| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
Modules | |
| Fatal error base types | |
Functions | |
| FUNC_NORETURN void | k_fatal_halt (unsigned int reason) | 
| Halt the system on a fatal error.  More... | |
| void | k_sys_fatal_error_handler (unsigned int reason, const z_arch_esf_t *esf) | 
| Fatal error policy handler.  More... | |
| FUNC_NORETURN void k_fatal_halt | ( | unsigned int | reason | ) | 
#include <include/zephyr/fatal.h>
Halt the system on a fatal error.
Invokes architecture-specific code to power off or halt the system in a low power state. Lacking that, lock interrupts and sit in an idle loop.
| reason | Fatal exception reason code | 
| void k_sys_fatal_error_handler | ( | unsigned int | reason, | 
| const z_arch_esf_t * | esf | ||
| ) | 
#include <include/zephyr/fatal.h>
Fatal error policy handler.
This function is not invoked by application code, but is declared as a weak symbol so that applications may introduce their own policy.
The default implementation of this function halts the system unconditionally. Depending on architecture support, this may be a simple infinite loop, power off the hardware, or exit an emulator.
If this function returns, then the currently executing thread will be aborted.
A few notes for custom implementations:
| reason | The reason for the fatal error | 
| esf | Exception context, with details and partial or full register state when the error occurred. May in some cases be NULL. | 
Fatal error policy handler.
Test Objective:
Testing techniques:
Prerequisite Conditions:
Input Specifications:
Test Procedure:
Expected Test Result:
Pass/Fail Criteria:
Assumptions and Constraints: