Skip to main content
PG26
Associate II
January 11, 2023
Solved

RTC Accuracy issue

Hello,

we are working on new release of STM32WL "STM32Cube_FW_WL_V1.3.0". release which has introduced changes in RTC driver which we believe is fixed for the issue (RTC loosing time issue STMicroelectronics/STM32CubeH7#24 )

But, after running RTC overnight we have seen RTC issue is still persist in different manner this time RTC is increasing time

Test Start time : 17:55:56, UTC time 1670415956

Test End Time: 9:48:00, UTC time 1670473080, (57124 Seconds)

Difference of UTC time should be : 57124 (1670473080 - 1670415956)

But, From attached logs we can see Test End time is 9:48:00 and total seconds are 57135s837 (check last line in logs).

RTC had generated 57135s837 seconds instead of 57124 Seconds.

So, 57135 - 57124 = 11 Seconds are increased in actual time

RTCTestLogs.txt

RTC Driver.zip

Driver files are also attached for more details.

Can someone please explain how to fix this?

This topic has been closed for replies.
AScha.3
AScha.3Best answer
Super User
January 13, 2023

no, this crystal is running 193ppm too fast !

means: missing or wrong (too small) load capacitors.

check data sheet of the crystal and adjust caps to this.

read:

https://www.st.com/resource/en/application_note/cd00221665-oscillator-design-guide-for-stm8afals-stm32-mcus-and-mpus-stmicroelectronics.pdf

If you feel a post has answered your question, please click on " Best Answer ".

4 replies

waclawek.jan
Super User
January 11, 2023

LSE oscillator may be designed improperly and run at higher than expected frequency, or it may be influenced by high-current adjacent signals.

Read AN2867.

JW

Piranha
Principal III
January 12, 2023

So it's slower by 193 ppm. That can easily be because of too much load capacitance for a crystal.

AScha.3
AScha.3Best answer
Super User
January 13, 2023

no, this crystal is running 193ppm too fast !

means: missing or wrong (too small) load capacitors.

check data sheet of the crystal and adjust caps to this.

read:

https://www.st.com/resource/en/application_note/cd00221665-oscillator-design-guide-for-stm8afals-stm32-mcus-and-mpus-stmicroelectronics.pdf

If you feel a post has answered your question, please click on " Best Answer ".
PG26
PG26Author
Associate II
April 4, 2023

we have made changes in capacitance and now with release v1.3.0 module is providing correct time.

we have tested continuously 4 days and haven't seen any missing seconds on logs. thank you guys for the suggestion and quick support