cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB05 Deep Sleep RTC weakup

Frantz
Visitor

Hi,

 

I am new to developing on ST32WB0x and would like to put the MCU into deep sleep and wake it up after 2 minutes for a fairly standard application.
According to the documentation, it is possible to use the RTC timer.
I have tried and tested several configurations of the RTC and NVIC registers, etc., but have never managed to wake up the MCU.
I am obviously missing something, and cannot see what configuration is missing.
Could you give me a clue or the keys to how the stm32WB05 wake-up works with the RTC timer?
THANK YOU
Here is an extract from the log to illustrate my attempts:

=== TESTING RTC OUTPUT BEFORE DEEPSTOP ===
Configuring 3-second test timer to verify PA9 output...
RTC time BEFORE test: 00:00:00
Re-forcing RTC_OUTPUT_WAKEUP after timer config...
RTC_CR after re-force: 0x00E04404
3-second test timer started - PA9 should pulse in 3 seconds
Scanning all GPIO pins for RTC signal...
GPIOA: 0x000F, GPIOB: 0xC027
RTC_IRQHandler called!
RTC WAKEUP CALLBACK! #2 - DEEPSTOP should exit now!
RTC_IRQHandler finished!
PA9 stayed LOW for 4 seconds - RTC_OUT not working 
Final GPIO state - GPIOA: 0x080F, GPIOB: 0xC027
RTC time AFTER test: 00:00:04
RTC elapsed time: 4 seconds (expected: ~7 seconds)
Test completed, reconfiguring 20-second timer...
Re-forcing RTC_OUTPUT_WAKEUP for 20s timer...
Final RTC_CR: 0x00E04404
PWR_CR3: 0x00008320

Entering DEEPSTOP mode for 20 seconds...
Press PA8 button or wait for RTC->PA9 pulse to wake up
Console will freeze now...
FORCING PRE-DEEPSTOP PWR CONFIG...
EIWL forced to 1
EWU9 and EWU8 forced to 1
GPIORET forced to 1
WUP9 cleared to 0
WUF9 cleared via HAL
RTC IP cleared
PWR registers after forcing:
PWR_CR1: 0x00000114
PWR_CR2: 0x00000120
PWR_CR3: 0x00008320
PWR_CR4: 0x00000020
PWR_SR1: 0x00000000
PWR_EXTSRR: 0x00000000
RTC clock force-enabled before DEEPSTOP

0 REPLIES 0