#120988·zephyr

driver: flash: flash_stm32wba_fm.c - hard fault

Author: whati001Created Oct 1, 2026Updated Oct 1, 2026

Describe the bug

Description: The current st flash driver flash_stm32wba_fm.c faces a critical bug, which let's the entire board hang on boot.

Bug: The initialization function stm32_flash_init tries to bring up an work queue in the PRE_KERNEL_1, which does not have any kernel functions available as stated here. So the system goes into halt state.

The bug got introduced with commit: https://github.com/zephyrproject-rtos/zephyr/commit/f611fde6d31c3e5e21e7266e4d04087603532b4c

Fix: To fix the problem, we could revert the commit above, however, this may break the OTP feature it aimed to fix.

Regression

  • This is a regression.

Steps to reproduce

To reproduce the bug, please flash the peripheral sample on the nucleo_wba65ri board (for example). It must be a STM32WBAX board and BLE enabled CONFIG_BT_STM32WBA.

west build -b nucleo_wba65ri samples/bluetooth/peripheral
west flash
Image

No output appears in the serial, but we can see via gdb, that this instruction is the last one before system hang:

Image

@mt-gjoerges can you may help here?

Relevant log output

bash

Impact

Showstopper – Prevents release or major functionality; system unusable.

Environment

No response

Additional Context

No response

Source: zephyrproject-rtos/zephyr