Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: powering down gracefully?

  1. #1

    powering down gracefully?

    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

  2. #2
    Senior Member
    Join Date
    May 2015
    Posts
    338
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •