Reboot failure after power cycling using A20 Olinuxino LIME

Started by haydn87, May 26, 2015, 04:23:46 PM

Previous topic - Next topic

haydn87

Hello,
I have a problem with Olinuxino LIME board with Debian image booted from NAND.

After power cycling the system sometimes fails to reboot. After some tests I discovered the reason.

The problem is that if the power tension falls between 3.3 and 3.7 V the system goes down but it remains in that state (no signal from ethernet or serial cable) even if the power returns to 5V. In order to make the system reset successfully one must make sure that power tension goes always below 3.3V, before returning to 5 V. Did someone else experience the same problem? Do you have any suggestions?

A way out could be the use of a LIPO battery, but unfortunatelly I can not use such a

solution in my project.

MBR

I would recommend a watchdog connected via GPIO. When "armed", it will require periodic pulses (shaped by  monostable multivibrator as stuck-in-high prevention) to keep in the inactive state and when activated, it will disconect the power for a while and then reconnect it (I would use a relay, a thyristor and a larger capacitor). It will not only prevent the stuck-in-reboot-state proplem, but also any other kinds of crashes and hang-ups.

haydn87

Thanks for the suggestion. I will look forward into it.

In the meanwhile we discovered that the system fails to reboot because the AXP209 chip apparently does not send a correct reset signal to the A20. When the power voltage falls between 3.3 V and 3.7 V the AXP209 sets the pin RESET_N to A20 at low voltage. In order to correctly reset the A20 this voltage level would need to be set back to high, when the power voltage rises again. However the AXP209 fails to do that, as you can see by the voltage levels in the image attached. Do you have any suggestion on how to correct this beahviour? Maybe it is possible to reprogram the AXP209 in some way.


soenke

From AXP209 Datasheet (http://linux-sunxi.org/AXP209):

Low-Power Warning and Low-Power Protection (Automatic Poweroff)
The value of VWARNING (low-power warning voltage) and VOFF(automatic shutdown voltage)
can be configured. If the system power is found to be lower than VWARNING, IRQ19/IRQ20 will be
released. If APS is lower than VOFF, AXP202 will automatically enter Shutdown Mode, and disable all
other outputs except LDO1.
There are two-levels in VWARNING, namely, LEVEL 1 and LEVEL 2, which can be defined differently in
applications. For example, use LEVEL1 to indicate insufficient power while LEVEL 2 can be used to
indicate the oncoming shutdown.
The default values of VWARNING and VOFF can be respectively set in registers REG3AH、 REG3BH and
REG31H[2:0].

Also:

9.1 Power On / Off & Reset
Button(PEK)
AXP209 PWRON Pin can be connected to GND through a button, as a Power Enable Key (PEK) or
hibernation/wake button. The AXP209 can automatically identify long and short button presses and
react accordingly.
Power on Sources:
1 . ACIN, VBUS, and battery
2. N_OE transition from high to low.
3. PEK press
Power On
System power-on is initiated whenever the following conditions occur:
1. When N_OE is low, and upon connection of a power supply that meets the requirements
(ACIN Or VBUS > 3.8V, and the battery voltage is higher than the shutdown voltage), AXP209
will automatically boot (Automatic booting on power supply connection can be configured by
the developer).
2. N_OE is low and the system is powered off, press PEK can power on AXP209. If required the
Host
3. When there is a valid external power source or battery present and N_OE changes from high to
low, AXP209 will be turned on.
After power on, DC-DC and LDO will be soft booted in a preset timing sequence, and then either the
Host or PWREN the pin can enable/disable power.

There are also some other things mentioned how to configure powerup/reset behaviour. You can configure the AXP209 via i2c.