Hi,
I'm using the MCU STM32l476, and I have a problem with RTC.
The RTC works only if the board is turned on. When the board is turned off or it's sent a command to the MCU go to shutdown mode, the RTC is reset to zero values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-05 9:16 AM
According to the datasheet, there is shutdown mode with and without RTC, so I believe it's a problem of configuration. Can be some parameter of configuration that is missing? How to configure the shutdown mode with RTC?
Thanks!
- Labels:
-
RTC
-
STM32L4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-07 11:02 AM
In this case the RTC is reset to zero too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-07 11:08 AM
Are the functions HAL_RTC_SetDate() and HAL_RTC_SetTime() enough to configure the RTC for working in shutdown mode?
Looking into these functions, they do the same steps for initializing and configuring the RTC as doing it step by step, so I think it's missing some parameter of configuration or I have a hardware problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-08 12:25 AM
That means you do something wrong in software then.
I don't use Cube so can't help with that. Maybe I'd set a breakpoint immediately after the reset label, before any "initialization" code is called in the startup, and check in debugger if the RTC is still up and running. Then, step through any of the "clock initialization" or whatever Cube imposes on you to see if there is any backup domain reset or anything similar occuring there.
JW

- « Previous
-
- 1
- 2
- Next »