aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/hal/ports/STM32/STM32F3xx/stm32_isr.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32F3xx/stm32_isr.h')
-rw-r--r--lib/chibios/os/hal/ports/STM32/STM32F3xx/stm32_isr.h400
1 files changed, 400 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32F3xx/stm32_isr.h b/lib/chibios/os/hal/ports/STM32/STM32F3xx/stm32_isr.h
new file mode 100644
index 000000000..67a77e1b5
--- /dev/null
+++ b/lib/chibios/os/hal/ports/STM32/STM32F3xx/stm32_isr.h
@@ -0,0 +1,400 @@
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 STM32F3xx/stm32_isr.h
19 * @brief STM32F3xx ISR handler header.
20 *
21 * @addtogroup STM32F3xx_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_TIM15_SUPPRESS_ISR
38#define STM32_TIM16_SUPPRESS_ISR
39#define STM32_TIM17_SUPPRESS_ISR
40/** @} */
41
42/**
43 * @name ISR names and numbers remapping
44 * @{
45 */
46/*
47 * CAN units.
48 */
49#define STM32_CAN1_TX_HANDLER Vector8C
50#define STM32_CAN1_RX0_HANDLER Vector90
51#define STM32_CAN1_RX1_HANDLER Vector94
52#define STM32_CAN1_SCE_HANDLER Vector98
53
54#define STM32_CAN1_TX_NUMBER 19
55#define STM32_CAN1_RX0_NUMBER 20
56#define STM32_CAN1_RX1_NUMBER 21
57#define STM32_CAN1_SCE_NUMBER 22
58
59/*
60 * I2C units.
61 */
62#define STM32_I2C1_EVENT_HANDLER VectorBC
63#define STM32_I2C1_ERROR_HANDLER VectorC0
64#define STM32_I2C1_EVENT_NUMBER 31
65#define STM32_I2C1_ERROR_NUMBER 32
66
67#define STM32_I2C2_EVENT_HANDLER VectorC4
68#define STM32_I2C2_ERROR_HANDLER VectorC8
69#define STM32_I2C2_EVENT_NUMBER 33
70#define STM32_I2C2_ERROR_NUMBER 34
71
72#define STM32_I2C3_EVENT_HANDLER Vector160
73#define STM32_I2C3_ERROR_HANDLER Vector164
74#define STM32_I2C3_EVENT_NUMBER 72
75#define STM32_I2C3_ERROR_NUMBER 73
76
77/*
78 * TIM units.
79 */
80#define STM32_TIM1_UP_HANDLER VectorA4
81#define STM32_TIM1_CC_HANDLER VectorAC
82#define STM32_TIM2_HANDLER VectorB0
83#define STM32_TIM3_HANDLER VectorB4
84#define STM32_TIM4_HANDLER VectorB8
85#define STM32_TIM6_HANDLER Vector118
86#define STM32_TIM7_HANDLER Vector11C
87#define STM32_TIM8_UP_HANDLER VectorF0
88#define STM32_TIM8_CC_HANDLER VectorF8
89#define STM32_TIM15_HANDLER VectorA0 /* Note: same as STM32_TIM1_BRK */
90#define STM32_TIM16_HANDLER VectorA4 /* Note: same as STM32_TIM1_UP */
91#define STM32_TIM17_HANDLER VectorA8 /* Note: same as STM32_TIM1_TRG_COM */
92#define STM32_TIM20_UP_HANDLER Vector178
93#define STM32_TIM20_CC_HANDLER Vector180
94
95#define STM32_TIM1_UP_NUMBER 25
96#define STM32_TIM1_CC_NUMBER 27
97#define STM32_TIM2_NUMBER 28
98#define STM32_TIM3_NUMBER 29
99#define STM32_TIM4_NUMBER 30
100#define STM32_TIM6_NUMBER 54
101#define STM32_TIM7_NUMBER 55
102#define STM32_TIM8_UP_NUMBER 44
103#define STM32_TIM8_CC_NUMBER 46
104#define STM32_TIM15_NUMBER 24 /* Note: same as STM32_TIM1_BRK */
105#define STM32_TIM16_NUMBER 25 /* Note: same as STM32_TIM1_UP */
106#define STM32_TIM17_NUMBER 26 /* Note: same as STM32_TIM1_TRG_COM */
107#define STM32_TIM20_UP_NUMBER 78
108#define STM32_TIM20_CC_NUMBER 80
109
110/*
111 * HRTIM units (F334)
112 */
113#define STM32_HRTIM_MASTER_HANDLER Vector14C
114#define STM32_HRTIM_TIMA_HANDLER Vector150
115#define STM32_HRTIM_TIMB_HANDLER Vector154
116#define STM32_HRTIM_TIMC_HANDLER Vector158
117#define STM32_HRTIM_TIMD_HANDLER Vector15C
118#define STM32_HRTIM_TIME_HANDLER Vector160
119#define STM32_HRTIM_FLT_HANDLER Vector164
120
121#define STM32_HRTIM_MASTER_NUMBER 67
122#define STM32_HRTIM_TIMA_NUMBER 68
123#define STM32_HRTIM_TIMB_NUMBER 69
124#define STM32_HRTIM_TIMC_NUMBER 70
125#define STM32_HRTIM_TIMD_NUMBER 71
126#define STM32_HRTIM_TIME_NUMBER 72
127#define STM32_HRTIM_FLT_NUMBER 73
128
129/*
130 * USART units.
131 */
132#define STM32_USART1_HANDLER VectorD4
133#define STM32_USART2_HANDLER VectorD8
134#define STM32_USART3_HANDLER VectorDC
135#define STM32_UART4_HANDLER Vector110
136#define STM32_UART5_HANDLER Vector114
137
138#define STM32_USART1_NUMBER 37
139#define STM32_USART2_NUMBER 38
140#define STM32_USART3_NUMBER 39
141#define STM32_UART4_NUMBER 52
142#define STM32_UART5_NUMBER 53
143
144/*
145 * USB units.
146 */
147#define STM32_USB1_HP_HANDLER Vector168
148#define STM32_USB1_LP_HANDLER Vector16C
149
150#define STM32_USB1_HP_NUMBER 74
151#define STM32_USB1_LP_NUMBER 75
152/** @} */
153
154/*===========================================================================*/
155/* Driver pre-compile time settings. */
156/*===========================================================================*/
157
158/**
159 * @name Configuration options
160 * @{
161 */
162/**
163 * @brief EXTI0 interrupt priority level setting.
164 */
165#if !defined(STM32_IRQ_EXTI0_PRIORITY) || defined(__DOXYGEN__)
166#define STM32_IRQ_EXTI0_PRIORITY 6
167#endif
168
169/**
170 * @brief EXTI1 interrupt priority level setting.
171 */
172#if !defined(STM32_IRQ_EXTI1_PRIORITY) || defined(__DOXYGEN__)
173#define STM32_IRQ_EXTI1_PRIORITY 6
174#endif
175
176/**
177 * @brief EXTI2 interrupt priority level setting.
178 */
179#if !defined(STM32_IRQ_EXTI2_PRIORITY) || defined(__DOXYGEN__)
180#define STM32_IRQ_EXTI2_PRIORITY 6
181#endif
182
183/**
184 * @brief EXTI3 interrupt priority level setting.
185 */
186#if !defined(STM32_IRQ_EXTI3_PRIORITY) || defined(__DOXYGEN__)
187#define STM32_IRQ_EXTI3_PRIORITY 6
188#endif
189
190/**
191 * @brief EXTI4 interrupt priority level setting.
192 */
193#if !defined(STM32_IRQ_EXTI4_PRIORITY) || defined(__DOXYGEN__)
194#define STM32_IRQ_EXTI4_PRIORITY 6
195#endif
196
197/**
198 * @brief EXTI5..9 interrupt priority level setting.
199 */
200#if !defined(STM32_IRQ_EXTI5_9_PRIORITY) || defined(__DOXYGEN__)
201#define STM32_IRQ_EXTI5_9_PRIORITY 6
202#endif
203
204/**
205 * @brief EXTI10..15 interrupt priority level setting.
206 */
207#if !defined(STM32_IRQ_EXTI10_15_PRIORITY) || defined(__DOXYGEN__)
208#define STM32_IRQ_EXTI10_15_PRIORITY 6
209#endif
210
211/**
212 * @brief EXTI16 interrupt priority level setting.
213 */
214#if !defined(STM32_IRQ_EXTI16_PRIORITY) || defined(__DOXYGEN__)
215#define STM32_IRQ_EXTI16_PRIORITY 6
216#endif
217
218/**
219 * @brief EXTI17 interrupt priority level setting.
220 */
221#if !defined(STM32_IRQ_EXTI17_PRIORITY) || defined(__DOXYGEN__)
222#define STM32_IRQ_EXTI17_PRIORITY 6
223#endif
224
225/**
226 * @brief EXTI18 interrupt priority level setting.
227 */
228#if !defined(STM32_IRQ_EXTI18_PRIORITY) || defined(__DOXYGEN__)
229#define STM32_IRQ_EXTI18_PRIORITY 6
230#endif
231
232/**
233 * @brief EXTI19 interrupt priority level setting.
234 */
235#if !defined(STM32_IRQ_EXTI19_PRIORITY) || defined(__DOXYGEN__)
236#define STM32_IRQ_EXTI19_PRIORITY 6
237#endif
238
239/**
240 * @brief EXTI20 interrupt priority level setting.
241 */
242#if !defined(STM32_IRQ_EXTI20_PRIORITY) || defined(__DOXYGEN__)
243#define STM32_IRQ_EXTI20_PRIORITY 6
244#endif
245
246/**
247 * @brief EXTI21,22,29 interrupt priority level setting.
248 */
249#if !defined(STM32_IRQ_EXTI21_22_29_PRIORITY) || defined(__DOXYGEN__)
250#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
251#endif
252
253/**
254 * @brief EXTI30..32 interrupt priority level setting.
255 */
256#if !defined(STM32_IRQ_EXTI30_32_PRIORITY) || defined(__DOXYGEN__)
257#define STM32_IRQ_EXTI30_32_PRIORITY 6
258#endif
259
260/**
261 * @brief EXTI33 interrupt priority level setting.
262 */
263#if !defined(STM32_IRQ_EXTI33_PRIORITY) || defined(__DOXYGEN__)
264#define STM32_IRQ_EXTI33_PRIORITY 6
265#endif
266
267/**
268 * @brief TIM1-BRK, TIM15 interrupt priority level setting.
269 */
270#if !defined(STM32_IRQ_TIM1_BRK_TIM15_PRIORITY) || defined(__DOXYGEN__)
271#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
272#endif
273
274/**
275 * @brief TIM1-UP, TIM16 interrupt priority level setting.
276 */
277#if !defined(STM32_IRQ_TIM1_UP_TIM16_PRIORITY) || defined(__DOXYGEN__)
278#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
279#endif
280
281/**
282 * @brief TIM1-TRG-COM, TIM17 interrupt priority level setting.
283 */
284#if !defined(STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY) || defined(__DOXYGEN__)
285#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
286#endif
287
288/**
289 * @brief TIM1-CC interrupt priority level setting.
290 */
291#if !defined(STM32_IRQ_TIM1_CC_PRIORITY) || defined(__DOXYGEN__)
292#define STM32_IRQ_TIM1_CC_PRIORITY 7
293#endif
294/** @} */
295
296/*===========================================================================*/
297/* Derived constants and error checks. */
298/*===========================================================================*/
299
300/* IRQ priority checks.*/
301#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI0_PRIORITY)
302#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI0_PRIORITY"
303#endif
304
305#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI1_PRIORITY)
306#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI1_PRIORITY"
307#endif
308
309#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI2_PRIORITY)
310#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI2_PRIORITY"
311#endif
312
313#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI3_PRIORITY)
314#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI3_PRIORITY"
315#endif
316
317#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI4_PRIORITY)
318#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI4_PRIORITY"
319#endif
320
321#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI5_9_PRIORITY)
322#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI5_9_PRIORITY"
323#endif
324
325#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI10_15_PRIORITY)
326#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI10_15_PRIORITY"
327#endif
328
329#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI16_PRIORITY)
330#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI16_PRIORITY"
331#endif
332
333#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI17_PRIORITY)
334#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI17_PRIORITY"
335#endif
336
337#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI18_PRIORITY)
338#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI18_PRIORITY"
339#endif
340
341#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI19_PRIORITY)
342#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI19_PRIORITY"
343#endif
344
345#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI20_PRIORITY)
346#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI20_PRIORITY"
347#endif
348
349#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI21_22_29_PRIORITY)
350#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI21_22_29_PRIORITY"
351#endif
352
353#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI30_32_PRIORITY)
354#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI30_32_PRIORITY"
355#endif
356
357#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_EXTI33_PRIORITY)
358#error "Invalid IRQ priority assigned to STM32_IRQ_EXTI33_PRIORITY"
359#endif
360
361#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_BRK_TIM15_PRIORITY)
362#error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_BRK_TIM15_PRIORITY"
363#endif
364
365#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_UP_TIM16_PRIORITY)
366#error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_UP_TIM16_PRIORITY"
367#endif
368
369#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY)
370#error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY"
371#endif
372
373#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_IRQ_TIM1_CC_PRIORITY)
374#error "Invalid IRQ priority assigned to STM32_IRQ_TIM1_CC_PRIORITY"
375#endif
376
377/*===========================================================================*/
378/* Driver data structures and types. */
379/*===========================================================================*/
380
381/*===========================================================================*/
382/* Driver macros. */
383/*===========================================================================*/
384
385/*===========================================================================*/
386/* External declarations. */
387/*===========================================================================*/
388
389#ifdef __cplusplus
390extern "C" {
391#endif
392 void irqInit(void);
393 void irqDeinit(void);
394#ifdef __cplusplus
395}
396#endif
397
398#endif /* STM32_ISR_H */
399
400/** @} */