diff options
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32G4xx/stm32_isr.h')
-rw-r--r-- | lib/chibios/os/hal/ports/STM32/STM32G4xx/stm32_isr.h | 298 |
1 files changed, 298 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32G4xx/stm32_isr.h b/lib/chibios/os/hal/ports/STM32/STM32G4xx/stm32_isr.h new file mode 100644 index 000000000..d1dfdd066 --- /dev/null +++ b/lib/chibios/os/hal/ports/STM32/STM32G4xx/stm32_isr.h | |||
@@ -0,0 +1,298 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * @file STM32G4xx/stm32_isr.h | ||
19 | * @brief STM32G4xx ISR handler header. | ||
20 | * | ||
21 | * @addtogroup STM32G4xx_ISR | ||
22 | * @{ | ||
23 | */ | ||
24 | |||
25 | #ifndef STM32_ISR_H | ||
26 | #define STM32_ISR_H | ||
27 | |||
28 | /*===========================================================================*/ | ||
29 | /* Driver constants. */ | ||
30 | /*===========================================================================*/ | ||
31 | |||
32 | /** | ||
33 | * @name ISRs suppressed in standard drivers | ||
34 | * @{ | ||
35 | */ | ||
36 | #define STM32_TIM1_SUPPRESS_ISR | ||
37 | #define STM32_TIM2_SUPPRESS_ISR | ||
38 | #define STM32_TIM3_SUPPRESS_ISR | ||
39 | #define STM32_TIM4_SUPPRESS_ISR | ||
40 | #define STM32_TIM5_SUPPRESS_ISR | ||
41 | #define STM32_TIM6_SUPPRESS_ISR | ||
42 | #define STM32_TIM7_SUPPRESS_ISR | ||
43 | #define STM32_TIM8_SUPPRESS_ISR | ||
44 | #define STM32_TIM15_SUPPRESS_ISR | ||
45 | #define STM32_TIM16_SUPPRESS_ISR | ||
46 | #define STM32_TIM17_SUPPRESS_ISR | ||
47 | #define STM32_TIM20_SUPPRESS_ISR | ||
48 | |||
49 | #define STM32_USART1_SUPPRESS_ISR | ||
50 | #define STM32_USART2_SUPPRESS_ISR | ||
51 | #define STM32_USART3_SUPPRESS_ISR | ||
52 | #define STM32_UART4_SUPPRESS_ISR | ||
53 | #define STM32_UART5_SUPPRESS_ISR | ||
54 | #define STM32_LPUART1_SUPPRESS_ISR | ||
55 | /** @} */ | ||
56 | |||
57 | /** | ||
58 | * @name ISR names and numbers | ||
59 | * @{ | ||
60 | */ | ||
61 | /* | ||
62 | * ADC unit. | ||
63 | */ | ||
64 | #define STM32_ADC1_HANDLER Vector88 | ||
65 | #define STM32_ADC2_HANDLER Vector88 | ||
66 | #define STM32_ADC3_HANDLER VectorFC | ||
67 | #define STM32_ADC4_HANDLER Vector134 | ||
68 | #define STM32_ADC5_HANDLER Vector138 | ||
69 | |||
70 | #define STM32_ADC1_NUMBER 18 | ||
71 | #define STM32_ADC2_NUMBER 18 | ||
72 | #define STM32_ADC3_NUMBER 47 | ||
73 | #define STM32_ADC4_NUMBER 61 | ||
74 | #define STM32_ADC5_NUMBER 62 | ||
75 | |||
76 | /* | ||
77 | * DMA unit. | ||
78 | */ | ||
79 | #define STM32_DMA1_CH1_HANDLER Vector6C | ||
80 | #define STM32_DMA1_CH2_HANDLER Vector70 | ||
81 | #define STM32_DMA1_CH3_HANDLER Vector74 | ||
82 | #define STM32_DMA1_CH4_HANDLER Vector78 | ||
83 | #define STM32_DMA1_CH5_HANDLER Vector7C | ||
84 | #define STM32_DMA1_CH6_HANDLER Vector80 | ||
85 | #if !defined(STM32G431xx) && !defined(STM32G441xx) | ||
86 | #define STM32_DMA1_CH7_HANDLER Vector84 | ||
87 | #define STM32_DMA1_CH8_HANDLER Vector1C0 | ||
88 | #endif | ||
89 | #define STM32_DMA2_CH1_HANDLER Vector120 | ||
90 | #define STM32_DMA2_CH2_HANDLER Vector124 | ||
91 | #define STM32_DMA2_CH3_HANDLER Vector128 | ||
92 | #define STM32_DMA2_CH4_HANDLER Vector12C | ||
93 | #define STM32_DMA2_CH5_HANDLER Vector130 | ||
94 | #define STM32_DMA2_CH6_HANDLER Vector1C4 | ||
95 | #if !defined(STM32G431xx) && !defined(STM32G441xx) | ||
96 | #define STM32_DMA2_CH7_HANDLER Vector1C8 | ||
97 | #define STM32_DMA2_CH8_HANDLER Vector1CC | ||
98 | #endif | ||
99 | |||
100 | #define STM32_DMA1_CH1_NUMBER 11 | ||
101 | #define STM32_DMA1_CH2_NUMBER 12 | ||
102 | #define STM32_DMA1_CH3_NUMBER 13 | ||
103 | #define STM32_DMA1_CH4_NUMBER 14 | ||
104 | #define STM32_DMA1_CH5_NUMBER 15 | ||
105 | #define STM32_DMA1_CH6_NUMBER 16 | ||
106 | #if !defined(STM32G431xx) && !defined(STM32G441xx) | ||
107 | #define STM32_DMA1_CH7_NUMBER 17 | ||
108 | #define STM32_DMA1_CH8_NUMBER 96 | ||
109 | #endif | ||
110 | #define STM32_DMA2_CH1_NUMBER 56 | ||
111 | #define STM32_DMA2_CH2_NUMBER 57 | ||
112 | #define STM32_DMA2_CH3_NUMBER 58 | ||
113 | #define STM32_DMA2_CH4_NUMBER 59 | ||
114 | #define STM32_DMA2_CH5_NUMBER 60 | ||
115 | #define STM32_DMA2_CH6_NUMBER 97 | ||
116 | #if !defined(STM32G431xx) && !defined(STM32G441xx) | ||
117 | #define STM32_DMA2_CH7_NUMBER 98 | ||
118 | #define STM32_DMA2_CH8_NUMBER 99 | ||
119 | #endif | ||
120 | |||
121 | /* | ||
122 | * EXTI unit. | ||
123 | */ | ||
124 | #define STM32_EXTI0_HANDLER Vector58 | ||
125 | #define STM32_EXTI1_HANDLER Vector5C | ||
126 | #define STM32_EXTI2_HANDLER Vector60 | ||
127 | #define STM32_EXTI3_HANDLER Vector64 | ||
128 | #define STM32_EXTI4_HANDLER Vector68 | ||
129 | #define STM32_EXTI5_9_HANDLER Vector9C | ||
130 | #define STM32_EXTI10_15_HANDLER VectorE0 | ||
131 | #define STM32_EXTI164041_HANDLER Vector44 /* PVD PVM */ | ||
132 | #define STM32_EXTI17_HANDLER VectorE4 /* RTC ALARM */ | ||
133 | #define STM32_EXTI18_HANDLER VectorE8 /* USB WAKEUP */ | ||
134 | #define STM32_EXTI19_HANDLER Vector48 /* RTC TAMP CSS */ | ||
135 | #define STM32_EXTI20_HANDLER Vector4C /* RTC WAKEUP */ | ||
136 | #define STM32_EXTI212229_HANDLER Vector140 /* COMP1..3 */ | ||
137 | #define STM32_EXTI30_32_HANDLER Vector144 /* COMP4..6 */ | ||
138 | #define STM32_EXTI33_HANDLER Vector148 /* COMP7 */ | ||
139 | |||
140 | #define STM32_EXTI0_NUMBER 6 | ||
141 | #define STM32_EXTI1_NUMBER 7 | ||
142 | #define STM32_EXTI2_NUMBER 8 | ||
143 | #define STM32_EXTI3_NUMBER 9 | ||
144 | #define STM32_EXTI4_NUMBER 10 | ||
145 | #define STM32_EXTI5_9_NUMBER 23 | ||
146 | #define STM32_EXTI10_15_NUMBER 40 | ||
147 | #define STM32_EXTI164041_NUMBER 1 | ||
148 | #define STM32_EXTI17_NUMBER 41 | ||
149 | #define STM32_EXTI18_NUMBER 42 | ||
150 | #define STM32_EXTI19_NUMBER 2 | ||
151 | #define STM32_EXTI20_NUMBER 3 | ||
152 | #define STM32_EXTI212229_NUMBER 64 | ||
153 | #define STM32_EXTI30_32_NUMBER 65 | ||
154 | #define STM32_EXTI33_NUMBER 66 | ||
155 | |||
156 | /* | ||
157 | * FDCAN units. | ||
158 | */ | ||
159 | #define STM32_FDCAN1_IT0_HANDLER Vector94 | ||
160 | #define STM32_FDCAN1_IT1_HANDLER Vector98 | ||
161 | #define STM32_FDCAN2_IT0_HANDLER Vector198 | ||
162 | #define STM32_FDCAN2_IT1_HANDLER Vector19C | ||
163 | #define STM32_FDCAN3_IT0_HANDLER Vector1A0 | ||
164 | #define STM32_FDCAN3_IT1_HANDLER Vector1A4 | ||
165 | |||
166 | #define STM32_FDCAN1_IT0_NUMBER 21 | ||
167 | #define STM32_FDCAN1_IT1_NUMBER 22 | ||
168 | #define STM32_FDCAN2_IT0_NUMBER 86 | ||
169 | #define STM32_FDCAN2_IT1_NUMBER 87 | ||
170 | #define STM32_FDCAN3_IT0_NUMBER 88 | ||
171 | #define STM32_FDCAN3_IT1_NUMBER 89 | ||
172 | |||
173 | /* | ||
174 | * I2C units. | ||
175 | */ | ||
176 | #define STM32_I2C1_EVENT_HANDLER VectorBC | ||
177 | #define STM32_I2C1_ERROR_HANDLER VectorC0 | ||
178 | #define STM32_I2C2_EVENT_HANDLER VectorC4 | ||
179 | #define STM32_I2C2_ERROR_HANDLER VectorC8 | ||
180 | #define STM32_I2C3_EVENT_HANDLER Vector1B0 | ||
181 | #define STM32_I2C3_ERROR_HANDLER Vector1B4 | ||
182 | #define STM32_I2C4_EVENT_HANDLER Vector188 | ||
183 | #define STM32_I2C4_ERROR_HANDLER Vector18C | ||
184 | |||
185 | #define STM32_I2C1_EVENT_NUMBER 31 | ||
186 | #define STM32_I2C1_ERROR_NUMBER 32 | ||
187 | #define STM32_I2C2_EVENT_NUMBER 33 | ||
188 | #define STM32_I2C2_ERROR_NUMBER 34 | ||
189 | #define STM32_I2C3_EVENT_NUMBER 92 | ||
190 | #define STM32_I2C3_ERROR_NUMBER 93 | ||
191 | #define STM32_I2C4_EVENT_NUMBER 82 | ||
192 | #define STM32_I2C4_ERROR_NUMBER 83 | ||
193 | |||
194 | /* | ||
195 | * QUADSPI unit. | ||
196 | */ | ||
197 | #define STM32_QUADSPI1_HANDLER Vector1BC | ||
198 | #define STM32_QUADSPI1_NUMBER 95 | ||
199 | |||
200 | /* | ||
201 | * TIM units. | ||
202 | */ | ||
203 | #define STM32_TIM1_BRK_TIM15_HANDLER VectorA0 | ||
204 | #define STM32_TIM1_UP_TIM16_HANDLER VectorA4 | ||
205 | #define STM32_TIM1_TRGCO_TIM17_HANDLER VectorA8 | ||
206 | #define STM32_TIM1_CC_HANDLER VectorAC | ||
207 | #define STM32_TIM2_HANDLER VectorB0 | ||
208 | #define STM32_TIM3_HANDLER VectorB4 | ||
209 | #define STM32_TIM4_HANDLER VectorB8 | ||
210 | #define STM32_TIM5_HANDLER Vector108 | ||
211 | #define STM32_TIM6_HANDLER Vector118 | ||
212 | #define STM32_TIM7_HANDLER Vector11C | ||
213 | #define STM32_TIM8_BRK_HANDLER VectorEC | ||
214 | #define STM32_TIM8_UP_HANDLER VectorF0 | ||
215 | #define STM32_TIM8_TRGCO_HANDLER VectorF4 | ||
216 | #define STM32_TIM8_CC_HANDLER VectorF8 | ||
217 | #define STM32_TIM20_BRK_HANDLER Vector174 | ||
218 | #define STM32_TIM20_UP_HANDLER Vector178 | ||
219 | #define STM32_TIM20_TRGCO_HANDLER Vector17C | ||
220 | #define STM32_TIM20_CC_HANDLER Vector180 | ||
221 | |||
222 | #define STM32_TIM1_BRK_TIM15_NUMBER 24 | ||
223 | #define STM32_TIM1_UP_TIM16_NUMBER 25 | ||
224 | #define STM32_TIM1_TRGCO_TIM17_NUMBER 26 | ||
225 | #define STM32_TIM1_CC_NUMBER 27 | ||
226 | #define STM32_TIM2_NUMBER 28 | ||
227 | #define STM32_TIM3_NUMBER 29 | ||
228 | #define STM32_TIM4_NUMBER 30 | ||
229 | #define STM32_TIM5_NUMBER 50 | ||
230 | #define STM32_TIM6_NUMBER 54 | ||
231 | #define STM32_TIM7_NUMBER 55 | ||
232 | #define STM32_TIM8_BRK_NUMBER 43 | ||
233 | #define STM32_TIM8_UP_NUMBER 44 | ||
234 | #define STM32_TIM8_TRGCO_NUMBER 45 | ||
235 | #define STM32_TIM8_CC_NUMBER 46 | ||
236 | #define STM32_TIM20_BRK_NUMBER 77 | ||
237 | #define STM32_TIM20_UP_NUMBER 78 | ||
238 | #define STM32_TIM20_TRGCO_NUMBER 79 | ||
239 | #define STM32_TIM20_CC_NUMBER 80 | ||
240 | |||
241 | /* | ||
242 | * USART/UART units. | ||
243 | */ | ||
244 | #define STM32_USART1_HANDLER VectorD4 | ||
245 | #define STM32_USART2_HANDLER VectorD8 | ||
246 | #define STM32_USART3_HANDLER VectorDC | ||
247 | #define STM32_UART4_HANDLER Vector110 | ||
248 | #define STM32_UART5_HANDLER Vector114 | ||
249 | #define STM32_LPUART1_HANDLER Vector1AC | ||
250 | |||
251 | #define STM32_USART1_NUMBER 37 | ||
252 | #define STM32_USART2_NUMBER 38 | ||
253 | #define STM32_USART3_NUMBER 39 | ||
254 | #define STM32_UART4_NUMBER 52 | ||
255 | #define STM32_UART5_NUMBER 53 | ||
256 | #define STM32_LPUART1_NUMBER 91 | ||
257 | |||
258 | /* | ||
259 | * USB units. | ||
260 | */ | ||
261 | #define STM32_USB1_HP_HANDLER Vector8C | ||
262 | #define STM32_USB1_LP_HANDLER Vector90 | ||
263 | #define STM32_USB1_HP_NUMBER 19 | ||
264 | #define STM32_USB1_LP_NUMBER 20 | ||
265 | /** @} */ | ||
266 | |||
267 | /*===========================================================================*/ | ||
268 | /* Driver pre-compile time settings. */ | ||
269 | /*===========================================================================*/ | ||
270 | |||
271 | /*===========================================================================*/ | ||
272 | /* Derived constants and error checks. */ | ||
273 | /*===========================================================================*/ | ||
274 | |||
275 | /*===========================================================================*/ | ||
276 | /* Driver data structures and types. */ | ||
277 | /*===========================================================================*/ | ||
278 | |||
279 | /*===========================================================================*/ | ||
280 | /* Driver macros. */ | ||
281 | /*===========================================================================*/ | ||
282 | |||
283 | /*===========================================================================*/ | ||
284 | /* External declarations. */ | ||
285 | /*===========================================================================*/ | ||
286 | |||
287 | #ifdef __cplusplus | ||
288 | extern "C" { | ||
289 | #endif | ||
290 | void irqInit(void); | ||
291 | void irqDeinit(void); | ||
292 | #ifdef __cplusplus | ||
293 | } | ||
294 | #endif | ||
295 | |||
296 | #endif /* STM32_ISR_H */ | ||
297 | |||
298 | /** @} */ | ||