Skip to main content
CCtl.1
Visitor II
Jan 3, 2023 12:34 PM UTC
Question

Calling HAL_RTC_SetTime and HAL_RTC_SetDate during runtime causes RTC failure. Our application needs timestamp included in every packet, so during runtime we are updating the RTC datetime. But calling the above function is causing RTC interrupt failu

..

This topic has been closed for replies.

4 replies

ST Technical Moderator
Sep 5, 2023 5:17 PM UTC

Hello @CCtl.1 ,

Make sure to configure properly the RTC clock source and prescaler settings. Check also the interrupt priorities.

If possible, share your code and provide more details about your hardware/software used and your configuration. This will help community users to answer you.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Tesla DeLorean
Guru
Sep 5, 2023 5:20 PM UTC

>>Our application needs timestamp included in every packet, so during runtime we are updating the RTC datetime.

If the RTC is WORKING, WHY do you need to keep updating it, surely it just ticks if operating normally, off the LSE crystal..

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
Sep 6, 2023 3:57 PM UTC

What is "RTC interrupt failure"?

JW

Piranha
Principal III
Sep 6, 2023 4:14 PM UTC

ST removed my comment, where I said that those, who write the whole topic in the title, most likely are the same, who cannot understand the concept of Set/Get and Input/Output. :beaming_face_with_smiling_eyes: Even without any "harsh" words! What a pathetic and childish behavior...