RTC alarm - does this work if the MCU is already in shutdown ?
Does HAL_RTC_AlarmAEventCallback work if the the MCU is in shutdown ?
I am using
- RTC wake-up timer for wake/shutdown cycling
- RTC alarm for shutdown trigger via HAL_RTC_AlarmAEventCallback
But:
- RTC Alarm A interrupt never fires if the MCU is in Shutdown mode waiting for the RTC Wake-Up timer.
For test purposes I am using the following values:
- Wake cycle set to 10 seconds
- Shutdown cycle set to 5 seconds
- Alarm set to 28 seconds
From power up the MCU should run as follows...
1. Wake cycle for 10 seconds
2. Shutdown cycle for 5 seconds
3. Wake cycle for 10 seconds
4. Shutdown cycle for 5 seconds..... but after 3 seconds the alarm time is reached (28 seconds).
5. When the alarm occurs.... RTC wake is disabled and WKUP pin wake is enabled, then shutdown is called.
6. The MCU must not wake until the WKUP pin is detected
Refer to the timing diagram below...

I was hoping that if the alarm occurs during the 5 second shutdown cycle it would call the alarm interrupt in the next wake cycle. But it appears to be missed entirely ?
PS. I am using the Nucleo-L433RC-P board and the clock is set to LSE
