WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
HAL

结构体

struct  stack_frame_t
 Structure which is pushed onto the stack by the Cortex-M0 during exception processing - stack frame. 更多...
 
struct  excep_info_t
 
struct  exc_content_t
 
struct  exc_info_t
 
struct  exc_backtrace_info_t
 
struct  exc_info_save_t
 
struct  exc_stack_info_t
 

宏定义

#define WAIT_APPS_DUMP_DELAY_MS_EACH_TIME   16000U
 
#define WAIT_APPS_DUMP_DELAY_TIMES   2
 
#define WAIT_APPS_REFRESH_FLASH_MS   2000
 
#define EXCEP_INFO_FOR_R4_TO_R11   8
 
#define EXC_INFO_SAVE_TP_INDEX   16
 
#define EXC_INFO_SAVE_SIZE   sizeof(exc_info_save_t)
 
#define EXC_INFO_SAVE_SIZE   sizeof(exc_info_save_t)
 

类型定义

typedef struct stack_frame_t exception_stack_frame_t
 Structure which is pushed onto the stack by the Cortex-M0 during exception processing - stack frame.
 
typedef struct excep_info_t exception_info_t
 
typedef void(* nmi_proc_func) (exc_context_t *)
 Callback to output the exception information.
 
typedef void(* hal_exception_dump_callback) (uint32_t irq_id, exc_context_t *exc_buf_addr)
 

枚举

enum  INT_ID_FAULT_TYPE_ENUM {
  INT_ID_NMI_FAULT = 2 , INT_ID_HARD_FAULT = 3 , INT_ID_MEM_FAULT = 4 , INT_ID_BUS_FAULT = 5 ,
  INT_ID_USAGE_FAULT = 6 , INT_ID_CHIP_WATCHDOG_FAULT = 59 , INT_ID_WATCHDOG_FAULT = 47 , INT_ID_INDEX_BUTT
}
 
enum  IRQ_ID_FAULT_TYPE_ENMU {
  IRQ_ID_INSTRUCTION_ADDRESS_MISALIGNED = 0 , IRQ_ID_INSTRUCTION_ACCESS_FAULT = 1 , IRQ_ID_ILLEGAL_INSTRUCTION = 2 , IRQ_ID_BREAKPOINT = 3 ,
  IRQ_ID_LOAD_ADDERSS_MISALIGNED = 4 , IRQ_ID_LOAD_ACCESS_FAULT = 5 , IRQ_ID_STORE_OR_AMO_ADDRESS_MISALIGNED = 6 , IRQ_ID_STORE_OR_AMO_ACCESS_FALUT = 7 ,
  IRQ_ID_ENVIRONMENT_CALL_FROM_UMODE = 8 , IRQ_ID_ENVIRONMENT_CALL_FROM_SMODE = 9 , IRQ_ID_RESERVED_0 = 10 , IRQ_ID_ENVIRONMENT_CALL_FROM_MMODE = 11 ,
  IRQ_ID_INSTRUCTION_PAGE_FAULT = 12 , IRQ_ID_LOAD_PAGE_FAULT = 13 , IRQ_ID_RESERVED_1 = 14 , IRQ_ID_STORE_OR_AMO_PAGE_FAULT = 15 ,
  IRQ_ID_ASYNCHRONOUS_EXCEPTION = 24 , IRQ_ID_NMI_INTERRUPT = 0x00000FFF
}
 

函数

void do_hard_fault_handler (exc_context_t *exc_buf_addr)
 Prototype for the assembly language hard-fault handler. This will setup the stack and attempt to generate a stack trace to aid debug.
 
void do_fault_handler (uint32_t exc_type, exc_context_t *exc_buff_addr)
 
void hal_register_exception_dump_callback (hal_exception_dump_callback callback)
 Register the exception dump callback
 
void wait_apps_prepare_for_rebooting (void)
 Wait for the apps to finish the preparing for rebooting. eg. notify the apps and finish coredump if the debug is enable; Wait for the apps refresh the flash.
 
void hal_save_exception_reset_info (void)
 Save the exception reset information for debug after the restart.
 
void back_trace (uint32_t fp)
 

详细描述

宏定义说明

◆ EXC_INFO_SAVE_SIZE [1/2]

