Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / LightRing_1-2 / mcuconf.h @ 4684a9d9

History | View | Annotate | Download (7.917 KB)

1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2019  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
 * IRQ system settings.
63
 */
64
#define STM32_IRQ_EXTI0_PRIORITY            6
65
#define STM32_IRQ_EXTI1_PRIORITY            6
66
#define STM32_IRQ_EXTI2_PRIORITY            6
67
#define STM32_IRQ_EXTI3_PRIORITY            6
68
#define STM32_IRQ_EXTI4_PRIORITY            6
69
#define STM32_IRQ_EXTI5_9_PRIORITY          6
70
#define STM32_IRQ_EXTI10_15_PRIORITY        6
71
#define STM32_IRQ_EXTI16_PRIORITY           6
72
#define STM32_IRQ_EXTI17_PRIORITY           6
73
#define STM32_IRQ_EXTI18_PRIORITY           6
74
#define STM32_IRQ_EXTI19_PRIORITY           6
75

    
76
/*
77
 * ADC driver system settings.
78
 */
79
#define STM32_ADC_USE_ADC1                  FALSE
80
#define STM32_ADC_ADC1_DMA_PRIORITY         2
81
#define STM32_ADC_ADC1_IRQ_PRIORITY         6
82

    
83
/*
84
 * CAN driver system settings.
85
 */
86
#define STM32_CAN_USE_CAN1                  TRUE
87
#define STM32_CAN_CAN1_IRQ_PRIORITY         11
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                  FALSE
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_USE_DMA              TRUE
114
#define STM32_I2C_I2C2_USE_DMA              FALSE
115
#define STM32_I2C_I2C1_DMA_PRIORITY         3
116
#define STM32_I2C_I2C2_DMA_PRIORITY         3
117
#define STM32_I2C_DMA_ERROR_HOOK(i2cp)      osalSysHalt("DMA failure")
118

    
119
/*
120
 * ICU driver system settings.
121
 */
122
#define STM32_ICU_USE_TIM1                  FALSE
123
#define STM32_ICU_USE_TIM2                  FALSE
124
#define STM32_ICU_USE_TIM3                  FALSE
125
#define STM32_ICU_USE_TIM4                  FALSE
126
#define STM32_ICU_USE_TIM5                  FALSE
127
#define STM32_ICU_USE_TIM8                  FALSE
128
#define STM32_ICU_TIM1_IRQ_PRIORITY         7
129
#define STM32_ICU_TIM2_IRQ_PRIORITY         7
130
#define STM32_ICU_TIM3_IRQ_PRIORITY         7
131
#define STM32_ICU_TIM4_IRQ_PRIORITY         7
132
#define STM32_ICU_TIM5_IRQ_PRIORITY         7
133
#define STM32_ICU_TIM8_IRQ_PRIORITY         7
134

    
135
/*
136
 * PWM driver system settings.
137
 */
138
#define STM32_PWM_USE_ADVANCED              FALSE
139
#define STM32_PWM_USE_TIM1                  FALSE
140
#define STM32_PWM_USE_TIM2                  FALSE
141
#define STM32_PWM_USE_TIM3                  FALSE
142
#define STM32_PWM_USE_TIM4                  FALSE
143
#define STM32_PWM_USE_TIM5                  FALSE
144
#define STM32_PWM_USE_TIM8                  FALSE
145
#define STM32_PWM_TIM1_IRQ_PRIORITY         7
146
#define STM32_PWM_TIM2_IRQ_PRIORITY         7
147
#define STM32_PWM_TIM3_IRQ_PRIORITY         7
148
#define STM32_PWM_TIM4_IRQ_PRIORITY         7
149
#define STM32_PWM_TIM5_IRQ_PRIORITY         7
150
#define STM32_PWM_TIM8_IRQ_PRIORITY         7
151

    
152
/*
153
 * RTC driver system settings.
154
 */
155
#define STM32_RTC_IRQ_PRIORITY              15
156

    
157
/*
158
 * SERIAL driver system settings.
159
 */
160
#define STM32_SERIAL_USE_USART1             TRUE
161
#define STM32_SERIAL_USE_USART2             FALSE
162
#define STM32_SERIAL_USE_USART3             FALSE
163
#define STM32_SERIAL_USE_UART4              FALSE
164
#define STM32_SERIAL_USE_UART5              FALSE
165
#define STM32_SERIAL_USART1_PRIORITY        12
166
#define STM32_SERIAL_USART2_PRIORITY        12
167
#define STM32_SERIAL_USART3_PRIORITY        12
168
#define STM32_SERIAL_UART4_PRIORITY         12
169
#define STM32_SERIAL_UART5_PRIORITY         12
170

    
171
/*
172
 * SPI driver system settings.
173
 */
174
#define STM32_SPI_USE_SPI1                  TRUE
175
#define STM32_SPI_USE_SPI2                  TRUE
176
#define STM32_SPI_USE_SPI3                  FALSE
177
#define STM32_SPI_SPI1_DMA_PRIORITY         1
178
#define STM32_SPI_SPI2_DMA_PRIORITY         1
179
#define STM32_SPI_SPI3_DMA_PRIORITY         1
180
#define STM32_SPI_SPI1_IRQ_PRIORITY         10
181
#define STM32_SPI_SPI2_IRQ_PRIORITY         10
182
#define STM32_SPI_SPI3_IRQ_PRIORITY         10
183
#define STM32_SPI_DMA_ERROR_HOOK(spip)      osalSysHalt("DMA failure")
184

    
185
/*
186
 * ST driver system settings.
187
 */
188
#define STM32_ST_IRQ_PRIORITY               8
189
#define STM32_ST_USE_TIMER                  2
190

    
191
/*
192
 * UART driver system settings.
193
 */
194
#define STM32_UART_USE_USART1               FALSE
195
#define STM32_UART_USE_USART2               TRUE
196
#define STM32_UART_USE_USART3               FALSE
197
#define STM32_UART_USART1_IRQ_PRIORITY      12
198
#define STM32_UART_USART2_IRQ_PRIORITY      12
199
#define STM32_UART_USART3_IRQ_PRIORITY      12
200
#define STM32_UART_USART1_DMA_PRIORITY      0
201
#define STM32_UART_USART2_DMA_PRIORITY      0
202
#define STM32_UART_USART3_DMA_PRIORITY      0
203
#define STM32_UART_DMA_ERROR_HOOK(uartp)    osalSysHalt("DMA failure")
204

    
205
/*
206
 * USB driver system settings.
207
 */
208
#define STM32_USB_USE_USB1                  FALSE
209
#define STM32_USB_LOW_POWER_ON_SUSPEND      FALSE
210
#define STM32_USB_USB1_HP_IRQ_PRIORITY      13
211
#define STM32_USB_USB1_LP_IRQ_PRIORITY      14
212

    
213
/*
214
 * WDG driver system settings.
215
 */
216
#define STM32_WDG_USE_IWDG                  FALSE
217

    
218
/*
219
 * QEI driver system settings.
220
 */
221
#define STM32_QEI_USE_TIM1                  FALSE
222
#define STM32_QEI_USE_TIM2                  FALSE
223
#define STM32_QEI_USE_TIM3                  FALSE
224
#define STM32_QEI_USE_TIM4                  FALSE
225
#define STM32_QEI_USE_TIM5                  FALSE
226
#define STM32_QEI_USE_TIM8                  FALSE
227

    
228
#endif /* MCUCONF_H */