2020-09-02 12:54 AM
Hello,
I am using STM32L073V8T MCU, STM32CubeIDE.
My application needs low power consumotion. When some events occurs, MCU move to standby. Than it waits new event for waking up. In other words, my application periodically check new event. After going standby, MCU wakes up with about 23 seconds period and check new events. If there isnt event, MCU contuniue stay standby mode.
There is not any problem about going to standby or waking from standby. But, periodically sleeping and waking is causing losing time accuracy.
In my test condition, I setted device time according my PC. Than, I let device in standby mode during 1 day period. And, there was a 10 minutes difference from my PC time. In addition, in same conditions without standby there is about 2 second accuracy lose. (2 sec is not problem for my case)
void wakeupWithRTC(void)
{
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x63BA50, RTC_WAKEUPCLOCK_RTCCLK_DIV16);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
}
void pwr_lowPowermode(void)
{
dbg_printf("standby\n\r");
wakeupWithRTC();
GPIO_low_power();
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); */
HAL_PWR_EnterSTANDBYMode();
}
2020-09-03 10:13 AM
Read out and check content of the RTC registers just before you go to sleep.
You may want to compare them to the "working" case.
JW
2020-12-22 12:37 PM
Was there any solution to this problem?
JW