#define EXC_INFO_SAVE_SIZE   sizeof(exc_info_save_t)

◆ EXC_INFO_SAVE_SIZE [2/2]

#define EXC_INFO_SAVE_SIZE   sizeof(exc_info_save_t)

◆ EXC_INFO_SAVE_TP_INDEX

#define EXC_INFO_SAVE_TP_INDEX   16

◆ EXCEP_INFO_FOR_R4_TO_R11

#define EXCEP_INFO_FOR_R4_TO_R11   8

◆ WAIT_APPS_DUMP_DELAY_MS_EACH_TIME

#define WAIT_APPS_DUMP_DELAY_MS_EACH_TIME   16000U

◆ WAIT_APPS_DUMP_DELAY_TIMES

#define WAIT_APPS_DUMP_DELAY_TIMES   2

◆ WAIT_APPS_REFRESH_FLASH_MS

#define WAIT_APPS_REFRESH_FLASH_MS   2000

类型定义说明

◆ exception_info_t

◆ exception_stack_frame_t

Structure which is pushed onto the stack by the Cortex-M0 during exception processing - stack frame.

◆ hal_exception_dump_callback

typedef void(* hal_exception_dump_callback) (uint32_t irq_id, exc_context_t *exc_buf_addr)

◆ nmi_proc_func

typedef void(* nmi_proc_func) (exc_context_t *)

Callback to output the exception information.

枚举类型说明

◆ INT_ID_FAULT_TYPE_ENUM

枚举值
INT_ID_NMI_FAULT 
INT_ID_HARD_FAULT 
INT_ID_MEM_FAULT 
INT_ID_BUS_FAULT 
INT_ID_USAGE_FAULT 
INT_ID_CHIP_WATCHDOG_FAULT 
INT_ID_WATCHDOG_FAULT 
INT_ID_INDEX_BUTT 

◆ IRQ_ID_FAULT_TYPE_ENMU

riscv fault type

枚举值
IRQ_ID_INSTRUCTION_ADDRESS_MISALIGNED 
IRQ_ID_INSTRUCTION_ACCESS_FAULT 
IRQ_ID_ILLEGAL_INSTRUCTION 
IRQ_ID_BREAKPOINT 
IRQ_ID_LOAD_ADDERSS_MISALIGNED 
IRQ_ID_LOAD_ACCESS_FAULT 
IRQ_ID_STORE_OR_AMO_ADDRESS_MISALIGNED 
IRQ_ID_STORE_OR_AMO_ACCESS_FALUT 
IRQ_ID_ENVIRONMENT_CALL_FROM_UMODE 
IRQ_ID_ENVIRONMENT_CALL_FROM_SMODE 
IRQ_ID_RESERVED_0 
IRQ_ID_ENVIRONMENT_CALL_FROM_MMODE 
IRQ_ID_INSTRUCTION_PAGE_FAULT 
IRQ_ID_LOAD_PAGE_FAULT 
IRQ_ID_RESERVED_1 
IRQ_ID_STORE_OR_AMO_PAGE_FAULT 
IRQ_ID_ASYNCHRONOUS_EXCEPTION 
IRQ_ID_NMI_INTERRUPT 

函数说明

◆ back_trace()

void back_trace ( uint32_t  fp)

◆ do_fault_handler()

void do_fault_handler ( uint32_t  exc_type,
exc_context_t exc_buff_addr 
)

◆ do_hard_fault_handler()

void do_hard_fault_handler ( exc_context_t exc_buf_addr)

Prototype for the assembly language hard-fault handler. This will setup the stack and attempt to generate a stack trace to aid debug.

参数
exc_buf_addrFault param1.

◆ hal_register_exception_dump_callback()

void hal_register_exception_dump_callback ( hal_exception_dump_callback  callback)

Register the exception dump callback

参数
callbackThe dump callback func

◆ hal_save_exception_reset_info()

void hal_save_exception_reset_info ( void  )

Save the exception reset information for debug after the restart.

返回

◆ wait_apps_prepare_for_rebooting()

void wait_apps_prepare_for_rebooting ( void  )

Wait for the apps to finish the preparing for rebooting. eg. notify the apps and finish coredump if the debug is enable; Wait for the apps refresh the flash.

返回