amiro-os / os / modules / DiWheelDrive_1-1 / mcuconf.h @ b6b45e4c
History | View | Annotate | Download (7.88 KB)
1 |
/*
|
---|---|
2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
3 |
Copyright (C) 2016..2018 Thomas Schöpping et al.
|
4 |
|
5 |
This program is free software: you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
7 |
the Free Software Foundation, either version 3 of the License, or
|
8 |
(at your option) any later version.
|
9 |
|
10 |
This program is distributed in the hope that it will be useful,
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
GNU General Public License for more details.
|
14 |
|
15 |
You should have received a copy of the GNU General Public License
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17 |
*/
|
18 |
|
19 |
#ifndef _MCUCONF_H_
|
20 |
#define _MCUCONF_H_
|
21 |
|
22 |
#define STM32F103_MCUCONF
|
23 |
|
24 |
/*
|
25 |
* STM32F103 drivers configuration.
|
26 |
* The following settings override the default settings present in
|
27 |
* the various device driver implementation headers.
|
28 |
* Note that the settings for each driver only have effect if the whole
|
29 |
* driver is enabled in halconf.h.
|
30 |
*
|
31 |
* IRQ priorities:
|
32 |
* 15...0 Lowest...Highest.
|
33 |
*
|
34 |
* DMA priorities:
|
35 |
* 0...3 Lowest...Highest.
|
36 |
*/
|
37 |
|
38 |
/*
|
39 |
* HAL driver system settings.
|
40 |
*/
|
41 |
#define STM32_NO_INIT FALSE
|
42 |
#define STM32_HSI_ENABLED TRUE
|
43 |
#define STM32_LSI_ENABLED FALSE
|
44 |
#define STM32_HSE_ENABLED TRUE
|
45 |
#define STM32_LSE_ENABLED FALSE
|
46 |
#define STM32_SW STM32_SW_PLL
|
47 |
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
48 |
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
|
49 |
#define STM32_PLLMUL_VALUE 9 |
50 |
#define STM32_HPRE STM32_HPRE_DIV1
|
51 |
#define STM32_PPRE1 STM32_PPRE1_DIV2
|
52 |
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
53 |
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
54 |
#define STM32_USB_CLOCK_REQUIRED TRUE
|
55 |
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
56 |
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
57 |
#define STM32_RTCSEL STM32_RTCSEL_HSEDIV
|
58 |
#define STM32_PVD_ENABLE FALSE
|
59 |
#define STM32_PLS STM32_PLS_LEV0
|
60 |
|
61 |
/*
|
62 |
* ADC driver system settings.
|
63 |
*/
|
64 |
#define STM32_ADC_USE_ADC1 FALSE
|
65 |
#define STM32_ADC_ADC1_DMA_PRIORITY 2 |
66 |
#define STM32_ADC_ADC1_IRQ_PRIORITY 6 |
67 |
|
68 |
/*
|
69 |
* CAN driver system settings.
|
70 |
*/
|
71 |
#define STM32_CAN_USE_CAN1 TRUE
|
72 |
#define STM32_CAN_CAN1_IRQ_PRIORITY 11 |
73 |
|
74 |
/*
|
75 |
* EXT driver system settings.
|
76 |
*/
|
77 |
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 |
78 |
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 |
79 |
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 |
80 |
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 |
81 |
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 |
82 |
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 |
83 |
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 |
84 |
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 |
85 |
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 |
86 |
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 |
87 |
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 |
88 |
|
89 |
/*
|
90 |
* GPT driver system settings.
|
91 |
*/
|
92 |
#define STM32_GPT_USE_TIM1 FALSE
|
93 |
#define STM32_GPT_USE_TIM2 FALSE
|
94 |
#define STM32_GPT_USE_TIM3 FALSE
|
95 |
#define STM32_GPT_USE_TIM4 FALSE
|
96 |
#define STM32_GPT_USE_TIM5 FALSE
|
97 |
#define STM32_GPT_USE_TIM8 FALSE
|
98 |
#define STM32_GPT_TIM1_IRQ_PRIORITY 7 |
99 |
#define STM32_GPT_TIM2_IRQ_PRIORITY 7 |
100 |
#define STM32_GPT_TIM3_IRQ_PRIORITY 7 |
101 |
#define STM32_GPT_TIM4_IRQ_PRIORITY 7 |
102 |
#define STM32_GPT_TIM5_IRQ_PRIORITY 7 |
103 |
#define STM32_GPT_TIM8_IRQ_PRIORITY 7 |
104 |
|
105 |
/*
|
106 |
* I2C driver system settings.
|
107 |
*/
|
108 |
#define STM32_I2C_USE_I2C1 TRUE
|
109 |
#define STM32_I2C_USE_I2C2 TRUE
|
110 |
#define STM32_I2C_BUSY_TIMEOUT 50 |
111 |
#define STM32_I2C_I2C1_IRQ_PRIORITY 5 |
112 |
#define STM32_I2C_I2C2_IRQ_PRIORITY 5 |
113 |
#define STM32_I2C_I2C1_DMA_PRIORITY 3 |
114 |
#define STM32_I2C_I2C2_DMA_PRIORITY 3 |
115 |
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") |
116 |
#define STM32_I2C_USE_DMA FALSE
|
117 |
|
118 |
/*
|
119 |
* ICU driver system settings.
|
120 |
*/
|
121 |
#define STM32_ICU_USE_TIM1 FALSE
|
122 |
#define STM32_ICU_USE_TIM2 FALSE
|
123 |
#define STM32_ICU_USE_TIM3 FALSE
|
124 |
#define STM32_ICU_USE_TIM4 FALSE
|
125 |
#define STM32_ICU_USE_TIM5 FALSE
|
126 |
#define STM32_ICU_USE_TIM8 FALSE
|
127 |
#define STM32_ICU_TIM1_IRQ_PRIORITY 7 |
128 |
#define STM32_ICU_TIM2_IRQ_PRIORITY 7 |
129 |
#define STM32_ICU_TIM3_IRQ_PRIORITY 7 |
130 |
#define STM32_ICU_TIM4_IRQ_PRIORITY 7 |
131 |
#define STM32_ICU_TIM5_IRQ_PRIORITY 7 |
132 |
#define STM32_ICU_TIM8_IRQ_PRIORITY 7 |
133 |
|
134 |
/*
|
135 |
* PWM driver system settings.
|
136 |
*/
|
137 |
#define STM32_PWM_USE_ADVANCED FALSE
|
138 |
#define STM32_PWM_USE_TIM1 FALSE
|
139 |
#define STM32_PWM_USE_TIM2 TRUE
|
140 |
#define STM32_PWM_USE_TIM3 FALSE
|
141 |
#define STM32_PWM_USE_TIM4 FALSE
|
142 |
#define STM32_PWM_USE_TIM5 FALSE
|
143 |
#define STM32_PWM_USE_TIM8 FALSE
|
144 |
#define STM32_PWM_TIM1_IRQ_PRIORITY 7 |
145 |
#define STM32_PWM_TIM2_IRQ_PRIORITY 7 |
146 |
#define STM32_PWM_TIM3_IRQ_PRIORITY 7 |
147 |
#define STM32_PWM_TIM4_IRQ_PRIORITY 7 |
148 |
#define STM32_PWM_TIM5_IRQ_PRIORITY 7 |
149 |
#define STM32_PWM_TIM8_IRQ_PRIORITY 7 |
150 |
|
151 |
/*
|
152 |
* RTC driver system settings.
|
153 |
*/
|
154 |
#define STM32_RTC_IRQ_PRIORITY 15 |
155 |
|
156 |
/*
|
157 |
* SERIAL driver system settings.
|
158 |
*/
|
159 |
#define STM32_SERIAL_USE_USART1 TRUE
|
160 |
#define STM32_SERIAL_USE_USART2 FALSE
|
161 |
#define STM32_SERIAL_USE_USART3 FALSE
|
162 |
#define STM32_SERIAL_USE_UART4 FALSE
|
163 |
#define STM32_SERIAL_USE_UART5 FALSE
|
164 |
#define STM32_SERIAL_USART1_PRIORITY 12 |
165 |
#define STM32_SERIAL_USART2_PRIORITY 12 |
166 |
#define STM32_SERIAL_USART3_PRIORITY 12 |
167 |
#define STM32_SERIAL_UART4_PRIORITY 12 |
168 |
#define STM32_SERIAL_UART5_PRIORITY 12 |
169 |
|
170 |
/*
|
171 |
* SPI driver system settings.
|
172 |
*/
|
173 |
#define STM32_SPI_USE_SPI1 TRUE
|
174 |
#define STM32_SPI_USE_SPI2 FALSE
|
175 |
#define STM32_SPI_USE_SPI3 FALSE
|
176 |
#define STM32_SPI_SPI1_DMA_PRIORITY 1 |
177 |
#define STM32_SPI_SPI2_DMA_PRIORITY 1 |
178 |
#define STM32_SPI_SPI3_DMA_PRIORITY 1 |
179 |
#define STM32_SPI_SPI1_IRQ_PRIORITY 10 |
180 |
#define STM32_SPI_SPI2_IRQ_PRIORITY 10 |
181 |
#define STM32_SPI_SPI3_IRQ_PRIORITY 10 |
182 |
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") |
183 |
|
184 |
/*
|
185 |
* ST driver system settings.
|
186 |
*/
|
187 |
#define STM32_ST_IRQ_PRIORITY 8 |
188 |
#define STM32_ST_USE_TIMER 5 |
189 |
|
190 |
/*
|
191 |
* UART driver system settings.
|
192 |
*/
|
193 |
#define STM32_UART_USE_USART1 FALSE
|
194 |
#define STM32_UART_USE_USART2 FALSE
|
195 |
#define STM32_UART_USE_USART3 FALSE
|
196 |
#define STM32_UART_USART1_IRQ_PRIORITY 12 |
197 |
#define STM32_UART_USART2_IRQ_PRIORITY 12 |
198 |
#define STM32_UART_USART3_IRQ_PRIORITY 12 |
199 |
#define STM32_UART_USART1_DMA_PRIORITY 0 |
200 |
#define STM32_UART_USART2_DMA_PRIORITY 0 |
201 |
#define STM32_UART_USART3_DMA_PRIORITY 0 |
202 |
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") |
203 |
|
204 |
/*
|
205 |
* USB driver system settings.
|
206 |
*/
|
207 |
#define STM32_USB_USE_USB1 FALSE
|
208 |
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
209 |
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 |
210 |
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 |
211 |
|
212 |
/*
|
213 |
* WDG driver system settings.
|
214 |
*/
|
215 |
#define STM32_WDG_USE_IWDG FALSE
|
216 |
|
217 |
/*
|
218 |
* QEI driver system settings.
|
219 |
*/
|
220 |
#define STM32_QEI_USE_TIM1 FALSE
|
221 |
#define STM32_QEI_USE_TIM2 FALSE
|
222 |
#define STM32_QEI_USE_TIM3 TRUE
|
223 |
#define STM32_QEI_USE_TIM4 TRUE
|
224 |
#define STM32_QEI_USE_TIM5 FALSE
|
225 |
#define STM32_QEI_USE_TIM8 FALSE
|
226 |
|
227 |
#endif /* _MCUCONF_H_ */ |