I am trying to determine the wake up reason for an STM32L486 device.
If I have had the debugger connected then the wake-up reason registers report reasonable values after the device has been put into Shutdown Mode or Standby Mode. By reasonable I mean that I can detect the difference between a BOR, PIN reset, and WUF5 events using the RCC_CSR and PWR_SR1 registers. This works even if the debugger is subsequently disconnected from the processor.
But if the device is fully powered down, i.e. battery or power supply removed, and never connected to the debugger, then the RCC_CSR always reports BOR and PIN reset and the PWR_SR1 register does not indicate any WUF sources when the device is woken up from Standby or Shutdown modes.
Has anyone experienced this before? Is there a work around that I need to know about?