In this blog, I would like to share how to add the hardfault handler on the Nordic NRF5 SDK.
You can add the hardfault handler to trigger the problem when it occurs.
Because the priority of hardfault is higher than that of softdevice API.
Add the hardfault files inside the project
Enable the hardfault in the sdk_config.h
Compile the debug mode project with additional switch
Add the example to generate the error 0x80000 is illegal address
Open the breakpoint windows and enable the hardfault
When the problem occurs, it stops at the hardfault