This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

enabaling uart on nrf52840 causes soft device failure

We are using an NRF52840. After initializing a UART that uses P0.06-TX and P0.07-RX the following function calls fail: sd_ble_gap_device_name_set() and nrf_sdh_enable_rquest(). The debugger is unable to trace the calls. The calls are not returning and end up in memory locations that SES cannot resolve.

The UART device functions properly before these calls.

The parameters to these function calls are okay. Again, the failure only occurs after initializing the above UART device prior to these calls.

Any suggestions on tracking this down?

  • The root problem is the inability to write data out the UART from within a GCC Function Instrumentation call. It causes the program to consistently crash in sd_ble_gap_device_name_set(). If I bypass that particular call the program will eventually crash somewhere else. This leads me to suspect SVCALL related functions.

    I've tried adding an 'interrupt' attribute to various functions in the the function but tit still crashes.

    For now I have to look at alternatives.

Related