Main Site Documentation

Does EMX can be shutdown by software?


#1

On our embedded module we notice a strange behaviour when people switch off the power supply. Application is a data logger that logs data on SD and backs up the current the current log file as soon as its max size is obtain. I do not know how and why but in some cases after several weeks or months of use, some of the SD card embedded with the product are corrupted. (I do not know if its during writing to the file or during copying but some of SD cards can not be formatted after file corruption).

To avoid such kind of situations we investigate a backup battery solution that would let the EMX to close and unmount the file system properly. However saving the battery life recquires to shutdown the board after closing and unmounting the board. The board consumes about 230mA at runtime and 100mA during Hibernation therefore hibernate is not the solution. Is there a method that we can call to shutdown entirely the EMX?


#2

Surfing on the forum, I afraid that there’s no SW solution…


#3

There may be no software solution to how you can shut down the board, but perhaps you can be smart about how your software handles the interruption?

When you detect a power-out (however you choose to do that), go into close-out mode and write a status file to the storage and then close and flush everything (perhaps force a reset?). If the power-out condition doesn’t result in program restarting, and the power out goes away when the plug pack gets plugged back in (detect the reverse of what you saw before, and your supercap for instance saved the outage) then you clear the flag and go back to logging as normal. If at power up the “dirty power off” status file exists, then make sure the power is stable and proceed when you are comfortable the power has returned.

You could also consider a HW solution - use a RESET chip to assist with this, and look at one that has an externally triggered input (perhaps the MAX16020 where you use Chip Enable to take the module down?)