Module for writing error and stack to flash memory.
More...
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.
#define ERROR_MESSAGE_LENGTH 128 |
Length of error message to stored.
#define STACK_DUMP_LENGTH 256 |
Length of stack to be stored at max: 64 entries of 4 bytes each.
Address in flash where stack trace can be stored.
#define LOG_LED_PIN_NO NRF6310_LED_6 |
Use LED 6 to identify messages in log.
uint32_t ble_error_log_write |
( |
uint32_t |
err_code, |
|
|
const uint8_t * |
p_message, |
|
|
uint16_t |
line_number |
|
) |
| |
- 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.
If an error is present, this function will light LED6 and block current execution. Execution will continue when
- See Also
- ble_error_log_clear() is called from application.
-
ble_error_log_clear() will also delete the error present in the flash.
- Parameters
-
[in] | error_log | Pointer to the structure where the Error log present in the flash will be put. If no error was present, this structure will not be changed. |
- Returns
- NRF_SUCCESS if access to the flash was successful and no error was present in the flash.
void ble_error_log_clear |
( |
void |
| ) |
|
If an error was present and execution is blocked at
- See Also
- ble_error_log_read() then this function will notify the read and ensure operation continues. This function is expected to be called from an interrupt, e.g. on button press.
void ble_error_log_init |
( |
void |
| ) |
|
The init funtion will ensure the flash is initialized so that error can be logged.