cancel
Showing results for 
Search instead for 
Did you mean: 

The callback is not executed when HW_TS_Start is called

AkihiroN
Senior

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?

2 REPLIES 2
AkihiroN
Senior

This issue occurs with X-CUBE-MATTER v1.4.2.

It does not occur in the samples included in STM32CubeWB v1.23.0.

 

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?