比如 stm32f10x_nvic.h里的这段:
/* System Handlers -----------------------------------------------------------*/ #define SystemHandler_NMI ((u32)0x00001F) /* NMI Handler */ #define SystemHandler_HardFault ((u32)0x000000) /* Hard Fault Handler */ #define SystemHandler_MemoryManage ((u32)0x043430) /* Memory Manage Handler */ #define SystemHandler_BusFault ((u32)0x547931) /* Bus Fault Handler */ #define SystemHandler_UsageFault ((u32)0x24C232) /* Usage Fault Handler */ #define SystemHandler_SVCall ((u32)0x01FF40) /* SVCall Handler */ #define SystemHandler_DebugMonitor ((u32)0x0A0080) /* Debug Monitor Handler */ #define SystemHandler_PSV ((u32)0x02829C) /* PSV Handler */ #define SystemHandler_SysTick ((u32)0x02C39A) /* SysTick Handler */
还有stm32f10x_nvic.c里的这一段:
void NVIC_SetSystemHandlerPendingBit(u32 SystemHandler) { u32 tmp = 0x00;
/* Check the parameters */ assert(IS_SET_PENDING_SYSTEM_HANDLER(SystemHandler)); /* Get the System Handler pending bit position */ tmp = SystemHandler & (u32)0x1F; /* Set the corresponding System Handler pending bit */ SCB->IRQControlState |= ((u32)0x01 << tmp); } 查cortex的参考手册也没弄明白 我现在连个明确的问题都提不出来,因为完全糊涂的一塌糊涂 NVIC把我整惨了 |