amiro-os / devices / DiWheelDrive / mcuconf.h @ a0033dcb
History | View | Annotate | Download (6.822 KB)
1 | 58fe0e0b | Thomas Schöpping | #define STM32F103_MCUCONF
|
---|---|---|---|
2 | |||
3 | /*
|
||
4 | * STM32F103 drivers configuration.
|
||
5 | * The following settings override the default settings present in
|
||
6 | * the various device driver implementation headers.
|
||
7 | * Note that the settings for each driver only have effect if the whole
|
||
8 | * driver is enabled in halconf.h.
|
||
9 | *
|
||
10 | * IRQ priorities:
|
||
11 | * 15...0 Lowest...Highest.
|
||
12 | *
|
||
13 | * DMA priorities:
|
||
14 | * 0...3 Lowest...Highest.
|
||
15 | */
|
||
16 | |||
17 | /*
|
||
18 | * HAL driver system settings.
|
||
19 | */
|
||
20 | #define STM32_NO_INIT FALSE
|
||
21 | #define STM32_HSI_ENABLED TRUE
|
||
22 | #define STM32_LSI_ENABLED FALSE
|
||
23 | #define STM32_HSE_ENABLED TRUE
|
||
24 | #define STM32_LSE_ENABLED FALSE
|
||
25 | #define STM32_SW STM32_SW_PLL
|
||
26 | #define STM32_PLLSRC STM32_PLLSRC_HSE
|
||
27 | #define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
|
||
28 | #define STM32_PLLMUL_VALUE 9 |
||
29 | #define STM32_HPRE STM32_HPRE_DIV1
|
||
30 | #define STM32_PPRE1 STM32_PPRE1_DIV2
|
||
31 | #define STM32_PPRE2 STM32_PPRE2_DIV2
|
||
32 | #define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||
33 | #define STM32_USB_CLOCK_REQUIRED TRUE
|
||
34 | #define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||
35 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||
36 | #define STM32_RTCSEL STM32_RTCSEL_HSEDIV
|
||
37 | #define STM32_PVD_ENABLE FALSE
|
||
38 | #define STM32_PLS STM32_PLS_LEV0
|
||
39 | |||
40 | /*
|
||
41 | * ADC driver system settings.
|
||
42 | */
|
||
43 | #define STM32_ADC_USE_ADC1 FALSE
|
||
44 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 |
||
45 | #define STM32_ADC_ADC1_IRQ_PRIORITY 6 |
||
46 | |||
47 | /*
|
||
48 | * CAN driver system settings.
|
||
49 | */
|
||
50 | #define STM32_CAN_USE_CAN1 TRUE
|
||
51 | #define STM32_CAN_CAN1_IRQ_PRIORITY 11 |
||
52 | |||
53 | /*
|
||
54 | * EXT driver system settings.
|
||
55 | */
|
||
56 | #define STM32_EXT_EXTI0_IRQ_PRIORITY 6 |
||
57 | #define STM32_EXT_EXTI1_IRQ_PRIORITY 6 |
||
58 | #define STM32_EXT_EXTI2_IRQ_PRIORITY 6 |
||
59 | #define STM32_EXT_EXTI3_IRQ_PRIORITY 6 |
||
60 | #define STM32_EXT_EXTI4_IRQ_PRIORITY 6 |
||
61 | #define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 |
||
62 | #define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 |
||
63 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 6 |
||
64 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 6 |
||
65 | #define STM32_EXT_EXTI18_IRQ_PRIORITY 6 |
||
66 | #define STM32_EXT_EXTI19_IRQ_PRIORITY 6 |
||
67 | |||
68 | /*
|
||
69 | * GPT driver system settings.
|
||
70 | */
|
||
71 | #define STM32_GPT_USE_TIM1 FALSE
|
||
72 | #define STM32_GPT_USE_TIM2 FALSE
|
||
73 | #define STM32_GPT_USE_TIM3 FALSE
|
||
74 | #define STM32_GPT_USE_TIM4 FALSE
|
||
75 | #define STM32_GPT_USE_TIM5 FALSE
|
||
76 | #define STM32_GPT_USE_TIM8 FALSE
|
||
77 | #define STM32_GPT_TIM1_IRQ_PRIORITY 7 |
||
78 | #define STM32_GPT_TIM2_IRQ_PRIORITY 7 |
||
79 | #define STM32_GPT_TIM3_IRQ_PRIORITY 7 |
||
80 | #define STM32_GPT_TIM4_IRQ_PRIORITY 7 |
||
81 | #define STM32_GPT_TIM5_IRQ_PRIORITY 7 |
||
82 | #define STM32_GPT_TIM8_IRQ_PRIORITY 7 |
||
83 | |||
84 | /*
|
||
85 | * I2C driver system settings.
|
||
86 | */
|
||
87 | #define STM32_I2C_USE_I2C1 TRUE
|
||
88 | #define STM32_I2C_USE_I2C2 TRUE
|
||
89 | #define STM32_I2C_I2C1_IRQ_PRIORITY 5 |
||
90 | #define STM32_I2C_I2C2_IRQ_PRIORITY 5 |
||
91 | #define STM32_I2C_I2C1_DMA_PRIORITY 3 |
||
92 | #define STM32_I2C_I2C2_DMA_PRIORITY 3 |
||
93 | #define STM32_I2C_I2C1_DMA_ERROR_HOOK() chSysHalt()
|
||
94 | #define STM32_I2C_I2C2_DMA_ERROR_HOOK() chSysHalt()
|
||
95 | #define STM32_I2C_USE_DMA FALSE
|
||
96 | |||
97 | /*
|
||
98 | * ICU driver system settings.
|
||
99 | */
|
||
100 | #define STM32_ICU_USE_TIM1 FALSE
|
||
101 | #define STM32_ICU_USE_TIM2 FALSE
|
||
102 | #define STM32_ICU_USE_TIM3 FALSE
|
||
103 | #define STM32_ICU_USE_TIM4 FALSE
|
||
104 | #define STM32_ICU_USE_TIM5 FALSE
|
||
105 | #define STM32_ICU_USE_TIM8 FALSE
|
||
106 | #define STM32_ICU_TIM1_IRQ_PRIORITY 7 |
||
107 | #define STM32_ICU_TIM2_IRQ_PRIORITY 7 |
||
108 | #define STM32_ICU_TIM3_IRQ_PRIORITY 7 |
||
109 | #define STM32_ICU_TIM4_IRQ_PRIORITY 7 |
||
110 | #define STM32_ICU_TIM5_IRQ_PRIORITY 7 |
||
111 | #define STM32_ICU_TIM8_IRQ_PRIORITY 7 |
||
112 | |||
113 | /*
|
||
114 | * PWM driver system settings.
|
||
115 | */
|
||
116 | #define STM32_PWM_USE_ADVANCED FALSE
|
||
117 | #define STM32_PWM_USE_TIM1 FALSE
|
||
118 | #define STM32_PWM_USE_TIM2 TRUE
|
||
119 | #define STM32_PWM_USE_TIM3 FALSE
|
||
120 | #define STM32_PWM_USE_TIM4 FALSE
|
||
121 | #define STM32_PWM_USE_TIM5 FALSE
|
||
122 | #define STM32_PWM_USE_TIM8 FALSE
|
||
123 | #define STM32_PWM_TIM1_IRQ_PRIORITY 7 |
||
124 | #define STM32_PWM_TIM2_IRQ_PRIORITY 7 |
||
125 | #define STM32_PWM_TIM3_IRQ_PRIORITY 7 |
||
126 | #define STM32_PWM_TIM4_IRQ_PRIORITY 7 |
||
127 | #define STM32_PWM_TIM5_IRQ_PRIORITY 7 |
||
128 | #define STM32_PWM_TIM8_IRQ_PRIORITY 7 |
||
129 | |||
130 | /*
|
||
131 | * RTC driver system settings.
|
||
132 | */
|
||
133 | #define STM32_RTC_IRQ_PRIORITY 15 |
||
134 | |||
135 | /*
|
||
136 | * SERIAL driver system settings.
|
||
137 | */
|
||
138 | #define STM32_SERIAL_USE_USART1 TRUE
|
||
139 | #define STM32_SERIAL_USE_USART2 FALSE
|
||
140 | #define STM32_SERIAL_USE_USART3 FALSE
|
||
141 | #define STM32_SERIAL_USE_UART4 FALSE
|
||
142 | #define STM32_SERIAL_USE_UART5 FALSE
|
||
143 | #define STM32_SERIAL_USART1_PRIORITY 12 |
||
144 | #define STM32_SERIAL_USART2_PRIORITY 12 |
||
145 | #define STM32_SERIAL_USART3_PRIORITY 12 |
||
146 | #define STM32_SERIAL_UART4_PRIORITY 12 |
||
147 | #define STM32_SERIAL_UART5_PRIORITY 12 |
||
148 | |||
149 | /*
|
||
150 | * SPI driver system settings.
|
||
151 | */
|
||
152 | #define STM32_SPI_USE_SPI1 TRUE
|
||
153 | #define STM32_SPI_USE_SPI2 TRUE
|
||
154 | #define STM32_SPI_USE_SPI3 FALSE
|
||
155 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 |
||
156 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 |
||
157 | #define STM32_SPI_SPI3_DMA_PRIORITY 1 |
||
158 | #define STM32_SPI_SPI1_IRQ_PRIORITY 10 |
||
159 | #define STM32_SPI_SPI2_IRQ_PRIORITY 10 |
||
160 | #define STM32_SPI_SPI3_IRQ_PRIORITY 10 |
||
161 | #define STM32_SPI_DMA_ERROR_HOOK(spip) chSysHalt()
|
||
162 | |||
163 | /*
|
||
164 | * UART driver system settings.
|
||
165 | */
|
||
166 | #define STM32_UART_USE_USART1 FALSE
|
||
167 | #define STM32_UART_USE_USART2 FALSE
|
||
168 | #define STM32_UART_USE_USART3 FALSE
|
||
169 | #define STM32_UART_USART1_IRQ_PRIORITY 12 |
||
170 | #define STM32_UART_USART2_IRQ_PRIORITY 12 |
||
171 | #define STM32_UART_USART3_IRQ_PRIORITY 12 |
||
172 | #define STM32_UART_USART1_DMA_PRIORITY 0 |
||
173 | #define STM32_UART_USART2_DMA_PRIORITY 0 |
||
174 | #define STM32_UART_USART3_DMA_PRIORITY 0 |
||
175 | #define STM32_UART_DMA_ERROR_HOOK(uartp) chSysHalt()
|
||
176 | |||
177 | /*
|
||
178 | * USB driver system settings.
|
||
179 | */
|
||
180 | #define STM32_USB_USE_USB1 FALSE
|
||
181 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||
182 | #define STM32_USB_USB1_HP_IRQ_PRIORITY 13 |
||
183 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 14 |
||
184 | |||
185 | /*
|
||
186 | * QEI driver system settings.
|
||
187 | */
|
||
188 | #define STM32_QEI_USE_TIM1 FALSE
|
||
189 | #define STM32_QEI_USE_TIM2 FALSE
|
||
190 | #define STM32_QEI_USE_TIM3 TRUE
|
||
191 | #define STM32_QEI_USE_TIM4 TRUE
|
||
192 | #define STM32_QEI_USE_TIM5 FALSE
|
||
193 | #define STM32_QEI_USE_TIM8 FALSE |