STM32 RTC miliseconds set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 10:40 AM
Hi,
I would like to set the milliseconds in the STM32 RTC, the function hal_rtc_settime doesn't change the milliseconds (subseconds) value.
I tried be setting hrtc->instance->rtc_ssr but it doesnt change its value
Help would be appritiated
Thank you
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 1:07 PM
You can't. The subsecond register is read-only.
You can use the 'shift' feature, though, to manipulate the subsecond register.
Read the RTC chapter in the reference manual (RM), focus on RTC synchronization chapter and description of the RTC_SHIFTR register.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 11:08 AM
Which STM32, there are a few, and the designs of the RTC are different on several families?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 1:07 PM
You can't. The subsecond register is read-only.
You can use the 'shift' feature, though, to manipulate the subsecond register.
Read the RTC chapter in the reference manual (RM), focus on RTC synchronization chapter and description of the RTC_SHIFTR register.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 1:21 PM
My bad, STM32L452
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-14 2:16 PM
It may help every once in a while to read the datasheet to see how the device you are trying to click-and-program works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-15 1:30 AM
Thank you, I didn't noticed that it was read only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-05-15 1:31 AM
I have read the datasheet, I have missed the 'r' letter in the register
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-05 3:12 AM
Hello,
I'm trying to set the milliseconds with STM32 H753-Eval board.
If I want to set the 400 millisenconds value(for example), should I set the 0x190(=400 decimal) into SUBFS field in RTC_SHIFTR and set the 0x3E7(= 999 decimal) into PREDIV_S field in RTC_PRER ?
Is my understanding correct ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-06-07 2:09 AM
