cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with RTC Alarm, LSE, or power up?

JR2963
Senior II

Hi,
I'm having a problem with the LSE/RTC and I'm not exactly sure where to start, but I'll try to explain it.

I'm using the STM32WB55 and the RTC is used for FreeRTOS tick timing. It works perfectly during normal operation with a 1 ms tick, and it also works when entering STOP2 mode and waking up after a longer time, for example 2 seconds. The RTC is clocked by LSE.

However, the problem occurs if the ST-Link is connected to the SWD header. In that case, the RTC no longer wakes up the MCU from STOP2 mode — the MCU just stays stuck in sleep mode, like the RTC didn’t generate the interrupt or didn’t wake it up.

It also seems to be related to power cycling. If I disconnect the power supply from the MCU and wait long enough (more than 5 seconds, to fully discharge the board), then reconnect power, this issue always happens. But if I just reset the MCU without cutting the power, everything works fine again.

I also found that the problem does not occur when using LSI instead of LSE.

2 REPLIES 2
FilipKremen
ST Employee

Hello,

does it also happen with Nucleo board?

Please read the document below as it might be helpful.

STM32WB55xx/STM32WB35Cx device errata - Errata sheet

Best regards,

Filip Kremen

Hi,
I could not try. I would have to modify source a lot. 
I read Errata, but nothing about RTC helped.

It is a mystery to me that this only happens with LSE and when the SWD connector is connected - without it, it also happens but much less often.