2025-08-04 8:01 AM
Hi everyone,
I’m working on an application using an STM32WLE where the main loop is task-based, and Sub-GHz communication is handled through a message system. I’m currently trying to implement Stop Mode 2 to reduce power consumption.
Scenario:
Upon receiving a specific command, the device must enter Stop Mode 2.
Wake-up should occur only via an EXTI on a WakeUp Pin (GPIO).
At the same time, I have:
An active RTC Alarm used for Sub-GHz events and software timers.
SPI IRQ Handler (which shares the same IRQ with EXTI) for receiving SPI data.
Issue:
If I don’t disable the RTC Alarm before entering stop mode, the MCU wakes up immediately.
However, if I disable the RTC Alarm, the device stays in stop mode, but after wake-up:
The power consumption is higher than before entering Stop Mode.
The SPI communication stops working properly.
Questions:
Is it correct to disable the RTC Alarm before entering Stop Mode 2? Is there a better way to handle wake-up without RTC interfering?
After wake-up, which peripherals should I reinitialize to restore SPI communication and bring power consumption back to normal?
Do I need to perform a full re-initialization of the Sub-GHz/SPI stack after waking up from Stop Mode 2?
Thanks in advance for any advice!