Skip to main content
MSaci.1
Associate
June 23, 2026
Question

STM32_timer.c HardFault in UTIL_TIMER_IRQ_Handler — NULL Callback pointer — STM32WBA55 / CubeMX 6.17.0 / FW_WBA V1.9.0

  • June 23, 2026
  • 1 reply
  • 64 views

Hello ST Community,

I would like to report a bug in the code generated by STM32CubeMX 6.17.0 for the STM32WBA55 with firmware package STM32Cube FW_WBA V1.9.0.

 

Environment

- MCU: STM32WBA55CGU6
- CubeMX: 6.17.0
- Firmware package: STM32Cube FW_WBA V1.9.0
- Toolchain: Keil MDK-ARM V5.37
- Middleware: STM32_WPAN (BLE Basic stack)

 

Problem description

The application crashes with a HardFault after approximately 2 minutes of operation. The fault is caused by a NULL function pointer call in the generated file `Utilities/tim_serv/STM32_timer.c`, inside `UTIL_TIMER_IRQ_Handler`.

 

Suggested fix

Add a NULL guard before the callback invocation in `UTIL_TIMER_IRQ_Handler`:


if( currentExecutionHead->Callback != NULL ) {
    currentExecutionHead->Callback(currentExecutionHead->argument);
}

 

Note

This issue appeared after migrating from FW_WBA V1.6.1 to FW_WBA V1.9.0. The same project worked correctly with the previous version.

1 reply

ST Technical Moderator
July 27, 2026

Hi,
Thank you for your feedback – we will take this into account for future releases.

In addition to your workaround, we recommend adding an else clause to track and log cases that should not occur.

On this note, on your case were you able to identify the root cause during your investigation? Did you observe any specific pattern indicating how the timer's callback field became NULL – for example:
Timer object not properly initialized before being started?
Misuse of timer reuse or lifecycle management?
Any memory corruption or out-of-bounds writes affecting the timer structure?

Br, Joé