2022-04-13 04:33 AM
STM32L5 series Nucleo _L552ZE-Q..
Using Example project "RTC_LowPower_STANDBY_WUT"
The basis of the demo is to count the number of 3 second wakeups from standby, and after 5 wakeups, check the time elapsed =15 secs.
As it is, “out of the box�? works fine.
For my project, I need to do something very similar – except I need much longer periods between wakeups >= 60 seconds.
The example project contains this line:
if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, wut_value, RTC_WAKEUPCLOCK_RTCCLK_DIV8, wut_value) != HAL_OK)
The Use of clock source RTC_WAKEUPCLOCK_RTCCLK_DIV8 limits the wakeup time to 32 seconds. (Ref Manual 41.3.10 ).
I need much longer times, so I use the ck_spre 1 second clock source instead.
So substituting the above expression above by
if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 2, RTC_WAKEUPCLOCK_CK_SPRE_16BITS, 1) != HAL_OK)
I expect a 3 second wake up so the project should still work exactly the same. – but it doesn’t – as soon as the code runs over the “HAL_PWR_EnterSTANDBYMode();�?
it immediately wakes up again !!
Anyone any idea how to get this working ?