cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with STM32F407G-DISC1 Sleep Mode and RTC Wake-up After 3 Minutes

balaji_s
Associate II

Hello STM32 Community,

I am using the STM32F407G-DISC1 development board and have successfully implemented an RTC alarm that triggers every minute. The RTC is configured to use the LSI (Low-Speed Internal) clock signal.

My goal is to have the microcontroller enter sleep mode and wake up after 3 minutes using the RTC wake-up feature. However, when the MCU enters sleep mode, it wakes up prematurely, within only 2 seconds, instead of the expected 3-minute wake-up period.

I would appreciate any assistance or insights into resolving this issue. Has anyone encountered a similar problem when using the LSI clock for RTC wake-up, or can you suggest any potential causes for this behavior?

Thank you in advance for your help!ioc configurationioc configurationRTC init_1RTC init_1RTC init_2RTC init_2Stop functionStop functionwake up functionwake up function

1 REPLY 1
TDK
Guru

Procedure for waking up in the future:

  • Get the current time.
  • Change the time to 3 minutes in the future and set the alarm to wake up then.
  • Since you want to wake up when minutes and seconds match, mask everything except minutes and seconds. Your current mask ignores minutes.

Your current code wakes up when seconds = 1 and ignores minutes.

If you feel a post has answered your question, please click "Accept as Solution".