aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/demos/SPC5/RT-SPC564A-EVB/mcuconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/demos/SPC5/RT-SPC564A-EVB/mcuconf.h')
-rw-r--r--lib/chibios/demos/SPC5/RT-SPC564A-EVB/mcuconf.h188
1 files changed, 188 insertions, 0 deletions
diff --git a/lib/chibios/demos/SPC5/RT-SPC564A-EVB/mcuconf.h b/lib/chibios/demos/SPC5/RT-SPC564A-EVB/mcuconf.h
new file mode 100644
index 000000000..021cbce89
--- /dev/null
+++ b/lib/chibios/demos/SPC5/RT-SPC564A-EVB/mcuconf.h
@@ -0,0 +1,188 @@
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/*
21 * SPC564Axx drivers configuration.
22 * The following settings override the default settings present in
23 * the various device driver implementation headers.
24 * Note that the settings for each driver only have effect if the whole
25 * driver is enabled in halconf.h.
26 *
27 * IRQ priorities:
28 * 1...15 Lowest...Highest.
29 * DMA priorities:
30 * 0...15 Highest...Lowest.
31 */
32
33#define SPC564Axx_MCUCONF
34
35/*
36 * HAL driver system settings.
37 */
38#define SPC5_NO_INIT FALSE
39#define SPC5_CLK_BYPASS FALSE
40#define SPC5_ALLOW_OVERCLOCK FALSE
41#define SPC5_CLK_PREDIV_VALUE 2
42#define SPC5_CLK_MFD_VALUE 75
43#define SPC5_CLK_RFD SPC5_RFD_DIV2
44#define SPC5_FLASH_BIUCR (BIUCR_BANK1_TOO | \
45 BIUCR_MASTER4_PREFETCH | \
46 BIUCR_MASTER0_PREFETCH | \
47 BIUCR_DPFEN | \
48 BIUCR_IPFEN | \
49 BIUCR_PFLIM_ON_MISS | \
50 BIUCR_BFEN)
51#define SPC5_EMIOS_GPRE_VALUE 20
52
53/*
54 * EDMA driver settings.
55 */
56#define SPC5_EDMA_CR_SETTING (EDMA_CR_GRP3PRI(3) | \
57 EDMA_CR_GRP2PRI(2) | \
58 EDMA_CR_GRP1PRI(1) | \
59 EDMA_CR_GRP0PRI(0) | \
60 EDMA_CR_EMLM | \
61 EDMA_CR_ERGA)
62#define SPC5_EDMA_GROUP0_PRIORITIES 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
63#define SPC5_EDMA_GROUP1_PRIORITIES 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
64#define SPC5_EDMA_GROUP2_PRIORITIES 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
65#define SPC5_EDMA_GROUP3_PRIORITIES 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
66#define SPC5_EDMA_ERROR_IRQ_PRIO 12
67#define SPC5_EDMA_ERROR_HANDLER() osalSysHalt("DMA failure")
68
69/*
70 * ADC driver settings.
71 */
72#define SPC5_ADC_USE_ADC0_Q0 FALSE
73#define SPC5_ADC_USE_ADC0_Q1 FALSE
74#define SPC5_ADC_USE_ADC0_Q2 FALSE
75#define SPC5_ADC_USE_ADC1_Q3 FALSE
76#define SPC5_ADC_USE_ADC1_Q4 FALSE
77#define SPC5_ADC_USE_ADC1_Q5 FALSE
78#define SPC5_ADC_FIFO0_DMA_IRQ_PRIO 12
79#define SPC5_ADC_FIFO1_DMA_IRQ_PRIO 12
80#define SPC5_ADC_FIFO2_DMA_IRQ_PRIO 12
81#define SPC5_ADC_FIFO3_DMA_IRQ_PRIO 12
82#define SPC5_ADC_FIFO4_DMA_IRQ_PRIO 12
83#define SPC5_ADC_FIFO5_DMA_IRQ_PRIO 12
84#define SPC5_ADC_CR_CLK_PS ADC_CR_CLK_PS(5)
85#define SPC5_ADC_PUDCR {ADC_PUDCR_NONE,ADC_PUDCR_NONE,ADC_PUDCR_NONE,ADC_PUDCR_NONE,ADC_PUDCR_NONE,ADC_PUDCR_NONE,ADC_PUDCR_NONE,ADC_PUDCR_NONE}
86
87/*
88 * SERIAL driver system settings.
89 */
90#define SPC5_USE_ESCIA TRUE
91#define SPC5_USE_ESCIB FALSE
92#define SPC5_USE_ESCIC FALSE
93#define SPC5_ESCIA_PRIORITY 8
94#define SPC5_ESCIB_PRIORITY 8
95#define SPC5_ESCIC_PRIORITY 8
96
97/*
98 * SPI driver system settings.
99 */
100#define SPC5_SPI_USE_DSPI1 FALSE
101#define SPC5_SPI_USE_DSPI2 FALSE
102#define SPC5_SPI_USE_DSPI3 FALSE
103#define SPC5_SPI_DMA_MODE SPC5_SPI_DMA_RX_ONLY
104#define SPC5_SPI_DSPI1_MCR (0 | SPC5_MCR_PCSIS0 | SPC5_MCR_PCSIS1 | SPC5_MCR_PCSIS2 | SPC5_MCR_PCSIS3 | SPC5_MCR_PCSIS4 | SPC5_MCR_PCSIS5 | SPC5_MCR_PCSIS6 | SPC5_MCR_PCSIS7)
105#define SPC5_SPI_DSPI2_MCR (0 | SPC5_MCR_PCSIS0 | SPC5_MCR_PCSIS1 | SPC5_MCR_PCSIS2 | SPC5_MCR_PCSIS3 | SPC5_MCR_PCSIS4 | SPC5_MCR_PCSIS5 | SPC5_MCR_PCSIS6 | SPC5_MCR_PCSIS7)
106#define SPC5_SPI_DSPI3_MCR (0 | SPC5_MCR_PCSIS0 | SPC5_MCR_PCSIS1 | SPC5_MCR_PCSIS2 | SPC5_MCR_PCSIS3 | SPC5_MCR_PCSIS4 | SPC5_MCR_PCSIS5 | SPC5_MCR_PCSIS6 | SPC5_MCR_PCSIS7)
107#define SPC5_SPI_DSPI1_DMA_IRQ_PRIO 10
108#define SPC5_SPI_DSPI2_DMA_IRQ_PRIO 10
109#define SPC5_SPI_DSPI3_DMA_IRQ_PRIO 10
110#define SPC5_SPI_DSPI1_IRQ_PRIO 10
111#define SPC5_SPI_DSPI2_IRQ_PRIO 10
112#define SPC5_SPI_DSPI3_IRQ_PRIO 10
113#define SPC5_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DSPI DMA failure")
114
115/*
116 * ICU driver system settings.
117 */
118#define SPC5_ICU_USE_EMIOS_CH1 FALSE
119#define SPC5_ICU_USE_EMIOS_CH2 FALSE
120#define SPC5_ICU_USE_EMIOS_CH3 FALSE
121#define SPC5_ICU_USE_EMIOS_CH4 FALSE
122#define SPC5_ICU_USE_EMIOS_CH5 FALSE
123#define SPC5_ICU_USE_EMIOS_CH6 FALSE
124#define SPC5_ICU_USE_EMIOS_CH11 FALSE
125#define SPC5_ICU_USE_EMIOS_CH13 FALSE
126#define SPC5_ICU_USE_EMIOS_CH7 FALSE
127#define SPC5_ICU_USE_EMIOS_CH16 FALSE
128#define SPC5_ICU_USE_EMIOS_CH17 FALSE
129#define SPC5_ICU_USE_EMIOS_CH18 FALSE
130#define SPC5_EMIOS_FLAG_F1_PRIORITY 8
131#define SPC5_EMIOS_FLAG_F2_PRIORITY 8
132#define SPC5_EMIOS_FLAG_F3_PRIORITY 8
133#define SPC5_EMIOS_FLAG_F4_PRIORITY 8
134#define SPC5_EMIOS_FLAG_F5_PRIORITY 8
135#define SPC5_EMIOS_FLAG_F6_PRIORITY 8
136#define SPC5_EMIOS_FLAG_F11_PRIORITY 8
137#define SPC5_EMIOS_FLAG_F13_PRIORITY 8
138#define SPC5_EMIOS_FLAG_F7_PRIORITY 8
139#define SPC5_EMIOS_FLAG_F16_PRIORITY 8
140#define SPC5_EMIOS_FLAG_F17_PRIORITY 8
141#define SPC5_EMIOS_FLAG_F18_PRIORITY 8
142
143/*
144 * PWM driver system settings.
145 */
146#define SPC5_PWM_USE_EMIOS_CH0 FALSE
147#define SPC5_PWM_USE_EMIOS_CH8 FALSE
148#define SPC5_PWM_USE_EMIOS_CH9 FALSE
149#define SPC5_PWM_USE_EMIOS_CH10 FALSE
150#define SPC5_PWM_USE_EMIOS_CH12 FALSE
151#define SPC5_PWM_USE_EMIOS_CH14 FALSE
152#define SPC5_PWM_USE_EMIOS_CH15 FALSE
153#define SPC5_PWM_USE_EMIOS_CH23 FALSE
154#define SPC5_PWM_USE_EMIOS_CH19 FALSE
155#define SPC5_PWM_USE_EMIOS_CH20 FALSE
156#define SPC5_PWM_USE_EMIOS_CH21 FALSE
157#define SPC5_PWM_USE_EMIOS_CH22 FALSE
158#define SPC5_EMIOS_FLAG_F0_PRIORITY 8
159#define SPC5_EMIOS_FLAG_F8_PRIORITY 8
160#define SPC5_EMIOS_FLAG_F9_PRIORITY 8
161#define SPC5_EMIOS_FLAG_F10_PRIORITY 8
162#define SPC5_EMIOS_FLAG_F12_PRIORITY 8
163#define SPC5_EMIOS_FLAG_F14_PRIORITY 8
164#define SPC5_EMIOS_FLAG_F15_PRIORITY 8
165#define SPC5_EMIOS_FLAG_F23_PRIORITY 8
166#define SPC5_EMIOS_FLAG_F19_PRIORITY 8
167#define SPC5_EMIOS_FLAG_F20_PRIORITY 8
168#define SPC5_EMIOS_FLAG_F21_PRIORITY 8
169#define SPC5_EMIOS_FLAG_F22_PRIORITY 8
170
171/*
172 * CAN driver system settings.
173 */
174#define SPC5_CAN_USE_FILTERS FALSE
175
176#define SPC5_CAN_USE_FLEXCAN0 FALSE
177#define SPC5_CAN_FLEXCAN0_USE_EXT_CLK FALSE
178#define SPC5_CAN_FLEXCAN0_IRQ_PRIORITY 11
179
180#define SPC5_CAN_USE_FLEXCAN1 FALSE
181#define SPC5_CAN_FLEXCAN1_USE_EXT_CLK FALSE
182#define SPC5_CAN_FLEXCAN1_IRQ_PRIORITY 11
183
184#define SPC5_CAN_USE_FLEXCAN2 FALSE
185#define SPC5_CAN_FLEXCAN2_USE_EXT_CLK FALSE
186#define SPC5_CAN_FLEXCAN2_IRQ_PRIORITY 11
187
188#endif /* MCUCONF_H */