Set date and time RTC in main()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-13 6:49 PM
Hello,
I want to know if it is possible to set date and time of the RTC in the main() function.
I'm working with the LSI and I know that is very inaccurate. My idea is to -"re-initialize" (set manually the date and time) the RTC every 1 week for example.
I obtained those values, date and time, via serial from another device (with updated time).
I'm using the Nucleo Board STM32L476RG
Thank you very much!
Solved! Go to Solution.
- Labels:
-
RTC
-
STM32L4 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-13 7:14 PM
Yes, implement a menu to allow configuration, or parse a GPS stream, or query from a cellular network.
You can write code to do pretty much anything you want.
The HAL has specific functions to get/set the time/date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-13 7:14 PM
Yes, implement a menu to allow configuration, or parse a GPS stream, or query from a cellular network.
You can write code to do pretty much anything you want.
The HAL has specific functions to get/set the time/date.
