2025-08-01 4:28 AM
Does HAL_RTC_AlarmAEventCallback work if the the MCU is in shutdown ?
I am using
But:
For test purposes I am using the following values:
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
2025-08-05 5:58 AM
Hello @freeflyer,
What is the clock source for the RTC?
The RTC is only functional in Shutdown mode when it is clocked by the LSE,
If it’s running on the LSI, it won’t work when the system is in Shutdown mode.
You can check the details in this table from the reference manual:
Hope that helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.