Question
What is the correct procedure to recover an STM32L4x that has been put in Shutdown and experiences a brown out or POR. it shows the correct flags after reset, but the same flags appear after subsequent Shutdown periods.
This is the sequence of events:
- Enter Shutdown with RTC Wake up timer enabled (5 seconds)
- Brown out, remove and restore power
- POR Reset occurs, correct PWR->CSR = 0x0C000600
- Clear CSR flags by writing 1 to RMVF in CSR
- Read CSR flags and confirm they are clear
- Enter Shutdown with RTC Wake up timer enabled (5 seconds)
- Reset occurs from Wake up timer, incorrect PWR->CSR = 0x0C000600