cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Stop Mode 2 on STM32WLE using EXTI + RTC Alarm + SPI

Eldryad
Associate

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:

  1. 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?

  2. After wake-up, which peripherals should I reinitialize to restore SPI communication and bring power consumption back to normal?

  3. 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!

1 REPLY 1
Sarra.S
ST Employee

Hello @Eldryad

1. As you can see from this table, the RTC wakeup capability is optional in stop2 mode, which clock source are you using for it? 

SarraS_0-1754400948651.png

2. If you check Table 37 of the RM0461, you can see that the SPI is not functional in the Stop2 mode, so after wakeup, you'll need to reinitialize it 

3. Same for Sub-GHz/SPI stack, it's not available in Stop2, it can be retained in Stop0/1 only. 

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.