STM32 nucleo board internal rtc problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-28 4:22 AM
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-30 5:37 AM
get the time, then get the date, too. does the behavior change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-28 4:38 AM
what happens when you get the time, then get the date?
RTC_TimeTypeDef RTC_Time;
RTC_DateTypeDef RTC_Date;
HAL_RTC_GetTime(&hrtc,&RTC_Time,RTC_FORMAT_BCD);
HAL_RTC_GetDate(&hrtc, &RTC_Date, RTC_FORMAT_BCD);�?�?�?�?�?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-29 12:13 AM
Please explain I didn't get what you mean to say.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-29 7:51 AM
Hi,
Some boards comes with no X2 crystal, did you check yours? if it don't have, you must to change the rtc reference to the LSI RC or solder one crystal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-30 12:24 AM
I have tried that option also.I have given clock to RTC by LSI even though the problem is same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-30 4:08 AM
From the documentation:
You must call HAL_RTC_GetDate() after HAL_RTC_GetTime() to unlock the values in the higher-order calendar shadow registers to ensure consistency between the time and date values.
Reading RTC current time locks the values in calendar shadow registers until Current date is read to ensure consistency between the time and date values.As
doe.john.016
‌ already suggested, any time you are reading the time you should also read the date.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-30 5:37 AM
get the time, then get the date, too. does the behavior change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-08-30 6:54 AM
Thanks It worked and solved my problem.
