RTC stops during standby mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-07 8:08 PM
Hi,
I'm using STM32L452, and i need to get the time and date from RTC. The RTC works fine, but when i enter in standby and check the time after wake up (via RTC), the RTC only incrment durring the waked time, and doesn't count the time durring standby. It seems that during standby mode, the RTC stops increment the time/date.
So my question is: can i use the RTC to wake up from standby and to keep track the time at the same time, or it isn't possible to do that?
Anyone have this same issue?
- Labels:
-
Power
-
RTC
-
STM32Cube MCU Packages
-
STM32L4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-07 8:23 PM
Are you using LSI or LSE ?
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
‎2019-06-11 2:35 AM
HI,
I'm using LSE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-11 3:53 AM
How exactly is VBAT powered during standby?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-11 6:27 AM
VBAT is powered by VDD_MCU +3V3. The problem seems to be the use of the RTC interrupt to wake up from Standby.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-11 8:11 AM
So there is no change in the supply during Standby?
What's in that interrupt, then, and what's after WFI?
What is the timing, how often is Standby entered and how long does it last?
Try reducing the program to absolute minimum functional piece to demonstrate the problem.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-13 1:27 PM
I've figured out the problem.
In the HAL_RTCEx_SetWakeUpTimer_IT() function, i've changed the WakeUpCounter from RTC_WAKEUPCLOCK_RTCCLK_DIV16 to RTC_WAKEUPCLOCK_CK_SPRE_16BITS and now it works fine, without any issues.
Thank's everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-13 1:32 PM
Oh, and could you please explain the cause and remedy in terms of the mcu registers, for the benefit of those who don't Cube?
Thanks,
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-17 4:49 PM
I followed your suggestion and it seemed to fix my problem, the RTC is now counting during standby. However, the issue now is every time cycle power, it seems to loose about 1 sec. I think it is because of the sub-seconds is lost. In my project, I do not have the RTC_RFIN so I don't know how to recover the sub-seconds. Do you have an suggestion?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-18 2:39 AM
> However, the issue now is every time cycle power, it seems to loose about 1 sec. I think it is because of the sub-seconds is lost.
https://community.st.com/s/question/0D50X00009XkgBW/stm32-rtc-loses-one-second-after-each-reset
JW
