2025-09-10 3:07 AM
Using STM32CubeWB v1.23.0, I am running the hardware timer in the following order:
HW_TS_Init
HW_TS_Create
HW_TS_Start
However, despite this, the callback registered at the time of Create is not executed after the set time.
What could be the problem?
2025-09-11 6:07 PM
This issue occurs with X-CUBE-MATTER v1.4.2.
It does not occur in the samples included in STM32CubeWB v1.23.0.
2025-09-11 10:54 PM
When an RTC interrupt occurs, HAL_RTCEx_WakeUpTimerIRQHandler is called.
HAL_RTCEx_WakeUpTimerEventCallback(hrtc) is then executed, but since it is declared as weak,
void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc) { /* Prevent unused argument(s) compilation warning */ // UNUSED(hrtc); HW_TS_RTC_Wakeup_Handler(); /* NOTE: This function should not be modified, when the callback is needed, the HAL_RTCEx_WakeUpTimerEventCallback could be implemented in the user file */ }
is implemented like this, and by calling HW_TS_RTC_Wakeup_Handler() inside HAL_RTCEx_WakeUpTimerEventCallback, the callback registered with HW_TS_Create can be invoked.
Is this implementation correct?