STM32中断向量表初探
扫描二维码
随时随地手机看文章
cortex-M3的异常向量表中的内容并不是指令,0x00000000处(当然也可能映射到别的范围)是主堆栈指针的数值,0x00000004的内容是复位后需要跳转到的地址,是一个地址而不是一条指令。
0x08000000数据如下(memory 窗口查看--STM32小端):
10 02 00 20 05 19 00 08
AREA RESET, DATA, READONLY
EXPORT __Vectors
__Vectors DCD __initial_sp //0x20000210; Top of Stack
DCD Reset_Handler //0x08001905; Reset Handler---最后跳转到main函数
DCD NMI_Handler //0x08001909; NMI Handler
DCD HardFault_Handler //0x0800190B; Hard Fault Handler
DCD MemManage_Handler //0x0800190D; MPU Fault Handler
DCD BusFault_Handler //0x0800190F; Bus Fault Handler
DCD UsageFault_Handler //0x08001911; Usage Fault Handler
DCD 0 //0x00000000 ; Reserved
DCD 0 //0x00000000; Reserved
DCD 0 //0x00000000; Reserved
DCD 0 //0x00000000; Reserved
DCD SVC_Handler //0x08001913; SVCall Handler
DCD DebugMon_Handler //0x08001915; Debug Monitor Handler
DCD 0 ; Reserved
DCD PendSV_Handler //0x08001917; PendSV Handler
DCD SysTick_Handler //0x08000101; SysTick Handler
; External Interrupts
DCD WWDG_IRQHandler //0x0800191B; Window Watchdog
DCD PVD_IRQHandler //0x0800191B; PVD through EXTI Line detect
DCD TAMPER_IRQHandler //0x0800191B; Tamper
DCD RTC_IRQHandler //0x0800191B; RTC
DCD FLASH_IRQHandler //0x0800191B; Flash
DCD RCC_IRQHandler //0x0800191B; RCC
DCD EXTI0_IRQHandler //0x0800191B; EXTI Line 0
DCD EXTI1_IRQHandler //0x0800191B; EXTI Line 1
DCD EXTI2_IRQHandler //0x0800191B; EXTI Line 2
DCD EXTI3_IRQHandler //0x0800191B; EXTI Line 3
DCD EXTI4_IRQHandler //0x0800191B; EXTI Line 4
DCD DMAChannel1_IRQHandler //0x0800191B; DMA Channel 1
DCD DMAChannel2_IRQHandler //0x0800191B; DMA Channel 2
DCD DMAChannel3_IRQHandler //0x0800191B; DMA Channel 3
DCD DMAChannel4_IRQHandler //0x0800191B; DMA Channel 4
DCD DMAChannel5_IRQHandler //0x0800191B; DMA Channel 5
DCD DMAChannel6_IRQHandler //0x0800191B; DMA Channel 6
DCD DMAChannel7_IRQHandler //0x0800191B; DMA Channel 7
DCD ADC_IRQHandler //0x0800191B; ADC
DCD USB_HP_CAN_TX_IRQHandler //0x0800191B; USB High Priority or CAN TX
DCD USB_LP_CAN_RX0_IRQHandler //0x0800191B; USB Low Priority or CAN RX0
DCD CAN_RX1_IRQHandler //0x0800191B; CAN RX1
DCD CAN_SCE_IRQHandler //0x0800191B; CAN SCE
DCD EXTI9_5_IRQHandler //0x0800191B; EXTI Line 9..5
DCD TIM1_BRK_IRQHandler //0x0800191B; TIM1 Break
DCD TIM1_UP_IRQHandler //0x0800191B; TIM1 Update
DCD TIM1_TRG_COM_IRQHandler //0x0800191B; TIM1 Trigger and Commutation
DCD TIM1_CC_IRQHandler //0x0800191B; TIM1 Capture Compare
DCD TIM2_IRQHandler //0x0800191B; TIM2
DCD TIM3_IRQHandler //0x0800191B; TIM3
DCD TIM4_IRQHandler //0x0800191B; TIM4
DCD I2C1_EV_IRQHandler //0x0800191B ; I2C1 Event
DCD I2C1_ER_IRQHandler //0x0800191B; I2C1 Error
DCD I2C2_EV_IRQHandler //0x0800191B ; I2C2 Event
DCD I2C2_ER_IRQHandler //0x0800191B ; I2C2 Error
DCD SPI1_IRQHandler //0x0800191B ; SPI1
DCD SPI2_IRQHandler //0x0800191B ; SPI2
DCD USART1_IRQHandler //0x0800191B ; USART1
DCD USART2_IRQHandler //0x0800191B ; USART2
DCD USART3_IRQHandler //0x0800191B ; USART3
DCD EXTI15_10_IRQHandler //0x0800191B ; EXTI Line 15..10
DCD RTCAlarm_IRQHandler //0x0800191B ; RTC Alarm through EXTI Line
0x080000EA DCD USBWakeUp_IRQHandler //0x0800191B ; USB Wakeup from suspend
0x08003608 0x20000000 0x00000010
0x08003618 0x20000010 0x00000200