| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Functions
Error Log Module
BLE libraries

Module for writing error and stack to flash memory. More...

## Data Structures
struct | ble_error_log_data_t
| Error Log Data structure. More...

## Macros
#define | ERROR_MESSAGE_LENGTH 128
#define | STACK_DUMP_LENGTH 256
#define | FLASH_PAGE_ERROR_LOG (BLE_FLASH_PAGE_END - 2)

## Functions
uint32_t | ble_error_log_write (uint32_t err_code, const uint8_t *p_message, uint16_t line_number)
| Function for writing the file name/message, line number, and current program stack to flash. More...

## Detailed Description

Module for writing error and stack to flash memory.

It contains functions for writing an error code, line number, filename/message and the stack to the flash during an error, e.g. in the assert handler.

## Macro Definition Documentation

#define ERROR_MESSAGE_LENGTH 128

Length of error message to stored.

#define FLASH_PAGE_ERROR_LOG (BLE_FLASH_PAGE_END - 2)

Address in flash where stack trace can be stored.

#define STACK_DUMP_LENGTH 256

Length of stack to be stored at max: 64 entries of 4 bytes each.

## Function Documentation

uint32_t ble_error_log_write | ( | uint32_t | err_code,
|  | const uint8_t * | p_message,
|  | uint16_t | line_number
| ) |  |

Function for writing the file name/message, line number, and current program stack to flash.

Note
  This function will force the writing to flash, and disregard any radio communication. USE THIS FUNCTION WITH CARE.

Parameters

  [in] | err_code | Error code to be logged.
  [in] | p_message | Message to be written to the flash together with stack dump, usually the file name where the error occured.
  [in] | line_number | Line number where the error occured.

Returns
  NRF_SUCCESS on successful writing of the error log.