cancel
Showing results for 
Search instead for 
Did you mean: 

Is the RTC wakeup interrupt synchronized with the calendar?

Diez.R.
Associate II
Posted on November 17, 2015 at 11:49

Hi all:

I am writing firmware for the STM32F4xx and STM32F0xx families, and I am struggling with the RTC. In addition to internal usage, I want to display the RTC time on a kind of wall-clock. The RTC runs on a 32768 Hz crystal and I intend to synchronize it to an NTP server or GPS receiver later on.

With RTC_SetWakeUpCounter( 16384 - 1 ) and so on I am getting an interrupt per second, so that I can update the displayed clock. However, according to the documentation for RTC_WUTR, the wakeup counter seems to be independent from the RTC calendar's subseconds counter.

I am worried that the wakeup interrupt may not be synchronized with the calendar updates, which means that the display clock may visibly skip one second every now and then. There does not seem to be a way to trigger an interrupt every time the calendar increments one second.

Can anybody shed some light on this? Or do I have to wakeup several times a second so that the display does not miss any second updates?

Thanks in advance,

  R. Diez

#rtc
1 REPLY 1
ftiti
Associate II
Posted on November 18, 2015 at 18:48

I think you ought use the time stamp instead to manage corrctly the case.