]> begriffs open source - cmsis-freertos/blob - Demo/RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio/bsp/metal-platform.h
Updated pack to FreeRTOS 10.4.4
[cmsis-freertos] / Demo / RISC-V_RV32_SiFive_HiFive1-RevB_FreedomStudio / bsp / metal-platform.h
1 /* Copyright 2019 SiFive, Inc */
2 /* SPDX-License-Identifier: Apache-2.0 */
3 /* ----------------------------------- */
4 /* ----------------------------------- */
5
6 #ifndef METAL_PLATFORM_H
7 #define METAL_PLATFORM_H
8
9 /* From clock@0 */
10 #define METAL_FIXED_CLOCK_0_CLOCK_FREQUENCY 16000000UL
11
12 /* From clock@2 */
13 #define METAL_FIXED_CLOCK_2_CLOCK_FREQUENCY 72000000UL
14
15 /* From clock@5 */
16 #define METAL_FIXED_CLOCK_5_CLOCK_FREQUENCY 32768UL
17
18 /* From clock@6 */
19 #define METAL_FIXED_CLOCK_6_CLOCK_FREQUENCY 32768UL
20
21 #define METAL_FIXED_CLOCK
22
23 /* From clint@2000000 */
24 #define METAL_RISCV_CLINT0_2000000_BASE_ADDRESS 33554432UL
25 #define METAL_RISCV_CLINT0_0_BASE_ADDRESS 33554432UL
26 #define METAL_RISCV_CLINT0_2000000_SIZE 65536UL
27 #define METAL_RISCV_CLINT0_0_SIZE 65536UL
28
29 #define METAL_RISCV_CLINT0
30 #define METAL_RISCV_CLINT0_MSIP_BASE 0UL
31 #define METAL_RISCV_CLINT0_MTIMECMP_BASE 16384UL
32 #define METAL_RISCV_CLINT0_MTIME 49144UL
33
34 /* From interrupt_controller@c000000 */
35 #define METAL_RISCV_PLIC0_C000000_BASE_ADDRESS 201326592UL
36 #define METAL_RISCV_PLIC0_0_BASE_ADDRESS 201326592UL
37 #define METAL_RISCV_PLIC0_C000000_SIZE 67108864UL
38 #define METAL_RISCV_PLIC0_0_SIZE 67108864UL
39 #define METAL_RISCV_PLIC0_C000000_RISCV_MAX_PRIORITY 7UL
40 #define METAL_RISCV_PLIC0_0_RISCV_MAX_PRIORITY 7UL
41 #define METAL_RISCV_PLIC0_C000000_RISCV_NDEV 53UL
42 #define METAL_RISCV_PLIC0_0_RISCV_NDEV 53UL
43
44 #define METAL_RISCV_PLIC0
45 #define METAL_RISCV_PLIC0_PRIORITY_BASE 0UL
46 #define METAL_RISCV_PLIC0_PENDING_BASE 4096UL
47 #define METAL_RISCV_PLIC0_ENABLE_BASE 8192UL
48 #define METAL_RISCV_PLIC0_ENABLE_PER_HART 128UL
49 #define METAL_RISCV_PLIC0_CONTEXT_BASE 2097152UL
50 #define METAL_RISCV_PLIC0_CONTEXT_PER_HART 4096UL
51 #define METAL_RISCV_PLIC0_CONTEXT_THRESHOLD 0UL
52 #define METAL_RISCV_PLIC0_CONTEXT_CLAIM 4UL
53
54 /* From aon@10000000 */
55 #define METAL_SIFIVE_AON0_10000000_BASE_ADDRESS 268435456UL
56 #define METAL_SIFIVE_AON0_0_BASE_ADDRESS 268435456UL
57 #define METAL_SIFIVE_AON0_10000000_SIZE 32768UL
58 #define METAL_SIFIVE_AON0_0_SIZE 32768UL
59
60 #define METAL_SIFIVE_AON0
61 #define METAL_SIFIVE_AON0_WDOGCFG 0UL
62 #define METAL_SIFIVE_AON0_WDOGCOUNT 8UL
63 #define METAL_SIFIVE_AON0_WDOGS 16UL
64 #define METAL_SIFIVE_AON0_WDOGFEED 24UL
65 #define METAL_SIFIVE_AON0_WDOGKEY 28UL
66 #define METAL_SIFIVE_AON0_WDOGCMP 32UL
67 #define METAL_SIFIVE_AON0_RTCCFG 64UL
68 #define METAL_SIFIVE_AON0_RTCLO 72UL
69 #define METAL_SIFIVE_AON0_RTCHI 72UL
70 #define METAL_SIFIVE_AON0_RTCS 80UL
71 #define METAL_SIFIVE_AON0_RTCCMP 96UL
72 #define METAL_SIFIVE_AON0_LFROSCCFG 112UL
73 #define METAL_SIFIVE_AON0_BACKUP0 128UL
74 #define METAL_SIFIVE_AON0_BACKUP1 132UL
75 #define METAL_SIFIVE_AON0_BACKUP2 136UL
76 #define METAL_SIFIVE_AON0_BACKUP3 140UL
77 #define METAL_SIFIVE_AON0_BACKUP4 144UL
78 #define METAL_SIFIVE_AON0_BACKUP5 148UL
79 #define METAL_SIFIVE_AON0_BACKUP6 152UL
80 #define METAL_SIFIVE_AON0_BACKUP7 152UL
81 #define METAL_SIFIVE_AON0_BACKUP8 160UL
82 #define METAL_SIFIVE_AON0_BACKUP9 164UL
83 #define METAL_SIFIVE_AON0_BACKUP10 168UL
84 #define METAL_SIFIVE_AON0_BACKUP11 172UL
85 #define METAL_SIFIVE_AON0_BACKUP12 176UL
86 #define METAL_SIFIVE_AON0_BACKUP13 180UL
87 #define METAL_SIFIVE_AON0_BACKUP14 184UL
88 #define METAL_SIFIVE_AON0_BACKUP15 188UL
89 #define METAL_SIFIVE_AON0_BACKUP16 192UL
90 #define METAL_SIFIVE_AON0_BACKUP17 196UL
91 #define METAL_SIFIVE_AON0_BACKUP18 200UL
92 #define METAL_SIFIVE_AON0_BACKUP19 204UL
93 #define METAL_SIFIVE_AON0_BACKUP20 208UL
94 #define METAL_SIFIVE_AON0_BACKUP21 212UL
95 #define METAL_SIFIVE_AON0_BACKUP22 216UL
96 #define METAL_SIFIVE_AON0_BACKUP23 220UL
97 #define METAL_SIFIVE_AON0_BACKUP24 224UL
98 #define METAL_SIFIVE_AON0_BACKUP25 228UL
99 #define METAL_SIFIVE_AON0_BACKUP26 232UL
100 #define METAL_SIFIVE_AON0_BACKUP27 236UL
101 #define METAL_SIFIVE_AON0_BACKUP28 240UL
102 #define METAL_SIFIVE_AON0_BACKUP29 244UL
103 #define METAL_SIFIVE_AON0_BACKUP30 248UL
104 #define METAL_SIFIVE_AON0_BACKUP31 252UL
105 #define METAL_SIFIVE_AON0_PMU_WAKEUP_BASE 256UL
106 #define METAL_SIFIVE_AON0_PWM_SLEEP_BASE 288UL
107 #define METAL_SIFIVE_AON0_PMUIE 320UL
108 #define METAL_SIFIVE_AON0_PMUCAUSE 324UL
109 #define METAL_SIFIVE_AON0_PMUSLEEP 328UL
110 #define METAL_SIFIVE_AON0_PMUKEY 332UL
111
112 /* From clock@3 */
113
114 #define METAL_SIFIVE_FE310_G000_HFROSC
115
116 /* From clock@1 */
117
118 #define METAL_SIFIVE_FE310_G000_HFXOSC
119
120 /* From clock@7 */
121
122 #define METAL_SIFIVE_FE310_G000_LFROSC
123
124 /* From prci@10008000 */
125 #define METAL_SIFIVE_FE310_G000_PRCI_10008000_BASE_ADDRESS 268468224UL
126 #define METAL_SIFIVE_FE310_G000_PRCI_0_BASE_ADDRESS 268468224UL
127 #define METAL_SIFIVE_FE310_G000_PRCI_10008000_SIZE 32768UL
128 #define METAL_SIFIVE_FE310_G000_PRCI_0_SIZE 32768UL
129
130 #define METAL_SIFIVE_FE310_G000_PRCI
131 #define METAL_SIFIVE_FE310_G000_PRCI_HFROSCCFG 0UL
132 #define METAL_SIFIVE_FE310_G000_PRCI_HFXOSCCFG 4UL
133 #define METAL_SIFIVE_FE310_G000_PRCI_PLLCFG 8UL
134 #define METAL_SIFIVE_FE310_G000_PRCI_PLLOUTDIV 12UL
135
136 /* From clock@4 */
137 #define METAL_SIFIVE_FE310_G000_PLL_4_CLOCK_FREQUENCY 16000000UL
138
139 #define METAL_SIFIVE_FE310_G000_PLL
140
141 /* From gpio@10012000 */
142 #define METAL_SIFIVE_GPIO0_10012000_BASE_ADDRESS 268509184UL
143 #define METAL_SIFIVE_GPIO0_0_BASE_ADDRESS 268509184UL
144 #define METAL_SIFIVE_GPIO0_10012000_SIZE 4096UL
145 #define METAL_SIFIVE_GPIO0_0_SIZE 4096UL
146
147 #define METAL_SIFIVE_GPIO0
148 #define METAL_SIFIVE_GPIO0_VALUE 0UL
149 #define METAL_SIFIVE_GPIO0_INPUT_EN 4UL
150 #define METAL_SIFIVE_GPIO0_OUTPUT_EN 8UL
151 #define METAL_SIFIVE_GPIO0_PORT 12UL
152 #define METAL_SIFIVE_GPIO0_PUE 16UL
153 #define METAL_SIFIVE_GPIO0_DS 20UL
154 #define METAL_SIFIVE_GPIO0_RISE_IE 24UL
155 #define METAL_SIFIVE_GPIO0_RISE_IP 28UL
156 #define METAL_SIFIVE_GPIO0_FALL_IE 32UL
157 #define METAL_SIFIVE_GPIO0_FALL_IP 36UL
158 #define METAL_SIFIVE_GPIO0_HIGH_IE 40UL
159 #define METAL_SIFIVE_GPIO0_HIGH_IP 44UL
160 #define METAL_SIFIVE_GPIO0_LOW_IE 48UL
161 #define METAL_SIFIVE_GPIO0_LOW_IP 52UL
162 #define METAL_SIFIVE_GPIO0_IOF_EN 56UL
163 #define METAL_SIFIVE_GPIO0_IOF_SEL 60UL
164 #define METAL_SIFIVE_GPIO0_OUT_XOR 64UL
165
166 /* From led@0 */
167
168 /* From led@1 */
169
170 /* From led@2 */
171
172 #define METAL_SIFIVE_GPIO_LEDS
173
174 /* From i2c@10016000 */
175 #define METAL_SIFIVE_I2C0_10016000_BASE_ADDRESS 268525568UL
176 #define METAL_SIFIVE_I2C0_0_BASE_ADDRESS 268525568UL
177 #define METAL_SIFIVE_I2C0_10016000_SIZE 4096UL
178 #define METAL_SIFIVE_I2C0_0_SIZE 4096UL
179
180 #define METAL_SIFIVE_I2C0
181 #define METAL_SIFIVE_I2C0_PRESCALE_LOW 0UL
182 #define METAL_SIFIVE_I2C0_PRESCALE_HIGH 4UL
183 #define METAL_SIFIVE_I2C0_CONTROL 8UL
184 #define METAL_SIFIVE_I2C0_TRANSMIT 12UL
185 #define METAL_SIFIVE_I2C0_RECEIVE 12UL
186 #define METAL_SIFIVE_I2C0_COMMAND 16UL
187 #define METAL_SIFIVE_I2C0_STATUS 16UL
188
189 /* From pwm@10015000 */
190 #define METAL_SIFIVE_PWM0_10015000_BASE_ADDRESS 268521472UL
191 #define METAL_SIFIVE_PWM0_0_BASE_ADDRESS 268521472UL
192 #define METAL_SIFIVE_PWM0_10015000_SIZE 4096UL
193 #define METAL_SIFIVE_PWM0_0_SIZE 4096UL
194
195 /* From pwm@10025000 */
196 #define METAL_SIFIVE_PWM0_10025000_BASE_ADDRESS 268587008UL
197 #define METAL_SIFIVE_PWM0_1_BASE_ADDRESS 268587008UL
198 #define METAL_SIFIVE_PWM0_10025000_SIZE 4096UL
199 #define METAL_SIFIVE_PWM0_1_SIZE 4096UL
200
201 /* From pwm@10035000 */
202 #define METAL_SIFIVE_PWM0_10035000_BASE_ADDRESS 268652544UL
203 #define METAL_SIFIVE_PWM0_2_BASE_ADDRESS 268652544UL
204 #define METAL_SIFIVE_PWM0_10035000_SIZE 4096UL
205 #define METAL_SIFIVE_PWM0_2_SIZE 4096UL
206
207 #define METAL_SIFIVE_PWM0
208 #define METAL_SIFIVE_PWM0_PWMCFG 0UL
209 #define METAL_SIFIVE_PWM0_PWMCOUNT 8UL
210 #define METAL_SIFIVE_PWM0_PWMS 16UL
211 #define METAL_SIFIVE_PWM0_PWMCMP0 32UL
212 #define METAL_SIFIVE_PWM0_PWMCMP1 36UL
213 #define METAL_SIFIVE_PWM0_PWMCMP2 40UL
214 #define METAL_SIFIVE_PWM0_PWMCMP3 44UL
215
216 /* From aon@10000000 */
217 #define METAL_SIFIVE_AON0_10000000_BASE_ADDRESS 268435456UL
218 #define METAL_SIFIVE_AON0_0_BASE_ADDRESS 268435456UL
219 #define METAL_SIFIVE_AON0_10000000_SIZE 32768UL
220 #define METAL_SIFIVE_AON0_0_SIZE 32768UL
221
222 #define METAL_SIFIVE_RTC0
223 #define METAL_SIFIVE_RTC0_RTCCFG 64UL
224 #define METAL_SIFIVE_RTC0_RTCCOUNTLO 72UL
225 #define METAL_SIFIVE_RTC0_RTCCOUNTHI 76UL
226 #define METAL_SIFIVE_RTC0_RTCS 80UL
227 #define METAL_SIFIVE_RTC0_RTCCMP0 96UL
228
229 /* From spi@10014000 */
230 #define METAL_SIFIVE_SPI0_10014000_BASE_ADDRESS 268517376UL
231 #define METAL_SIFIVE_SPI0_0_BASE_ADDRESS 268517376UL
232 #define METAL_SIFIVE_SPI0_10014000_SIZE 4096UL
233 #define METAL_SIFIVE_SPI0_0_SIZE 4096UL
234
235 /* From spi@10024000 */
236 #define METAL_SIFIVE_SPI0_10024000_BASE_ADDRESS 268582912UL
237 #define METAL_SIFIVE_SPI0_1_BASE_ADDRESS 268582912UL
238 #define METAL_SIFIVE_SPI0_10024000_SIZE 4096UL
239 #define METAL_SIFIVE_SPI0_1_SIZE 4096UL
240
241 /* From spi@10034000 */
242 #define METAL_SIFIVE_SPI0_10034000_BASE_ADDRESS 268648448UL
243 #define METAL_SIFIVE_SPI0_2_BASE_ADDRESS 268648448UL
244 #define METAL_SIFIVE_SPI0_10034000_SIZE 4096UL
245 #define METAL_SIFIVE_SPI0_2_SIZE 4096UL
246
247 #define METAL_SIFIVE_SPI0
248 #define METAL_SIFIVE_SPI0_SCKDIV 0UL
249 #define METAL_SIFIVE_SPI0_SCKMODE 4UL
250 #define METAL_SIFIVE_SPI0_CSID 16UL
251 #define METAL_SIFIVE_SPI0_CSDEF 20UL
252 #define METAL_SIFIVE_SPI0_CSMODE 24UL
253 #define METAL_SIFIVE_SPI0_DELAY0 40UL
254 #define METAL_SIFIVE_SPI0_DELAY1 44UL
255 #define METAL_SIFIVE_SPI0_FMT 64UL
256 #define METAL_SIFIVE_SPI0_TXDATA 72UL
257 #define METAL_SIFIVE_SPI0_RXDATA 76UL
258 #define METAL_SIFIVE_SPI0_TXMARK 80UL
259 #define METAL_SIFIVE_SPI0_RXMARK 84UL
260 #define METAL_SIFIVE_SPI0_FCTRL 96UL
261 #define METAL_SIFIVE_SPI0_FFMT 100UL
262 #define METAL_SIFIVE_SPI0_IE 112UL
263 #define METAL_SIFIVE_SPI0_IP 116UL
264
265 /* From serial@10013000 */
266 #define METAL_SIFIVE_UART0_10013000_BASE_ADDRESS 268513280UL
267 #define METAL_SIFIVE_UART0_0_BASE_ADDRESS 268513280UL
268 #define METAL_SIFIVE_UART0_10013000_SIZE 4096UL
269 #define METAL_SIFIVE_UART0_0_SIZE 4096UL
270
271 /* From serial@10023000 */
272 #define METAL_SIFIVE_UART0_10023000_BASE_ADDRESS 268578816UL
273 #define METAL_SIFIVE_UART0_1_BASE_ADDRESS 268578816UL
274 #define METAL_SIFIVE_UART0_10023000_SIZE 4096UL
275 #define METAL_SIFIVE_UART0_1_SIZE 4096UL
276
277 #define METAL_SIFIVE_UART0
278 #define METAL_SIFIVE_UART0_TXDATA 0UL
279 #define METAL_SIFIVE_UART0_RXDATA 4UL
280 #define METAL_SIFIVE_UART0_TXCTRL 8UL
281 #define METAL_SIFIVE_UART0_RXCTRL 12UL
282 #define METAL_SIFIVE_UART0_IE 16UL
283 #define METAL_SIFIVE_UART0_IP 20UL
284 #define METAL_SIFIVE_UART0_DIV 24UL
285
286 /* From aon@10000000 */
287 #define METAL_SIFIVE_AON0_10000000_BASE_ADDRESS 268435456UL
288 #define METAL_SIFIVE_AON0_0_BASE_ADDRESS 268435456UL
289 #define METAL_SIFIVE_AON0_10000000_SIZE 32768UL
290 #define METAL_SIFIVE_AON0_0_SIZE 32768UL
291
292 #define METAL_SIFIVE_WDOG0
293 #define METAL_SIFIVE_WDOG0_MAGIC_KEY 5370206UL
294 #define METAL_SIFIVE_WDOG0_MAGIC_FOOD 218755085UL
295 #define METAL_SIFIVE_WDOG0_WDOGCFG 0UL
296 #define METAL_SIFIVE_WDOG0_WDOGCOUNT 8UL
297 #define METAL_SIFIVE_WDOG0_WDOGS 16UL
298 #define METAL_SIFIVE_WDOG0_WDOGFEED 24UL
299 #define METAL_SIFIVE_WDOG0_WDOGKEY 28UL
300 #define METAL_SIFIVE_WDOG0_WDOGCMP 32UL
301
302 #endif /* METAL_PLATFORM_H*/