cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Custom board hangsup, Configured as Slave device. gets stuck sometimes when starts advatising

AM.12
Associate III

My configuration is when button is pressed start advertising and stop advertising after 100ms. When the button is pressed a few times device gets hung and continuously advertises.

When I tried debugging following is the traces 0693W00000aIigVQAS.png0693W00000aIiguQAC.png0693W00000aIigzQAC.png0693W00000aIih4QAC.png 

I didn't understand this problem, can someone please explain this? and how to solve this.

Thank you.

3 REPLIES 3
Remy ISSALYS
ST Employee

Hello,

According to your screenshot, the CPU2 is in hard fault as you can see at @0x20030000 (SRAM2A_BASE) you have the hard fault keyword. In most of case, the CPU2 hard fault occurs when the CPU1 corrupts the flash memory and then when the CPU2 try to access to the flash, it generates the hard fault.

Can you confirm that you are using the BLE Full stack v1.16.0.4 as you said in this post?

When the hard fault occurred, can you check flash register value (FLASH_C2SR (CPU2) and FLASH_SR (CPU1) register)?

Best Regards

AM.12
Associate III

Hello @Remy ISSALYS​ ,

Thank you,

The project generated on v1.15.0 merged to 1.16.0, still, I am facing the same issue. I should try a simple project generated on v1.16.0.

-->can you check flash register value (FLASH_C2SR (CPU2) and FLASH_SR (CPU1) register)?

When I flash in debug mode I don't see any problem so it's hard to track.

  1. When I flash normally without debugging, the problem starts.
Remy ISSALYS
ST Employee

Hello,

To find out what's going on when the issue occurs, you can attach the debugger to the running target. To do this:

  • To debug your program without downloading it:

 Go to Debug Configurations... -> Startup -> select load image -> Edit... -> uncheck Download

  • To debug without resetting the device:

  Go to Debug Configurations... -> Debugger -> in Reset Behavior, select "None"

Best Regards