Skip to main content
Senior
September 10, 2025
Question

The callback is not executed when HW_TS_Start is called

  • September 10, 2025
  • 2 replies
  • 338 views

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?

This topic has been closed for replies.

2 replies

AkihiroNAuthor
Senior
September 12, 2025

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

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

AkihiroNAuthor
Senior
September 12, 2025

 

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?