12#ifndef INFUSE_SDK_INCLUDE_INFUSE_REBOOT_H_
13#define INFUSE_SDK_INCLUDE_INFUSE_REBOOT_H_
17#include <zephyr/kernel.h>
18#include <zephyr/fatal_types.h>
19#include <zephyr/toolchain.h>
31#define REBOOT_STATE_THREAD_NAME_MAX 8
102} __packed __aligned(16);
128} __packed __aligned(16);
131#define _NORETURN COND_CODE_1(CONFIG_INFUSE_REBOOT_RETURN, (), (FUNC_NORETURN))
int infuse_reboot_state_query(struct infuse_reboot_state *state)
Query the reason for the previous reboot.
void infuse_reboot_delayed(enum infuse_reboot_reason reason, uint32_t info1, uint32_t info2, k_timeout_t delay)
Trigger a system reboot in the future.
infuse_reboot_reason
Enumeration of reboot reasons.
Definition reboot.h:34
#define REBOOT_STATE_THREAD_NAME_MAX
Definition reboot.h:31
infuse_reboot_info_type
Type of infuse_reboot_info data.
Definition reboot.h:62
_NORETURN void infuse_reboot(enum infuse_reboot_reason reason, uint32_t info1, uint32_t info2)
Trigger a system reboot.
@ INFUSE_REBOOT_MCUMGR
MCUmgr request.
Definition reboot.h:50
@ INFUSE_REBOOT_SW_WATCHDOG
Software watchdog has expired.
Definition reboot.h:54
@ INFUSE_REBOOT_INFUSE_START
Infuse reboot reasons.
Definition reboot.h:40
@ INFUSE_REBOOT_EXTERNAL_TRIGGER
Triggered externally (Button, etc)
Definition reboot.h:44
@ INFUSE_REBOOT_HW_WATCHDOG
Hardware watchdog has expired.
Definition reboot.h:42
@ INFUSE_REBOOT_RPC
Remote procedure call.
Definition reboot.h:46
@ INFUSE_REBOOT_CFG_CHANGE
Rebooting due to configuration change.
Definition reboot.h:52
@ INFUSE_REBOOT_UNKNOWN
Unknown reboot reason.
Definition reboot.h:58
@ INFUSE_REBOOT_LTE_MODEM_FAULT
Internal LTE modem fault.
Definition reboot.h:48
@ INFUSE_REBOOT_DFU
Rebooting for device firmware update.
Definition reboot.h:56
@ INFUSE_REBOOT_ZEPHYR_BASE
Common Zephyr exception codes.
Definition reboot.h:36
@ INFUSE_REBOOT_ARCH_SPECIFIC
Architecture specific exception codes.
Definition reboot.h:38
@ INFUSE_REBOOT_INFO_GENERIC
Definition reboot.h:64
@ INFUSE_REBOOT_INFO_EXCEPTION_BASIC
Exception with only PC and LR info.
Definition reboot.h:66
@ INFUSE_REBOOT_INFO_EXCEPTION_ESF
Exception with full stack frame.
Definition reboot.h:68
@ INFUSE_REBOOT_INFO_WATCHDOG
Hardware watchdog expiry.
Definition reboot.h:70
Reboot state information.
Definition reboot.h:105
uint32_t hardware_reason
Hardware reboot reason flags.
Definition reboot.h:119
union infuse_reboot_info info
Reboot information.
Definition reboot.h:127
enum infuse_reboot_info_type info_type
Type of the information in info.
Definition reboot.h:123
uint64_t epoch_time
The epoch time at the reboot.
Definition reboot.h:113
uint8_t epoch_time_source
First 3 parameters are updated a second time on delayed reboots.
Definition reboot.h:111
enum infuse_reboot_reason reason
Reason for the reboot.
Definition reboot.h:117
uint32_t uptime
The device uptime at the reboot.
Definition reboot.h:115
Detailed information about the reboot location/cause RISCV platforms have 16 byte alignment requireme...
Definition reboot.h:78
struct arch_esf exception_full
Definition reboot.h:94
uint32_t info1
Info 1.
Definition reboot.h:82
struct infuse_reboot_info::@33 watchdog
uint32_t link_register
Link register value at exception.
Definition reboot.h:91
uint32_t program_counter
Program counter value at exception.
Definition reboot.h:89
struct infuse_reboot_info::@32 exception_basic
uint32_t info2
Info 2.
Definition reboot.h:84