cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB Nucleo Board- BLE implementation P2P server- Getting SIGTRAP:Trace/breakpoint trap) HardFault_Handler() - during button press notification

RPrab.1
Associate

Namaste from India.

I am working on STM32WB Nucleo board for BLE functionality as per the tutorial available: https://www.youtube.com/watch?v=zNfIGh30kSs

I have copied the codes from workshop snippets provided by ST. When I press the LED on the ST BLE sensor App, the LED of the Nucleo board toggles its state. When I press the button switch 1, the notification is not received in the BLE app. The LED stops blinking and debugger shows this message: SIGTRAP:Trace/breakpoint trap) HardFault_Handler() 

When I use the p2pServer project provided by the ST, it works flawlessly. If I build the project from scratch by following the tutorial, I am facing this issue.

Cube IDE Version: 1.6.1

CubeMX version: 6.1.1

STM32Cube_FW_WB_V1.10.0

Anyone here should help me.

Regards

Raghavendra

1 REPLY 1
RPrab.1
Associate

Hi,

I found the issue with the RegTask. Shifting was misisng in the code snippet provided by ST.

In p2p_serve_app.c in line 43:

UTIL_SEQ_RegTask( CFG_TASK_SW1_BUTTON_PUSHED_ID,0,P2PS_Send_Notification );

this must be

UTIL_SEQ_RegTask( 1<<CFG_TASK_SW1_BUTTON_PUSHED_ID,0,P2PS_Send_Notification );

This might help someone like me who took one week to fix it.

Thanks