WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
reboot_porting.h
浏览该文件的文档.
1
9#ifndef REBOOT_PORTING_H
10#define REBOOT_PORTING_H
11
12#ifdef __cplusplus
13#if __cplusplus
14extern "C" {
15#endif
16#endif
17
18#define HAL_REBOOT_REASON_MCPU_WDT 0x2002
19#define HAL_REBOOT_REASON_DSP_WDT 0x4002
20#define HAL_REBOOT_REASON_BCPU_WDT 0x8002
21#define HAL_REBOOT_REASON_BCPU_CHIP_WDT 0x8004
22
23#if MASTER_BY_WS53_ONLY
24#define HAL_CHIP_RESET_REG (ULP_AON_CTL_RB_ADDR + CHIP_RESET_OFF)
25#else
26#define HAL_CHIP_RESET_REG (GLB_CTL_M_RB_BASE + CHIP_RESET_OFF)
27#endif
28
29#define HAL_CHIP_RESET_REG_OFFSET 0x0
30#define HAL_CHIP_RESET_REG_ENABLE_RESET_BIT 2
31
32#define HAL_PMU_PROTECT_STATUS_REG (PMU1_CTL_RB_BASE + 0x370)
33#define HAL_PMU_PROTECT_STATUS_CLR_REG (PMU1_CTL_RB_BASE + 0x370)
34
35// buck short circuit protection, if this case occur, cpu can't read, only ssi can read the status.
36#define HAL_PMU_PROTECT_BUCK2_SCP_BIT 2
37#define HAL_PMU_PROTECT_BUCK1_SCP_BIT 3
38#define HAL_PMU_PROTECT_CHIP_WDG_BIT 4
39#define HAL_PMU_PROTECT_CHIP_WDG_BIT_CLR 0
40
41#define HAL_BCPU_RESET_STS_REG (GLB_CTL_M_RB_BASE + 0x30)
42#define HAL_MCPU_RESET_STS_REG (GLB_CTL_M_RB_BASE + 0x34)
43
44// This status is valid when CLDO2 power on.
45#define HAL_DSP_RESET_STS_REG (GLB_CTL_B_RB_BASE + 0x38)
46#define HAL_RESET_STS_COMMON_RESET_BIT 0 // Control by RST_PULSE0 at GLB_CTL_B + 0x70
47#define HAL_RESET_STS_CORE_RESET_BIT 1 // Control by RST_PULSE0 at GLB_CTL_B + 0x70
48#define HAL_RESET_STS_CORE_WDT_RESET_BIT 2
49#define HAL_RESET_STS_CLEAR_REG (GLB_CTL_M_RB_BASE + 0x3c)
50#define HAL_RESET_STS_CLEAR_ALL 0xFF
51
52// Software dedicated whether a hard power failure occurs
53#define HAL_ULP_AON_GENERAL_REG (ULP_AON_CTL_RB_ADDR + 0x14)
54
55#define HAL_ULP_AON_NO_POWEROFF_FLAG 0xA5A5
56
69
71uint32_t reboot_port_get_rst_reason(void);
78#ifdef __cplusplus
79#if __cplusplus
80}
81#endif /* __cplusplus */
82#endif /* __cplusplus */
83#endif
reboot_port_rst_reason
Definition reboot_porting.h:63
void reboot_mem_save_to_flash(void)
void reboot_port_reboot_chip(void)
Definition reboot_porting.c:82
enum reboot_port_rst_reason reboot_port_rst_reason_t
uint32_t reboot_port_get_rst_reason(void)
Definition reboot_porting.c:93
void reboot_mem_flash_erase(void)
@ RST_REASON_WDT_RST
Definition reboot_porting.h:64
@ RST_REASON_SOFT_RST
Definition reboot_porting.h:65
@ RST_REASON_HARD_RST
Definition reboot_porting.h:66
@ RST_REASON_INVALID
Definition reboot_porting.h:67