This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2676: Initial power detection

Part Number: MSP430FR2676

MSP430 in a battery powered application. Using always-on technique with MPU in LPM4.5 when "powered-down". Looking for a way to detect if the battery has been removed and reinstalled. Tried testing PMMLPM5IFG and/or PMMBORIFG, but can't tell the difference between battery connect and BOR exit from LPM4.5. Is there a way to do this?  

  • Hello David,

    When in LPM4.5 mode, the device is completely shutdown, and the only thing you can do is wakeup via GPIO or RST. There would be no way to detect if battery was replaced, unless you had a some sort of GPIO toggle from the battery switching to wakeup the device and record the event. This is of course assuming you have some sort of power reserve (supercap for example) o operate device when battery is replaced (or if alternate power source is available while batter is being replaced).

  • One more thing I did think of, is if you use the Compute Through Power Loss Library and a variable stored in FRAM, you can count how many times you have been woken up by power being restored. Big assumption  (from application standpoint) would be that the wake up happened due to power being restored and not a reset, but if you were to perform the same actions regardless, it might work for you. 

  • You may have hinted at a way to do this. Regular powerup is via a GPIO interrupt, so the ISR can set a flag for the boot process. No flag would be set on a battery connect.

**Attention** This is a public forum