2026-03-20 8:24 AM - last edited on 2026-03-23 3:41 AM by Imen.D
Hello,
I am trying to setup the BLE stack on my custom board without LSE using a STM32WB55CEU6. I have multiple boards on hand, on the first one, appe_Tl_init(); worked fine and I got to the BLE stack initialization code. However BLE never worked due to using a 16Mhz crystal. Before I had the chance to change out the crystal, the MCU bricked due to unrelated flash mistake.
Now on the second board, I switched out the crystal to a proper 32Mhz one, unfortunately, despite flashing the wireless stack the same way, the wireless stack seems to instantly hard fault. Everything else, including USB (which relies on tight clock) work on the new 32Mhz crystal, I even soldered back the 16Mhz crystal temporarily, and it did not fix the hard fault. I flashed the most recent FUS and wireless stack, v2.2.0.0 and v1.24.0.3 respectively. I tried with ble_light, ble_full and ble_full_extended, all hard fault CPU2.
So, within MX_APPE_Init(), during the call TL_Enable(), CPU2 hard faults. The contents of SRAM2a are: 0x20030000 1170fd0f 00002f3c 00001f99 20037c00. These values are with the full ble stack flashed on the MCU.
This hardfault ONLY happens when Wireless Stack is running. In FUS mode, The initialization finishes without hard fault and APPE_SysUserEvtRx triggers with the expected SHCI_SUB_EVT_CODE_READY.
To make sure I didn't mess up any files or something, I also generated the same project with CubeMX in a new directory, and copied over STM32_WPAN to make sure it's not some usercode causing the issue. I also deleted the wireless firmware and reinstalled it just to make sure and it did not change the behaivor. Okay, I just tried with a third board without changing any component and I kept the original 16Mhz clock which worked on the first board for initialization but now it doesn't, so this Hard Fault seems to be entirely reproducable consistently with the code I currently have.
2026-03-20 9:35 AM
Okay, for some reason regenerating the entire project fixed this, I have no clue why. I would still like to know if anyone knows what the specific hardfault in CPU2 means.
2026-03-23 8:20 AM
You issue can be related to several factors, such as: the memory allocation for SRAM2a, or BLE stack flashing sequence.
You can find more information in AN5289: How to build wireless applications with STM32WB MCUs
Check also if you have the same condition mentioned in the errata sheet.