Getting hardfault on STM32WB at initialization after power up randomly
By some reason I am not able to figure out I randomly get a hard-fault that causes to not initialize the BLE stack, I occasionally get to this hard-fault just by having the board that is using the STM32WB55 by doing powering up and powering down (cutting the power) directly on the board and eventually when I repeat this for a few 3 to 6 cycles it gets to this condition.
If add code to supervise this failure and trigger a software reboot it successfully initializes and starts working (no hard fault seen)
I am trying to understand what is the cause, I have suspect that something in the initialization or startup code needs to happen (or wait) to avoid this hardfault
I know that is a hardfault since I am reading the @SRAM2A_BASE and getting the following
keyword : 0x1170fd0f
pc : 0x7628
link_reg : 0x7265
sp : 0x20037c28
However that stack pointer address seems to be related to the SRAM that is used for CPU2 and not sure what is telling me, Any ideas what can I either do or enable to find out more information on what is causing this ?
The product has the Ble_Ota as bootloader and the application firmware is using FreeRTOS, its using a STM32WB55RGV6 and running with the Wireless Firmware version 1.17.3 with stm32wb5x_BLE_Stack_full_fw.bin.
