powering down gracefully?

Status
Not open for further replies.

JKIM

Active member
Is there a standard way to handle power down on the Teensy/ARM?

What I mean by that is the user will usually cut power immediately with a switch, if you don't have some type of "soft power button".

When this happens, in my case, I get some small amount of garbage/incomplete data sent on the serial output as the MCU loses power.

Maybe something like using brownout detection, so you can catch the power dropping when powering off and perform a few functions right before the MCU stops completely?

Any tips appreciated.

Thanks
JKIM
 
I asked a similar question yesterday and the suggestions included monitoring the V in and when I drops to around 4 volts handle the issues in your code. Others were more specific for me to monitoring the battery voltage. I'm not sure what you would do to make sure garbage wasn't transmitted. Also I'm sure it would be different if it was USB or UART serial. You might want to provide that so you can get a better answer.
 
Status
Not open for further replies.
Back
Top