2025-08-11 4:39 PM
After updating to STM32CubeMX 6.15.0 with STM32CubeWBA FW V1.7.0 for the STM32WBA63CIUx, I noticed a change in how the HAL tick is driven.
In MX_APPE_Init() (generated in app_entry.c), CubeMX now creates a UTIL timer to increment the HAL tick:
/* Create an RTC based timer to trigger HAL tick increment */
UTIL_TIMER_Create(&TimerHALtick_Id,
HAL_TICK_FREQ_100HZ,
UTIL_TIMER_PERIODIC,
&TimerHALtickCB, 0);
uwTickFreq = HAL_TICK_FREQ_100HZ;
/* Start HAL tick timer */
UTIL_TIMER_StartWithPeriod(&TimerHALtick_Id, HAL_TICK_FREQ_100HZ);
This runs at 100 Hz by default and causes my system to wake every 10 ms.
Previously, I used TIM17 for the HAL tick, with FreeRTOS (tickless idle) and STM32_WPAN BLE, and it worked well. Now, I see both TIM17 and this new UTIL timer, which leads to unnecessary wakeups.
My questions:
Is there official documentation on this new HAL tick implementation using UTIL_TIMER?
How can it be configured or disabled via STM32CubeMX instead of modifying the generated code?
If I want a 1 ms HAL tick, should I reconfigure the UTIL timer to 1000 Hz, or simply disable it and keep using TIM17?
What is the intended use case for this change in FW V1.7.0?
I could not find any CubeMX option to select between TIM17 and this UTIL timer. Any guidance or reference to documentation would be appreciated.