Skip to main content
LConn.2
Associate
March 20, 2023
Question

STM32WB15cc - Wake up periodically with RTC and check for event (battery charged), disable rtc if event has happened

  • March 20, 2023
  • 3 replies
  • 2015 views

I am trying to use as little power as possible, I want my board to wake up every 30 seconds or so, check if battery has been sufficiently charged, if not, go back to sleep, if it has then turn off rtc and do a function. Is it possible to disable rtc whilst running?

This topic has been closed for replies.

3 replies

Joe WILLIAMS
ST Employee
March 22, 2023

Dear Liam

Our team is checking into this inquiry and we will be in touch with you shortly.

Kind Regards

Joe WILLIAMS

STMicro Support

Piranha
Principal III
March 22, 2023

> Is it possible to disable rtc whilst running?

What makes you think the RTCEN bit in RCC_BDCR register cannot be cleared?

Remy ISSALYS
Technical Moderator
March 31, 2023

Hello,

You can disable the RTC by setting the RTCSEL in RCC_BDCR register at no clock.

Best Regards

Piranha
Principal III
April 1, 2023

Bits 9:8 RTCSEL[1:0]: RTC clock source selection

Set by software to select the clock source for the RTC. Once the RTC clock source has been selected, it cannot be changed anymore unless the Backup domain is reset, or unless a failure is detected on LSE (LSECSSD is set). The BDRST bit can be used to reset them.