Error handling

All SoftDevice API functions return a 32-bit error code. The application must check this error code to confirm whether a SoftDevice API function call was successful.

Unrecoverable failures (faults) detected by the SoftDevice will be reported to the application by a registered, fault handling callback function. A pointer to the fault handler must be provided by the application upon SoftDevice initialization. The fault handler is then used to notify of unrecoverable errors and the type of error is indicated as a parameter to the fault handler.

The following types of faults can be reported to the application through the fault handler:
  • SoftDevice assertions.
  • Attempts by the application to perform unallowed memory accesses, either against SoftDevice memory protection rules or to protected peripheral configuration registers at runtime.

The fault handler callback is invoked by the SoftDevice in HardFault context, with all interrupts disabled.


Documentation feedback | Developer Zone | Subscribe | Updated 2017-03-10