aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h')
-rw-r--r--lib/chibios/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h191
1 files changed, 191 insertions, 0 deletions
diff --git a/lib/chibios/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h b/lib/chibios/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h
new file mode 100644
index 000000000..fc4fcda6b
--- /dev/null
+++ b/lib/chibios/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h
@@ -0,0 +1,191 @@
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#ifndef MCUCONF_H
18#define MCUCONF_H
19
20#define STM32F100_MCUCONF
21
22/*
23 * STM32F103 drivers configuration.
24 * The following settings override the default settings present in
25 * the various device driver implementation headers.
26 * Note that the settings for each driver only have effect if the whole
27 * driver is enabled in halconf.h.
28 *
29 * IRQ priorities:
30 * 15...0 Lowest...Highest.
31 *
32 * DMA priorities:
33 * 0...3 Lowest...Highest.
34 */
35
36/*
37 * HAL driver system settings.
38 */
39#define STM32_NO_INIT FALSE
40#define STM32_HSI_ENABLED TRUE
41#define STM32_LSI_ENABLED FALSE
42#define STM32_HSE_ENABLED TRUE
43#define STM32_LSE_ENABLED FALSE
44#define STM32_SW STM32_SW_PLL
45#define STM32_PLLSRC STM32_PLLSRC_HSE
46#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
47#define STM32_PLLMUL_VALUE 3
48#define STM32_HPRE STM32_HPRE_DIV1
49#define STM32_PPRE1 STM32_PPRE1_DIV1
50#define STM32_PPRE2 STM32_PPRE2_DIV1
51#define STM32_ADCPRE STM32_ADCPRE_DIV2
52#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
53#define STM32_RTCSEL STM32_RTCSEL_HSEDIV
54#define STM32_PVD_ENABLE FALSE
55#define STM32_PLS STM32_PLS_LEV0
56
57/*
58 * IRQ system settings.
59 */
60#define STM32_IRQ_EXTI0_PRIORITY 6
61#define STM32_IRQ_EXTI1_PRIORITY 6
62#define STM32_IRQ_EXTI2_PRIORITY 6
63#define STM32_IRQ_EXTI3_PRIORITY 6
64#define STM32_IRQ_EXTI4_PRIORITY 6
65#define STM32_IRQ_EXTI5_9_PRIORITY 6
66#define STM32_IRQ_EXTI10_15_PRIORITY 6
67#define STM32_IRQ_EXTI16_PRIORITY 6
68#define STM32_IRQ_EXTI17_PRIORITY 6
69#define STM32_IRQ_EXTI18_PRIORITY 6
70#define STM32_IRQ_EXTI19_PRIORITY 6
71
72/*
73 * ADC driver system settings.
74 */
75#define STM32_ADC_USE_ADC1 TRUE
76#define STM32_ADC_ADC1_DMA_PRIORITY 2
77#define STM32_ADC_ADC1_IRQ_PRIORITY 6
78
79/*
80 * GPT driver system settings.
81 */
82#define STM32_GPT_USE_TIM1 FALSE
83#define STM32_GPT_USE_TIM2 FALSE
84#define STM32_GPT_USE_TIM3 FALSE
85#define STM32_GPT_USE_TIM4 FALSE
86#define STM32_GPT_USE_TIM5 FALSE
87#define STM32_GPT_USE_TIM8 FALSE
88#define STM32_GPT_TIM1_IRQ_PRIORITY 7
89#define STM32_GPT_TIM2_IRQ_PRIORITY 7
90#define STM32_GPT_TIM3_IRQ_PRIORITY 7
91#define STM32_GPT_TIM4_IRQ_PRIORITY 7
92#define STM32_GPT_TIM5_IRQ_PRIORITY 7
93#define STM32_GPT_TIM8_IRQ_PRIORITY 7
94
95/*
96 * I2C driver system settings.
97 */
98#define STM32_I2C_USE_I2C1 FALSE
99#define STM32_I2C_USE_I2C2 FALSE
100#define STM32_I2C_BUSY_TIMEOUT 50
101#define STM32_I2C_I2C1_IRQ_PRIORITY 5
102#define STM32_I2C_I2C2_IRQ_PRIORITY 5
103#define STM32_I2C_I2C1_DMA_PRIORITY 3
104#define STM32_I2C_I2C2_DMA_PRIORITY 3
105#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
106
107/*
108 * ICU driver system settings.
109 */
110#define STM32_ICU_USE_TIM1 FALSE
111#define STM32_ICU_USE_TIM2 FALSE
112#define STM32_ICU_USE_TIM3 FALSE
113#define STM32_ICU_USE_TIM4 FALSE
114#define STM32_ICU_USE_TIM5 FALSE
115#define STM32_ICU_USE_TIM8 FALSE
116#define STM32_ICU_TIM1_IRQ_PRIORITY 7
117#define STM32_ICU_TIM2_IRQ_PRIORITY 7
118#define STM32_ICU_TIM3_IRQ_PRIORITY 7
119#define STM32_ICU_TIM4_IRQ_PRIORITY 7
120#define STM32_ICU_TIM5_IRQ_PRIORITY 7
121#define STM32_ICU_TIM8_IRQ_PRIORITY 7
122
123/*
124 * PWM driver system settings.
125 */
126#define STM32_PWM_USE_ADVANCED FALSE
127#define STM32_PWM_USE_TIM1 FALSE
128#define STM32_PWM_USE_TIM2 FALSE
129#define STM32_PWM_USE_TIM3 TRUE
130#define STM32_PWM_USE_TIM4 FALSE
131#define STM32_PWM_USE_TIM5 FALSE
132#define STM32_PWM_USE_TIM8 FALSE
133#define STM32_PWM_TIM1_IRQ_PRIORITY 7
134#define STM32_PWM_TIM2_IRQ_PRIORITY 7
135#define STM32_PWM_TIM3_IRQ_PRIORITY 7
136#define STM32_PWM_TIM4_IRQ_PRIORITY 7
137#define STM32_PWM_TIM5_IRQ_PRIORITY 7
138#define STM32_PWM_TIM8_IRQ_PRIORITY 7
139
140/*
141 * RTC driver system settings.
142 */
143#define STM32_RTC_IRQ_PRIORITY 15
144
145/*
146 * SERIAL driver system settings.
147 */
148#define STM32_SERIAL_USE_USART1 TRUE
149#define STM32_SERIAL_USE_USART2 FALSE
150#define STM32_SERIAL_USE_USART3 FALSE
151#define STM32_SERIAL_USART1_PRIORITY 12
152#define STM32_SERIAL_USART2_PRIORITY 12
153#define STM32_SERIAL_USART3_PRIORITY 12
154
155/*
156 * SPI driver system settings.
157 */
158#define STM32_SPI_USE_SPI1 TRUE
159#define STM32_SPI_USE_SPI2 FALSE
160#define STM32_SPI_SPI1_DMA_PRIORITY 1
161#define STM32_SPI_SPI2_DMA_PRIORITY 1
162#define STM32_SPI_SPI1_IRQ_PRIORITY 10
163#define STM32_SPI_SPI2_IRQ_PRIORITY 10
164#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
165
166/*
167 * ST driver system settings.
168 */
169#define STM32_ST_IRQ_PRIORITY 8
170#define STM32_ST_USE_TIMER 2
171
172/*
173 * UART driver system settings.
174 */
175#define STM32_UART_USE_USART1 FALSE
176#define STM32_UART_USE_USART2 FALSE
177#define STM32_UART_USE_USART3 FALSE
178#define STM32_UART_USART1_IRQ_PRIORITY 12
179#define STM32_UART_USART2_IRQ_PRIORITY 12
180#define STM32_UART_USART3_IRQ_PRIORITY 12
181#define STM32_UART_USART1_DMA_PRIORITY 0
182#define STM32_UART_USART2_DMA_PRIORITY 0
183#define STM32_UART_USART3_DMA_PRIORITY 0
184#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
185
186/*
187 * WDG driver system settings.
188 */
189#define STM32_WDG_USE_IWDG FALSE
190
191#endif /* MCUCONF_H */