diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /lib/chibios/os/hal/ports/STM32/STM32F37x/stm32_registry.h |
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32F37x/stm32_registry.h')
-rw-r--r-- | lib/chibios/os/hal/ports/STM32/STM32F37x/stm32_registry.h | 572 |
1 files changed, 572 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32F37x/stm32_registry.h b/lib/chibios/os/hal/ports/STM32/STM32F37x/stm32_registry.h new file mode 100644 index 000000000..295a538c5 --- /dev/null +++ b/lib/chibios/os/hal/ports/STM32/STM32F37x/stm32_registry.h | |||
@@ -0,0 +1,572 @@ | |||
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 STM32F37x/stm32_registry.h | ||
19 | * @brief STM32F37x capabilities registry. | ||
20 | * | ||
21 | * @addtogroup HAL | ||
22 | * @{ | ||
23 | */ | ||
24 | |||
25 | #ifndef STM32_REGISTRY_H | ||
26 | #define STM32_REGISTRY_H | ||
27 | |||
28 | /*===========================================================================*/ | ||
29 | /* Platform capabilities. */ | ||
30 | /*===========================================================================*/ | ||
31 | |||
32 | /** | ||
33 | * @name STM32F37x capabilities | ||
34 | * @{ | ||
35 | */ | ||
36 | /*===========================================================================*/ | ||
37 | /* STM32F373xC. */ | ||
38 | /*===========================================================================*/ | ||
39 | #if defined(STM32F373xC) || defined(__DOXYGEN__) | ||
40 | /* ADC attributes.*/ | ||
41 | #define STM32_HAS_ADC1 TRUE | ||
42 | #define STM32_HAS_ADC2 FALSE | ||
43 | #define STM32_HAS_ADC3 FALSE | ||
44 | #define STM32_HAS_ADC4 FALSE | ||
45 | |||
46 | #define STM32_HAS_SDADC1 TRUE | ||
47 | #define STM32_HAS_SDADC2 TRUE | ||
48 | #define STM32_HAS_SDADC3 TRUE | ||
49 | |||
50 | /* CAN attributes.*/ | ||
51 | #define STM32_HAS_CAN1 TRUE | ||
52 | #define STM32_HAS_CAN2 FALSE | ||
53 | #define STM32_HAS_CAN3 FALSE | ||
54 | #define STM32_CAN_MAX_FILTERS 14 | ||
55 | |||
56 | /* DAC attributes.*/ | ||
57 | #define STM32_HAS_DAC1_CH1 TRUE | ||
58 | #define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) | ||
59 | |||
60 | #define STM32_HAS_DAC1_CH2 TRUE | ||
61 | #define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) | ||
62 | |||
63 | #define STM32_HAS_DAC2_CH1 TRUE | ||
64 | #define STM32_DAC_DAC2_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) | ||
65 | |||
66 | #define STM32_HAS_DAC2_CH2 FALSE | ||
67 | |||
68 | /* DMA attributes.*/ | ||
69 | #define STM32_ADVANCED_DMA FALSE | ||
70 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
71 | #define STM32_DMA_SUPPORTS_CSELR FALSE | ||
72 | |||
73 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
74 | #define STM32_DMA1_CH1_HANDLER Vector6C | ||
75 | #define STM32_DMA1_CH2_HANDLER Vector70 | ||
76 | #define STM32_DMA1_CH3_HANDLER Vector74 | ||
77 | #define STM32_DMA1_CH4_HANDLER Vector78 | ||
78 | #define STM32_DMA1_CH5_HANDLER Vector7C | ||
79 | #define STM32_DMA1_CH6_HANDLER Vector80 | ||
80 | #define STM32_DMA1_CH7_HANDLER Vector84 | ||
81 | #define STM32_DMA1_CH1_NUMBER 11 | ||
82 | #define STM32_DMA1_CH2_NUMBER 12 | ||
83 | #define STM32_DMA1_CH3_NUMBER 13 | ||
84 | #define STM32_DMA1_CH4_NUMBER 14 | ||
85 | #define STM32_DMA1_CH5_NUMBER 15 | ||
86 | #define STM32_DMA1_CH6_NUMBER 16 | ||
87 | #define STM32_DMA1_CH7_NUMBER 17 | ||
88 | |||
89 | #define STM32_DMA2_NUM_CHANNELS 5 | ||
90 | #define STM32_DMA2_CH1_HANDLER Vector120 | ||
91 | #define STM32_DMA2_CH2_HANDLER Vector124 | ||
92 | #define STM32_DMA2_CH3_HANDLER Vector128 | ||
93 | #define STM32_DMA2_CH4_HANDLER Vector12C | ||
94 | #define STM32_DMA2_CH5_HANDLER Vector130 | ||
95 | #define STM32_DMA2_CH1_NUMBER 56 | ||
96 | #define STM32_DMA2_CH2_NUMBER 57 | ||
97 | #define STM32_DMA2_CH3_NUMBER 58 | ||
98 | #define STM32_DMA2_CH4_NUMBER 59 | ||
99 | #define STM32_DMA2_CH5_NUMBER 60 | ||
100 | |||
101 | /* ETH attributes.*/ | ||
102 | #define STM32_HAS_ETH FALSE | ||
103 | |||
104 | /* EXTI attributes.*/ | ||
105 | #define STM32_EXTI_NUM_LINES 23 | ||
106 | #define STM32_EXTI_IMR1_MASK 0x1F800000U | ||
107 | |||
108 | /* GPIO attributes.*/ | ||
109 | #define STM32_HAS_GPIOA TRUE | ||
110 | #define STM32_HAS_GPIOB TRUE | ||
111 | #define STM32_HAS_GPIOC TRUE | ||
112 | #define STM32_HAS_GPIOD TRUE | ||
113 | #define STM32_HAS_GPIOE TRUE | ||
114 | #define STM32_HAS_GPIOF TRUE | ||
115 | #define STM32_HAS_GPIOG FALSE | ||
116 | #define STM32_HAS_GPIOH FALSE | ||
117 | #define STM32_HAS_GPIOI FALSE | ||
118 | #define STM32_HAS_GPIOJ FALSE | ||
119 | #define STM32_HAS_GPIOK FALSE | ||
120 | #define STM32_GPIO_EN_MASK (RCC_AHBENR_GPIOAEN | \ | ||
121 | RCC_AHBENR_GPIOBEN | \ | ||
122 | RCC_AHBENR_GPIOCEN | \ | ||
123 | RCC_AHBENR_GPIODEN | \ | ||
124 | RCC_AHBENR_GPIOEEN | \ | ||
125 | RCC_AHBENR_GPIOFEN) | ||
126 | |||
127 | /* I2C attributes.*/ | ||
128 | #define STM32_HAS_I2C1 TRUE | ||
129 | #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) | ||
130 | #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) | ||
131 | |||
132 | #define STM32_HAS_I2C2 TRUE | ||
133 | #define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
134 | #define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
135 | |||
136 | #define STM32_HAS_I2C3 FALSE | ||
137 | #define STM32_HAS_I2C4 FALSE | ||
138 | |||
139 | /* QUADSPI attributes.*/ | ||
140 | #define STM32_HAS_QUADSPI1 FALSE | ||
141 | |||
142 | /* RTC attributes.*/ | ||
143 | #define STM32_HAS_RTC TRUE | ||
144 | #define STM32_RTC_HAS_SUBSECONDS TRUE | ||
145 | #define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE | ||
146 | #define STM32_RTC_NUM_ALARMS 1 | ||
147 | #define STM32_RTC_STORAGE_SIZE 64 | ||
148 | #define STM32_RTC_TAMP_STAMP_HANDLER Vector48 | ||
149 | #define STM32_RTC_WKUP_HANDLER Vector4C | ||
150 | #define STM32_RTC_ALARM_HANDLER VectorE4 | ||
151 | #define STM32_RTC_TAMP_STAMP_NUMBER 2 | ||
152 | #define STM32_RTC_WKUP_NUMBER 3 | ||
153 | #define STM32_RTC_ALARM_NUMBER 41 | ||
154 | #define STM32_RTC_ALARM_EXTI 17 | ||
155 | #define STM32_RTC_TAMP_STAMP_EXTI 19 | ||
156 | #define STM32_RTC_WKUP_EXTI 20 | ||
157 | #define STM32_RTC_IRQ_ENABLE() do { \ | ||
158 | nvicEnableVector(STM32_RTC_TAMP_STAMP_NUMBER, STM32_IRQ_EXTI19_PRIORITY); \ | ||
159 | nvicEnableVector(STM32_RTC_WKUP_NUMBER, STM32_IRQ_EXTI20_PRIORITY); \ | ||
160 | nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI17_PRIORITY); \ | ||
161 | } while (false) | ||
162 | |||
163 | /* SDIO attributes.*/ | ||
164 | #define STM32_HAS_SDIO FALSE | ||
165 | |||
166 | /* SPI attributes.*/ | ||
167 | #define STM32_HAS_SPI1 TRUE | ||
168 | #define STM32_SPI1_SUPPORTS_I2S TRUE | ||
169 | #define STM32_SPI1_I2S_FULLDUPLEX FALSE | ||
170 | #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
171 | #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
172 | |||
173 | #define STM32_HAS_SPI2 TRUE | ||
174 | #define STM32_SPI2_SUPPORTS_I2S TRUE | ||
175 | #define STM32_SPI2_I2S_FULLDUPLEX FALSE | ||
176 | #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
177 | #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
178 | |||
179 | #define STM32_HAS_SPI3 TRUE | ||
180 | #define STM32_SPI3_SUPPORTS_I2S TRUE | ||
181 | #define STM32_SPI3_I2S_FULLDUPLEX FALSE | ||
182 | #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) | ||
183 | #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) | ||
184 | |||
185 | #define STM32_HAS_SPI4 FALSE | ||
186 | #define STM32_HAS_SPI5 FALSE | ||
187 | #define STM32_HAS_SPI6 FALSE | ||
188 | |||
189 | /* TIM attributes.*/ | ||
190 | #define STM32_TIM_MAX_CHANNELS 4 | ||
191 | |||
192 | #define STM32_HAS_TIM2 TRUE | ||
193 | #define STM32_TIM2_IS_32BITS TRUE | ||
194 | #define STM32_TIM2_CHANNELS 4 | ||
195 | |||
196 | #define STM32_HAS_TIM3 TRUE | ||
197 | #define STM32_TIM3_IS_32BITS FALSE | ||
198 | #define STM32_TIM3_CHANNELS 4 | ||
199 | |||
200 | #define STM32_HAS_TIM4 TRUE | ||
201 | #define STM32_TIM4_IS_32BITS FALSE | ||
202 | #define STM32_TIM4_CHANNELS 4 | ||
203 | |||
204 | #define STM32_HAS_TIM5 TRUE | ||
205 | #define STM32_TIM5_IS_32BITS TRUE | ||
206 | #define STM32_TIM5_CHANNELS 4 | ||
207 | |||
208 | #define STM32_HAS_TIM6 TRUE | ||
209 | #define STM32_TIM6_IS_32BITS FALSE | ||
210 | #define STM32_TIM6_CHANNELS 0 | ||
211 | |||
212 | #define STM32_HAS_TIM7 TRUE | ||
213 | #define STM32_TIM7_IS_32BITS FALSE | ||
214 | #define STM32_TIM7_CHANNELS 0 | ||
215 | |||
216 | #define STM32_HAS_TIM12 TRUE | ||
217 | #define STM32_TIM12_IS_32BITS FALSE | ||
218 | #define STM32_TIM12_CHANNELS 2 | ||
219 | |||
220 | #define STM32_HAS_TIM13 TRUE | ||
221 | #define STM32_TIM13_IS_32BITS FALSE | ||
222 | #define STM32_TIM13_CHANNELS 1 | ||
223 | |||
224 | #define STM32_HAS_TIM14 TRUE | ||
225 | #define STM32_TIM14_IS_32BITS FALSE | ||
226 | #define STM32_TIM14_CHANNELS 1 | ||
227 | |||
228 | #define STM32_HAS_TIM15 TRUE | ||
229 | #define STM32_TIM15_IS_32BITS FALSE | ||
230 | #define STM32_TIM15_CHANNELS 2 | ||
231 | |||
232 | #define STM32_HAS_TIM16 TRUE | ||
233 | #define STM32_TIM16_IS_32BITS FALSE | ||
234 | #define STM32_TIM16_CHANNELS 1 | ||
235 | |||
236 | #define STM32_HAS_TIM17 TRUE | ||
237 | #define STM32_TIM17_IS_32BITS FALSE | ||
238 | #define STM32_TIM17_CHANNELS 1 | ||
239 | |||
240 | #define STM32_HAS_TIM18 TRUE | ||
241 | #define STM32_TIM18_IS_32BITS FALSE | ||
242 | #define STM32_TIM18_CHANNELS 0 | ||
243 | |||
244 | #define STM32_HAS_TIM19 TRUE | ||
245 | #define STM32_TIM19_IS_32BITS FALSE | ||
246 | #define STM32_TIM19_CHANNELS 4 | ||
247 | |||
248 | #define STM32_HAS_TIM1 FALSE | ||
249 | #define STM32_HAS_TIM8 FALSE | ||
250 | #define STM32_HAS_TIM9 FALSE | ||
251 | #define STM32_HAS_TIM10 FALSE | ||
252 | #define STM32_HAS_TIM11 FALSE | ||
253 | #define STM32_HAS_TIM20 FALSE | ||
254 | #define STM32_HAS_TIM21 FALSE | ||
255 | #define STM32_HAS_TIM22 FALSE | ||
256 | |||
257 | /* USART attributes.*/ | ||
258 | #define STM32_HAS_USART1 TRUE | ||
259 | #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
260 | #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
261 | |||
262 | #define STM32_HAS_USART2 TRUE | ||
263 | #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) | ||
264 | #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) | ||
265 | |||
266 | #define STM32_HAS_USART3 TRUE | ||
267 | #define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
268 | #define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
269 | |||
270 | #define STM32_HAS_UART4 FALSE | ||
271 | #define STM32_HAS_UART5 FALSE | ||
272 | #define STM32_HAS_USART6 FALSE | ||
273 | #define STM32_HAS_UART7 FALSE | ||
274 | #define STM32_HAS_UART8 FALSE | ||
275 | #define STM32_HAS_LPUART1 FALSE | ||
276 | |||
277 | /* USB attributes.*/ | ||
278 | #define STM32_HAS_USB TRUE | ||
279 | #define STM32_USB_ACCESS_SCHEME_2x16 FALSE | ||
280 | #define STM32_USB_PMA_SIZE 512 | ||
281 | #define STM32_USB_HAS_BCDR FALSE | ||
282 | #define STM32_HAS_OTG1 FALSE | ||
283 | #define STM32_HAS_OTG2 FALSE | ||
284 | |||
285 | /* IWDG attributes.*/ | ||
286 | #define STM32_HAS_IWDG TRUE | ||
287 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
288 | |||
289 | /* LTDC attributes.*/ | ||
290 | #define STM32_HAS_LTDC FALSE | ||
291 | |||
292 | /* DMA2D attributes.*/ | ||
293 | #define STM32_HAS_DMA2D FALSE | ||
294 | |||
295 | /* FSMC attributes.*/ | ||
296 | #define STM32_HAS_FSMC FALSE | ||
297 | |||
298 | /* CRC attributes.*/ | ||
299 | #define STM32_HAS_CRC TRUE | ||
300 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
301 | #endif /* defined(STM32F373xC) */ | ||
302 | |||
303 | /*===========================================================================*/ | ||
304 | /* STM32F378xx. */ | ||
305 | /*===========================================================================*/ | ||
306 | #if defined(STM32F378xx) || defined(__DOXYGEN__) | ||
307 | /* ADC attributes.*/ | ||
308 | #define STM32_HAS_ADC1 TRUE | ||
309 | #define STM32_HAS_ADC2 FALSE | ||
310 | #define STM32_HAS_ADC3 FALSE | ||
311 | #define STM32_HAS_ADC4 FALSE | ||
312 | |||
313 | #define STM32_HAS_SDADC1 TRUE | ||
314 | #define STM32_HAS_SDADC2 TRUE | ||
315 | #define STM32_HAS_SDADC3 TRUE | ||
316 | |||
317 | /* CAN attributes.*/ | ||
318 | #define STM32_HAS_CAN1 TRUE | ||
319 | #define STM32_HAS_CAN2 FALSE | ||
320 | #define STM32_HAS_CAN3 FALSE | ||
321 | #define STM32_CAN_MAX_FILTERS 14 | ||
322 | |||
323 | /* DAC attributes.*/ | ||
324 | #define STM32_HAS_DAC1_CH1 TRUE | ||
325 | #define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) | ||
326 | |||
327 | #define STM32_HAS_DAC1_CH2 TRUE | ||
328 | #define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) | ||
329 | |||
330 | #define STM32_HAS_DAC2_CH1 TRUE | ||
331 | #define STM32_DAC_DAC2_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) | ||
332 | |||
333 | #define STM32_HAS_DAC2_CH2 FALSE | ||
334 | |||
335 | /* DMA attributes.*/ | ||
336 | #define STM32_ADVANCED_DMA FALSE | ||
337 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
338 | #define STM32_DMA_SUPPORTS_CSELR FALSE | ||
339 | |||
340 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
341 | #define STM32_DMA1_CH1_HANDLER Vector6C | ||
342 | #define STM32_DMA1_CH2_HANDLER Vector70 | ||
343 | #define STM32_DMA1_CH3_HANDLER Vector74 | ||
344 | #define STM32_DMA1_CH4_HANDLER Vector78 | ||
345 | #define STM32_DMA1_CH5_HANDLER Vector7C | ||
346 | #define STM32_DMA1_CH6_HANDLER Vector80 | ||
347 | #define STM32_DMA1_CH7_HANDLER Vector84 | ||
348 | #define STM32_DMA1_CH1_NUMBER 11 | ||
349 | #define STM32_DMA1_CH2_NUMBER 12 | ||
350 | #define STM32_DMA1_CH3_NUMBER 13 | ||
351 | #define STM32_DMA1_CH4_NUMBER 14 | ||
352 | #define STM32_DMA1_CH5_NUMBER 15 | ||
353 | #define STM32_DMA1_CH6_NUMBER 16 | ||
354 | #define STM32_DMA1_CH7_NUMBER 17 | ||
355 | |||
356 | #define STM32_DMA2_NUM_CHANNELS 5 | ||
357 | #define STM32_DMA2_CH1_HANDLER Vector120 | ||
358 | #define STM32_DMA2_CH2_HANDLER Vector124 | ||
359 | #define STM32_DMA2_CH3_HANDLER Vector128 | ||
360 | #define STM32_DMA2_CH4_HANDLER Vector12C | ||
361 | #define STM32_DMA2_CH5_HANDLER Vector130 | ||
362 | #define STM32_DMA2_CH1_NUMBER 56 | ||
363 | #define STM32_DMA2_CH2_NUMBER 57 | ||
364 | #define STM32_DMA2_CH3_NUMBER 58 | ||
365 | #define STM32_DMA2_CH4_NUMBER 59 | ||
366 | #define STM32_DMA2_CH5_NUMBER 60 | ||
367 | |||
368 | /* ETH attributes.*/ | ||
369 | #define STM32_HAS_ETH FALSE | ||
370 | |||
371 | /* EXTI attributes.*/ | ||
372 | #define STM32_EXTI_NUM_LINES 23 | ||
373 | #define STM32_EXTI_IMR1_MASK 0x1F800000U | ||
374 | |||
375 | /* GPIO attributes.*/ | ||
376 | #define STM32_HAS_GPIOA TRUE | ||
377 | #define STM32_HAS_GPIOB TRUE | ||
378 | #define STM32_HAS_GPIOC TRUE | ||
379 | #define STM32_HAS_GPIOD TRUE | ||
380 | #define STM32_HAS_GPIOE TRUE | ||
381 | #define STM32_HAS_GPIOF TRUE | ||
382 | #define STM32_HAS_GPIOG FALSE | ||
383 | #define STM32_HAS_GPIOH FALSE | ||
384 | #define STM32_HAS_GPIOI FALSE | ||
385 | #define STM32_HAS_GPIOJ FALSE | ||
386 | #define STM32_HAS_GPIOK FALSE | ||
387 | #define STM32_GPIO_EN_MASK (RCC_AHBENR_GPIOAEN | \ | ||
388 | RCC_AHBENR_GPIOBEN | \ | ||
389 | RCC_AHBENR_GPIOCEN | \ | ||
390 | RCC_AHBENR_GPIODEN | \ | ||
391 | RCC_AHBENR_GPIOEEN | \ | ||
392 | RCC_AHBENR_GPIOFEN) | ||
393 | |||
394 | /* I2C attributes.*/ | ||
395 | #define STM32_HAS_I2C1 TRUE | ||
396 | #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) | ||
397 | #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) | ||
398 | |||
399 | #define STM32_HAS_I2C2 TRUE | ||
400 | #define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
401 | #define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
402 | |||
403 | #define STM32_HAS_I2C3 FALSE | ||
404 | #define STM32_HAS_I2C4 FALSE | ||
405 | |||
406 | /* QUADSPI attributes.*/ | ||
407 | #define STM32_HAS_QUADSPI1 FALSE | ||
408 | |||
409 | /* RTC attributes.*/ | ||
410 | #define STM32_HAS_RTC TRUE | ||
411 | #define STM32_RTC_HAS_SUBSECONDS TRUE | ||
412 | #define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE | ||
413 | #define STM32_RTC_NUM_ALARMS 1 | ||
414 | #define STM32_RTC_STORAGE_SIZE 64 | ||
415 | #define STM32_RTC_TAMP_STAMP_HANDLER Vector48 | ||
416 | #define STM32_RTC_WKUP_HANDLER Vector4C | ||
417 | #define STM32_RTC_ALARM_HANDLER VectorE4 | ||
418 | #define STM32_RTC_TAMP_STAMP_NUMBER 2 | ||
419 | #define STM32_RTC_WKUP_NUMBER 3 | ||
420 | #define STM32_RTC_ALARM_NUMBER 41 | ||
421 | #define STM32_RTC_ALARM_EXTI 17 | ||
422 | #define STM32_RTC_TAMP_STAMP_EXTI 19 | ||
423 | #define STM32_RTC_WKUP_EXTI 20 | ||
424 | #define STM32_RTC_IRQ_ENABLE() do { \ | ||
425 | nvicEnableVector(STM32_RTC_TAMP_STAMP_NUMBER, STM32_IRQ_EXTI19_PRIORITY); \ | ||
426 | nvicEnableVector(STM32_RTC_WKUP_NUMBER, STM32_IRQ_EXTI20_PRIORITY); \ | ||
427 | nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI17_PRIORITY); \ | ||
428 | } while (false) | ||
429 | |||
430 | /* SDIO attributes.*/ | ||
431 | #define STM32_HAS_SDIO FALSE | ||
432 | |||
433 | /* SPI attributes.*/ | ||
434 | #define STM32_HAS_SPI1 TRUE | ||
435 | #define STM32_SPI1_SUPPORTS_I2S TRUE | ||
436 | #define STM32_SPI1_I2S_FULLDUPLEX FALSE | ||
437 | #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
438 | #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
439 | |||
440 | #define STM32_HAS_SPI2 TRUE | ||
441 | #define STM32_SPI2_SUPPORTS_I2S TRUE | ||
442 | #define STM32_SPI2_I2S_FULLDUPLEX FALSE | ||
443 | #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
444 | #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
445 | |||
446 | #define STM32_HAS_SPI3 TRUE | ||
447 | #define STM32_SPI3_SUPPORTS_I2S TRUE | ||
448 | #define STM32_SPI3_I2S_FULLDUPLEX FALSE | ||
449 | #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) | ||
450 | #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) | ||
451 | |||
452 | #define STM32_HAS_SPI4 FALSE | ||
453 | #define STM32_HAS_SPI5 FALSE | ||
454 | #define STM32_HAS_SPI6 FALSE | ||
455 | |||
456 | /* TIM attributes.*/ | ||
457 | #define STM32_TIM_MAX_CHANNELS 4 | ||
458 | |||
459 | #define STM32_HAS_TIM2 TRUE | ||
460 | #define STM32_TIM2_IS_32BITS TRUE | ||
461 | #define STM32_TIM2_CHANNELS 4 | ||
462 | |||
463 | #define STM32_HAS_TIM3 TRUE | ||
464 | #define STM32_TIM3_IS_32BITS FALSE | ||
465 | #define STM32_TIM3_CHANNELS 4 | ||
466 | |||
467 | #define STM32_HAS_TIM4 TRUE | ||
468 | #define STM32_TIM4_IS_32BITS FALSE | ||
469 | #define STM32_TIM4_CHANNELS 4 | ||
470 | |||
471 | #define STM32_HAS_TIM5 TRUE | ||
472 | #define STM32_TIM5_IS_32BITS TRUE | ||
473 | #define STM32_TIM5_CHANNELS 4 | ||
474 | |||
475 | #define STM32_HAS_TIM6 TRUE | ||
476 | #define STM32_TIM6_IS_32BITS FALSE | ||
477 | #define STM32_TIM6_CHANNELS 0 | ||
478 | |||
479 | #define STM32_HAS_TIM7 TRUE | ||
480 | #define STM32_TIM7_IS_32BITS FALSE | ||
481 | #define STM32_TIM7_CHANNELS 0 | ||
482 | |||
483 | #define STM32_HAS_TIM12 TRUE | ||
484 | #define STM32_TIM12_IS_32BITS FALSE | ||
485 | #define STM32_TIM12_CHANNELS 2 | ||
486 | |||
487 | #define STM32_HAS_TIM13 TRUE | ||
488 | #define STM32_TIM13_IS_32BITS FALSE | ||
489 | #define STM32_TIM13_CHANNELS 1 | ||
490 | |||
491 | #define STM32_HAS_TIM14 TRUE | ||
492 | #define STM32_TIM14_IS_32BITS FALSE | ||
493 | #define STM32_TIM14_CHANNELS 1 | ||
494 | |||
495 | #define STM32_HAS_TIM15 TRUE | ||
496 | #define STM32_TIM15_IS_32BITS FALSE | ||
497 | #define STM32_TIM15_CHANNELS 2 | ||
498 | |||
499 | #define STM32_HAS_TIM16 TRUE | ||
500 | #define STM32_TIM16_IS_32BITS FALSE | ||
501 | #define STM32_TIM16_CHANNELS 1 | ||
502 | |||
503 | #define STM32_HAS_TIM17 TRUE | ||
504 | #define STM32_TIM17_IS_32BITS FALSE | ||
505 | #define STM32_TIM17_CHANNELS 1 | ||
506 | |||
507 | #define STM32_HAS_TIM18 TRUE | ||
508 | #define STM32_TIM18_IS_32BITS FALSE | ||
509 | #define STM32_TIM18_CHANNELS 0 | ||
510 | |||
511 | #define STM32_HAS_TIM19 TRUE | ||
512 | #define STM32_TIM19_IS_32BITS FALSE | ||
513 | #define STM32_TIM19_CHANNELS 4 | ||
514 | |||
515 | #define STM32_HAS_TIM1 FALSE | ||
516 | #define STM32_HAS_TIM8 FALSE | ||
517 | #define STM32_HAS_TIM9 FALSE | ||
518 | #define STM32_HAS_TIM10 FALSE | ||
519 | #define STM32_HAS_TIM11 FALSE | ||
520 | #define STM32_HAS_TIM20 FALSE | ||
521 | #define STM32_HAS_TIM21 FALSE | ||
522 | #define STM32_HAS_TIM22 FALSE | ||
523 | |||
524 | /* USART attributes.*/ | ||
525 | #define STM32_HAS_USART1 TRUE | ||
526 | #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
527 | #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
528 | |||
529 | #define STM32_HAS_USART2 TRUE | ||
530 | #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) | ||
531 | #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) | ||
532 | |||
533 | #define STM32_HAS_USART3 TRUE | ||
534 | #define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
535 | #define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
536 | |||
537 | #define STM32_HAS_UART4 FALSE | ||
538 | #define STM32_HAS_UART5 FALSE | ||
539 | #define STM32_HAS_USART6 FALSE | ||
540 | #define STM32_HAS_UART7 FALSE | ||
541 | #define STM32_HAS_UART8 FALSE | ||
542 | #define STM32_HAS_LPUART1 FALSE | ||
543 | |||
544 | /* USB attributes.*/ | ||
545 | #define STM32_HAS_USB FALSE | ||
546 | #define STM32_USB_ACCESS_SCHEME_2x16 FALSE | ||
547 | #define STM32_USB_PMA_SIZE 512 | ||
548 | #define STM32_HAS_OTG1 FALSE | ||
549 | #define STM32_HAS_OTG2 FALSE | ||
550 | |||
551 | /* IWDG attributes.*/ | ||
552 | #define STM32_HAS_IWDG TRUE | ||
553 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
554 | |||
555 | /* LTDC attributes.*/ | ||
556 | #define STM32_HAS_LTDC FALSE | ||
557 | |||
558 | /* DMA2D attributes.*/ | ||
559 | #define STM32_HAS_DMA2D FALSE | ||
560 | |||
561 | /* FSMC attributes.*/ | ||
562 | #define STM32_HAS_FSMC FALSE | ||
563 | |||
564 | /* CRC attributes.*/ | ||
565 | #define STM32_HAS_CRC TRUE | ||
566 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
567 | #endif /* defined(STM32F378xx) */ | ||
568 | /** @} */ | ||
569 | |||
570 | #endif /* STM32_REGISTRY_H */ | ||
571 | |||
572 | /** @} */ | ||