diff options
Diffstat (limited to 'lib/chibios/os/hal/ports/STM32/STM32L0xx/stm32_registry.h')
-rw-r--r-- | lib/chibios/os/hal/ports/STM32/STM32L0xx/stm32_registry.h | 1220 |
1 files changed, 1220 insertions, 0 deletions
diff --git a/lib/chibios/os/hal/ports/STM32/STM32L0xx/stm32_registry.h b/lib/chibios/os/hal/ports/STM32/STM32L0xx/stm32_registry.h new file mode 100644 index 000000000..067b07d0f --- /dev/null +++ b/lib/chibios/os/hal/ports/STM32/STM32L0xx/stm32_registry.h | |||
@@ -0,0 +1,1220 @@ | |||
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 STM32L0xx/stm32_registry.h | ||
19 | * @brief STM32L0xx 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 STM32L0xx capabilities | ||
34 | * @{ | ||
35 | */ | ||
36 | |||
37 | /*===========================================================================*/ | ||
38 | /* Common. */ | ||
39 | /*===========================================================================*/ | ||
40 | |||
41 | /* RNG attributes.*/ | ||
42 | #define STM32_HAS_RNG1 TRUE | ||
43 | |||
44 | /* RTC attributes.*/ | ||
45 | #define STM32_HAS_RTC TRUE | ||
46 | #define STM32_RTC_HAS_SUBSECONDS TRUE | ||
47 | #define STM32_RTC_HAS_PERIODIC_WAKEUPS TRUE | ||
48 | #define STM32_RTC_NUM_ALARMS 2 | ||
49 | #define STM32_RTC_STORAGE_SIZE 20 | ||
50 | #define STM32_RTC_COMMON_HANDLER Vector48 | ||
51 | #define STM32_RTC_COMMON_NUMBER 2 | ||
52 | #define STM32_RTC_ALARM_EXTI 17 | ||
53 | #define STM32_RTC_TAMP_STAMP_EXTI 19 | ||
54 | #define STM32_RTC_WKUP_EXTI 20 | ||
55 | #define STM32_RTC_IRQ_ENABLE() \ | ||
56 | nvicEnableVector(STM32_RTC_COMMON_NUMBER, STM32_IRQ_EXTI17_20_PRIORITY) | ||
57 | |||
58 | /*===========================================================================*/ | ||
59 | /* STM32L011xx. */ | ||
60 | /*===========================================================================*/ | ||
61 | #if defined(STM32L011xx) || defined(__DOXYGEN__) | ||
62 | |||
63 | /* ADC attributes.*/ | ||
64 | #define STM32_HAS_ADC1 TRUE | ||
65 | #define STM32_ADC_SUPPORTS_PRESCALER TRUE | ||
66 | #define STM32_ADC_SUPPORTS_OVERSAMPLING TRUE | ||
67 | #define STM32_ADC1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 1) |\ | ||
68 | STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
69 | #define STM32_ADC1_DMA_CHN 0x00000000 | ||
70 | |||
71 | #define STM32_HAS_ADC2 FALSE | ||
72 | #define STM32_HAS_ADC3 FALSE | ||
73 | #define STM32_HAS_ADC4 FALSE | ||
74 | |||
75 | /* CAN attributes.*/ | ||
76 | #define STM32_HAS_CAN1 FALSE | ||
77 | #define STM32_HAS_CAN2 FALSE | ||
78 | #define STM32_HAS_CAN3 FALSE | ||
79 | |||
80 | /* DAC attributes.*/ | ||
81 | #define STM32_HAS_DAC1_CH1 FALSE | ||
82 | #define STM32_HAS_DAC1_CH2 FALSE | ||
83 | #define STM32_HAS_DAC2_CH1 FALSE | ||
84 | #define STM32_HAS_DAC2_CH2 FALSE | ||
85 | |||
86 | /* DMA attributes.*/ | ||
87 | #define STM32_ADVANCED_DMA TRUE | ||
88 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
89 | #define STM32_DMA_SUPPORTS_CSELR TRUE | ||
90 | #define STM32_DMA1_NUM_CHANNELS 5 | ||
91 | #define STM32_DMA2_NUM_CHANNELS 0 | ||
92 | |||
93 | /* ETH attributes.*/ | ||
94 | #define STM32_HAS_ETH FALSE | ||
95 | |||
96 | /* EXTI attributes.*/ | ||
97 | #define STM32_EXTI_NUM_LINES 23 | ||
98 | #define STM32_EXTI_IMR1_MASK 0xFF840000U | ||
99 | |||
100 | /* GPIO attributes.*/ | ||
101 | #define STM32_HAS_GPIOA TRUE | ||
102 | #define STM32_HAS_GPIOB TRUE | ||
103 | #define STM32_HAS_GPIOC TRUE | ||
104 | #define STM32_HAS_GPIOD FALSE | ||
105 | #define STM32_HAS_GPIOE FALSE | ||
106 | #define STM32_HAS_GPIOF FALSE | ||
107 | #define STM32_HAS_GPIOG FALSE | ||
108 | #define STM32_HAS_GPIOH FALSE | ||
109 | #define STM32_HAS_GPIOI FALSE | ||
110 | #define STM32_HAS_GPIOJ FALSE | ||
111 | #define STM32_HAS_GPIOK FALSE | ||
112 | #define STM32_GPIO_EN_MASK (RCC_IOPENR_GPIOAEN | \ | ||
113 | RCC_IOPENR_GPIOBEN | \ | ||
114 | RCC_IOPENR_GPIOCEN) | ||
115 | |||
116 | /* I2C attributes.*/ | ||
117 | #define STM32_HAS_I2C1 TRUE | ||
118 | #define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
119 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
120 | #define STM32_I2C1_RX_DMA_CHN 0x06000600 | ||
121 | #define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
122 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
123 | #define STM32_I2C1_TX_DMA_CHN 0x00600060 | ||
124 | |||
125 | #define STM32_HAS_I2C2 FALSE | ||
126 | #define STM32_HAS_I2C3 FALSE | ||
127 | #define STM32_HAS_I2C4 FALSE | ||
128 | |||
129 | /* QUADSPI attributes.*/ | ||
130 | #define STM32_HAS_QUADSPI1 FALSE | ||
131 | |||
132 | /* SDIO attributes.*/ | ||
133 | #define STM32_HAS_SDIO FALSE | ||
134 | |||
135 | /* SPI attributes.*/ | ||
136 | #define STM32_HAS_SPI1 TRUE | ||
137 | #define STM32_SPI1_SUPPORTS_I2S FALSE | ||
138 | #define STM32_SPI1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
139 | #define STM32_SPI1_RX_DMA_CHN 0x00000010 | ||
140 | #define STM32_SPI1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) | ||
141 | #define STM32_SPI1_TX_DMA_CHN 0x00000100 | ||
142 | |||
143 | #define STM32_HAS_SPI2 FALSE | ||
144 | #define STM32_HAS_SPI3 FALSE | ||
145 | #define STM32_HAS_SPI4 FALSE | ||
146 | #define STM32_HAS_SPI5 FALSE | ||
147 | #define STM32_HAS_SPI6 FALSE | ||
148 | |||
149 | /* TIM attributes.*/ | ||
150 | #define STM32_TIM_MAX_CHANNELS 4 | ||
151 | |||
152 | #define STM32_HAS_TIM2 TRUE | ||
153 | #define STM32_TIM2_IS_32BITS FALSE | ||
154 | #define STM32_TIM2_CHANNELS 4 | ||
155 | |||
156 | #define STM32_HAS_TIM21 TRUE | ||
157 | #define STM32_TIM21_IS_32BITS FALSE | ||
158 | #define STM32_TIM21_CHANNELS 2 | ||
159 | |||
160 | #define STM32_HAS_TIM1 FALSE | ||
161 | #define STM32_HAS_TIM3 FALSE | ||
162 | #define STM32_HAS_TIM4 FALSE | ||
163 | #define STM32_HAS_TIM5 FALSE | ||
164 | #define STM32_HAS_TIM6 FALSE | ||
165 | #define STM32_HAS_TIM7 FALSE | ||
166 | #define STM32_HAS_TIM8 FALSE | ||
167 | #define STM32_HAS_TIM9 FALSE | ||
168 | #define STM32_HAS_TIM10 FALSE | ||
169 | #define STM32_HAS_TIM11 FALSE | ||
170 | #define STM32_HAS_TIM12 FALSE | ||
171 | #define STM32_HAS_TIM13 FALSE | ||
172 | #define STM32_HAS_TIM14 FALSE | ||
173 | #define STM32_HAS_TIM15 FALSE | ||
174 | #define STM32_HAS_TIM16 FALSE | ||
175 | #define STM32_HAS_TIM17 FALSE | ||
176 | #define STM32_HAS_TIM18 FALSE | ||
177 | #define STM32_HAS_TIM19 FALSE | ||
178 | #define STM32_HAS_TIM20 FALSE | ||
179 | #define STM32_HAS_TIM22 FALSE | ||
180 | |||
181 | /* USART attributes.*/ | ||
182 | #define STM32_HAS_USART2 TRUE | ||
183 | #define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
184 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
185 | #define STM32_USART2_RX_DMA_CHN 0x00440000 | ||
186 | #define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
187 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
188 | #define STM32_USART2_TX_DMA_CHN 0x04004000 | ||
189 | |||
190 | #define STM32_HAS_LPUART1 TRUE | ||
191 | |||
192 | #define STM32_HAS_USART1 FALSE | ||
193 | #define STM32_HAS_USART3 FALSE | ||
194 | #define STM32_HAS_UART4 FALSE | ||
195 | #define STM32_HAS_UART5 FALSE | ||
196 | #define STM32_HAS_USART6 FALSE | ||
197 | #define STM32_HAS_UART7 FALSE | ||
198 | #define STM32_HAS_UART8 FALSE | ||
199 | |||
200 | /* USB attributes.*/ | ||
201 | #define STM32_HAS_USB FALSE | ||
202 | #define STM32_HAS_OTG1 FALSE | ||
203 | #define STM32_HAS_OTG2 FALSE | ||
204 | |||
205 | /* IWDG attributes.*/ | ||
206 | #define STM32_HAS_IWDG TRUE | ||
207 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
208 | |||
209 | /* LTDC attributes.*/ | ||
210 | #define STM32_HAS_LTDC FALSE | ||
211 | |||
212 | /* DMA2D attributes.*/ | ||
213 | #define STM32_HAS_DMA2D FALSE | ||
214 | |||
215 | /* FSMC attributes.*/ | ||
216 | #define STM32_HAS_FSMC FALSE | ||
217 | |||
218 | /* CRC attributes.*/ | ||
219 | #define STM32_HAS_CRC TRUE | ||
220 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
221 | |||
222 | /*===========================================================================*/ | ||
223 | /* STM32L031xx. */ | ||
224 | /*===========================================================================*/ | ||
225 | #elif defined(STM32L031xx) | ||
226 | |||
227 | /* ADC attributes.*/ | ||
228 | #define STM32_HAS_ADC1 TRUE | ||
229 | #define STM32_ADC_SUPPORTS_PRESCALER TRUE | ||
230 | #define STM32_ADC_SUPPORTS_OVERSAMPLING TRUE | ||
231 | #define STM32_ADC1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 1) |\ | ||
232 | STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
233 | #define STM32_ADC1_DMA_CHN 0x00000000 | ||
234 | |||
235 | #define STM32_HAS_ADC2 FALSE | ||
236 | #define STM32_HAS_ADC3 FALSE | ||
237 | #define STM32_HAS_ADC4 FALSE | ||
238 | |||
239 | /* CAN attributes.*/ | ||
240 | #define STM32_HAS_CAN1 FALSE | ||
241 | #define STM32_HAS_CAN2 FALSE | ||
242 | #define STM32_HAS_CAN3 FALSE | ||
243 | |||
244 | /* DAC attributes.*/ | ||
245 | #define STM32_HAS_DAC1_CH1 FALSE | ||
246 | #define STM32_HAS_DAC1_CH2 FALSE | ||
247 | #define STM32_HAS_DAC2_CH1 FALSE | ||
248 | #define STM32_HAS_DAC2_CH2 FALSE | ||
249 | |||
250 | /* DMA attributes.*/ | ||
251 | #define STM32_ADVANCED_DMA TRUE | ||
252 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
253 | #define STM32_DMA_SUPPORTS_CSELR TRUE | ||
254 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
255 | #define STM32_DMA2_NUM_CHANNELS 0 | ||
256 | |||
257 | /* ETH attributes.*/ | ||
258 | #define STM32_HAS_ETH FALSE | ||
259 | |||
260 | /* EXTI attributes.*/ | ||
261 | #define STM32_EXTI_NUM_LINES 23 | ||
262 | #define STM32_EXTI_IMR1_MASK 0xFF840000U | ||
263 | |||
264 | /* GPIO attributes.*/ | ||
265 | #define STM32_HAS_GPIOA TRUE | ||
266 | #define STM32_HAS_GPIOB TRUE | ||
267 | #define STM32_HAS_GPIOC TRUE | ||
268 | #define STM32_HAS_GPIOD FALSE | ||
269 | #define STM32_HAS_GPIOE FALSE | ||
270 | #define STM32_HAS_GPIOF FALSE | ||
271 | #define STM32_HAS_GPIOG FALSE | ||
272 | #define STM32_HAS_GPIOH TRUE | ||
273 | #define STM32_HAS_GPIOI FALSE | ||
274 | #define STM32_HAS_GPIOJ FALSE | ||
275 | #define STM32_HAS_GPIOK FALSE | ||
276 | #define STM32_GPIO_EN_MASK (RCC_IOPENR_GPIOAEN | \ | ||
277 | RCC_IOPENR_GPIOBEN | \ | ||
278 | RCC_IOPENR_GPIOCEN | \ | ||
279 | RCC_IOPENR_GPIOHEN) | ||
280 | |||
281 | /* I2C attributes.*/ | ||
282 | #define STM32_HAS_I2C1 TRUE | ||
283 | #define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
284 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
285 | #define STM32_I2C1_RX_DMA_CHN 0x06000600 | ||
286 | #define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
287 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
288 | #define STM32_I2C1_TX_DMA_CHN 0x00600060 | ||
289 | |||
290 | #define STM32_HAS_I2C2 FALSE | ||
291 | #define STM32_HAS_I2C3 FALSE | ||
292 | #define STM32_HAS_I2C4 FALSE | ||
293 | |||
294 | /* SDIO attributes.*/ | ||
295 | #define STM32_HAS_SDIO FALSE | ||
296 | |||
297 | /* SPI attributes.*/ | ||
298 | #define STM32_HAS_SPI1 TRUE | ||
299 | #define STM32_SPI1_SUPPORTS_I2S FALSE | ||
300 | #define STM32_SPI1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
301 | #define STM32_SPI1_RX_DMA_CHN 0x00000010 | ||
302 | #define STM32_SPI1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) | ||
303 | #define STM32_SPI1_TX_DMA_CHN 0x00000100 | ||
304 | |||
305 | #define STM32_HAS_SPI2 FALSE | ||
306 | #define STM32_HAS_SPI3 FALSE | ||
307 | #define STM32_HAS_SPI4 FALSE | ||
308 | #define STM32_HAS_SPI5 FALSE | ||
309 | #define STM32_HAS_SPI6 FALSE | ||
310 | |||
311 | /* TIM attributes.*/ | ||
312 | #define STM32_TIM_MAX_CHANNELS 4 | ||
313 | |||
314 | #define STM32_HAS_TIM2 TRUE | ||
315 | #define STM32_TIM2_IS_32BITS FALSE | ||
316 | #define STM32_TIM2_CHANNELS 4 | ||
317 | |||
318 | #define STM32_HAS_TIM21 TRUE | ||
319 | #define STM32_TIM21_IS_32BITS FALSE | ||
320 | #define STM32_TIM21_CHANNELS 2 | ||
321 | |||
322 | #define STM32_HAS_TIM22 TRUE | ||
323 | #define STM32_TIM22_IS_32BITS FALSE | ||
324 | #define STM32_TIM22_CHANNELS 2 | ||
325 | |||
326 | #define STM32_HAS_TIM1 FALSE | ||
327 | #define STM32_HAS_TIM3 FALSE | ||
328 | #define STM32_HAS_TIM4 FALSE | ||
329 | #define STM32_HAS_TIM5 FALSE | ||
330 | #define STM32_HAS_TIM6 FALSE | ||
331 | #define STM32_HAS_TIM7 FALSE | ||
332 | #define STM32_HAS_TIM8 FALSE | ||
333 | #define STM32_HAS_TIM9 FALSE | ||
334 | #define STM32_HAS_TIM10 FALSE | ||
335 | #define STM32_HAS_TIM11 FALSE | ||
336 | #define STM32_HAS_TIM12 FALSE | ||
337 | #define STM32_HAS_TIM13 FALSE | ||
338 | #define STM32_HAS_TIM14 FALSE | ||
339 | #define STM32_HAS_TIM15 FALSE | ||
340 | #define STM32_HAS_TIM16 FALSE | ||
341 | #define STM32_HAS_TIM17 FALSE | ||
342 | #define STM32_HAS_TIM18 FALSE | ||
343 | #define STM32_HAS_TIM19 FALSE | ||
344 | #define STM32_HAS_TIM20 FALSE | ||
345 | |||
346 | /* USART attributes.*/ | ||
347 | #define STM32_HAS_USART2 TRUE | ||
348 | #define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
349 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
350 | #define STM32_USART2_RX_DMA_CHN 0x00440000 | ||
351 | #define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
352 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
353 | #define STM32_USART2_TX_DMA_CHN 0x04004000 | ||
354 | |||
355 | #define STM32_HAS_LPUART1 TRUE | ||
356 | |||
357 | #define STM32_HAS_USART1 FALSE | ||
358 | #define STM32_HAS_USART3 FALSE | ||
359 | #define STM32_HAS_UART4 FALSE | ||
360 | #define STM32_HAS_UART5 FALSE | ||
361 | #define STM32_HAS_USART6 FALSE | ||
362 | #define STM32_HAS_UART7 FALSE | ||
363 | #define STM32_HAS_UART8 FALSE | ||
364 | |||
365 | /* USB attributes.*/ | ||
366 | #define STM32_HAS_USB FALSE | ||
367 | #define STM32_HAS_OTG1 FALSE | ||
368 | #define STM32_HAS_OTG2 FALSE | ||
369 | |||
370 | /* IWDG attributes.*/ | ||
371 | #define STM32_HAS_IWDG TRUE | ||
372 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
373 | |||
374 | /* LTDC attributes.*/ | ||
375 | #define STM32_HAS_LTDC FALSE | ||
376 | |||
377 | /* DMA2D attributes.*/ | ||
378 | #define STM32_HAS_DMA2D FALSE | ||
379 | |||
380 | /* FSMC attributes.*/ | ||
381 | #define STM32_HAS_FSMC FALSE | ||
382 | |||
383 | /* CRC attributes.*/ | ||
384 | #define STM32_HAS_CRC TRUE | ||
385 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
386 | |||
387 | /*===========================================================================*/ | ||
388 | /* STM32L051xx, STM32L061xx. */ | ||
389 | /*===========================================================================*/ | ||
390 | #elif defined(STM32L051xx) || defined(STM32L061xx) | ||
391 | |||
392 | /* ADC attributes.*/ | ||
393 | #define STM32_HAS_ADC1 TRUE | ||
394 | #define STM32_ADC_SUPPORTS_PRESCALER TRUE | ||
395 | #define STM32_ADC_SUPPORTS_OVERSAMPLING TRUE | ||
396 | #define STM32_ADC1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 1) |\ | ||
397 | STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
398 | #define STM32_ADC1_DMA_CHN 0x00000000 | ||
399 | |||
400 | #define STM32_HAS_ADC2 FALSE | ||
401 | #define STM32_HAS_ADC3 FALSE | ||
402 | #define STM32_HAS_ADC4 FALSE | ||
403 | |||
404 | /* CAN attributes.*/ | ||
405 | #define STM32_HAS_CAN1 FALSE | ||
406 | #define STM32_HAS_CAN2 FALSE | ||
407 | #define STM32_HAS_CAN3 FALSE | ||
408 | |||
409 | /* DAC attributes.*/ | ||
410 | #define STM32_HAS_DAC1_CH1 FALSE | ||
411 | #define STM32_HAS_DAC1_CH2 FALSE | ||
412 | #define STM32_HAS_DAC2_CH1 FALSE | ||
413 | #define STM32_HAS_DAC2_CH2 FALSE | ||
414 | |||
415 | /* DMA attributes.*/ | ||
416 | #define STM32_ADVANCED_DMA TRUE | ||
417 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
418 | #define STM32_DMA_SUPPORTS_CSELR TRUE | ||
419 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
420 | #define STM32_DMA2_NUM_CHANNELS 0 | ||
421 | |||
422 | /* ETH attributes.*/ | ||
423 | #define STM32_HAS_ETH FALSE | ||
424 | |||
425 | /* EXTI attributes.*/ | ||
426 | #define STM32_EXTI_NUM_LINES 23 | ||
427 | #define STM32_EXTI_IMR1_MASK 0xFF840000U | ||
428 | |||
429 | /* GPIO attributes.*/ | ||
430 | #define STM32_HAS_GPIOA TRUE | ||
431 | #define STM32_HAS_GPIOB TRUE | ||
432 | #define STM32_HAS_GPIOC TRUE | ||
433 | #define STM32_HAS_GPIOD TRUE | ||
434 | #define STM32_HAS_GPIOE FALSE | ||
435 | #define STM32_HAS_GPIOF FALSE | ||
436 | #define STM32_HAS_GPIOG FALSE | ||
437 | #define STM32_HAS_GPIOH TRUE | ||
438 | #define STM32_HAS_GPIOI FALSE | ||
439 | #define STM32_HAS_GPIOJ FALSE | ||
440 | #define STM32_HAS_GPIOK FALSE | ||
441 | #define STM32_GPIO_EN_MASK (RCC_IOPENR_GPIOAEN | \ | ||
442 | RCC_IOPENR_GPIOBEN | \ | ||
443 | RCC_IOPENR_GPIOCEN | \ | ||
444 | RCC_IOPENR_GPIODEN | \ | ||
445 | RCC_IOPENR_GPIOHEN) | ||
446 | |||
447 | /* I2C attributes.*/ | ||
448 | #define STM32_HAS_I2C1 TRUE | ||
449 | #define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
450 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
451 | #define STM32_I2C1_RX_DMA_CHN 0x06000600 | ||
452 | #define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
453 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
454 | #define STM32_I2C1_TX_DMA_CHN 0x00600060 | ||
455 | |||
456 | #define STM32_HAS_I2C2 TRUE | ||
457 | #define STM32_I2C2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5) | ||
458 | #define STM32_I2C2_RX_DMA_CHN 0x00070000 | ||
459 | #define STM32_I2C2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4) | ||
460 | #define STM32_I2C2_TX_DMA_CHN 0x00007000 | ||
461 | |||
462 | #define STM32_HAS_I2C3 FALSE | ||
463 | #define STM32_HAS_I2C4 FALSE | ||
464 | |||
465 | /* SDIO attributes.*/ | ||
466 | #define STM32_HAS_SDIO FALSE | ||
467 | |||
468 | /* SPI attributes.*/ | ||
469 | #define STM32_HAS_SPI1 TRUE | ||
470 | #define STM32_SPI1_SUPPORTS_I2S FALSE | ||
471 | #define STM32_SPI1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
472 | #define STM32_SPI1_RX_DMA_CHN 0x00000010 | ||
473 | #define STM32_SPI1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) | ||
474 | #define STM32_SPI1_TX_DMA_CHN 0x00000100 | ||
475 | |||
476 | #define STM32_HAS_SPI2 TRUE | ||
477 | #define STM32_SPI2_SUPPORTS_I2S TRUE | ||
478 | #define STM32_SPI2_I2S_FULLDUPLEX FALSE | ||
479 | #define STM32_SPI2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
480 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
481 | #define STM32_SPI2_RX_DMA_CHN 0x00202000 | ||
482 | #define STM32_SPI2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
483 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
484 | #define STM32_SPI2_TX_DMA_CHN 0x02020000 | ||
485 | |||
486 | #define STM32_HAS_SPI3 FALSE | ||
487 | #define STM32_HAS_SPI4 FALSE | ||
488 | #define STM32_HAS_SPI5 FALSE | ||
489 | #define STM32_HAS_SPI6 FALSE | ||
490 | |||
491 | /* TIM attributes.*/ | ||
492 | #define STM32_TIM_MAX_CHANNELS 4 | ||
493 | |||
494 | #define STM32_HAS_TIM2 TRUE | ||
495 | #define STM32_TIM2_IS_32BITS FALSE | ||
496 | #define STM32_TIM2_CHANNELS 4 | ||
497 | |||
498 | #define STM32_HAS_TIM6 TRUE | ||
499 | #define STM32_TIM6_IS_32BITS FALSE | ||
500 | #define STM32_TIM6_CHANNELS 0 | ||
501 | |||
502 | #define STM32_HAS_TIM21 TRUE | ||
503 | #define STM32_TIM21_IS_32BITS FALSE | ||
504 | #define STM32_TIM21_CHANNELS 2 | ||
505 | |||
506 | #define STM32_HAS_TIM22 TRUE | ||
507 | #define STM32_TIM22_IS_32BITS FALSE | ||
508 | #define STM32_TIM22_CHANNELS 2 | ||
509 | |||
510 | #define STM32_HAS_TIM1 FALSE | ||
511 | #define STM32_HAS_TIM3 FALSE | ||
512 | #define STM32_HAS_TIM4 FALSE | ||
513 | #define STM32_HAS_TIM5 FALSE | ||
514 | #define STM32_HAS_TIM7 FALSE | ||
515 | #define STM32_HAS_TIM8 FALSE | ||
516 | #define STM32_HAS_TIM9 FALSE | ||
517 | #define STM32_HAS_TIM10 FALSE | ||
518 | #define STM32_HAS_TIM11 FALSE | ||
519 | #define STM32_HAS_TIM12 FALSE | ||
520 | #define STM32_HAS_TIM13 FALSE | ||
521 | #define STM32_HAS_TIM14 FALSE | ||
522 | #define STM32_HAS_TIM15 FALSE | ||
523 | #define STM32_HAS_TIM16 FALSE | ||
524 | #define STM32_HAS_TIM17 FALSE | ||
525 | #define STM32_HAS_TIM18 FALSE | ||
526 | #define STM32_HAS_TIM19 FALSE | ||
527 | #define STM32_HAS_TIM20 FALSE | ||
528 | |||
529 | /* USART attributes.*/ | ||
530 | #define STM32_HAS_USART1 TRUE | ||
531 | #define STM32_USART1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
532 | STM32_DMA_STREAM_ID_MSK(1, 5)) | ||
533 | #define STM32_USART1_RX_DMA_CHN 0x00030300 | ||
534 | #define STM32_USART1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
535 | STM32_DMA_STREAM_ID_MSK(1, 4)) | ||
536 | #define STM32_USART1_TX_DMA_CHN 0x00003030 | ||
537 | |||
538 | #define STM32_HAS_USART2 TRUE | ||
539 | #define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
540 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
541 | #define STM32_USART2_RX_DMA_CHN 0x00440000 | ||
542 | #define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
543 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
544 | #define STM32_USART2_TX_DMA_CHN 0x04004000 | ||
545 | |||
546 | #define STM32_HAS_LPUART1 TRUE | ||
547 | |||
548 | #define STM32_HAS_USART3 FALSE | ||
549 | #define STM32_HAS_UART4 FALSE | ||
550 | #define STM32_HAS_UART5 FALSE | ||
551 | #define STM32_HAS_USART6 FALSE | ||
552 | #define STM32_HAS_UART7 FALSE | ||
553 | #define STM32_HAS_UART8 FALSE | ||
554 | |||
555 | /* USB attributes.*/ | ||
556 | #define STM32_HAS_USB FALSE | ||
557 | #define STM32_HAS_OTG1 FALSE | ||
558 | #define STM32_HAS_OTG2 FALSE | ||
559 | |||
560 | /* IWDG attributes.*/ | ||
561 | #define STM32_HAS_IWDG TRUE | ||
562 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
563 | |||
564 | /* LTDC attributes.*/ | ||
565 | #define STM32_HAS_LTDC FALSE | ||
566 | |||
567 | /* DMA2D attributes.*/ | ||
568 | #define STM32_HAS_DMA2D FALSE | ||
569 | |||
570 | /* FSMC attributes.*/ | ||
571 | #define STM32_HAS_FSMC FALSE | ||
572 | |||
573 | /* CRC attributes.*/ | ||
574 | #define STM32_HAS_CRC TRUE | ||
575 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
576 | |||
577 | |||
578 | /*===========================================================================*/ | ||
579 | /* STM32L052xx, STM32L062xx, STM32L053xx, STM32L063xx. */ | ||
580 | /*===========================================================================*/ | ||
581 | #elif defined(STM32L052xx) || defined(STM32L062xx) || \ | ||
582 | defined(STM32L053xx) || defined(STM32L063xx) | ||
583 | |||
584 | /* ADC attributes.*/ | ||
585 | #define STM32_HAS_ADC1 TRUE | ||
586 | #define STM32_ADC_SUPPORTS_PRESCALER TRUE | ||
587 | #define STM32_ADC_SUPPORTS_OVERSAMPLING TRUE | ||
588 | #define STM32_ADC1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 1) |\ | ||
589 | STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
590 | #define STM32_ADC1_DMA_CHN 0x00000000 | ||
591 | |||
592 | #define STM32_HAS_ADC2 FALSE | ||
593 | #define STM32_HAS_ADC3 FALSE | ||
594 | #define STM32_HAS_ADC4 FALSE | ||
595 | |||
596 | /* CAN attributes.*/ | ||
597 | #define STM32_HAS_CAN1 FALSE | ||
598 | #define STM32_HAS_CAN2 FALSE | ||
599 | #define STM32_HAS_CAN3 FALSE | ||
600 | |||
601 | /* DAC attributes.*/ | ||
602 | #define STM32_HAS_DAC1_CH1 TRUE | ||
603 | #define STM32_DAC1_CH1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
604 | #define STM32_DAC1_CH1_DMA_CHN 0x00000090 | ||
605 | |||
606 | #define STM32_HAS_DAC1_CH2 TRUE | ||
607 | #define STM32_HAS_DAC2_CH1 TRUE | ||
608 | #define STM32_HAS_DAC2_CH2 TRUE | ||
609 | |||
610 | /* DMA attributes.*/ | ||
611 | #define STM32_ADVANCED_DMA TRUE | ||
612 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
613 | #define STM32_DMA_SUPPORTS_CSELR TRUE | ||
614 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
615 | #define STM32_DMA2_NUM_CHANNELS 0 | ||
616 | |||
617 | /* ETH attributes.*/ | ||
618 | #define STM32_HAS_ETH FALSE | ||
619 | |||
620 | /* EXTI attributes.*/ | ||
621 | #define STM32_EXTI_NUM_LINES 23 | ||
622 | #define STM32_EXTI_IMR1_MASK 0xFF840000U | ||
623 | |||
624 | /* GPIO attributes.*/ | ||
625 | #define STM32_HAS_GPIOA TRUE | ||
626 | #define STM32_HAS_GPIOB TRUE | ||
627 | #define STM32_HAS_GPIOC TRUE | ||
628 | #define STM32_HAS_GPIOD TRUE | ||
629 | #define STM32_HAS_GPIOE FALSE | ||
630 | #define STM32_HAS_GPIOF FALSE | ||
631 | #define STM32_HAS_GPIOG FALSE | ||
632 | #define STM32_HAS_GPIOH TRUE | ||
633 | #define STM32_HAS_GPIOI FALSE | ||
634 | #define STM32_HAS_GPIOJ FALSE | ||
635 | #define STM32_HAS_GPIOK FALSE | ||
636 | #define STM32_GPIO_EN_MASK (RCC_IOPENR_GPIOAEN | \ | ||
637 | RCC_IOPENR_GPIOBEN | \ | ||
638 | RCC_IOPENR_GPIOCEN | \ | ||
639 | RCC_IOPENR_GPIODEN | \ | ||
640 | RCC_IOPENR_GPIOHEN) | ||
641 | |||
642 | /* I2C attributes.*/ | ||
643 | #define STM32_HAS_I2C1 TRUE | ||
644 | #define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
645 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
646 | #define STM32_I2C1_RX_DMA_CHN 0x06000600 | ||
647 | #define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
648 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
649 | #define STM32_I2C1_TX_DMA_CHN 0x00600060 | ||
650 | |||
651 | #define STM32_HAS_I2C2 TRUE | ||
652 | #define STM32_I2C2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5) | ||
653 | #define STM32_I2C2_RX_DMA_CHN 0x00070000 | ||
654 | #define STM32_I2C2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4) | ||
655 | #define STM32_I2C2_TX_DMA_CHN 0x00007000 | ||
656 | |||
657 | #define STM32_HAS_I2C3 FALSE | ||
658 | |||
659 | /* SDIO attributes.*/ | ||
660 | #define STM32_HAS_SDIO FALSE | ||
661 | |||
662 | /* SPI attributes.*/ | ||
663 | #define STM32_HAS_SPI1 TRUE | ||
664 | #define STM32_SPI1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
665 | #define STM32_SPI1_RX_DMA_CHN 0x00000010 | ||
666 | #define STM32_SPI1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) | ||
667 | #define STM32_SPI1_TX_DMA_CHN 0x00000100 | ||
668 | |||
669 | #define STM32_HAS_SPI2 TRUE | ||
670 | #define STM32_SPI2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
671 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
672 | #define STM32_SPI2_RX_DMA_CHN 0x00202000 | ||
673 | #define STM32_SPI2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
674 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
675 | #define STM32_SPI2_TX_DMA_CHN 0x02020000 | ||
676 | |||
677 | #define STM32_HAS_SPI3 FALSE | ||
678 | #define STM32_HAS_SPI4 FALSE | ||
679 | #define STM32_HAS_SPI5 FALSE | ||
680 | #define STM32_HAS_SPI6 FALSE | ||
681 | |||
682 | /* TIM attributes.*/ | ||
683 | #define STM32_TIM_MAX_CHANNELS 4 | ||
684 | |||
685 | #define STM32_HAS_TIM2 TRUE | ||
686 | #define STM32_TIM2_IS_32BITS FALSE | ||
687 | #define STM32_TIM2_CHANNELS 4 | ||
688 | |||
689 | #define STM32_HAS_TIM6 TRUE | ||
690 | #define STM32_TIM6_IS_32BITS FALSE | ||
691 | #define STM32_TIM6_CHANNELS 0 | ||
692 | |||
693 | #define STM32_HAS_TIM21 TRUE | ||
694 | #define STM32_TIM21_IS_32BITS FALSE | ||
695 | #define STM32_TIM21_CHANNELS 2 | ||
696 | |||
697 | #define STM32_HAS_TIM22 TRUE | ||
698 | #define STM32_TIM22_IS_32BITS FALSE | ||
699 | #define STM32_TIM22_CHANNELS 2 | ||
700 | |||
701 | #define STM32_HAS_TIM1 FALSE | ||
702 | #define STM32_HAS_TIM3 FALSE | ||
703 | #define STM32_HAS_TIM4 FALSE | ||
704 | #define STM32_HAS_TIM5 FALSE | ||
705 | #define STM32_HAS_TIM7 FALSE | ||
706 | #define STM32_HAS_TIM8 FALSE | ||
707 | #define STM32_HAS_TIM9 FALSE | ||
708 | #define STM32_HAS_TIM10 FALSE | ||
709 | #define STM32_HAS_TIM11 FALSE | ||
710 | #define STM32_HAS_TIM12 FALSE | ||
711 | #define STM32_HAS_TIM13 FALSE | ||
712 | #define STM32_HAS_TIM14 FALSE | ||
713 | #define STM32_HAS_TIM15 FALSE | ||
714 | #define STM32_HAS_TIM16 FALSE | ||
715 | #define STM32_HAS_TIM17 FALSE | ||
716 | #define STM32_HAS_TIM18 FALSE | ||
717 | #define STM32_HAS_TIM19 FALSE | ||
718 | #define STM32_HAS_TIM20 FALSE | ||
719 | |||
720 | /* USART attributes.*/ | ||
721 | #define STM32_HAS_USART1 TRUE | ||
722 | #define STM32_USART1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
723 | STM32_DMA_STREAM_ID_MSK(1, 5)) | ||
724 | #define STM32_USART1_RX_DMA_CHN 0x00030300 | ||
725 | #define STM32_USART1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
726 | STM32_DMA_STREAM_ID_MSK(1, 4)) | ||
727 | #define STM32_USART1_TX_DMA_CHN 0x00003030 | ||
728 | |||
729 | #define STM32_HAS_USART2 TRUE | ||
730 | #define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
731 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
732 | #define STM32_USART2_RX_DMA_CHN 0x00440000 | ||
733 | #define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
734 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
735 | #define STM32_USART2_TX_DMA_CHN 0x04004000 | ||
736 | |||
737 | #define STM32_HAS_LPUART1 TRUE | ||
738 | |||
739 | #define STM32_HAS_USART3 FALSE | ||
740 | #define STM32_HAS_UART4 FALSE | ||
741 | #define STM32_HAS_UART5 FALSE | ||
742 | #define STM32_HAS_USART6 FALSE | ||
743 | #define STM32_HAS_UART7 FALSE | ||
744 | #define STM32_HAS_UART8 FALSE | ||
745 | |||
746 | /* USB attributes.*/ | ||
747 | #define STM32_HAS_USB TRUE | ||
748 | #define STM32_USB_ACCESS_SCHEME_2x16 TRUE | ||
749 | #define STM32_USB_PMA_SIZE 1024 | ||
750 | #define STM32_USB_HAS_BCDR TRUE | ||
751 | |||
752 | #define STM32_HAS_OTG1 FALSE | ||
753 | #define STM32_HAS_OTG2 FALSE | ||
754 | |||
755 | /* IWDG attributes.*/ | ||
756 | #define STM32_HAS_IWDG TRUE | ||
757 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
758 | |||
759 | /* LTDC attributes.*/ | ||
760 | #define STM32_HAS_LTDC FALSE | ||
761 | |||
762 | /* DMA2D attributes.*/ | ||
763 | #define STM32_HAS_DMA2D FALSE | ||
764 | |||
765 | /* FSMC attributes.*/ | ||
766 | #define STM32_HAS_FSMC FALSE | ||
767 | |||
768 | /* CRC attributes.*/ | ||
769 | #define STM32_HAS_CRC TRUE | ||
770 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
771 | |||
772 | /*===========================================================================*/ | ||
773 | /* STM32L071xx. */ | ||
774 | /*===========================================================================*/ | ||
775 | #elif defined(STM32L071xx) | ||
776 | |||
777 | /* ADC attributes.*/ | ||
778 | #define STM32_HAS_ADC1 TRUE | ||
779 | #define STM32_ADC_SUPPORTS_PRESCALER TRUE | ||
780 | #define STM32_ADC_SUPPORTS_OVERSAMPLING TRUE | ||
781 | #define STM32_ADC1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 1) |\ | ||
782 | STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
783 | #define STM32_ADC1_DMA_CHN 0x00000000 | ||
784 | |||
785 | #define STM32_HAS_ADC2 FALSE | ||
786 | #define STM32_HAS_ADC3 FALSE | ||
787 | #define STM32_HAS_ADC4 FALSE | ||
788 | |||
789 | /* CAN attributes.*/ | ||
790 | #define STM32_HAS_CAN1 FALSE | ||
791 | #define STM32_HAS_CAN2 FALSE | ||
792 | #define STM32_HAS_CAN3 FALSE | ||
793 | |||
794 | /* DAC attributes.*/ | ||
795 | #define STM32_HAS_DAC1_CH1 TRUE | ||
796 | #define STM32_DAC1_CH1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
797 | #define STM32_DAC1_CH1_DMA_CHN 0x00000090 | ||
798 | #define STM32_HAS_DAC1_CH2 TRUE | ||
799 | #define STM32_DAC1_CH2_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4)) | ||
800 | #define STM32_DAC1_CH2_DMA_CHN 0x0000F000 | ||
801 | |||
802 | #define STM32_HAS_DAC2_CH1 FALSE | ||
803 | #define STM32_HAS_DAC2_CH2 FALSE | ||
804 | |||
805 | /* DMA attributes.*/ | ||
806 | #define STM32_ADVANCED_DMA TRUE | ||
807 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
808 | #define STM32_DMA_SUPPORTS_CSELR TRUE | ||
809 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
810 | #define STM32_DMA2_NUM_CHANNELS 0 | ||
811 | |||
812 | /* ETH attributes.*/ | ||
813 | #define STM32_HAS_ETH FALSE | ||
814 | |||
815 | /* EXTI attributes.*/ | ||
816 | #define STM32_EXTI_NUM_LINES 23 | ||
817 | #define STM32_EXTI_IMR1_MASK 0xFF840000U | ||
818 | |||
819 | /* GPIO attributes.*/ | ||
820 | #define STM32_HAS_GPIOA TRUE | ||
821 | #define STM32_HAS_GPIOB TRUE | ||
822 | #define STM32_HAS_GPIOC TRUE | ||
823 | #define STM32_HAS_GPIOD TRUE | ||
824 | #define STM32_HAS_GPIOE TRUE | ||
825 | #define STM32_HAS_GPIOF FALSE | ||
826 | #define STM32_HAS_GPIOG FALSE | ||
827 | #define STM32_HAS_GPIOH TRUE | ||
828 | #define STM32_HAS_GPIOI FALSE | ||
829 | #define STM32_HAS_GPIOJ FALSE | ||
830 | #define STM32_HAS_GPIOK FALSE | ||
831 | #define STM32_GPIO_EN_MASK (RCC_IOPENR_GPIOAEN | \ | ||
832 | RCC_IOPENR_GPIOBEN | \ | ||
833 | RCC_IOPENR_GPIOCEN | \ | ||
834 | RCC_IOPENR_GPIODEN | \ | ||
835 | RCC_IOPENR_GPIOEEN | \ | ||
836 | RCC_IOPENR_GPIOHEN) | ||
837 | |||
838 | /* I2C attributes.*/ | ||
839 | #define STM32_HAS_I2C1 TRUE | ||
840 | #define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
841 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
842 | #define STM32_I2C1_RX_DMA_CHN 0x06000600 | ||
843 | #define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
844 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
845 | #define STM32_I2C1_TX_DMA_CHN 0x00600060 | ||
846 | |||
847 | #define STM32_HAS_I2C2 TRUE | ||
848 | #define STM32_I2C2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5) | ||
849 | #define STM32_I2C2_RX_DMA_CHN 0x00070000 | ||
850 | #define STM32_I2C2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4) | ||
851 | #define STM32_I2C2_TX_DMA_CHN 0x00007000 | ||
852 | |||
853 | #define STM32_HAS_I2C3 TRUE | ||
854 | #define STM32_I2C3_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
855 | STM32_DMA_STREAM_ID_MSK(1, 5)) | ||
856 | #define STM32_I2C3_RX_DMA_CHN 0x00E0E000 | ||
857 | #define STM32_I2C3_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
858 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
859 | #define STM32_I2C3_TX_DMA_CHN 0x0E0E0000 | ||
860 | |||
861 | /* SDIO attributes.*/ | ||
862 | #define STM32_HAS_SDIO FALSE | ||
863 | |||
864 | /* SPI attributes.*/ | ||
865 | #define STM32_HAS_SPI1 TRUE | ||
866 | #define STM32_SPI1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
867 | #define STM32_SPI1_RX_DMA_CHN 0x00000010 | ||
868 | #define STM32_SPI1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) | ||
869 | #define STM32_SPI1_TX_DMA_CHN 0x00000100 | ||
870 | |||
871 | #define STM32_HAS_SPI2 TRUE | ||
872 | #define STM32_SPI2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
873 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
874 | #define STM32_SPI2_RX_DMA_CHN 0x00202000 | ||
875 | #define STM32_SPI2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
876 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
877 | #define STM32_SPI2_TX_DMA_CHN 0x02020000 | ||
878 | |||
879 | #define STM32_HAS_SPI3 FALSE | ||
880 | #define STM32_HAS_SPI4 FALSE | ||
881 | #define STM32_HAS_SPI5 FALSE | ||
882 | #define STM32_HAS_SPI6 FALSE | ||
883 | |||
884 | /* TIM attributes.*/ | ||
885 | #define STM32_TIM_MAX_CHANNELS 4 | ||
886 | |||
887 | #define STM32_HAS_TIM2 TRUE | ||
888 | #define STM32_TIM2_IS_32BITS FALSE | ||
889 | #define STM32_TIM2_CHANNELS 4 | ||
890 | |||
891 | #define STM32_HAS_TIM3 TRUE | ||
892 | #define STM32_TIM3_IS_32BITS FALSE | ||
893 | #define STM32_TIM3_CHANNELS 4 | ||
894 | |||
895 | #define STM32_HAS_TIM6 TRUE | ||
896 | #define STM32_TIM6_IS_32BITS FALSE | ||
897 | #define STM32_TIM6_CHANNELS 0 | ||
898 | |||
899 | #define STM32_HAS_TIM7 TRUE | ||
900 | #define STM32_TIM7_IS_32BITS FALSE | ||
901 | #define STM32_TIM7_CHANNELS 0 | ||
902 | |||
903 | #define STM32_HAS_TIM21 TRUE | ||
904 | #define STM32_TIM21_IS_32BITS FALSE | ||
905 | #define STM32_TIM21_CHANNELS 2 | ||
906 | |||
907 | #define STM32_HAS_TIM22 TRUE | ||
908 | #define STM32_TIM22_IS_32BITS FALSE | ||
909 | #define STM32_TIM22_CHANNELS 2 | ||
910 | |||
911 | #define STM32_HAS_TIM1 FALSE | ||
912 | #define STM32_HAS_TIM4 FALSE | ||
913 | #define STM32_HAS_TIM5 FALSE | ||
914 | #define STM32_HAS_TIM8 FALSE | ||
915 | #define STM32_HAS_TIM9 FALSE | ||
916 | #define STM32_HAS_TIM10 FALSE | ||
917 | #define STM32_HAS_TIM11 FALSE | ||
918 | #define STM32_HAS_TIM12 FALSE | ||
919 | #define STM32_HAS_TIM13 FALSE | ||
920 | #define STM32_HAS_TIM14 FALSE | ||
921 | #define STM32_HAS_TIM15 FALSE | ||
922 | #define STM32_HAS_TIM16 FALSE | ||
923 | #define STM32_HAS_TIM17 FALSE | ||
924 | #define STM32_HAS_TIM18 FALSE | ||
925 | #define STM32_HAS_TIM19 FALSE | ||
926 | #define STM32_HAS_TIM20 FALSE | ||
927 | |||
928 | /* USART attributes.*/ | ||
929 | #define STM32_HAS_USART1 TRUE | ||
930 | #define STM32_USART1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
931 | STM32_DMA_STREAM_ID_MSK(1, 5)) | ||
932 | #define STM32_USART1_RX_DMA_CHN 0x00030300 | ||
933 | #define STM32_USART1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
934 | STM32_DMA_STREAM_ID_MSK(1, 4)) | ||
935 | #define STM32_USART1_TX_DMA_CHN 0x00003030 | ||
936 | |||
937 | #define STM32_HAS_USART2 TRUE | ||
938 | #define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
939 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
940 | #define STM32_USART2_RX_DMA_CHN 0x00440000 | ||
941 | #define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
942 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
943 | #define STM32_USART2_TX_DMA_CHN 0x04004000 | ||
944 | |||
945 | #define STM32_HAS_UART4 TRUE | ||
946 | #define STM32_UART4_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
947 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
948 | #define STM32_UART4_RX_DMA_CHN 0x00C000C0 | ||
949 | #define STM32_UART4_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
950 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
951 | #define STM32_UART4_TX_DMA_CHN 0x0C000C00 | ||
952 | |||
953 | #define STM32_HAS_UART5 TRUE | ||
954 | #define STM32_UART5_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
955 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
956 | #define STM32_UART5_RX_DMA_CHN 0x00D000D0 | ||
957 | #define STM32_UART5_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
958 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
959 | #define STM32_UART5_TX_DMA_CHN 0x0D000D00 | ||
960 | |||
961 | #define STM32_HAS_LPUART1 TRUE | ||
962 | |||
963 | #define STM32_HAS_USART3 FALSE | ||
964 | #define STM32_HAS_USART6 FALSE | ||
965 | #define STM32_HAS_UART7 FALSE | ||
966 | #define STM32_HAS_UART8 FALSE | ||
967 | |||
968 | /* USB attributes.*/ | ||
969 | #define STM32_HAS_USB FALSE | ||
970 | #define STM32_HAS_OTG1 FALSE | ||
971 | #define STM32_HAS_OTG2 FALSE | ||
972 | |||
973 | /* IWDG attributes.*/ | ||
974 | #define STM32_HAS_IWDG TRUE | ||
975 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
976 | |||
977 | /* LTDC attributes.*/ | ||
978 | #define STM32_HAS_LTDC FALSE | ||
979 | |||
980 | /* DMA2D attributes.*/ | ||
981 | #define STM32_HAS_DMA2D FALSE | ||
982 | |||
983 | /* FSMC attributes.*/ | ||
984 | #define STM32_HAS_FSMC FALSE | ||
985 | |||
986 | /* CRC attributes.*/ | ||
987 | #define STM32_HAS_CRC TRUE | ||
988 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
989 | |||
990 | /*===========================================================================*/ | ||
991 | /* STM32L072xx, STM32L073xx. */ | ||
992 | /*===========================================================================*/ | ||
993 | #elif defined(STM32L072xx) || defined(STM32L073xx) | ||
994 | |||
995 | /* ADC attributes.*/ | ||
996 | #define STM32_HAS_ADC1 TRUE | ||
997 | #define STM32_ADC_SUPPORTS_PRESCALER TRUE | ||
998 | #define STM32_ADC_SUPPORTS_OVERSAMPLING TRUE | ||
999 | #define STM32_ADC1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 1) |\ | ||
1000 | STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
1001 | #define STM32_ADC1_DMA_CHN 0x00000000 | ||
1002 | |||
1003 | #define STM32_HAS_ADC2 FALSE | ||
1004 | #define STM32_HAS_ADC3 FALSE | ||
1005 | #define STM32_HAS_ADC4 FALSE | ||
1006 | |||
1007 | /* CAN attributes.*/ | ||
1008 | #define STM32_HAS_CAN1 FALSE | ||
1009 | #define STM32_HAS_CAN2 FALSE | ||
1010 | #define STM32_HAS_CAN3 FALSE | ||
1011 | |||
1012 | /* DAC attributes.*/ | ||
1013 | #define STM32_HAS_DAC1_CH1 TRUE | ||
1014 | #define STM32_DAC1_CH1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
1015 | #define STM32_DAC1_CH1_DMA_CHN 0x00000090 | ||
1016 | #define STM32_HAS_DAC1_CH2 TRUE | ||
1017 | #define STM32_DAC1_CH2_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4)) | ||
1018 | #define STM32_DAC1_CH2_DMA_CHN 0x0000F000 | ||
1019 | |||
1020 | #define STM32_HAS_DAC2_CH1 FALSE | ||
1021 | #define STM32_HAS_DAC2_CH2 FALSE | ||
1022 | |||
1023 | /* DMA attributes.*/ | ||
1024 | #define STM32_ADVANCED_DMA TRUE | ||
1025 | #define STM32_DMA_SUPPORTS_DMAMUX FALSE | ||
1026 | #define STM32_DMA_SUPPORTS_CSELR TRUE | ||
1027 | #define STM32_DMA1_NUM_CHANNELS 7 | ||
1028 | #define STM32_DMA2_NUM_CHANNELS 0 | ||
1029 | |||
1030 | /* ETH attributes.*/ | ||
1031 | #define STM32_HAS_ETH FALSE | ||
1032 | |||
1033 | /* EXTI attributes.*/ | ||
1034 | #define STM32_EXTI_NUM_LINES 23 | ||
1035 | #define STM32_EXTI_IMR1_MASK 0xFF840000U | ||
1036 | |||
1037 | /* GPIO attributes.*/ | ||
1038 | #define STM32_HAS_GPIOA TRUE | ||
1039 | #define STM32_HAS_GPIOB TRUE | ||
1040 | #define STM32_HAS_GPIOC TRUE | ||
1041 | #define STM32_HAS_GPIOD TRUE | ||
1042 | #define STM32_HAS_GPIOE TRUE | ||
1043 | #define STM32_HAS_GPIOF FALSE | ||
1044 | #define STM32_HAS_GPIOG FALSE | ||
1045 | #define STM32_HAS_GPIOH TRUE | ||
1046 | #define STM32_HAS_GPIOI FALSE | ||
1047 | #define STM32_HAS_GPIOJ FALSE | ||
1048 | #define STM32_HAS_GPIOK FALSE | ||
1049 | #define STM32_GPIO_EN_MASK (RCC_IOPENR_GPIOAEN | \ | ||
1050 | RCC_IOPENR_GPIOBEN | \ | ||
1051 | RCC_IOPENR_GPIOCEN | \ | ||
1052 | RCC_IOPENR_GPIODEN | \ | ||
1053 | RCC_IOPENR_GPIOEEN | \ | ||
1054 | RCC_IOPENR_GPIOHEN) | ||
1055 | |||
1056 | /* I2C attributes.*/ | ||
1057 | #define STM32_HAS_I2C1 TRUE | ||
1058 | #define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
1059 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
1060 | #define STM32_I2C1_RX_DMA_CHN 0x06000600 | ||
1061 | #define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
1062 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
1063 | #define STM32_I2C1_TX_DMA_CHN 0x00600060 | ||
1064 | |||
1065 | #define STM32_HAS_I2C2 TRUE | ||
1066 | #define STM32_I2C2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5) | ||
1067 | #define STM32_I2C2_RX_DMA_CHN 0x00070000 | ||
1068 | #define STM32_I2C2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4) | ||
1069 | #define STM32_I2C2_TX_DMA_CHN 0x00007000 | ||
1070 | |||
1071 | #define STM32_HAS_I2C3 TRUE | ||
1072 | #define STM32_I2C3_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
1073 | STM32_DMA_STREAM_ID_MSK(1, 5)) | ||
1074 | #define STM32_I2C3_RX_DMA_CHN 0x00E0E000 | ||
1075 | #define STM32_I2C3_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
1076 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
1077 | #define STM32_I2C3_TX_DMA_CHN 0x0E0E0000 | ||
1078 | |||
1079 | /* SDIO attributes.*/ | ||
1080 | #define STM32_HAS_SDIO FALSE | ||
1081 | |||
1082 | /* SPI attributes.*/ | ||
1083 | #define STM32_HAS_SPI1 TRUE | ||
1084 | #define STM32_SPI1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) | ||
1085 | #define STM32_SPI1_RX_DMA_CHN 0x00000010 | ||
1086 | #define STM32_SPI1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) | ||
1087 | #define STM32_SPI1_TX_DMA_CHN 0x00000100 | ||
1088 | |||
1089 | #define STM32_HAS_SPI2 TRUE | ||
1090 | #define STM32_SPI2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
1091 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
1092 | #define STM32_SPI2_RX_DMA_CHN 0x00202000 | ||
1093 | #define STM32_SPI2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
1094 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
1095 | #define STM32_SPI2_TX_DMA_CHN 0x02020000 | ||
1096 | |||
1097 | #define STM32_HAS_SPI3 FALSE | ||
1098 | #define STM32_HAS_SPI4 FALSE | ||
1099 | #define STM32_HAS_SPI5 FALSE | ||
1100 | #define STM32_HAS_SPI6 FALSE | ||
1101 | |||
1102 | /* TIM attributes.*/ | ||
1103 | #define STM32_TIM_MAX_CHANNELS 4 | ||
1104 | |||
1105 | #define STM32_HAS_TIM2 TRUE | ||
1106 | #define STM32_TIM2_IS_32BITS FALSE | ||
1107 | #define STM32_TIM2_CHANNELS 4 | ||
1108 | |||
1109 | #define STM32_HAS_TIM3 TRUE | ||
1110 | #define STM32_TIM3_IS_32BITS FALSE | ||
1111 | #define STM32_TIM3_CHANNELS 4 | ||
1112 | |||
1113 | #define STM32_HAS_TIM6 TRUE | ||
1114 | #define STM32_TIM6_IS_32BITS FALSE | ||
1115 | #define STM32_TIM6_CHANNELS 0 | ||
1116 | |||
1117 | #define STM32_HAS_TIM7 TRUE | ||
1118 | #define STM32_TIM7_IS_32BITS FALSE | ||
1119 | #define STM32_TIM7_CHANNELS 0 | ||
1120 | |||
1121 | #define STM32_HAS_TIM21 TRUE | ||
1122 | #define STM32_TIM21_IS_32BITS FALSE | ||
1123 | #define STM32_TIM21_CHANNELS 2 | ||
1124 | |||
1125 | #define STM32_HAS_TIM22 TRUE | ||
1126 | #define STM32_TIM22_IS_32BITS FALSE | ||
1127 | #define STM32_TIM22_CHANNELS 2 | ||
1128 | |||
1129 | #define STM32_HAS_TIM1 FALSE | ||
1130 | #define STM32_HAS_TIM4 FALSE | ||
1131 | #define STM32_HAS_TIM5 FALSE | ||
1132 | #define STM32_HAS_TIM8 FALSE | ||
1133 | #define STM32_HAS_TIM9 FALSE | ||
1134 | #define STM32_HAS_TIM10 FALSE | ||
1135 | #define STM32_HAS_TIM11 FALSE | ||
1136 | #define STM32_HAS_TIM12 FALSE | ||
1137 | #define STM32_HAS_TIM13 FALSE | ||
1138 | #define STM32_HAS_TIM14 FALSE | ||
1139 | #define STM32_HAS_TIM15 FALSE | ||
1140 | #define STM32_HAS_TIM16 FALSE | ||
1141 | #define STM32_HAS_TIM17 FALSE | ||
1142 | #define STM32_HAS_TIM18 FALSE | ||
1143 | #define STM32_HAS_TIM19 FALSE | ||
1144 | #define STM32_HAS_TIM20 FALSE | ||
1145 | |||
1146 | /* USART attributes.*/ | ||
1147 | #define STM32_HAS_USART1 TRUE | ||
1148 | #define STM32_USART1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
1149 | STM32_DMA_STREAM_ID_MSK(1, 5)) | ||
1150 | #define STM32_USART1_RX_DMA_CHN 0x00030300 | ||
1151 | #define STM32_USART1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
1152 | STM32_DMA_STREAM_ID_MSK(1, 4)) | ||
1153 | #define STM32_USART1_TX_DMA_CHN 0x00003030 | ||
1154 | |||
1155 | #define STM32_HAS_USART2 TRUE | ||
1156 | #define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\ | ||
1157 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
1158 | #define STM32_USART2_RX_DMA_CHN 0x00440000 | ||
1159 | #define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\ | ||
1160 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
1161 | #define STM32_USART2_TX_DMA_CHN 0x04004000 | ||
1162 | |||
1163 | #define STM32_HAS_UART4 TRUE | ||
1164 | #define STM32_UART4_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
1165 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
1166 | #define STM32_UART4_RX_DMA_CHN 0x00C000C0 | ||
1167 | #define STM32_UART4_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
1168 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
1169 | #define STM32_UART4_TX_DMA_CHN 0x0C000C00 | ||
1170 | |||
1171 | #define STM32_HAS_UART5 TRUE | ||
1172 | #define STM32_UART5_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\ | ||
1173 | STM32_DMA_STREAM_ID_MSK(1, 6)) | ||
1174 | #define STM32_UART5_RX_DMA_CHN 0x00D000D0 | ||
1175 | #define STM32_UART5_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\ | ||
1176 | STM32_DMA_STREAM_ID_MSK(1, 7)) | ||
1177 | #define STM32_UART5_TX_DMA_CHN 0x0D000D00 | ||
1178 | |||
1179 | #define STM32_HAS_LPUART1 TRUE | ||
1180 | |||
1181 | #define STM32_HAS_USART3 FALSE | ||
1182 | #define STM32_HAS_USART6 FALSE | ||
1183 | #define STM32_HAS_UART7 FALSE | ||
1184 | #define STM32_HAS_UART8 FALSE | ||
1185 | |||
1186 | /* USB attributes.*/ | ||
1187 | #define STM32_HAS_USB TRUE | ||
1188 | #define STM32_USB_ACCESS_SCHEME_2x16 TRUE | ||
1189 | #define STM32_USB_PMA_SIZE 1024 | ||
1190 | #define STM32_USB_HAS_BCDR TRUE | ||
1191 | |||
1192 | #define STM32_HAS_OTG1 FALSE | ||
1193 | #define STM32_HAS_OTG2 FALSE | ||
1194 | |||
1195 | /* IWDG attributes.*/ | ||
1196 | #define STM32_HAS_IWDG TRUE | ||
1197 | #define STM32_IWDG_IS_WINDOWED TRUE | ||
1198 | |||
1199 | /* LTDC attributes.*/ | ||
1200 | #define STM32_HAS_LTDC FALSE | ||
1201 | |||
1202 | /* DMA2D attributes.*/ | ||
1203 | #define STM32_HAS_DMA2D FALSE | ||
1204 | |||
1205 | /* FSMC attributes.*/ | ||
1206 | #define STM32_HAS_FSMC FALSE | ||
1207 | |||
1208 | /* CRC attributes.*/ | ||
1209 | #define STM32_HAS_CRC TRUE | ||
1210 | #define STM32_CRC_PROGRAMMABLE TRUE | ||
1211 | |||
1212 | #else | ||
1213 | #error "STM32L0xx device not specified" | ||
1214 | #endif | ||
1215 | |||
1216 | /** @} */ | ||
1217 | |||
1218 | #endif /* STM32_REGISTRY_H */ | ||
1219 | |||
1220 | /** @} */ | ||