nRF51 SDK - S120 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Error module

The error module provides the weak function app_error_handler for handling application errors. This function is used by most applications if it is not defined explicitly in the application code.

The behavior of the error handler differs depending on whether the DEBUG flag is set:

  • If the DEBUG flag is set:

    When app_error_handler is invoked, the function parameters (error code, line number, and file name) are copied to global memory, interrupts are disabled, and the application enters an infinite loop.

    If the BSP_DEFINES_ONLY flag is set, all LEDs available on the board are turned on.

    If the BSP_DEFINES_ONLY flag is not set, the BSP_INDICATE_FATAL_ERROR state is indicated.