2020-11-05 01:07 AM
I want to enable RTC WKUP interrupt, so that I can use it later to wake the device up from sleep modes.
Nevertheless, CubeMX will also add HAL_RTCEx_SetWakeUpTimer_IT in init. I don't want to launch the timer in init! I only want to set it up for later use (setup interrupt handlers, NVIC enable).
2020-11-05 02:35 AM
Hi @Tuoman
> Is this call 100% necessary? Why CubeMX generates it in init?
Yes STM32CubeMX calls this function when we activate the WakeUp, then go to the NVIC Settings table and Enable the RTC wake-up interrupt Through EXTI line 19.
When we generate code: we get this function
HAL_RTCEx_SetWakeUpTimer_IT
When we uncheck the RTC wake-up interrupt Through EXTI line 19
Then we go to the generated code: we get this function HAL_RTCEx_SetWakeUpTimer
> What does it mean if WakeUpCounter parameter to this call is 0?
0 is the default value, you can change it :
Best regards,
Nesrine
2020-11-05 03:42 AM
Hello, Nesrine. Unfortunately this did not answer my question at all. You answered how to setup WakeUp in CubeMX (I already know) and that I can change value from 0 (I already know)
My questions still remain;