BLE_Nano nRF51 Central heart rate
Common application error handler
Common application error handler. More...
Data Structures | |
struct | error_info_t |
Structure containing info about an error of the type NRF_FAULT_ID_SDK_ERROR. More... | |
struct | assert_info_t |
Structure containing info about an error of the type NRF_FAULT_ID_SDK_ASSERT. More... | |
Modules | |
Fault ID types | |
Functions | |
void | app_error_handler (ret_code_t error_code, uint32_t line_num, const uint8_t *p_file_name) |
Function for error handling, which is called when an error has occurred. | |
void | app_error_handler_bare (ret_code_t error_code) |
Function for error handling, which is called when an error has occurred. | |
void | app_error_save_and_stop (uint32_t id, uint32_t pc, uint32_t info) |
Function for saving the parameters and entering an eternal loop, for debug purposes. | |
void | app_error_handler (uint32_t error_code, uint32_t line_num, const uint8_t *p_file_name) |
Function for error handling, which is called when an error has occurred. | |
static __INLINE void | app_error_log (uint32_t id, uint32_t pc, uint32_t info) |
Function for printing all error info (using nrf_log). | |
static __INLINE void | app_error_print (uint32_t id, uint32_t pc, uint32_t info) |
Function for printing all error info (using printf). | |
void | app_error_fault_handler (uint32_t id, uint32_t pc, uint32_t info) |
Callback function for asserts in the SoftDevice. |
Detailed Description
Common application error handler.
Common application error handler and macros for utilizing a common error handler.
Function Documentation
void app_error_fault_handler | ( | uint32_t | id, |
uint32_t | pc, | ||
uint32_t | info | ||
) |
Callback function for asserts in the SoftDevice.
A pointer to this function will be passed to the SoftDevice. This function will be called by the SoftDevice if certain unrecoverable errors occur within the application or SoftDevice.
See nrf_fault_handler_t for more details.
- Parameters:
-
[in] id Fault identifier. See Fault ID types. [in] pc The program counter of the instruction that triggered the fault, or 0 if unavailable. [in] info Optional additional information regarding the fault. Refer to each fault identifier for details.
- Remarks:
- Function is implemented as weak so that it can be overwritten by custom application error handler when needed.
Definition at line 25 of file app_error_weak.c.
void app_error_handler | ( | uint32_t | error_code, |
uint32_t | line_num, | ||
const uint8_t * | p_file_name | ||
) |
Function for error handling, which is called when an error has occurred.
- Parameters:
-
[in] error_code Error code supplied to the handler. [in] line_num Line number where the handler is called. [in] p_file_name Pointer to the file name.
void app_error_handler | ( | ret_code_t | error_code, |
uint32_t | line_num, | ||
const uint8_t * | p_file_name | ||
) |
Function for error handling, which is called when an error has occurred.
- Warning:
- This handler is an example only and does not fit a final product. You need to analyze how your product is supposed to react in case of error.
- Parameters:
-
[in] error_code Error code supplied to the handler. [in] line_num Line number where the handler is called. [in] p_file_name Pointer to the file name.
Definition at line 46 of file app_error.c.
void app_error_handler_bare | ( | ret_code_t | error_code ) |
Function for error handling, which is called when an error has occurred.
- Parameters:
-
[in] error_code Error code supplied to the handler.
Definition at line 60 of file app_error.c.
static __INLINE void app_error_log | ( | uint32_t | id, |
uint32_t | pc, | ||
uint32_t | info | ||
) | [static] |
Function for printing all error info (using nrf_log).
Nrf_log library must be initialized using NRF_LOG_INIT macro before calling this function.
- Parameters:
-
[in] id Fault identifier. See Fault ID types. [in] pc The program counter of the instruction that triggered the fault, or 0 if unavailable. [in] info Optional additional information regarding the fault. Refer to each fault identifier for details.
Definition at line 94 of file app_error.h.
static __INLINE void app_error_print | ( | uint32_t | id, |
uint32_t | pc, | ||
uint32_t | info | ||
) | [static] |
Function for printing all error info (using printf).
- Parameters:
-
[in] id Fault identifier. See Fault ID types. [in] pc The program counter of the instruction that triggered the fault, or 0 if unavailable. [in] info Optional additional information regarding the fault. Refer to each fault identifier for details.
Definition at line 129 of file app_error.h.
void app_error_save_and_stop | ( | uint32_t | id, |
uint32_t | pc, | ||
uint32_t | info | ||
) |
Function for saving the parameters and entering an eternal loop, for debug purposes.
- Parameters:
-
[in] id Fault identifier. See Fault ID types. [in] pc The program counter of the instruction that triggered the fault, or 0 if unavailable. [in] info Optional additional information regarding the fault. Refer to each fault identifier for details.
Definition at line 74 of file app_error.c.
Generated on Wed Jul 13 2022 07:07:19 by 1.7.2