RTC isn't updating time in free running mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-10 9:21 PM - last edited on ‎2024-03-11 12:43 AM by Sarra.S
Hi All,
I am facing problem with RTC in STM32.i have written function in my code where i am updating display function for time every 1 min. But whenever i am trying to see the updated time in free running mode i am unable to see that. But it works fine in debugging mode or at power on or when i program microcontroller.
Please suggest what can be done to resolve this issue? Thanking you in advance.
Solved! Go to Solution.
- Labels:
-
RTC
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-18 2:26 AM - edited ‎2024-03-18 2:30 AM
Hi,
from HAL lib:
> @note You must call HAL_RTC_GetDate() after HAL_RTC_GetTime() to unlock the values
-- but call date first.... :)
+
on which cpu ? (Maybe problem with cache...?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-11 12:51 AM
Hello @Rushali,
This seems to be related to the shadow registers update, to be sure, you can enable the bypass shadow (RTC_CR_BYPADHAD) in your main function, to see if the issue is fixed.
Also, please specify the stm32 product you are using!
Thank you!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-12 3:20 AM
Dear @Sarra.S
I have checked with
HAL_RTCEx_EnableBypassShadow(&hrtc1); by using this command still not able to see the updated time on screen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-15 1:42 AM
Dear All,
Can anybody help me with above problem????????.............
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-15 1:57 AM
Hello @Rushali, sorry for the delayed answer
>>But whenever i am trying to see the updated time in free running mode i am unable to see that.
Can please elaborate more on your problem so we can help you!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-18 1:39 AM
I have attached file along with this post for you to get a better idea about the code .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-18 1:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-18 2:26 AM - edited ‎2024-03-18 2:30 AM
Hi,
from HAL lib:
> @note You must call HAL_RTC_GetDate() after HAL_RTC_GetTime() to unlock the values
-- but call date first.... :)
+
on which cpu ? (Maybe problem with cache...?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-18 3:00 AM
hey hii @AScha.3
It works fine after calling rtc_get_time first and rtc_get_date later. Thank you.
