cancel
Showing results for 
Search instead for 
Did you mean: 

RTC Accuracy issue

PG26
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief II

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 "Accept as Solution".

View solution in original post

4 REPLIES 4

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
Chief II

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

AScha.3
Chief II

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 "Accept as Solution".
PG26
Associate II

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