AnsweredAssumed Answered

Issue with RTC maximum time resolution

Question asked by Guillaume FERLIN on Sep 19, 2017
Latest reply on Oct 10, 2017 by Nesrine M

Hi,

 

I'm using Nucleo STM32L476RG board and I have issue using specific configuration of RTC peripheral.

Our embedded software requires precise timing for real time application.

RTC is clocked by 32.768 kHz LSE and is configured with PREDIV_A: 0 and PREDIV_S: 32767 to get time resolution of 1/32768 s.

Then subseconds register will down count from PREDIV_S to 0 and Alarm A interrupt is used to get precise timer from milliseconds to minutes.

This configuration is valid according STM32L4 reference manual.

However we observed strange behavior:

- Timestamp retrieved from RTC are sometimes inconsistent: seconds register did not increment while subseconds register reached 0 and rolled over.

- RTC_OUT configured to output 1 Hz is 128 Hz. 1Hz output is observed only when PREDIV_A and PREDIV_S are set to default values (127 and 255).

 

I used Cube MX and last HAL drivers.

Did anyone already use this configuration and observe consistent results?

 

Thanks,

Outcomes