I am working on an STM32 project where I need to manage two RTC alarms: Alarm A for periodic wake-ups and Alarm B for switching modes after a specific timeout. The system enters standby mode and wakes up multiple times before Alarm B's timeout. I am encountering an issue where Alarm B does not trigger as expected after the timeout.
Both alarms work individually, but Alarm B fails to trigger when both alarms are used together, especially after waking-up from standby mode.
Question:
I understand that when waking up from standby mode, the MCU typically performs a restart. Could this be causing Alarm B not to trigger after the wake-up?
Is there a way to make this approach work reliably, where Alarm B triggers even after multiple wake-ups from standby mode?