rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2012 Travis Geiselbrecht |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining |
| 5 | * a copy of this software and associated documentation files |
| 6 | * (the "Software"), to deal in the Software without restriction, |
| 7 | * including without limitation the rights to use, copy, modify, merge, |
| 8 | * publish, distribute, sublicense, and/or sell copies of the Software, |
| 9 | * and to permit persons to whom the Software is furnished to do so, |
| 10 | * subject to the following conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be |
| 13 | * included in all copies or substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 19 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 20 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 21 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | */ |
| 23 | #include <debug.h> |
| 24 | #include <compiler.h> |
| 25 | #include <stm32f10x.h> |
| 26 | #include <arch/arm/cm.h> |
| 27 | #include <platform/stm32.h> |
| 28 | #include <target/debugconfig.h> |
| 29 | #include <lib/cbuf.h> |
| 30 | |
| 31 | /* un-overridden irq handler */ |
| 32 | void stm32_dummy_irq(void) |
| 33 | { |
| 34 | arm_cm_irq_entry(); |
| 35 | |
| 36 | panic("unhandled irq\n"); |
| 37 | } |
| 38 | |
| 39 | /* a list of default handlers that are simply aliases to the dummy handler */ |
| 40 | #define DEFAULT_HANDLER(x) \ |
| 41 | void stm32_##x(void) __WEAK_ALIAS("stm32_dummy_irq"); |
| 42 | |
| 43 | DEFAULT_HANDLER(WWDG_IRQ); |
| 44 | DEFAULT_HANDLER(PVD_IRQ); |
| 45 | DEFAULT_HANDLER(TAMPER_IRQ); |
| 46 | DEFAULT_HANDLER(RTC_IRQ); |
| 47 | DEFAULT_HANDLER(FLASH_IRQ); |
| 48 | DEFAULT_HANDLER(RCC_IRQ); |
| 49 | DEFAULT_HANDLER(EXTI0_IRQ); |
| 50 | DEFAULT_HANDLER(EXTI1_IRQ); |
| 51 | DEFAULT_HANDLER(EXTI2_IRQ); |
| 52 | DEFAULT_HANDLER(EXTI3_IRQ); |
| 53 | DEFAULT_HANDLER(EXTI4_IRQ); |
| 54 | DEFAULT_HANDLER(DMA1_Channel1_IRQ); |
| 55 | DEFAULT_HANDLER(DMA1_Channel2_IRQ); |
| 56 | DEFAULT_HANDLER(DMA1_Channel3_IRQ); |
| 57 | DEFAULT_HANDLER(DMA1_Channel4_IRQ); |
| 58 | DEFAULT_HANDLER(DMA1_Channel5_IRQ); |
| 59 | DEFAULT_HANDLER(DMA1_Channel6_IRQ); |
| 60 | DEFAULT_HANDLER(DMA1_Channel7_IRQ); |
| 61 | |
| 62 | DEFAULT_HANDLER(USART1_IRQ); |
| 63 | DEFAULT_HANDLER(USART2_IRQ); |
| 64 | DEFAULT_HANDLER(USART3_IRQ); |
| 65 | |
| 66 | DEFAULT_HANDLER(TIM2_IRQ); |
| 67 | DEFAULT_HANDLER(TIM3_IRQ); |
| 68 | DEFAULT_HANDLER(TIM4_IRQ); |
| 69 | DEFAULT_HANDLER(TIM5_IRQ); |
| 70 | DEFAULT_HANDLER(TIM6_IRQ); |
| 71 | DEFAULT_HANDLER(TIM7_IRQ); |
| 72 | |
| 73 | DEFAULT_HANDLER(ADC1_2_IRQ); |
| 74 | DEFAULT_HANDLER(USB_HP_CAN1_TX_IRQ); |
| 75 | DEFAULT_HANDLER(USB_LP_CAN1_RX0_IRQ); |
| 76 | DEFAULT_HANDLER(CAN1_RX1_IRQ); |
| 77 | DEFAULT_HANDLER(CAN1_SCE_IRQ); |
| 78 | DEFAULT_HANDLER(EXTI9_5_IRQ); |
| 79 | DEFAULT_HANDLER(TIM1_BRK_IRQ); |
| 80 | DEFAULT_HANDLER(TIM1_UP_IRQ); |
| 81 | DEFAULT_HANDLER(TIM1_TRG_COM_IRQ); |
| 82 | DEFAULT_HANDLER(TIM1_CC_IRQ); |
| 83 | DEFAULT_HANDLER(I2C1_EV_IRQ); |
| 84 | DEFAULT_HANDLER(I2C1_ER_IRQ); |
| 85 | DEFAULT_HANDLER(I2C2_EV_IRQ); |
| 86 | DEFAULT_HANDLER(I2C2_ER_IRQ); |
| 87 | DEFAULT_HANDLER(SPI1_IRQ); |
| 88 | DEFAULT_HANDLER(SPI2_IRQ); |
| 89 | DEFAULT_HANDLER(EXTI15_10_IRQ); |
| 90 | DEFAULT_HANDLER(RTCAlarm_IRQ); |
| 91 | DEFAULT_HANDLER(USBWakeUp_IRQ); |
| 92 | |
| 93 | DEFAULT_HANDLER(CAN1_TX_IRQ); |
| 94 | DEFAULT_HANDLER(CAN1_RX0_IRQ); |
| 95 | DEFAULT_HANDLER(OTG_FS_WKUP_IRQ); |
| 96 | DEFAULT_HANDLER(SPI3_IRQ); |
| 97 | DEFAULT_HANDLER(UART4_IRQ); |
| 98 | DEFAULT_HANDLER(UART5_IRQ); |
| 99 | DEFAULT_HANDLER(DMA2_Channel1_IRQ); |
| 100 | DEFAULT_HANDLER(DMA2_Channel2_IRQ); |
| 101 | DEFAULT_HANDLER(DMA2_Channel3_IRQ); |
| 102 | DEFAULT_HANDLER(DMA2_Channel4_IRQ); |
| 103 | DEFAULT_HANDLER(DMA2_Channel5_IRQ); |
| 104 | DEFAULT_HANDLER(ETH_IRQ); |
| 105 | DEFAULT_HANDLER(ETH_WKUP_IRQ); |
| 106 | DEFAULT_HANDLER(CAN2_TX_IRQ); |
| 107 | DEFAULT_HANDLER(CAN2_RX0_IRQ); |
| 108 | DEFAULT_HANDLER(CAN2_RX1_IRQ); |
| 109 | DEFAULT_HANDLER(CAN2_SCE_IRQ); |
| 110 | DEFAULT_HANDLER(OTG_FS_IRQ); |
| 111 | |
| 112 | DEFAULT_HANDLER(TIM8_BRK_IRQ); |
| 113 | DEFAULT_HANDLER(TIM8_UP_IRQ); |
| 114 | DEFAULT_HANDLER(TIM8_TRG_COM_IRQ); |
| 115 | DEFAULT_HANDLER(TIM8_CC_IRQ); |
| 116 | DEFAULT_HANDLER(ADC3_IRQ); |
| 117 | DEFAULT_HANDLER(FSMC_IRQ); |
| 118 | DEFAULT_HANDLER(SDIO_IRQ); |
| 119 | DEFAULT_HANDLER(DMA2_Channel4_5_IRQ); |
| 120 | DEFAULT_HANDLER(TIM1_BRK_TIM9_IRQ); |
| 121 | DEFAULT_HANDLER(TIM1_UP_TIM10_IRQ); |
| 122 | DEFAULT_HANDLER(TIM1_TRG_COM_TIM11_IRQ); |
| 123 | |
| 124 | DEFAULT_HANDLER(TIM8_BRK_TIM12_IRQ); |
| 125 | DEFAULT_HANDLER(TIM8_UP_TIM13_IRQ); |
| 126 | DEFAULT_HANDLER(TIM8_TRG_COM_TIM14_IRQ); |
| 127 | |
| 128 | #define VECTAB_ENTRY(x) [x##n] = stm32_##x |
| 129 | |
| 130 | /* appended to the end of the main vector table */ |
| 131 | const void * const __SECTION(".text.boot.vectab2") vectab2[] = { |
| 132 | VECTAB_ENTRY(WWDG_IRQ), /*!< Window WatchDog Interrupt */ |
| 133 | VECTAB_ENTRY(PVD_IRQ), /*!< PVD through EXTI Line detection Interrupt */ |
| 134 | VECTAB_ENTRY(TAMPER_IRQ), /*!< Tamper Interrupt */ |
| 135 | VECTAB_ENTRY(RTC_IRQ), /*!< RTC global Interrupt */ |
| 136 | VECTAB_ENTRY(FLASH_IRQ), /*!< FLASH global Interrupt */ |
| 137 | VECTAB_ENTRY(RCC_IRQ), /*!< RCC global Interrupt */ |
| 138 | VECTAB_ENTRY(EXTI0_IRQ), /*!< EXTI Line0 Interrupt */ |
| 139 | VECTAB_ENTRY(EXTI1_IRQ), /*!< EXTI Line1 Interrupt */ |
| 140 | VECTAB_ENTRY(EXTI2_IRQ), /*!< EXTI Line2 Interrupt */ |
| 141 | VECTAB_ENTRY(EXTI3_IRQ), /*!< EXTI Line3 Interrupt */ |
| 142 | VECTAB_ENTRY(EXTI4_IRQ), /*!< EXTI Line4 Interrupt */ |
| 143 | VECTAB_ENTRY(DMA1_Channel1_IRQ), /*!< DMA1 Channel 1 global Interrupt */ |
| 144 | VECTAB_ENTRY(DMA1_Channel2_IRQ), /*!< DMA1 Channel 2 global Interrupt */ |
| 145 | VECTAB_ENTRY(DMA1_Channel3_IRQ), /*!< DMA1 Channel 3 global Interrupt */ |
| 146 | VECTAB_ENTRY(DMA1_Channel4_IRQ), /*!< DMA1 Channel 4 global Interrupt */ |
| 147 | VECTAB_ENTRY(DMA1_Channel5_IRQ), /*!< DMA1 Channel 5 global Interrupt */ |
| 148 | VECTAB_ENTRY(DMA1_Channel6_IRQ), /*!< DMA1 Channel 6 global Interrupt */ |
| 149 | VECTAB_ENTRY(DMA1_Channel7_IRQ), /*!< DMA1 Channel 7 global Interrupt */ |
| 150 | |
| 151 | /* taken from the stm32 irq definition list */ |
| 152 | #ifdef STM32F10X_LD |
| 153 | VECTAB_ENTRY(ADC1_2_IRQ), /*!< ADC1 and ADC2 global Interrupt */ |
| 154 | VECTAB_ENTRY(USB_HP_CAN1_TX_IRQ), /*!< USB Device High Priority or CAN1 TX Interrupts */ |
| 155 | VECTAB_ENTRY(USB_LP_CAN1_RX0_IRQ), /*!< USB Device Low Priority or CAN1 RX0 Interrupts */ |
| 156 | VECTAB_ENTRY(CAN1_RX1_IRQ), /*!< CAN1 RX1 Interrupt */ |
| 157 | VECTAB_ENTRY(CAN1_SCE_IRQ), /*!< CAN1 SCE Interrupt */ |
| 158 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 159 | VECTAB_ENTRY(TIM1_BRK_IRQ), /*!< TIM1 Break Interrupt */ |
| 160 | VECTAB_ENTRY(TIM1_UP_IRQ), /*!< TIM1 Update Interrupt */ |
| 161 | VECTAB_ENTRY(TIM1_TRG_COM_IRQ), /*!< TIM1 Trigger and Commutation Interrupt */ |
| 162 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 163 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 164 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 165 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 166 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 167 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 168 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 169 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 170 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 171 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 172 | VECTAB_ENTRY(USBWakeUp_IRQ), /*!< USB Device WakeUp from suspend through EXTI Line Interrupt */ |
| 173 | #endif /* STM32F10X_LD */ |
| 174 | |
| 175 | #ifdef STM32F10X_LD_VL |
| 176 | VECTAB_ENTRY(ADC1_IRQ), /*!< ADC1 global Interrupt */ |
| 177 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 178 | VECTAB_ENTRY(TIM1_BRK_TIM15_IRQ), /*!< TIM1 Break and TIM15 Interrupts */ |
| 179 | VECTAB_ENTRY(TIM1_UP_TIM16_IRQ), /*!< TIM1 Update and TIM16 Interrupts */ |
| 180 | VECTAB_ENTRY(TIM1_TRG_COM_TIM17_IRQ), /*!< TIM1 Trigger and Commutation and TIM17 Interrupt */ |
| 181 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 182 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 183 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 184 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 185 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 186 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 187 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 188 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 189 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 190 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 191 | VECTAB_ENTRY(CEC_IRQ), /*!< HDMI-CEC Interrupt */ |
| 192 | VECTAB_ENTRY(TIM6_DAC_IRQ), /*!< TIM6 and DAC underrun Interrupt */ |
| 193 | VECTAB_ENTRY(TIM7_IRQ), /*!< TIM7 Interrupt */ |
| 194 | #endif /* STM32F10X_LD_VL */ |
| 195 | |
| 196 | #ifdef STM32F10X_MD |
| 197 | VECTAB_ENTRY(ADC1_2_IRQ), /*!< ADC1 and ADC2 global Interrupt */ |
| 198 | VECTAB_ENTRY(USB_HP_CAN1_TX_IRQ), /*!< USB Device High Priority or CAN1 TX Interrupts */ |
| 199 | VECTAB_ENTRY(USB_LP_CAN1_RX0_IRQ), /*!< USB Device Low Priority or CAN1 RX0 Interrupts */ |
| 200 | VECTAB_ENTRY(CAN1_RX1_IRQ), /*!< CAN1 RX1 Interrupt */ |
| 201 | VECTAB_ENTRY(CAN1_SCE_IRQ), /*!< CAN1 SCE Interrupt */ |
| 202 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 203 | VECTAB_ENTRY(TIM1_BRK_IRQ), /*!< TIM1 Break Interrupt */ |
| 204 | VECTAB_ENTRY(TIM1_UP_IRQ), /*!< TIM1 Update Interrupt */ |
| 205 | VECTAB_ENTRY(TIM1_TRG_COM_IRQ), /*!< TIM1 Trigger and Commutation Interrupt */ |
| 206 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 207 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 208 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 209 | VECTAB_ENTRY(TIM4_IRQ), /*!< TIM4 global Interrupt */ |
| 210 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 211 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 212 | VECTAB_ENTRY(I2C2_EV_IRQ), /*!< I2C2 Event Interrupt */ |
| 213 | VECTAB_ENTRY(I2C2_ER_IRQ), /*!< I2C2 Error Interrupt */ |
| 214 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 215 | VECTAB_ENTRY(SPI2_IRQ), /*!< SPI2 global Interrupt */ |
| 216 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 217 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 218 | VECTAB_ENTRY(USART3_IRQ), /*!< USART3 global Interrupt */ |
| 219 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 220 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 221 | VECTAB_ENTRY(USBWakeUp_IRQ), /*!< USB Device WakeUp from suspend through EXTI Line Interrupt */ |
| 222 | #endif /* STM32F10X_MD */ |
| 223 | |
| 224 | #ifdef STM32F10X_MD_VL |
| 225 | VECTAB_ENTRY(ADC1_IRQ), /*!< ADC1 global Interrupt */ |
| 226 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 227 | VECTAB_ENTRY(TIM1_BRK_TIM15_IRQ), /*!< TIM1 Break and TIM15 Interrupts */ |
| 228 | VECTAB_ENTRY(TIM1_UP_TIM16_IRQ), /*!< TIM1 Update and TIM16 Interrupts */ |
| 229 | VECTAB_ENTRY(TIM1_TRG_COM_TIM17_IRQ), /*!< TIM1 Trigger and Commutation and TIM17 Interrupt */ |
| 230 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 231 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 232 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 233 | VECTAB_ENTRY(TIM4_IRQ), /*!< TIM4 global Interrupt */ |
| 234 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 235 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 236 | VECTAB_ENTRY(I2C2_EV_IRQ), /*!< I2C2 Event Interrupt */ |
| 237 | VECTAB_ENTRY(I2C2_ER_IRQ), /*!< I2C2 Error Interrupt */ |
| 238 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 239 | VECTAB_ENTRY(SPI2_IRQ), /*!< SPI2 global Interrupt */ |
| 240 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 241 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 242 | VECTAB_ENTRY(USART3_IRQ), /*!< USART3 global Interrupt */ |
| 243 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 244 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 245 | VECTAB_ENTRY(CEC_IRQ), /*!< HDMI-CEC Interrupt */ |
| 246 | VECTAB_ENTRY(TIM6_DAC_IRQ), /*!< TIM6 and DAC underrun Interrupt */ |
| 247 | VECTAB_ENTRY(TIM7_IRQ), /*!< TIM7 Interrupt */ |
| 248 | #endif /* STM32F10X_MD_VL */ |
| 249 | |
| 250 | #ifdef STM32F10X_HD |
| 251 | VECTAB_ENTRY(ADC1_2_IRQ), /*!< ADC1 and ADC2 global Interrupt */ |
| 252 | VECTAB_ENTRY(USB_HP_CAN1_TX_IRQ), /*!< USB Device High Priority or CAN1 TX Interrupts */ |
| 253 | VECTAB_ENTRY(USB_LP_CAN1_RX0_IRQ), /*!< USB Device Low Priority or CAN1 RX0 Interrupts */ |
| 254 | VECTAB_ENTRY(CAN1_RX1_IRQ), /*!< CAN1 RX1 Interrupt */ |
| 255 | VECTAB_ENTRY(CAN1_SCE_IRQ), /*!< CAN1 SCE Interrupt */ |
| 256 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 257 | VECTAB_ENTRY(TIM1_BRK_IRQ), /*!< TIM1 Break Interrupt */ |
| 258 | VECTAB_ENTRY(TIM1_UP_IRQ), /*!< TIM1 Update Interrupt */ |
| 259 | VECTAB_ENTRY(TIM1_TRG_COM_IRQ), /*!< TIM1 Trigger and Commutation Interrupt */ |
| 260 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 261 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 262 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 263 | VECTAB_ENTRY(TIM4_IRQ), /*!< TIM4 global Interrupt */ |
| 264 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 265 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 266 | VECTAB_ENTRY(I2C2_EV_IRQ), /*!< I2C2 Event Interrupt */ |
| 267 | VECTAB_ENTRY(I2C2_ER_IRQ), /*!< I2C2 Error Interrupt */ |
| 268 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 269 | VECTAB_ENTRY(SPI2_IRQ), /*!< SPI2 global Interrupt */ |
| 270 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 271 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 272 | VECTAB_ENTRY(USART3_IRQ), /*!< USART3 global Interrupt */ |
| 273 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 274 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 275 | VECTAB_ENTRY(USBWakeUp_IRQ), /*!< USB Device WakeUp from suspend through EXTI Line Interrupt */ |
| 276 | VECTAB_ENTRY(TIM8_BRK_IRQ), /*!< TIM8 Break Interrupt */ |
| 277 | VECTAB_ENTRY(TIM8_UP_IRQ), /*!< TIM8 Update Interrupt */ |
| 278 | VECTAB_ENTRY(TIM8_TRG_COM_IRQ), /*!< TIM8 Trigger and Commutation Interrupt */ |
| 279 | VECTAB_ENTRY(TIM8_CC_IRQ), /*!< TIM8 Capture Compare Interrupt */ |
| 280 | VECTAB_ENTRY(ADC3_IRQ), /*!< ADC3 global Interrupt */ |
| 281 | VECTAB_ENTRY(FSMC_IRQ), /*!< FSMC global Interrupt */ |
| 282 | VECTAB_ENTRY(SDIO_IRQ), /*!< SDIO global Interrupt */ |
| 283 | VECTAB_ENTRY(TIM5_IRQ), /*!< TIM5 global Interrupt */ |
| 284 | VECTAB_ENTRY(SPI3_IRQ), /*!< SPI3 global Interrupt */ |
| 285 | VECTAB_ENTRY(UART4_IRQ), /*!< UART4 global Interrupt */ |
| 286 | VECTAB_ENTRY(UART5_IRQ), /*!< UART5 global Interrupt */ |
| 287 | VECTAB_ENTRY(TIM6_IRQ), /*!< TIM6 global Interrupt */ |
| 288 | VECTAB_ENTRY(TIM7_IRQ), /*!< TIM7 global Interrupt */ |
| 289 | VECTAB_ENTRY(DMA2_Channel1_IRQ), /*!< DMA2 Channel 1 global Interrupt */ |
| 290 | VECTAB_ENTRY(DMA2_Channel2_IRQ), /*!< DMA2 Channel 2 global Interrupt */ |
| 291 | VECTAB_ENTRY(DMA2_Channel3_IRQ), /*!< DMA2 Channel 3 global Interrupt */ |
| 292 | VECTAB_ENTRY(DMA2_Channel4_5_IRQ), /*!< DMA2 Channel 4 and Channel 5 global Interrupt */ |
| 293 | #endif /* STM32F10X_HD */ |
| 294 | |
| 295 | #ifdef STM32F10X_HD_VL |
| 296 | VECTAB_ENTRY(ADC1_IRQ), /*!< ADC1 global Interrupt */ |
| 297 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 298 | VECTAB_ENTRY(TIM1_BRK_TIM15_IRQ), /*!< TIM1 Break and TIM15 Interrupts */ |
| 299 | VECTAB_ENTRY(TIM1_UP_TIM16_IRQ), /*!< TIM1 Update and TIM16 Interrupts */ |
| 300 | VECTAB_ENTRY(TIM1_TRG_COM_TIM17_IRQ), /*!< TIM1 Trigger and Commutation and TIM17 Interrupt */ |
| 301 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 302 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 303 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 304 | VECTAB_ENTRY(TIM4_IRQ), /*!< TIM4 global Interrupt */ |
| 305 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 306 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 307 | VECTAB_ENTRY(I2C2_EV_IRQ), /*!< I2C2 Event Interrupt */ |
| 308 | VECTAB_ENTRY(I2C2_ER_IRQ), /*!< I2C2 Error Interrupt */ |
| 309 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 310 | VECTAB_ENTRY(SPI2_IRQ), /*!< SPI2 global Interrupt */ |
| 311 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 312 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 313 | VECTAB_ENTRY(USART3_IRQ), /*!< USART3 global Interrupt */ |
| 314 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 315 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 316 | VECTAB_ENTRY(CEC_IRQ), /*!< HDMI-CEC Interrupt */ |
| 317 | VECTAB_ENTRY(TIM12_IRQ), /*!< TIM12 global Interrupt */ |
| 318 | VECTAB_ENTRY(TIM13_IRQ), /*!< TIM13 global Interrupt */ |
| 319 | VECTAB_ENTRY(TIM14_IRQ), /*!< TIM14 global Interrupt */ |
| 320 | VECTAB_ENTRY(FSMC_IRQ), /*!< FSMC global Interrupt */ |
| 321 | VECTAB_ENTRY(TIM5_IRQ), /*!< TIM5 global Interrupt */ |
| 322 | VECTAB_ENTRY(SPI3_IRQ), /*!< SPI3 global Interrupt */ |
| 323 | VECTAB_ENTRY(UART4_IRQ), /*!< UART4 global Interrupt */ |
| 324 | VECTAB_ENTRY(UART5_IRQ), /*!< UART5 global Interrupt */ |
| 325 | VECTAB_ENTRY(TIM6_DAC_IRQ), /*!< TIM6 and DAC underrun Interrupt */ |
| 326 | VECTAB_ENTRY(TIM7_IRQ), /*!< TIM7 Interrupt */ |
| 327 | VECTAB_ENTRY(DMA2_Channel1_IRQ), /*!< DMA2 Channel 1 global Interrupt */ |
| 328 | VECTAB_ENTRY(DMA2_Channel2_IRQ), /*!< DMA2 Channel 2 global Interrupt */ |
| 329 | VECTAB_ENTRY(DMA2_Channel3_IRQ), /*!< DMA2 Channel 3 global Interrupt */ |
| 330 | VECTAB_ENTRY(DMA2_Channel4_5_IRQ), /*!< DMA2 Channel 4 and Channel 5 global Interrupt */ |
| 331 | VECTAB_ENTRY(DMA2_Channel5_IRQ), /*!< DMA2 Channel 5 global Interrupt (DMA2 Channel 5 is |
| 332 | mapped at postion 60 only if the MISC_REMAP bit in |
| 333 | the AFIO_MAPR2 register is set) */ |
| 334 | #endif /* STM32F10X_HD_VL */ |
| 335 | |
| 336 | #ifdef STM32F10X_XL |
| 337 | VECTAB_ENTRY(ADC1_2_IRQ), /*!< ADC1 and ADC2 global Interrupt */ |
| 338 | VECTAB_ENTRY(USB_HP_CAN1_TX_IRQ), /*!< USB Device High Priority or CAN1 TX Interrupts */ |
| 339 | VECTAB_ENTRY(USB_LP_CAN1_RX0_IRQ), /*!< USB Device Low Priority or CAN1 RX0 Interrupts */ |
| 340 | VECTAB_ENTRY(CAN1_RX1_IRQ), /*!< CAN1 RX1 Interrupt */ |
| 341 | VECTAB_ENTRY(CAN1_SCE_IRQ), /*!< CAN1 SCE Interrupt */ |
| 342 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 343 | VECTAB_ENTRY(TIM1_BRK_TIM9_IRQ), /*!< TIM1 Break Interrupt and TIM9 global Interrupt */ |
| 344 | VECTAB_ENTRY(TIM1_UP_TIM10_IRQ), /*!< TIM1 Update Interrupt and TIM10 global Interrupt */ |
| 345 | VECTAB_ENTRY(TIM1_TRG_COM_TIM11_IRQ), /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */ |
| 346 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 347 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 348 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 349 | VECTAB_ENTRY(TIM4_IRQ), /*!< TIM4 global Interrupt */ |
| 350 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 351 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 352 | VECTAB_ENTRY(I2C2_EV_IRQ), /*!< I2C2 Event Interrupt */ |
| 353 | VECTAB_ENTRY(I2C2_ER_IRQ), /*!< I2C2 Error Interrupt */ |
| 354 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 355 | VECTAB_ENTRY(SPI2_IRQ), /*!< SPI2 global Interrupt */ |
| 356 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 357 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 358 | VECTAB_ENTRY(USART3_IRQ), /*!< USART3 global Interrupt */ |
| 359 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 360 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 361 | VECTAB_ENTRY(USBWakeUp_IRQ), /*!< USB Device WakeUp from suspend through EXTI Line Interrupt */ |
| 362 | VECTAB_ENTRY(TIM8_BRK_TIM12_IRQ), /*!< TIM8 Break Interrupt and TIM12 global Interrupt */ |
| 363 | VECTAB_ENTRY(TIM8_UP_TIM13_IRQ), /*!< TIM8 Update Interrupt and TIM13 global Interrupt */ |
| 364 | VECTAB_ENTRY(TIM8_TRG_COM_TIM14_IRQ), /*!< TIM8 Trigger and Commutation Interrupt and TIM14 global interrupt */ |
| 365 | VECTAB_ENTRY(TIM8_CC_IRQ), /*!< TIM8 Capture Compare Interrupt */ |
| 366 | VECTAB_ENTRY(ADC3_IRQ), /*!< ADC3 global Interrupt */ |
| 367 | VECTAB_ENTRY(FSMC_IRQ), /*!< FSMC global Interrupt */ |
| 368 | VECTAB_ENTRY(SDIO_IRQ), /*!< SDIO global Interrupt */ |
| 369 | VECTAB_ENTRY(TIM5_IRQ), /*!< TIM5 global Interrupt */ |
| 370 | VECTAB_ENTRY(SPI3_IRQ), /*!< SPI3 global Interrupt */ |
| 371 | VECTAB_ENTRY(UART4_IRQ), /*!< UART4 global Interrupt */ |
| 372 | VECTAB_ENTRY(UART5_IRQ), /*!< UART5 global Interrupt */ |
| 373 | VECTAB_ENTRY(TIM6_IRQ), /*!< TIM6 global Interrupt */ |
| 374 | VECTAB_ENTRY(TIM7_IRQ), /*!< TIM7 global Interrupt */ |
| 375 | VECTAB_ENTRY(DMA2_Channel1_IRQ), /*!< DMA2 Channel 1 global Interrupt */ |
| 376 | VECTAB_ENTRY(DMA2_Channel2_IRQ), /*!< DMA2 Channel 2 global Interrupt */ |
| 377 | VECTAB_ENTRY(DMA2_Channel3_IRQ), /*!< DMA2 Channel 3 global Interrupt */ |
| 378 | VECTAB_ENTRY(DMA2_Channel4_5_IRQ), /*!< DMA2 Channel 4 and Channel 5 global Interrupt */ |
| 379 | #endif /* STM32F10X_XL */ |
| 380 | |
| 381 | #ifdef STM32F10X_CL |
| 382 | VECTAB_ENTRY(ADC1_2_IRQ), /*!< ADC1 and ADC2 global Interrupt */ |
| 383 | VECTAB_ENTRY(CAN1_TX_IRQ), /*!< USB Device High Priority or CAN1 TX Interrupts */ |
| 384 | VECTAB_ENTRY(CAN1_RX0_IRQ), /*!< USB Device Low Priority or CAN1 RX0 Interrupts */ |
| 385 | VECTAB_ENTRY(CAN1_RX1_IRQ), /*!< CAN1 RX1 Interrupt */ |
| 386 | VECTAB_ENTRY(CAN1_SCE_IRQ), /*!< CAN1 SCE Interrupt */ |
| 387 | VECTAB_ENTRY(EXTI9_5_IRQ), /*!< External Line[9:5] Interrupts */ |
| 388 | VECTAB_ENTRY(TIM1_BRK_IRQ), /*!< TIM1 Break Interrupt */ |
| 389 | VECTAB_ENTRY(TIM1_UP_IRQ), /*!< TIM1 Update Interrupt */ |
| 390 | VECTAB_ENTRY(TIM1_TRG_COM_IRQ), /*!< TIM1 Trigger and Commutation Interrupt */ |
| 391 | VECTAB_ENTRY(TIM1_CC_IRQ), /*!< TIM1 Capture Compare Interrupt */ |
| 392 | VECTAB_ENTRY(TIM2_IRQ), /*!< TIM2 global Interrupt */ |
| 393 | VECTAB_ENTRY(TIM3_IRQ), /*!< TIM3 global Interrupt */ |
| 394 | VECTAB_ENTRY(TIM4_IRQ), /*!< TIM4 global Interrupt */ |
| 395 | VECTAB_ENTRY(I2C1_EV_IRQ), /*!< I2C1 Event Interrupt */ |
| 396 | VECTAB_ENTRY(I2C1_ER_IRQ), /*!< I2C1 Error Interrupt */ |
| 397 | VECTAB_ENTRY(I2C2_EV_IRQ), /*!< I2C2 Event Interrupt */ |
| 398 | VECTAB_ENTRY(I2C2_ER_IRQ), /*!< I2C2 Error Interrupt */ |
| 399 | VECTAB_ENTRY(SPI1_IRQ), /*!< SPI1 global Interrupt */ |
| 400 | VECTAB_ENTRY(SPI2_IRQ), /*!< SPI2 global Interrupt */ |
| 401 | VECTAB_ENTRY(USART1_IRQ), /*!< USART1 global Interrupt */ |
| 402 | VECTAB_ENTRY(USART2_IRQ), /*!< USART2 global Interrupt */ |
| 403 | VECTAB_ENTRY(USART3_IRQ), /*!< USART3 global Interrupt */ |
| 404 | VECTAB_ENTRY(EXTI15_10_IRQ), /*!< External Line[15:10] Interrupts */ |
| 405 | VECTAB_ENTRY(RTCAlarm_IRQ), /*!< RTC Alarm through EXTI Line Interrupt */ |
| 406 | VECTAB_ENTRY(OTG_FS_WKUP_IRQ), /*!< USB OTG FS WakeUp from suspend through EXTI Line Interrupt */ |
| 407 | VECTAB_ENTRY(TIM5_IRQ), /*!< TIM5 global Interrupt */ |
| 408 | VECTAB_ENTRY(SPI3_IRQ), /*!< SPI3 global Interrupt */ |
| 409 | VECTAB_ENTRY(UART4_IRQ), /*!< UART4 global Interrupt */ |
| 410 | VECTAB_ENTRY(UART5_IRQ), /*!< UART5 global Interrupt */ |
| 411 | VECTAB_ENTRY(TIM6_IRQ), /*!< TIM6 global Interrupt */ |
| 412 | VECTAB_ENTRY(TIM7_IRQ), /*!< TIM7 global Interrupt */ |
| 413 | VECTAB_ENTRY(DMA2_Channel1_IRQ), /*!< DMA2 Channel 1 global Interrupt */ |
| 414 | VECTAB_ENTRY(DMA2_Channel2_IRQ), /*!< DMA2 Channel 2 global Interrupt */ |
| 415 | VECTAB_ENTRY(DMA2_Channel3_IRQ), /*!< DMA2 Channel 3 global Interrupt */ |
| 416 | VECTAB_ENTRY(DMA2_Channel4_IRQ), /*!< DMA2 Channel 4 global Interrupt */ |
| 417 | VECTAB_ENTRY(DMA2_Channel5_IRQ), /*!< DMA2 Channel 5 global Interrupt */ |
| 418 | VECTAB_ENTRY(ETH_IRQ), /*!< Ethernet global Interrupt */ |
| 419 | VECTAB_ENTRY(ETH_WKUP_IRQ), /*!< Ethernet Wakeup through EXTI line Interrupt */ |
| 420 | VECTAB_ENTRY(CAN2_TX_IRQ), /*!< CAN2 TX Interrupt */ |
| 421 | VECTAB_ENTRY(CAN2_RX0_IRQ), /*!< CAN2 RX0 Interrupt */ |
| 422 | VECTAB_ENTRY(CAN2_RX1_IRQ), /*!< CAN2 RX1 Interrupt */ |
| 423 | VECTAB_ENTRY(CAN2_SCE_IRQ), /*!< CAN2 SCE Interrupt */ |
| 424 | VECTAB_ENTRY(OTG_FS_IRQ), /*!< USB OTG FS global Interrupt */ |
| 425 | #endif /* STM32F10X_CL */ |
| 426 | }; |
| 427 | |