YAHAL
Yet Another Hardware Abstraction Library
Loading...
Searching...
No Matches
RP2350_regs.h
1
2// This file was generated with svd2cpp, source file was RP2350_regs.svd
3// DO NOT EDIT - CHANGES MIGHT BE OVERWRITTEN !!
5//
6#include "bitfield_defs.h"
7
8// vendor: Raspberry Pi
9// name: RP2350
10// series: RP
11// version: 0.1
12// description:
13// Dual Cortex-M33 or Hazard3 processors at 150MHz
14// 520kB on-chip SRAM, in 10 independent banks
15// Extended low-power sleep states with optional SRAM retention: as low as 10uA DVDD
16// 8kB of one-time-programmable storage (OTP)
17// Up to 16MB of external QSPI flash/PSRAM via dedicated QSPI bus
18// Additional 16MB flash/PSRAM accessible via optional second chip-select
19// On-chip switched-mode power supply to generate core voltage
20// Low-quiescent-current LDO mode can be enabled for sleep states
21// 2x on-chip PLLs for internal or external clock generation
22// GPIOs are 5V-tolerant (powered), and 3.3V-failsafe (unpowered)
23// Security features:
24// Optional boot signing, enforced by on-chip mask ROM, with key fingerprint in OTP
25// Protected OTP storage for optional boot decryption key
26// Global bus filtering based on Arm or RISC-V security/privilege levels
27// Peripherals, GPIOs and DMA channels individually assignable to security domains
28// Hardware mitigations for fault injection attacks
29// Hardware SHA-256 accelerator
30// Peripherals:
31// 2x UARTs
32// 2x SPI controllers
33// 2x I2C controllers
34// 24x PWM channels
35// USB 1.1 controller and PHY, with host and device support
36// 12x PIO state machines
37// 1x HSTX peripheral
38//
39// width: 32
40// size: 32
41// resetMask: 0xffffffff
42// resetValue: 0x00000000
43// access: read-write
44// licenseText:
45// Copyright (c) 2024 Raspberry Pi Ltd.
46// SPDX-License-Identifier: BSD-3-Clause
47// cpu
48// name: CM33
49// revision: r1p0
50// endian: little
51// mpuPresent: true
52// fpuPresent: true
53// sauNumRegions: 8
54// nvicPrioBits: 4
55// vtorPresent: 1
56// dspPresent: 1
57// vendorSystickConfig: false
58// deviceNumInterrupts: 52
59// addressUnitBits: 8
60
61namespace _RESETS_ {
62
63 // Reset value: 0x1fffffff
64 BEGIN_TYPE(RESET_t, uint32_t)
65 ADD_BITFIELD_RW(USBCTRL, 28, 1)
66 ADD_BITFIELD_RW(UART1, 27, 1)
67 ADD_BITFIELD_RW(UART0, 26, 1)
68 ADD_BITFIELD_RW(TRNG, 25, 1)
69 ADD_BITFIELD_RW(TIMER1, 24, 1)
70 ADD_BITFIELD_RW(TIMER0, 23, 1)
71 ADD_BITFIELD_RW(TBMAN, 22, 1)
72 ADD_BITFIELD_RW(SYSINFO, 21, 1)
73 ADD_BITFIELD_RW(SYSCFG, 20, 1)
74 ADD_BITFIELD_RW(SPI1, 19, 1)
75 ADD_BITFIELD_RW(SPI0, 18, 1)
76 ADD_BITFIELD_RW(SHA256, 17, 1)
77 ADD_BITFIELD_RW(PWM, 16, 1)
78 ADD_BITFIELD_RW(PLL_USB, 15, 1)
79 ADD_BITFIELD_RW(PLL_SYS, 14, 1)
80 ADD_BITFIELD_RW(PIO2, 13, 1)
81 ADD_BITFIELD_RW(PIO1, 12, 1)
82 ADD_BITFIELD_RW(PIO0, 11, 1)
83 ADD_BITFIELD_RW(PADS_QSPI, 10, 1)
84 ADD_BITFIELD_RW(PADS_BANK0, 9, 1)
85 ADD_BITFIELD_RW(JTAG, 8, 1)
86 ADD_BITFIELD_RW(IO_QSPI, 7, 1)
87 ADD_BITFIELD_RW(IO_BANK0, 6, 1)
88 ADD_BITFIELD_RW(I2C1, 5, 1)
89 ADD_BITFIELD_RW(I2C0, 4, 1)
90 ADD_BITFIELD_RW(HSTX, 3, 1)
91 ADD_BITFIELD_RW(DMA, 2, 1)
92 ADD_BITFIELD_RW(BUSCTRL, 1, 1)
93 ADD_BITFIELD_RW(ADC, 0, 1)
94 END_TYPE()
95
96 // Reset value: 0x00000000
97 BEGIN_TYPE(WDSEL_t, uint32_t)
98 ADD_BITFIELD_RW(USBCTRL, 28, 1)
99 ADD_BITFIELD_RW(UART1, 27, 1)
100 ADD_BITFIELD_RW(UART0, 26, 1)
101 ADD_BITFIELD_RW(TRNG, 25, 1)
102 ADD_BITFIELD_RW(TIMER1, 24, 1)
103 ADD_BITFIELD_RW(TIMER0, 23, 1)
104 ADD_BITFIELD_RW(TBMAN, 22, 1)
105 ADD_BITFIELD_RW(SYSINFO, 21, 1)
106 ADD_BITFIELD_RW(SYSCFG, 20, 1)
107 ADD_BITFIELD_RW(SPI1, 19, 1)
108 ADD_BITFIELD_RW(SPI0, 18, 1)
109 ADD_BITFIELD_RW(SHA256, 17, 1)
110 ADD_BITFIELD_RW(PWM, 16, 1)
111 ADD_BITFIELD_RW(PLL_USB, 15, 1)
112 ADD_BITFIELD_RW(PLL_SYS, 14, 1)
113 ADD_BITFIELD_RW(PIO2, 13, 1)
114 ADD_BITFIELD_RW(PIO1, 12, 1)
115 ADD_BITFIELD_RW(PIO0, 11, 1)
116 ADD_BITFIELD_RW(PADS_QSPI, 10, 1)
117 ADD_BITFIELD_RW(PADS_BANK0, 9, 1)
118 ADD_BITFIELD_RW(JTAG, 8, 1)
119 ADD_BITFIELD_RW(IO_QSPI, 7, 1)
120 ADD_BITFIELD_RW(IO_BANK0, 6, 1)
121 ADD_BITFIELD_RW(I2C1, 5, 1)
122 ADD_BITFIELD_RW(I2C0, 4, 1)
123 ADD_BITFIELD_RW(HSTX, 3, 1)
124 ADD_BITFIELD_RW(DMA, 2, 1)
125 ADD_BITFIELD_RW(BUSCTRL, 1, 1)
126 ADD_BITFIELD_RW(ADC, 0, 1)
127 END_TYPE()
128
129 // Reset value: 0x00000000
130 BEGIN_TYPE(RESET_DONE_t, uint32_t)
131 ADD_BITFIELD_RO(USBCTRL, 28, 1)
132 ADD_BITFIELD_RO(UART1, 27, 1)
133 ADD_BITFIELD_RO(UART0, 26, 1)
134 ADD_BITFIELD_RO(TRNG, 25, 1)
135 ADD_BITFIELD_RO(TIMER1, 24, 1)
136 ADD_BITFIELD_RO(TIMER0, 23, 1)
137 ADD_BITFIELD_RO(TBMAN, 22, 1)
138 ADD_BITFIELD_RO(SYSINFO, 21, 1)
139 ADD_BITFIELD_RO(SYSCFG, 20, 1)
140 ADD_BITFIELD_RO(SPI1, 19, 1)
141 ADD_BITFIELD_RO(SPI0, 18, 1)
142 ADD_BITFIELD_RO(SHA256, 17, 1)
143 ADD_BITFIELD_RO(PWM, 16, 1)
144 ADD_BITFIELD_RO(PLL_USB, 15, 1)
145 ADD_BITFIELD_RO(PLL_SYS, 14, 1)
146 ADD_BITFIELD_RO(PIO2, 13, 1)
147 ADD_BITFIELD_RO(PIO1, 12, 1)
148 ADD_BITFIELD_RO(PIO0, 11, 1)
149 ADD_BITFIELD_RO(PADS_QSPI, 10, 1)
150 ADD_BITFIELD_RO(PADS_BANK0, 9, 1)
151 ADD_BITFIELD_RO(JTAG, 8, 1)
152 ADD_BITFIELD_RO(IO_QSPI, 7, 1)
153 ADD_BITFIELD_RO(IO_BANK0, 6, 1)
154 ADD_BITFIELD_RO(I2C1, 5, 1)
155 ADD_BITFIELD_RO(I2C0, 4, 1)
156 ADD_BITFIELD_RO(HSTX, 3, 1)
157 ADD_BITFIELD_RO(DMA, 2, 1)
158 ADD_BITFIELD_RO(BUSCTRL, 1, 1)
159 ADD_BITFIELD_RO(ADC, 0, 1)
160 END_TYPE()
161
162 struct RESETS_t {
163 RESET_t RESET;
164 WDSEL_t WDSEL;
165 RESET_DONE_t RESET_DONE;
166 };
167
168 static RESETS_t & RESETS = (*(RESETS_t *)0x40020000);
169 static RESETS_t & RESETS_XOR = (*(RESETS_t *)0x40021000);
170 static RESETS_t & RESETS_SET = (*(RESETS_t *)0x40022000);
171 static RESETS_t & RESETS_CLR = (*(RESETS_t *)0x40023000);
172
173} // _RESETS_
174
175namespace _PSM_ {
176
177 // Force block out of reset (i.e. power it on)
178 // Reset value: 0x00000000
179 BEGIN_TYPE(FRCE_ON_t, uint32_t)
180 ADD_BITFIELD_RW(PROC1, 24, 1)
181 ADD_BITFIELD_RW(PROC0, 23, 1)
182 ADD_BITFIELD_RW(ACCESSCTRL, 22, 1)
183 ADD_BITFIELD_RW(SIO, 21, 1)
184 ADD_BITFIELD_RW(XIP, 20, 1)
185 ADD_BITFIELD_RW(SRAM9, 19, 1)
186 ADD_BITFIELD_RW(SRAM8, 18, 1)
187 ADD_BITFIELD_RW(SRAM7, 17, 1)
188 ADD_BITFIELD_RW(SRAM6, 16, 1)
189 ADD_BITFIELD_RW(SRAM5, 15, 1)
190 ADD_BITFIELD_RW(SRAM4, 14, 1)
191 ADD_BITFIELD_RW(SRAM3, 13, 1)
192 ADD_BITFIELD_RW(SRAM2, 12, 1)
193 ADD_BITFIELD_RW(SRAM1, 11, 1)
194 ADD_BITFIELD_RW(SRAM0, 10, 1)
195 ADD_BITFIELD_RW(BOOTRAM, 9, 1)
196 ADD_BITFIELD_RW(ROM, 8, 1)
197 ADD_BITFIELD_RW(BUSFABRIC, 7, 1)
198 ADD_BITFIELD_RW(PSM_READY, 6, 1)
199 ADD_BITFIELD_RW(CLOCKS, 5, 1)
200 ADD_BITFIELD_RW(RESETS, 4, 1)
201 ADD_BITFIELD_RW(XOSC, 3, 1)
202 ADD_BITFIELD_RW(ROSC, 2, 1)
203 ADD_BITFIELD_RW(OTP, 1, 1)
204 ADD_BITFIELD_RW(PROC_COLD, 0, 1)
205 END_TYPE()
206
207 // Force into reset (i.e. power it off)
208 // Reset value: 0x00000000
209 BEGIN_TYPE(FRCE_OFF_t, uint32_t)
210 ADD_BITFIELD_RW(PROC1, 24, 1)
211 ADD_BITFIELD_RW(PROC0, 23, 1)
212 ADD_BITFIELD_RW(ACCESSCTRL, 22, 1)
213 ADD_BITFIELD_RW(SIO, 21, 1)
214 ADD_BITFIELD_RW(XIP, 20, 1)
215 ADD_BITFIELD_RW(SRAM9, 19, 1)
216 ADD_BITFIELD_RW(SRAM8, 18, 1)
217 ADD_BITFIELD_RW(SRAM7, 17, 1)
218 ADD_BITFIELD_RW(SRAM6, 16, 1)
219 ADD_BITFIELD_RW(SRAM5, 15, 1)
220 ADD_BITFIELD_RW(SRAM4, 14, 1)
221 ADD_BITFIELD_RW(SRAM3, 13, 1)
222 ADD_BITFIELD_RW(SRAM2, 12, 1)
223 ADD_BITFIELD_RW(SRAM1, 11, 1)
224 ADD_BITFIELD_RW(SRAM0, 10, 1)
225 ADD_BITFIELD_RW(BOOTRAM, 9, 1)
226 ADD_BITFIELD_RW(ROM, 8, 1)
227 ADD_BITFIELD_RW(BUSFABRIC, 7, 1)
228 ADD_BITFIELD_RW(PSM_READY, 6, 1)
229 ADD_BITFIELD_RW(CLOCKS, 5, 1)
230 ADD_BITFIELD_RW(RESETS, 4, 1)
231 ADD_BITFIELD_RW(XOSC, 3, 1)
232 ADD_BITFIELD_RW(ROSC, 2, 1)
233 ADD_BITFIELD_RW(OTP, 1, 1)
234 ADD_BITFIELD_RW(PROC_COLD, 0, 1)
235 END_TYPE()
236
237 // Set to 1 if the watchdog should reset this
238 // Reset value: 0x00000000
239 BEGIN_TYPE(WDSEL_t, uint32_t)
240 ADD_BITFIELD_RW(PROC1, 24, 1)
241 ADD_BITFIELD_RW(PROC0, 23, 1)
242 ADD_BITFIELD_RW(ACCESSCTRL, 22, 1)
243 ADD_BITFIELD_RW(SIO, 21, 1)
244 ADD_BITFIELD_RW(XIP, 20, 1)
245 ADD_BITFIELD_RW(SRAM9, 19, 1)
246 ADD_BITFIELD_RW(SRAM8, 18, 1)
247 ADD_BITFIELD_RW(SRAM7, 17, 1)
248 ADD_BITFIELD_RW(SRAM6, 16, 1)
249 ADD_BITFIELD_RW(SRAM5, 15, 1)
250 ADD_BITFIELD_RW(SRAM4, 14, 1)
251 ADD_BITFIELD_RW(SRAM3, 13, 1)
252 ADD_BITFIELD_RW(SRAM2, 12, 1)
253 ADD_BITFIELD_RW(SRAM1, 11, 1)
254 ADD_BITFIELD_RW(SRAM0, 10, 1)
255 ADD_BITFIELD_RW(BOOTRAM, 9, 1)
256 ADD_BITFIELD_RW(ROM, 8, 1)
257 ADD_BITFIELD_RW(BUSFABRIC, 7, 1)
258 ADD_BITFIELD_RW(PSM_READY, 6, 1)
259 ADD_BITFIELD_RW(CLOCKS, 5, 1)
260 ADD_BITFIELD_RW(RESETS, 4, 1)
261 ADD_BITFIELD_RW(XOSC, 3, 1)
262 ADD_BITFIELD_RW(ROSC, 2, 1)
263 ADD_BITFIELD_RW(OTP, 1, 1)
264 ADD_BITFIELD_RW(PROC_COLD, 0, 1)
265 END_TYPE()
266
267 // Is the subsystem ready?
268 // Reset value: 0x00000000
269 BEGIN_TYPE(DONE_t, uint32_t)
270 ADD_BITFIELD_RO(PROC1, 24, 1)
271 ADD_BITFIELD_RO(PROC0, 23, 1)
272 ADD_BITFIELD_RO(ACCESSCTRL, 22, 1)
273 ADD_BITFIELD_RO(SIO, 21, 1)
274 ADD_BITFIELD_RO(XIP, 20, 1)
275 ADD_BITFIELD_RO(SRAM9, 19, 1)
276 ADD_BITFIELD_RO(SRAM8, 18, 1)
277 ADD_BITFIELD_RO(SRAM7, 17, 1)
278 ADD_BITFIELD_RO(SRAM6, 16, 1)
279 ADD_BITFIELD_RO(SRAM5, 15, 1)
280 ADD_BITFIELD_RO(SRAM4, 14, 1)
281 ADD_BITFIELD_RO(SRAM3, 13, 1)
282 ADD_BITFIELD_RO(SRAM2, 12, 1)
283 ADD_BITFIELD_RO(SRAM1, 11, 1)
284 ADD_BITFIELD_RO(SRAM0, 10, 1)
285 ADD_BITFIELD_RO(BOOTRAM, 9, 1)
286 ADD_BITFIELD_RO(ROM, 8, 1)
287 ADD_BITFIELD_RO(BUSFABRIC, 7, 1)
288 ADD_BITFIELD_RO(PSM_READY, 6, 1)
289 ADD_BITFIELD_RO(CLOCKS, 5, 1)
290 ADD_BITFIELD_RO(RESETS, 4, 1)
291 ADD_BITFIELD_RO(XOSC, 3, 1)
292 ADD_BITFIELD_RO(ROSC, 2, 1)
293 ADD_BITFIELD_RO(OTP, 1, 1)
294 ADD_BITFIELD_RO(PROC_COLD, 0, 1)
295 END_TYPE()
296
297 struct PSM_t {
298 FRCE_ON_t FRCE_ON;
299 FRCE_OFF_t FRCE_OFF;
300 WDSEL_t WDSEL;
301 DONE_t DONE;
302 };
303
304 static PSM_t & PSM = (*(PSM_t *)0x40018000);
305 static PSM_t & PSM_XOR = (*(PSM_t *)0x40019000);
306 static PSM_t & PSM_SET = (*(PSM_t *)0x4001a000);
307 static PSM_t & PSM_CLR = (*(PSM_t *)0x4001b000);
308
309} // _PSM_
310
311namespace _CLOCKS_ {
312
313 // Clock control, can be changed on-the-fly (except for auxsrc)
314 // Reset value: 0x00000000
315 BEGIN_TYPE(CLK_GPOUT_CTRL_t, uint32_t)
316 // clock generator is enabled
317 ADD_BITFIELD_RO(ENABLED, 28, 1)
318 // An edge on this signal shifts the phase of the output by 1 cycle
319 // of the input clock. This can be done at any time.
320 ADD_BITFIELD_RW(NUDGE, 20, 1)
321 // This delays the enable signal by up to 3 cycles of the input clock.
322 // This must be set before the clock is enabled to have any effect.
323 ADD_BITFIELD_RW(PHASE, 16, 2)
324 // Enables duty cycle correction for odd divisors,
325 // can be changed on-the-fly
326 ADD_BITFIELD_RW(DC50, 12, 1)
327 // Starts and stops the clock generator cleanly
328 ADD_BITFIELD_RW(ENABLE, 11, 1)
329 // Asynchronously kills the clock generator, enable must be set low
330 // before deasserting kill
331 ADD_BITFIELD_RW(KILL, 10, 1)
332 // Selects the auxiliary clock source, will glitch when switching
333 ADD_BITFIELD_RW(AUXSRC, 5, 4)
334 END_TYPE()
335
336 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clksrc_pll_sys = 0;
337 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clksrc_gpin0 = 1;
338 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clksrc_gpin1 = 2;
339 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clksrc_pll_usb = 3;
340 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clksrc_pll_usb_primary_ref_opcg = 4;
341 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__rosc_clksrc = 5;
342 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__xosc_clksrc = 6;
343 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__lposc_clksrc = 7;
344 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clk_sys = 8;
345 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clk_usb = 9;
346 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clk_adc = 10;
347 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clk_ref = 11;
348 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clk_peri = 12;
349 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__clk_hstx = 13;
350 static const uint32_t CLK_GPOUT_CTRL_AUXSRC__otp_clk2fc = 14;
351
352 // Reset value: 0x00010000
353 BEGIN_TYPE(CLK_GPOUT_DIV_t, uint32_t)
354 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
355 ADD_BITFIELD_RW(INT, 16, 16)
356 // Fractional component of the divisor, can be changed on-the-fly
357 ADD_BITFIELD_RW(FRAC, 0, 16)
358 END_TYPE()
359
360 // Indicates which src is currently selected (one-hot)
361 // Reset value: 0x00000001
362 BEGIN_TYPE(CLK_GPOUT_SELECTED_t, uint32_t)
363 // This slice does not have a glitchless mux (only the AUX_SRC field is present,
364 // not SRC) so this register is hardwired to 0x1.
365 ADD_BITFIELD_RO(SELECTED, 0, 1)
366 END_TYPE()
367
368 // Clock control, can be changed on-the-fly (except for auxsrc)
369 // Reset value: 0x00000000
370 BEGIN_TYPE(CLK_REF_CTRL_t, uint32_t)
371 // Selects the auxiliary clock source, will glitch when switching
372 ADD_BITFIELD_RW(AUXSRC, 5, 2)
373 // Selects the clock source glitchlessly, can be changed on-the-fly
374 ADD_BITFIELD_RW(SRC, 0, 2)
375 END_TYPE()
376
377 static const uint32_t CLK_REF_CTRL_AUXSRC__clksrc_pll_usb = 0;
378 static const uint32_t CLK_REF_CTRL_AUXSRC__clksrc_gpin0 = 1;
379 static const uint32_t CLK_REF_CTRL_AUXSRC__clksrc_gpin1 = 2;
380 static const uint32_t CLK_REF_CTRL_AUXSRC__clksrc_pll_usb_primary_ref_opcg = 3;
381 static const uint32_t CLK_REF_CTRL_SRC__rosc_clksrc_ph = 0;
382 static const uint32_t CLK_REF_CTRL_SRC__clksrc_clk_ref_aux = 1;
383 static const uint32_t CLK_REF_CTRL_SRC__xosc_clksrc = 2;
384 static const uint32_t CLK_REF_CTRL_SRC__lposc_clksrc = 3;
385
386 // Reset value: 0x00010000
387 BEGIN_TYPE(CLK_REF_DIV_t, uint32_t)
388 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
389 ADD_BITFIELD_RW(INT, 16, 8)
390 END_TYPE()
391
392 // Indicates which src is currently selected (one-hot)
393 // Reset value: 0x00000001
394 BEGIN_TYPE(CLK_REF_SELECTED_t, uint32_t)
395 // The glitchless multiplexer does not switch instantaneously (to avoid glitches),
396 // so software should poll this register to wait for the switch to complete.
397 // This register contains one decoded bit for each of the clock sources enumerated
398 // in the CTRL SRC field. At most one of these bits will be set at any time, indicating
399 // that clock is currently present at the output of the glitchless mux.
400 // Whilst switching is in progress, this register may briefly show all-0s.
401 ADD_BITFIELD_RO(CLK_REF_SELECTED, 0, 4)
402 END_TYPE()
403
404 // Clock control, can be changed on-the-fly (except for auxsrc)
405 // Reset value: 0x00000000
406 BEGIN_TYPE(CLK_SYS_CTRL_t, uint32_t)
407 // Selects the auxiliary clock source, will glitch when switching
408 ADD_BITFIELD_RW(AUXSRC, 5, 3)
409 // Selects the clock source glitchlessly, can be changed on-the-fly
410 ADD_BITFIELD_RW(SRC, 0, 1)
411 END_TYPE()
412
413 static const uint32_t CLK_SYS_CTRL_AUXSRC__clksrc_pll_sys = 0;
414 static const uint32_t CLK_SYS_CTRL_AUXSRC__clksrc_pll_usb = 1;
415 static const uint32_t CLK_SYS_CTRL_AUXSRC__rosc_clksrc = 2;
416 static const uint32_t CLK_SYS_CTRL_AUXSRC__xosc_clksrc = 3;
417 static const uint32_t CLK_SYS_CTRL_AUXSRC__clksrc_gpin0 = 4;
418 static const uint32_t CLK_SYS_CTRL_AUXSRC__clksrc_gpin1 = 5;
419 static const uint32_t CLK_SYS_CTRL_SRC__clk_ref = 0;
420 static const uint32_t CLK_SYS_CTRL_SRC__clksrc_clk_sys_aux = 1;
421
422 // Reset value: 0x00010000
423 BEGIN_TYPE(CLK_SYS_DIV_t, uint32_t)
424 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
425 ADD_BITFIELD_RW(INT, 16, 16)
426 // Fractional component of the divisor, can be changed on-the-fly
427 ADD_BITFIELD_RW(FRAC, 0, 16)
428 END_TYPE()
429
430 // Indicates which src is currently selected (one-hot)
431 // Reset value: 0x00000001
432 BEGIN_TYPE(CLK_SYS_SELECTED_t, uint32_t)
433 // The glitchless multiplexer does not switch instantaneously (to avoid glitches),
434 // so software should poll this register to wait for the switch to complete.
435 // This register contains one decoded bit for each of the clock sources enumerated
436 // in the CTRL SRC field. At most one of these bits will be set at any time, indicating
437 // that clock is currently present at the output of the glitchless mux.
438 // Whilst switching is in progress, this register may briefly show all-0s.
439 ADD_BITFIELD_RO(CLK_SYS_SELECTED, 0, 2)
440 END_TYPE()
441
442 // Clock control, can be changed on-the-fly (except for auxsrc)
443 // Reset value: 0x00000000
444 BEGIN_TYPE(CLK_PERI_CTRL_t, uint32_t)
445 // clock generator is enabled
446 ADD_BITFIELD_RO(ENABLED, 28, 1)
447 // Starts and stops the clock generator cleanly
448 ADD_BITFIELD_RW(ENABLE, 11, 1)
449 // Asynchronously kills the clock generator,
450 // enable must be set low before deasserting kill
451 ADD_BITFIELD_RW(KILL, 10, 1)
452 // Selects the auxiliary clock source, will glitch when switching
453 ADD_BITFIELD_RW(AUXSRC, 5, 3)
454 END_TYPE()
455
456 static const uint32_t CLK_PERI_CTRL_AUXSRC__clk_sys = 0;
457 static const uint32_t CLK_PERI_CTRL_AUXSRC__clksrc_pll_sys = 1;
458 static const uint32_t CLK_PERI_CTRL_AUXSRC__clksrc_pll_usb = 2;
459 static const uint32_t CLK_PERI_CTRL_AUXSRC__rosc_clksrc_ph = 3;
460 static const uint32_t CLK_PERI_CTRL_AUXSRC__xosc_clksrc = 4;
461 static const uint32_t CLK_PERI_CTRL_AUXSRC__clksrc_gpin0 = 5;
462 static const uint32_t CLK_PERI_CTRL_AUXSRC__clksrc_gpin1 = 6;
463
464 // Reset value: 0x00010000
465 BEGIN_TYPE(CLK_PERI_DIV_t, uint32_t)
466 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
467 ADD_BITFIELD_RW(INT, 16, 2)
468 END_TYPE()
469
470 // Indicates which src is currently selected (one-hot)
471 // Reset value: 0x00000001
472 BEGIN_TYPE(CLK_PERI_SELECTED_t, uint32_t)
473 // This slice does not have a glitchless mux (only the AUX_SRC field is present,
474 // not SRC) so this register is hardwired to 0x1.
475 ADD_BITFIELD_RO(CLK_PERI_SELECTED, 0, 1)
476 END_TYPE()
477
478 // Clock control, can be changed on-the-fly (except for auxsrc)
479 // Reset value: 0x00000000
480 BEGIN_TYPE(CLK_HSTX_CTRL_t, uint32_t)
481 // clock generator is enabled
482 ADD_BITFIELD_RO(ENABLED, 28, 1)
483 // An edge on this signal shifts the phase of the output by
484 // 1 cycle of the input clock. This can be done at any time.
485 ADD_BITFIELD_RW(NUDGE, 20, 1)
486 // This delays the enable signal by up to 3 cycles of the input clock
487 // This must be set before the clock is enabled to have any effect
488 ADD_BITFIELD_RW(PHASE, 16, 2)
489 // Starts and stops the clock generator cleanly
490 ADD_BITFIELD_RW(ENABLE, 11, 1)
491 // Asynchronously kills the clock generator,
492 // enable must be set low before deasserting kill
493 ADD_BITFIELD_RW(KILL, 10, 1)
494 // Selects the auxiliary clock source, will glitch when switching
495 ADD_BITFIELD_RW(AUXSRC, 5, 3)
496 END_TYPE()
497
498 static const uint32_t CLK_HSTX_CTRL_AUXSRC__clk_sys = 0;
499 static const uint32_t CLK_HSTX_CTRL_AUXSRC__clksrc_pll_sys = 1;
500 static const uint32_t CLK_HSTX_CTRL_AUXSRC__clksrc_pll_usb = 2;
501 static const uint32_t CLK_HSTX_CTRL_AUXSRC__clksrc_gpin0 = 3;
502 static const uint32_t CLK_HSTX_CTRL_AUXSRC__clksrc_gpin1 = 4;
503
504 // Reset value: 0x00010000
505 BEGIN_TYPE(CLK_HSTX_DIV_t, uint32_t)
506 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
507 ADD_BITFIELD_RW(INT, 16, 2)
508 END_TYPE()
509
510 // Indicates which src is currently selected (one-hot)
511 // Reset value: 0x00000001
512 BEGIN_TYPE(CLK_HSTX_SELECTED_t, uint32_t)
513 // This slice does not have a glitchless mux (only the AUX_SRC field
514 // is present, not SRC) so this register is hardwired to 0x1.
515 ADD_BITFIELD_RO(CLK_HSTX_SELECTED, 0, 1)
516 END_TYPE()
517
518 // Clock control, can be changed on-the-fly (except for auxsrc)
519 // Reset value: 0x00000000
520 BEGIN_TYPE(CLK_USB_CTRL_t, uint32_t)
521 // clock generator is enabled
522 ADD_BITFIELD_RO(ENABLED, 28, 1)
523 // An edge on this signal shifts the phase of the output by 1
524 // cycle of the input clock. This can be done at any time
525 ADD_BITFIELD_RW(NUDGE, 20, 1)
526 // This delays the enable signal by up to 3 cycles of the input clock
527 // This must be set before the clock is enabled to have any effect
528 ADD_BITFIELD_RW(PHASE, 16, 2)
529 // Starts and stops the clock generator cleanly
530 ADD_BITFIELD_RW(ENABLE, 11, 1)
531 // Asynchronously kills the clock generator,
532 // enable must be set low before deasserting kill
533 ADD_BITFIELD_RW(KILL, 10, 1)
534 // Selects the auxiliary clock source, will glitch when switching
535 ADD_BITFIELD_RW(AUXSRC, 5, 3)
536 END_TYPE()
537
538 static const uint32_t CLK_USB_CTRL_AUXSRC__clksrc_pll_usb = 0;
539 static const uint32_t CLK_USB_CTRL_AUXSRC__clksrc_pll_sys = 1;
540 static const uint32_t CLK_USB_CTRL_AUXSRC__rosc_clksrc_ph = 2;
541 static const uint32_t CLK_USB_CTRL_AUXSRC__xosc_clksrc = 3;
542 static const uint32_t CLK_USB_CTRL_AUXSRC__clksrc_gpin0 = 4;
543 static const uint32_t CLK_USB_CTRL_AUXSRC__clksrc_gpin1 = 5;
544
545 // Reset value: 0x00010000
546 BEGIN_TYPE(CLK_USB_DIV_t, uint32_t)
547 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
548 ADD_BITFIELD_RW(INT, 16, 4)
549 END_TYPE()
550
551 // Indicates which src is currently selected (one-hot)
552 // Reset value: 0x00000001
553 BEGIN_TYPE(CLK_USB_SELECTED_t, uint32_t)
554 // This slice does not have a glitchless mux (only the AUX_SRC field
555 // is present, not SRC) so this register is hardwired to 0x1.
556 ADD_BITFIELD_RO(CLK_USB_SELECTED, 0, 1)
557 END_TYPE()
558
559 // Clock control, can be changed on-the-fly (except for auxsrc)
560 // Reset value: 0x00000000
561 BEGIN_TYPE(CLK_ADC_CTRL_t, uint32_t)
562 // clock generator is enabled
563 ADD_BITFIELD_RO(ENABLED, 28, 1)
564 // An edge on this signal shifts the phase of the output by 1
565 // cycle of the input clock. This can be done at any time
566 ADD_BITFIELD_RW(NUDGE, 20, 1)
567 // This delays the enable signal by up to 3 cycles of the input clock
568 // This must be set before the clock is enabled to have any effect
569 ADD_BITFIELD_RW(PHASE, 16, 2)
570 // Starts and stops the clock generator cleanly
571 ADD_BITFIELD_RW(ENABLE, 11, 1)
572 // Asynchronously kills the clock generator,
573 // enable must be set low before deasserting kill
574 ADD_BITFIELD_RW(KILL, 10, 1)
575 // Selects the auxiliary clock source, will glitch when switching
576 ADD_BITFIELD_RW(AUXSRC, 5, 3)
577 END_TYPE()
578
579 static const uint32_t CLK_ADC_CTRL_AUXSRC__clksrc_pll_usb = 0;
580 static const uint32_t CLK_ADC_CTRL_AUXSRC__clksrc_pll_sys = 1;
581 static const uint32_t CLK_ADC_CTRL_AUXSRC__rosc_clksrc_ph = 2;
582 static const uint32_t CLK_ADC_CTRL_AUXSRC__xosc_clksrc = 3;
583 static const uint32_t CLK_ADC_CTRL_AUXSRC__clksrc_gpin0 = 4;
584 static const uint32_t CLK_ADC_CTRL_AUXSRC__clksrc_gpin1 = 5;
585
586 // Reset value: 0x00010000
587 BEGIN_TYPE(CLK_ADC_DIV_t, uint32_t)
588 // Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly
589 ADD_BITFIELD_RW(INT, 16, 4)
590 END_TYPE()
591
592 // Indicates which src is currently selected (one-hot)
593 // Reset value: 0x00000001
594 BEGIN_TYPE(CLK_ADC_SELECTED_t, uint32_t)
595 // This slice does not have a glitchless mux (only the AUX_SRC
596 // field is present, not SRC) so this register is hardwired to 0x1.
597 ADD_BITFIELD_RO(CLK_ADC_SELECTED, 0, 1)
598 END_TYPE()
599
600 // Reset value: 0x00000000
601 BEGIN_TYPE(DFTCLK_XOSC_CTRL_t, uint32_t)
602 ADD_BITFIELD_RW(SRC, 0, 2)
603 END_TYPE()
604
605 static const uint32_t DFTCLK_XOSC_CTRL_SRC__NULL = 0;
606 static const uint32_t DFTCLK_XOSC_CTRL_SRC__clksrc_pll_usb_primary = 1;
607 static const uint32_t DFTCLK_XOSC_CTRL_SRC__clksrc_gpin0 = 2;
608
609 // Reset value: 0x00000000
610 BEGIN_TYPE(DFTCLK_ROSC_CTRL_t, uint32_t)
611 ADD_BITFIELD_RW(SRC, 0, 2)
612 END_TYPE()
613
614 static const uint32_t DFTCLK_ROSC_CTRL_SRC__NULL = 0;
615 static const uint32_t DFTCLK_ROSC_CTRL_SRC__clksrc_pll_sys_primary_rosc = 1;
616 static const uint32_t DFTCLK_ROSC_CTRL_SRC__clksrc_gpin1 = 2;
617
618 // Reset value: 0x00000000
619 BEGIN_TYPE(DFTCLK_LPOSC_CTRL_t, uint32_t)
620 ADD_BITFIELD_RW(SRC, 0, 2)
621 END_TYPE()
622
623 static const uint32_t DFTCLK_LPOSC_CTRL_SRC__NULL = 0;
624 static const uint32_t DFTCLK_LPOSC_CTRL_SRC__clksrc_pll_usb_primary_lposc = 1;
625 static const uint32_t DFTCLK_LPOSC_CTRL_SRC__clksrc_gpin1 = 2;
626
627 // Reset value: 0x000000ff
628 BEGIN_TYPE(CLK_SYS_RESUS_CTRL_t, uint32_t)
629 // For clearing the resus after the fault that triggered it has been corrected
630 ADD_BITFIELD_RW(CLEAR, 16, 1)
631 // Force a resus, for test purposes only
632 ADD_BITFIELD_RW(FRCE, 12, 1)
633 // Enable resus
634 ADD_BITFIELD_RW(ENABLE, 8, 1)
635 // This is expressed as a number of clk_ref cycles
636 // and must be >= 2x clk_ref_freq/min_clk_tst_freq
637 ADD_BITFIELD_RW(TIMEOUT, 0, 8)
638 END_TYPE()
639
640 // Reset value: 0x00000000
641 BEGIN_TYPE(CLK_SYS_RESUS_STATUS_t, uint32_t)
642 // Clock has been resuscitated, correct the error then send ctrl_clear=1
643 ADD_BITFIELD_RO(RESUSSED, 0, 1)
644 END_TYPE()
645
646 // Reference clock frequency in kHz
647 // Reset value: 0x00000000
648 BEGIN_TYPE(FC0_REF_KHZ_t, uint32_t)
649 ADD_BITFIELD_RW(FC0_REF_KHZ, 0, 20)
650 END_TYPE()
651
652 // Minimum pass frequency in kHz.
653 // This is optional. Set to 0 if you are not using the pass/fail flags
654 // Reset value: 0x00000000
655 BEGIN_TYPE(FC0_MIN_KHZ_t, uint32_t)
656 ADD_BITFIELD_RW(FC0_MIN_KHZ, 0, 25)
657 END_TYPE()
658
659 // Maximum pass frequency in kHz. This is optional.
660 // Set to 0x1ffffff if you are not using the pass/fail flags
661 // Reset value: 0x01ffffff
662 BEGIN_TYPE(FC0_MAX_KHZ_t, uint32_t)
663 ADD_BITFIELD_RW(FC0_MAX_KHZ, 0, 25)
664 END_TYPE()
665
666 // Delays the start of frequency counting to allow the mux to settle
667 // Delay is measured in multiples of the reference clock period
668 // Reset value: 0x00000001
669 BEGIN_TYPE(FC0_DELAY_t, uint32_t)
670 ADD_BITFIELD_RW(FC0_DELAY, 0, 3)
671 END_TYPE()
672
673 // The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval
674 // The default gives a test interval of 250us
675 // Reset value: 0x00000008
676 BEGIN_TYPE(FC0_INTERVAL_t, uint32_t)
677 ADD_BITFIELD_RW(FC0_INTERVAL, 0, 4)
678 END_TYPE()
679
680 // Clock sent to frequency counter, set to 0 when not required
681 // Writing to this register initiates the frequency count
682 // Reset value: 0x00000000
683 BEGIN_TYPE(FC0_SRC_t, uint32_t)
684 ADD_BITFIELD_RW(FC0_SRC, 0, 8)
685 END_TYPE()
686
687 static const uint32_t FC0_SRC_FC0_SRC__NULL = 0;
688 static const uint32_t FC0_SRC_FC0_SRC__pll_sys_clksrc_primary = 1;
689 static const uint32_t FC0_SRC_FC0_SRC__pll_usb_clksrc_primary = 2;
690 static const uint32_t FC0_SRC_FC0_SRC__rosc_clksrc = 3;
691 static const uint32_t FC0_SRC_FC0_SRC__rosc_clksrc_ph = 4;
692 static const uint32_t FC0_SRC_FC0_SRC__xosc_clksrc = 5;
693 static const uint32_t FC0_SRC_FC0_SRC__clksrc_gpin0 = 6;
694 static const uint32_t FC0_SRC_FC0_SRC__clksrc_gpin1 = 7;
695 static const uint32_t FC0_SRC_FC0_SRC__clk_ref = 8;
696 static const uint32_t FC0_SRC_FC0_SRC__clk_sys = 9;
697 static const uint32_t FC0_SRC_FC0_SRC__clk_peri = 10;
698 static const uint32_t FC0_SRC_FC0_SRC__clk_usb = 11;
699 static const uint32_t FC0_SRC_FC0_SRC__clk_adc = 12;
700 static const uint32_t FC0_SRC_FC0_SRC__clk_hstx = 13;
701 static const uint32_t FC0_SRC_FC0_SRC__lposc_clksrc = 14;
702 static const uint32_t FC0_SRC_FC0_SRC__otp_clk2fc = 15;
703 static const uint32_t FC0_SRC_FC0_SRC__pll_usb_clksrc_primary_dft = 16;
704
705 // Frequency counter status
706 // Reset value: 0x00000000
707 BEGIN_TYPE(FC0_STATUS_t, uint32_t)
708 // Test clock stopped during test
709 ADD_BITFIELD_RO(DIED, 28, 1)
710 // Test clock faster than expected, only valid when status_done=1
711 ADD_BITFIELD_RO(FAST, 24, 1)
712 // Test clock slower than expected, only valid when status_done=1
713 ADD_BITFIELD_RO(SLOW, 20, 1)
714 // Test failed
715 ADD_BITFIELD_RO(FAIL, 16, 1)
716 // Waiting for test clock to start
717 ADD_BITFIELD_RO(WAITING, 12, 1)
718 // Test running
719 ADD_BITFIELD_RO(RUNNING, 8, 1)
720 // Test complete
721 ADD_BITFIELD_RO(DONE, 4, 1)
722 // Test passed
723 ADD_BITFIELD_RO(PASS, 0, 1)
724 END_TYPE()
725
726 // Result of frequency measurement, only valid when status_done=1
727 // Reset value: 0x00000000
728 BEGIN_TYPE(FC0_RESULT_t, uint32_t)
729 ADD_BITFIELD_RO(KHZ, 5, 25)
730 ADD_BITFIELD_RO(FRAC, 0, 5)
731 END_TYPE()
732
733 // enable clock in wake mode
734 // Reset value: 0xffffffff
735 BEGIN_TYPE(WAKE_EN0_t, uint32_t)
736 ADD_BITFIELD_RW(CLK_SYS_SIO, 31, 1)
737 ADD_BITFIELD_RW(CLK_SYS_SHA256, 30, 1)
738 ADD_BITFIELD_RW(CLK_SYS_PSM, 29, 1)
739 ADD_BITFIELD_RW(CLK_SYS_ROSC, 28, 1)
740 ADD_BITFIELD_RW(CLK_SYS_ROM, 27, 1)
741 ADD_BITFIELD_RW(CLK_SYS_RESETS, 26, 1)
742 ADD_BITFIELD_RW(CLK_SYS_PWM, 25, 1)
743 ADD_BITFIELD_RW(CLK_SYS_POWMAN, 24, 1)
744 ADD_BITFIELD_RW(CLK_REF_POWMAN, 23, 1)
745 ADD_BITFIELD_RW(CLK_SYS_PLL_USB, 22, 1)
746 ADD_BITFIELD_RW(CLK_SYS_PLL_SYS, 21, 1)
747 ADD_BITFIELD_RW(CLK_SYS_PIO2, 20, 1)
748 ADD_BITFIELD_RW(CLK_SYS_PIO1, 19, 1)
749 ADD_BITFIELD_RW(CLK_SYS_PIO0, 18, 1)
750 ADD_BITFIELD_RW(CLK_SYS_PADS, 17, 1)
751 ADD_BITFIELD_RW(CLK_SYS_OTP, 16, 1)
752 ADD_BITFIELD_RW(CLK_REF_OTP, 15, 1)
753 ADD_BITFIELD_RW(CLK_SYS_JTAG, 14, 1)
754 ADD_BITFIELD_RW(CLK_SYS_IO, 13, 1)
755 ADD_BITFIELD_RW(CLK_SYS_I2C1, 12, 1)
756 ADD_BITFIELD_RW(CLK_SYS_I2C0, 11, 1)
757 ADD_BITFIELD_RW(CLK_SYS_HSTX, 10, 1)
758 ADD_BITFIELD_RW(CLK_HSTX, 9, 1)
759 ADD_BITFIELD_RW(CLK_SYS_GLITCH_DETECTOR, 8, 1)
760 ADD_BITFIELD_RW(CLK_SYS_DMA, 7, 1)
761 ADD_BITFIELD_RW(CLK_SYS_BUSFABRIC, 6, 1)
762 ADD_BITFIELD_RW(CLK_SYS_BUSCTRL, 5, 1)
763 ADD_BITFIELD_RW(CLK_SYS_BOOTRAM, 4, 1)
764 ADD_BITFIELD_RW(CLK_SYS_ADC, 3, 1)
765 ADD_BITFIELD_RW(CLK_ADC, 2, 1)
766 ADD_BITFIELD_RW(CLK_SYS_ACCESSCTRL, 1, 1)
767 ADD_BITFIELD_RW(CLK_SYS_CLOCKS, 0, 1)
768 END_TYPE()
769
770 // enable clock in wake mode
771 // Reset value: 0x7fffffff
772 BEGIN_TYPE(WAKE_EN1_t, uint32_t)
773 ADD_BITFIELD_RW(CLK_SYS_XOSC, 30, 1)
774 ADD_BITFIELD_RW(CLK_SYS_XIP, 29, 1)
775 ADD_BITFIELD_RW(CLK_SYS_WATCHDOG, 28, 1)
776 ADD_BITFIELD_RW(CLK_USB, 27, 1)
777 ADD_BITFIELD_RW(CLK_SYS_USBCTRL, 26, 1)
778 ADD_BITFIELD_RW(CLK_SYS_UART1, 25, 1)
779 ADD_BITFIELD_RW(CLK_PERI_UART1, 24, 1)
780 ADD_BITFIELD_RW(CLK_SYS_UART0, 23, 1)
781 ADD_BITFIELD_RW(CLK_PERI_UART0, 22, 1)
782 ADD_BITFIELD_RW(CLK_SYS_TRNG, 21, 1)
783 ADD_BITFIELD_RW(CLK_SYS_TIMER1, 20, 1)
784 ADD_BITFIELD_RW(CLK_SYS_TIMER0, 19, 1)
785 ADD_BITFIELD_RW(CLK_SYS_TICKS, 18, 1)
786 ADD_BITFIELD_RW(CLK_REF_TICKS, 17, 1)
787 ADD_BITFIELD_RW(CLK_SYS_TBMAN, 16, 1)
788 ADD_BITFIELD_RW(CLK_SYS_SYSINFO, 15, 1)
789 ADD_BITFIELD_RW(CLK_SYS_SYSCFG, 14, 1)
790 ADD_BITFIELD_RW(CLK_SYS_SRAM9, 13, 1)
791 ADD_BITFIELD_RW(CLK_SYS_SRAM8, 12, 1)
792 ADD_BITFIELD_RW(CLK_SYS_SRAM7, 11, 1)
793 ADD_BITFIELD_RW(CLK_SYS_SRAM6, 10, 1)
794 ADD_BITFIELD_RW(CLK_SYS_SRAM5, 9, 1)
795 ADD_BITFIELD_RW(CLK_SYS_SRAM4, 8, 1)
796 ADD_BITFIELD_RW(CLK_SYS_SRAM3, 7, 1)
797 ADD_BITFIELD_RW(CLK_SYS_SRAM2, 6, 1)
798 ADD_BITFIELD_RW(CLK_SYS_SRAM1, 5, 1)
799 ADD_BITFIELD_RW(CLK_SYS_SRAM0, 4, 1)
800 ADD_BITFIELD_RW(CLK_SYS_SPI1, 3, 1)
801 ADD_BITFIELD_RW(CLK_PERI_SPI1, 2, 1)
802 ADD_BITFIELD_RW(CLK_SYS_SPI0, 1, 1)
803 ADD_BITFIELD_RW(CLK_PERI_SPI0, 0, 1)
804 END_TYPE()
805
806 // enable clock in sleep mode
807 // Reset value: 0xffffffff
808 BEGIN_TYPE(SLEEP_EN0_t, uint32_t)
809 ADD_BITFIELD_RW(CLK_SYS_SIO, 31, 1)
810 ADD_BITFIELD_RW(CLK_SYS_SHA256, 30, 1)
811 ADD_BITFIELD_RW(CLK_SYS_PSM, 29, 1)
812 ADD_BITFIELD_RW(CLK_SYS_ROSC, 28, 1)
813 ADD_BITFIELD_RW(CLK_SYS_ROM, 27, 1)
814 ADD_BITFIELD_RW(CLK_SYS_RESETS, 26, 1)
815 ADD_BITFIELD_RW(CLK_SYS_PWM, 25, 1)
816 ADD_BITFIELD_RW(CLK_SYS_POWMAN, 24, 1)
817 ADD_BITFIELD_RW(CLK_REF_POWMAN, 23, 1)
818 ADD_BITFIELD_RW(CLK_SYS_PLL_USB, 22, 1)
819 ADD_BITFIELD_RW(CLK_SYS_PLL_SYS, 21, 1)
820 ADD_BITFIELD_RW(CLK_SYS_PIO2, 20, 1)
821 ADD_BITFIELD_RW(CLK_SYS_PIO1, 19, 1)
822 ADD_BITFIELD_RW(CLK_SYS_PIO0, 18, 1)
823 ADD_BITFIELD_RW(CLK_SYS_PADS, 17, 1)
824 ADD_BITFIELD_RW(CLK_SYS_OTP, 16, 1)
825 ADD_BITFIELD_RW(CLK_REF_OTP, 15, 1)
826 ADD_BITFIELD_RW(CLK_SYS_JTAG, 14, 1)
827 ADD_BITFIELD_RW(CLK_SYS_IO, 13, 1)
828 ADD_BITFIELD_RW(CLK_SYS_I2C1, 12, 1)
829 ADD_BITFIELD_RW(CLK_SYS_I2C0, 11, 1)
830 ADD_BITFIELD_RW(CLK_SYS_HSTX, 10, 1)
831 ADD_BITFIELD_RW(CLK_HSTX, 9, 1)
832 ADD_BITFIELD_RW(CLK_SYS_GLITCH_DETECTOR, 8, 1)
833 ADD_BITFIELD_RW(CLK_SYS_DMA, 7, 1)
834 ADD_BITFIELD_RW(CLK_SYS_BUSFABRIC, 6, 1)
835 ADD_BITFIELD_RW(CLK_SYS_BUSCTRL, 5, 1)
836 ADD_BITFIELD_RW(CLK_SYS_BOOTRAM, 4, 1)
837 ADD_BITFIELD_RW(CLK_SYS_ADC, 3, 1)
838 ADD_BITFIELD_RW(CLK_ADC, 2, 1)
839 ADD_BITFIELD_RW(CLK_SYS_ACCESSCTRL, 1, 1)
840 ADD_BITFIELD_RW(CLK_SYS_CLOCKS, 0, 1)
841 END_TYPE()
842
843 // enable clock in sleep mode
844 // Reset value: 0x7fffffff
845 BEGIN_TYPE(SLEEP_EN1_t, uint32_t)
846 ADD_BITFIELD_RW(CLK_SYS_XOSC, 30, 1)
847 ADD_BITFIELD_RW(CLK_SYS_XIP, 29, 1)
848 ADD_BITFIELD_RW(CLK_SYS_WATCHDOG, 28, 1)
849 ADD_BITFIELD_RW(CLK_USB, 27, 1)
850 ADD_BITFIELD_RW(CLK_SYS_USBCTRL, 26, 1)
851 ADD_BITFIELD_RW(CLK_SYS_UART1, 25, 1)
852 ADD_BITFIELD_RW(CLK_PERI_UART1, 24, 1)
853 ADD_BITFIELD_RW(CLK_SYS_UART0, 23, 1)
854 ADD_BITFIELD_RW(CLK_PERI_UART0, 22, 1)
855 ADD_BITFIELD_RW(CLK_SYS_TRNG, 21, 1)
856 ADD_BITFIELD_RW(CLK_SYS_TIMER1, 20, 1)
857 ADD_BITFIELD_RW(CLK_SYS_TIMER0, 19, 1)
858 ADD_BITFIELD_RW(CLK_SYS_TICKS, 18, 1)
859 ADD_BITFIELD_RW(CLK_REF_TICKS, 17, 1)
860 ADD_BITFIELD_RW(CLK_SYS_TBMAN, 16, 1)
861 ADD_BITFIELD_RW(CLK_SYS_SYSINFO, 15, 1)
862 ADD_BITFIELD_RW(CLK_SYS_SYSCFG, 14, 1)
863 ADD_BITFIELD_RW(CLK_SYS_SRAM9, 13, 1)
864 ADD_BITFIELD_RW(CLK_SYS_SRAM8, 12, 1)
865 ADD_BITFIELD_RW(CLK_SYS_SRAM7, 11, 1)
866 ADD_BITFIELD_RW(CLK_SYS_SRAM6, 10, 1)
867 ADD_BITFIELD_RW(CLK_SYS_SRAM5, 9, 1)
868 ADD_BITFIELD_RW(CLK_SYS_SRAM4, 8, 1)
869 ADD_BITFIELD_RW(CLK_SYS_SRAM3, 7, 1)
870 ADD_BITFIELD_RW(CLK_SYS_SRAM2, 6, 1)
871 ADD_BITFIELD_RW(CLK_SYS_SRAM1, 5, 1)
872 ADD_BITFIELD_RW(CLK_SYS_SRAM0, 4, 1)
873 ADD_BITFIELD_RW(CLK_SYS_SPI1, 3, 1)
874 ADD_BITFIELD_RW(CLK_PERI_SPI1, 2, 1)
875 ADD_BITFIELD_RW(CLK_SYS_SPI0, 1, 1)
876 ADD_BITFIELD_RW(CLK_PERI_SPI0, 0, 1)
877 END_TYPE()
878
879 // indicates the state of the clock enable
880 // Reset value: 0x00000000
881 BEGIN_TYPE(ENABLED0_t, uint32_t)
882 ADD_BITFIELD_RO(CLK_SYS_SIO, 31, 1)
883 ADD_BITFIELD_RO(CLK_SYS_SHA256, 30, 1)
884 ADD_BITFIELD_RO(CLK_SYS_PSM, 29, 1)
885 ADD_BITFIELD_RO(CLK_SYS_ROSC, 28, 1)
886 ADD_BITFIELD_RO(CLK_SYS_ROM, 27, 1)
887 ADD_BITFIELD_RO(CLK_SYS_RESETS, 26, 1)
888 ADD_BITFIELD_RO(CLK_SYS_PWM, 25, 1)
889 ADD_BITFIELD_RO(CLK_SYS_POWMAN, 24, 1)
890 ADD_BITFIELD_RO(CLK_REF_POWMAN, 23, 1)
891 ADD_BITFIELD_RO(CLK_SYS_PLL_USB, 22, 1)
892 ADD_BITFIELD_RO(CLK_SYS_PLL_SYS, 21, 1)
893 ADD_BITFIELD_RO(CLK_SYS_PIO2, 20, 1)
894 ADD_BITFIELD_RO(CLK_SYS_PIO1, 19, 1)
895 ADD_BITFIELD_RO(CLK_SYS_PIO0, 18, 1)
896 ADD_BITFIELD_RO(CLK_SYS_PADS, 17, 1)
897 ADD_BITFIELD_RO(CLK_SYS_OTP, 16, 1)
898 ADD_BITFIELD_RO(CLK_REF_OTP, 15, 1)
899 ADD_BITFIELD_RO(CLK_SYS_JTAG, 14, 1)
900 ADD_BITFIELD_RO(CLK_SYS_IO, 13, 1)
901 ADD_BITFIELD_RO(CLK_SYS_I2C1, 12, 1)
902 ADD_BITFIELD_RO(CLK_SYS_I2C0, 11, 1)
903 ADD_BITFIELD_RO(CLK_SYS_HSTX, 10, 1)
904 ADD_BITFIELD_RO(CLK_HSTX, 9, 1)
905 ADD_BITFIELD_RO(CLK_SYS_GLITCH_DETECTOR, 8, 1)
906 ADD_BITFIELD_RO(CLK_SYS_DMA, 7, 1)
907 ADD_BITFIELD_RO(CLK_SYS_BUSFABRIC, 6, 1)
908 ADD_BITFIELD_RO(CLK_SYS_BUSCTRL, 5, 1)
909 ADD_BITFIELD_RO(CLK_SYS_BOOTRAM, 4, 1)
910 ADD_BITFIELD_RO(CLK_SYS_ADC, 3, 1)
911 ADD_BITFIELD_RO(CLK_ADC, 2, 1)
912 ADD_BITFIELD_RO(CLK_SYS_ACCESSCTRL, 1, 1)
913 ADD_BITFIELD_RO(CLK_SYS_CLOCKS, 0, 1)
914 END_TYPE()
915
916 // indicates the state of the clock enable
917 // Reset value: 0x00000000
918 BEGIN_TYPE(ENABLED1_t, uint32_t)
919 ADD_BITFIELD_RO(CLK_SYS_XOSC, 30, 1)
920 ADD_BITFIELD_RO(CLK_SYS_XIP, 29, 1)
921 ADD_BITFIELD_RO(CLK_SYS_WATCHDOG, 28, 1)
922 ADD_BITFIELD_RO(CLK_USB, 27, 1)
923 ADD_BITFIELD_RO(CLK_SYS_USBCTRL, 26, 1)
924 ADD_BITFIELD_RO(CLK_SYS_UART1, 25, 1)
925 ADD_BITFIELD_RO(CLK_PERI_UART1, 24, 1)
926 ADD_BITFIELD_RO(CLK_SYS_UART0, 23, 1)
927 ADD_BITFIELD_RO(CLK_PERI_UART0, 22, 1)
928 ADD_BITFIELD_RO(CLK_SYS_TRNG, 21, 1)
929 ADD_BITFIELD_RO(CLK_SYS_TIMER1, 20, 1)
930 ADD_BITFIELD_RO(CLK_SYS_TIMER0, 19, 1)
931 ADD_BITFIELD_RO(CLK_SYS_TICKS, 18, 1)
932 ADD_BITFIELD_RO(CLK_REF_TICKS, 17, 1)
933 ADD_BITFIELD_RO(CLK_SYS_TBMAN, 16, 1)
934 ADD_BITFIELD_RO(CLK_SYS_SYSINFO, 15, 1)
935 ADD_BITFIELD_RO(CLK_SYS_SYSCFG, 14, 1)
936 ADD_BITFIELD_RO(CLK_SYS_SRAM9, 13, 1)
937 ADD_BITFIELD_RO(CLK_SYS_SRAM8, 12, 1)
938 ADD_BITFIELD_RO(CLK_SYS_SRAM7, 11, 1)
939 ADD_BITFIELD_RO(CLK_SYS_SRAM6, 10, 1)
940 ADD_BITFIELD_RO(CLK_SYS_SRAM5, 9, 1)
941 ADD_BITFIELD_RO(CLK_SYS_SRAM4, 8, 1)
942 ADD_BITFIELD_RO(CLK_SYS_SRAM3, 7, 1)
943 ADD_BITFIELD_RO(CLK_SYS_SRAM2, 6, 1)
944 ADD_BITFIELD_RO(CLK_SYS_SRAM1, 5, 1)
945 ADD_BITFIELD_RO(CLK_SYS_SRAM0, 4, 1)
946 ADD_BITFIELD_RO(CLK_SYS_SPI1, 3, 1)
947 ADD_BITFIELD_RO(CLK_PERI_SPI1, 2, 1)
948 ADD_BITFIELD_RO(CLK_SYS_SPI0, 1, 1)
949 ADD_BITFIELD_RO(CLK_PERI_SPI0, 0, 1)
950 END_TYPE()
951
952 // Raw Interrupts
953 // Reset value: 0x00000000
954 BEGIN_TYPE(INTR_t, uint32_t)
955 ADD_BITFIELD_RO(CLK_SYS_RESUS, 0, 1)
956 END_TYPE()
957
958 // Interrupt Enable
959 // Reset value: 0x00000000
960 BEGIN_TYPE(INTE_t, uint32_t)
961 ADD_BITFIELD_RW(CLK_SYS_RESUS, 0, 1)
962 END_TYPE()
963
964 // Interrupt Force
965 // Reset value: 0x00000000
966 BEGIN_TYPE(INTF_t, uint32_t)
967 ADD_BITFIELD_RW(CLK_SYS_RESUS, 0, 1)
968 END_TYPE()
969
970 // Interrupt status after masking & forcing
971 // Reset value: 0x00000000
972 BEGIN_TYPE(INTS_t, uint32_t)
973 ADD_BITFIELD_RO(CLK_SYS_RESUS, 0, 1)
974 END_TYPE()
975
976 struct CLOCKS_t {
977 CLK_GPOUT_CTRL_t CLK_GPOUT0_CTRL;
978 CLK_GPOUT_DIV_t CLK_GPOUT0_DIV;
979 CLK_GPOUT_SELECTED_t CLK_GPOUT0_SELECTED;
980 CLK_GPOUT_CTRL_t CLK_GPOUT1_CTRL;
981 CLK_GPOUT_DIV_t CLK_GPOUT1_DIV;
982 CLK_GPOUT_SELECTED_t CLK_GPOUT1_SELECTED;
983 CLK_GPOUT_CTRL_t CLK_GPOUT2_CTRL;
984 CLK_GPOUT_DIV_t CLK_GPOUT2_DIV;
985 CLK_GPOUT_SELECTED_t CLK_GPOUT2_SELECTED;
986 CLK_GPOUT_CTRL_t CLK_GPOUT3_CTRL;
987 CLK_GPOUT_DIV_t CLK_GPOUT3_DIV;
988 CLK_GPOUT_SELECTED_t CLK_GPOUT3_SELECTED;
989 CLK_REF_CTRL_t CLK_REF_CTRL;
990 CLK_REF_DIV_t CLK_REF_DIV;
991 CLK_REF_SELECTED_t CLK_REF_SELECTED;
992 CLK_SYS_CTRL_t CLK_SYS_CTRL;
993 CLK_SYS_DIV_t CLK_SYS_DIV;
994 CLK_SYS_SELECTED_t CLK_SYS_SELECTED;
995 CLK_PERI_CTRL_t CLK_PERI_CTRL;
996 CLK_PERI_DIV_t CLK_PERI_DIV;
997 CLK_PERI_SELECTED_t CLK_PERI_SELECTED;
998 CLK_HSTX_CTRL_t CLK_HSTX_CTRL;
999 CLK_HSTX_DIV_t CLK_HSTX_DIV;
1000 CLK_HSTX_SELECTED_t CLK_HSTX_SELECTED;
1001 CLK_USB_CTRL_t CLK_USB_CTRL;
1002 CLK_USB_DIV_t CLK_USB_DIV;
1003 CLK_USB_SELECTED_t CLK_USB_SELECTED;
1004 CLK_ADC_CTRL_t CLK_ADC_CTRL;
1005 CLK_ADC_DIV_t CLK_ADC_DIV;
1006 CLK_ADC_SELECTED_t CLK_ADC_SELECTED;
1007 DFTCLK_XOSC_CTRL_t DFTCLK_XOSC_CTRL;
1008 DFTCLK_ROSC_CTRL_t DFTCLK_ROSC_CTRL;
1009 DFTCLK_LPOSC_CTRL_t DFTCLK_LPOSC_CTRL;
1010 CLK_SYS_RESUS_CTRL_t CLK_SYS_RESUS_CTRL;
1011 CLK_SYS_RESUS_STATUS_t CLK_SYS_RESUS_STATUS;
1012 FC0_REF_KHZ_t FC0_REF_KHZ;
1013 FC0_MIN_KHZ_t FC0_MIN_KHZ;
1014 FC0_MAX_KHZ_t FC0_MAX_KHZ;
1015 FC0_DELAY_t FC0_DELAY;
1016 FC0_INTERVAL_t FC0_INTERVAL;
1017 FC0_SRC_t FC0_SRC;
1018 FC0_STATUS_t FC0_STATUS;
1019 FC0_RESULT_t FC0_RESULT;
1020 WAKE_EN0_t WAKE_EN0;
1021 WAKE_EN1_t WAKE_EN1;
1022 SLEEP_EN0_t SLEEP_EN0;
1023 SLEEP_EN1_t SLEEP_EN1;
1024 ENABLED0_t ENABLED0;
1025 ENABLED1_t ENABLED1;
1026 INTR_t INTR;
1027 INTE_t INTE;
1028 INTF_t INTF;
1029 INTS_t INTS;
1030 };
1031
1032 static CLOCKS_t & CLOCKS = (*(CLOCKS_t *)0x40010000);
1033 static CLOCKS_t & CLOCKS_XOR = (*(CLOCKS_t *)0x40011000);
1034 static CLOCKS_t & CLOCKS_SET = (*(CLOCKS_t *)0x40012000);
1035 static CLOCKS_t & CLOCKS_CLR = (*(CLOCKS_t *)0x40013000);
1036
1037} // _CLOCKS_
1038
1039namespace _TICKS_ {
1040
1041 // Controls the tick generator
1042 // Reset value: 0x00000000
1043 BEGIN_TYPE(PROC0_CTRL_t, uint32_t)
1044 // Is the tick generator running?
1045 ADD_BITFIELD_RO(RUNNING, 1, 1)
1046 // start / stop tick generation
1047 ADD_BITFIELD_RW(ENABLE, 0, 1)
1048 END_TYPE()
1049
1050 // Reset value: 0x00000000
1051 BEGIN_TYPE(PROC0_CYCLES_t, uint32_t)
1052 // Total number of clk_tick cycles before the next tick.
1053 ADD_BITFIELD_RW(PROC0_CYCLES, 0, 9)
1054 END_TYPE()
1055
1056 BEGIN_TYPE(PROC0_COUNT_t, uint32_t)
1057 // Count down timer: the remaining number clk_tick cycles before
1058 // the next tick is generated.
1059 ADD_BITFIELD_RO(PROC0_COUNT, 0, 9)
1060 END_TYPE()
1061
1062 // Controls the tick generator
1063 // Reset value: 0x00000000
1064 BEGIN_TYPE(PROC1_CTRL_t, uint32_t)
1065 // Is the tick generator running?
1066 ADD_BITFIELD_RO(RUNNING, 1, 1)
1067 // start / stop tick generation
1068 ADD_BITFIELD_RW(ENABLE, 0, 1)
1069 END_TYPE()
1070
1071 // Reset value: 0x00000000
1072 BEGIN_TYPE(PROC1_CYCLES_t, uint32_t)
1073 // Total number of clk_tick cycles before the next tick.
1074 ADD_BITFIELD_RW(PROC1_CYCLES, 0, 9)
1075 END_TYPE()
1076
1077 BEGIN_TYPE(PROC1_COUNT_t, uint32_t)
1078 // Count down timer: the remaining number clk_tick cycles before
1079 // the next tick is generated.
1080 ADD_BITFIELD_RO(PROC1_COUNT, 0, 9)
1081 END_TYPE()
1082
1083 // Controls the tick generator
1084 // Reset value: 0x00000000
1085 BEGIN_TYPE(TIMER0_CTRL_t, uint32_t)
1086 // Is the tick generator running?
1087 ADD_BITFIELD_RO(RUNNING, 1, 1)
1088 // start / stop tick generation
1089 ADD_BITFIELD_RW(ENABLE, 0, 1)
1090 END_TYPE()
1091
1092 // Reset value: 0x00000000
1093 BEGIN_TYPE(TIMER0_CYCLES_t, uint32_t)
1094 // Total number of clk_tick cycles before the next tick.
1095 ADD_BITFIELD_RW(TIMER0_CYCLES, 0, 9)
1096 END_TYPE()
1097
1098 BEGIN_TYPE(TIMER0_COUNT_t, uint32_t)
1099 // Count down timer: the remaining number clk_tick cycles before
1100 // the next tick is generated.
1101 ADD_BITFIELD_RO(TIMER0_COUNT, 0, 9)
1102 END_TYPE()
1103
1104 // Controls the tick generator
1105 // Reset value: 0x00000000
1106 BEGIN_TYPE(TIMER1_CTRL_t, uint32_t)
1107 // Is the tick generator running?
1108 ADD_BITFIELD_RO(RUNNING, 1, 1)
1109 // start / stop tick generation
1110 ADD_BITFIELD_RW(ENABLE, 0, 1)
1111 END_TYPE()
1112
1113 // Reset value: 0x00000000
1114 BEGIN_TYPE(TIMER1_CYCLES_t, uint32_t)
1115 // Total number of clk_tick cycles before the next tick.
1116 ADD_BITFIELD_RW(TIMER1_CYCLES, 0, 9)
1117 END_TYPE()
1118
1119 BEGIN_TYPE(TIMER1_COUNT_t, uint32_t)
1120 // Count down timer: the remaining number clk_tick cycles
1121 // before the next tick is generated.
1122 ADD_BITFIELD_RO(TIMER1_COUNT, 0, 9)
1123 END_TYPE()
1124
1125 // Controls the tick generator
1126 // Reset value: 0x00000000
1127 BEGIN_TYPE(WATCHDOG_CTRL_t, uint32_t)
1128 // Is the tick generator running?
1129 ADD_BITFIELD_RO(RUNNING, 1, 1)
1130 // start / stop tick generation
1131 ADD_BITFIELD_RW(ENABLE, 0, 1)
1132 END_TYPE()
1133
1134 // Reset value: 0x00000000
1135 BEGIN_TYPE(WATCHDOG_CYCLES_t, uint32_t)
1136 // Total number of clk_tick cycles before the next tick.
1137 ADD_BITFIELD_RW(WATCHDOG_CYCLES, 0, 9)
1138 END_TYPE()
1139
1140 BEGIN_TYPE(WATCHDOG_COUNT_t, uint32_t)
1141 // Count down timer: the remaining number clk_tick cycles before
1142 // the next tick is generated.
1143 ADD_BITFIELD_RO(WATCHDOG_COUNT, 0, 9)
1144 END_TYPE()
1145
1146 // Controls the tick generator
1147 // Reset value: 0x00000000
1148 BEGIN_TYPE(RISCV_CTRL_t, uint32_t)
1149 // Is the tick generator running?
1150 ADD_BITFIELD_RO(RUNNING, 1, 1)
1151 // start / stop tick generation
1152 ADD_BITFIELD_RW(ENABLE, 0, 1)
1153 END_TYPE()
1154
1155 // Reset value: 0x00000000
1156 BEGIN_TYPE(RISCV_CYCLES_t, uint32_t)
1157 // Total number of clk_tick cycles before the next tick.
1158 ADD_BITFIELD_RW(RISCV_CYCLES, 0, 9)
1159 END_TYPE()
1160
1161 BEGIN_TYPE(RISCV_COUNT_t, uint32_t)
1162 // Count down timer: the remaining number clk_tick cycles before
1163 // the next tick is generated.
1164 ADD_BITFIELD_RO(RISCV_COUNT, 0, 9)
1165 END_TYPE()
1166
1167 struct TICKS_t {
1168 PROC0_CTRL_t PROC0_CTRL;
1169 PROC0_CYCLES_t PROC0_CYCLES;
1170 PROC0_COUNT_t PROC0_COUNT;
1171 PROC1_CTRL_t PROC1_CTRL;
1172 PROC1_CYCLES_t PROC1_CYCLES;
1173 PROC1_COUNT_t PROC1_COUNT;
1174 TIMER0_CTRL_t TIMER0_CTRL;
1175 TIMER0_CYCLES_t TIMER0_CYCLES;
1176 TIMER0_COUNT_t TIMER0_COUNT;
1177 TIMER1_CTRL_t TIMER1_CTRL;
1178 TIMER1_CYCLES_t TIMER1_CYCLES;
1179 TIMER1_COUNT_t TIMER1_COUNT;
1180 WATCHDOG_CTRL_t WATCHDOG_CTRL;
1181 WATCHDOG_CYCLES_t WATCHDOG_CYCLES;
1182 WATCHDOG_COUNT_t WATCHDOG_COUNT;
1183 RISCV_CTRL_t RISCV_CTRL;
1184 RISCV_CYCLES_t RISCV_CYCLES;
1185 RISCV_COUNT_t RISCV_COUNT;
1186 };
1187
1188 static TICKS_t & TICKS = (*(TICKS_t *)0x40108000);
1189 static TICKS_t & TICKS_XOR = (*(TICKS_t *)0x40109000);
1190 static TICKS_t & TICKS_SET = (*(TICKS_t *)0x4010a000);
1191 static TICKS_t & TICKS_CLR = (*(TICKS_t *)0x4010b000);
1192
1193} // _TICKS_
1194
1195namespace _PADS_BANK0_ {
1196
1197 // Voltage select. Per bank control
1198 // Reset value: 0x00000000
1199 BEGIN_TYPE(VOLTAGE_SELECT_t, uint32_t)
1200 ADD_BITFIELD_RW(VOLTAGE_SELECT, 0, 1)
1201 END_TYPE()
1202
1203 // Set voltage to 3.3V (DVDD >= 2V5)
1204 static const uint32_t VOLTAGE_SELECT_VOLTAGE_SELECT__3v3 = 0;
1205 // Set voltage to 1.8V (DVDD <= 1V8)
1206 static const uint32_t VOLTAGE_SELECT_VOLTAGE_SELECT__1v8 = 1;
1207
1208 // Reset value: 0x00000116
1209 BEGIN_TYPE(GPIO_t, uint32_t)
1210 // Pad isolation control.
1211 // Remove this once the pad is configured by software.
1212 ADD_BITFIELD_RW(ISO, 8, 1)
1213 // Output disable. Has priority over output enable from peripherals
1214 ADD_BITFIELD_RW(OD, 7, 1)
1215 // Input enable
1216 ADD_BITFIELD_RW(IE, 6, 1)
1217 // Drive strength.
1218 ADD_BITFIELD_RW(DRIVE, 4, 2)
1219 // Pull up enable
1220 ADD_BITFIELD_RW(PUE, 3, 1)
1221 // Pull down enable
1222 ADD_BITFIELD_RW(PDE, 2, 1)
1223 // Enable schmitt trigger
1224 ADD_BITFIELD_RW(SCHMITT, 1, 1)
1225 // Slew rate control. 1 = Fast, 0 = Slow
1226 ADD_BITFIELD_RW(SLEWFAST, 0, 1)
1227 END_TYPE()
1228
1229 static const uint32_t GPIO_DRIVE__2mA = 0;
1230 static const uint32_t GPIO_DRIVE__4mA = 1;
1231 static const uint32_t GPIO_DRIVE__8mA = 2;
1232 static const uint32_t GPIO_DRIVE__12mA = 3;
1233
1234 // Reset value: 0x0000005a
1235 BEGIN_TYPE(SWCLK_t, uint32_t)
1236 // Pad isolation control.
1237 // Remove this once the pad is configured by software.
1238 ADD_BITFIELD_RW(ISO, 8, 1)
1239 // Output disable. Has priority over output enable from peripherals
1240 ADD_BITFIELD_RW(OD, 7, 1)
1241 // Input enable
1242 ADD_BITFIELD_RW(IE, 6, 1)
1243 // Drive strength.
1244 ADD_BITFIELD_RW(DRIVE, 4, 2)
1245 // Pull up enable
1246 ADD_BITFIELD_RW(PUE, 3, 1)
1247 // Pull down enable
1248 ADD_BITFIELD_RW(PDE, 2, 1)
1249 // Enable schmitt trigger
1250 ADD_BITFIELD_RW(SCHMITT, 1, 1)
1251 // Slew rate control. 1 = Fast, 0 = Slow
1252 ADD_BITFIELD_RW(SLEWFAST, 0, 1)
1253 END_TYPE()
1254
1255 static const uint32_t SWCLK_DRIVE__2mA = 0;
1256 static const uint32_t SWCLK_DRIVE__4mA = 1;
1257 static const uint32_t SWCLK_DRIVE__8mA = 2;
1258 static const uint32_t SWCLK_DRIVE__12mA = 3;
1259
1260 // Reset value: 0x0000005a
1261 BEGIN_TYPE(SWD_t, uint32_t)
1262 // Pad isolation control.
1263 // Remove this once the pad is configured by software.
1264 ADD_BITFIELD_RW(ISO, 8, 1)
1265 // Output disable. Has priority over output enable from peripherals
1266 ADD_BITFIELD_RW(OD, 7, 1)
1267 // Input enable
1268 ADD_BITFIELD_RW(IE, 6, 1)
1269 // Drive strength.
1270 ADD_BITFIELD_RW(DRIVE, 4, 2)
1271 // Pull up enable
1272 ADD_BITFIELD_RW(PUE, 3, 1)
1273 // Pull down enable
1274 ADD_BITFIELD_RW(PDE, 2, 1)
1275 // Enable schmitt trigger
1276 ADD_BITFIELD_RW(SCHMITT, 1, 1)
1277 // Slew rate control. 1 = Fast, 0 = Slow
1278 ADD_BITFIELD_RW(SLEWFAST, 0, 1)
1279 END_TYPE()
1280
1281 static const uint32_t SWD_DRIVE__2mA = 0;
1282 static const uint32_t SWD_DRIVE__4mA = 1;
1283 static const uint32_t SWD_DRIVE__8mA = 2;
1284 static const uint32_t SWD_DRIVE__12mA = 3;
1285
1287 VOLTAGE_SELECT_t VOLTAGE_SELECT;
1288 GPIO_t GPIO[48];
1289 SWCLK_t SWCLK;
1290 SWD_t SWD;
1291 };
1292
1293 static PADS_BANK0_t & PADS_BANK0 = (*(PADS_BANK0_t *)0x40038000);
1294 static PADS_BANK0_t & PADS_BANK0_XOR = (*(PADS_BANK0_t *)0x40039000);
1295 static PADS_BANK0_t & PADS_BANK0_SET = (*(PADS_BANK0_t *)0x4003a000);
1296 static PADS_BANK0_t & PADS_BANK0_CLR = (*(PADS_BANK0_t *)0x4003b000);
1297
1298} // _PADS_BANK0_
1299
1300namespace _PADS_QSPI_ {
1301
1302 // Voltage select. Per bank control
1303 // Reset value: 0x00000000
1304 BEGIN_TYPE(VOLTAGE_SELECT_t, uint32_t)
1305 ADD_BITFIELD_RW(VOLTAGE_SELECT, 0, 1)
1306 END_TYPE()
1307
1308 // Set voltage to 3.3V (DVDD >= 2V5)
1309 static const uint32_t VOLTAGE_SELECT_VOLTAGE_SELECT__3v3 = 0;
1310 // Set voltage to 1.8V (DVDD <= 1V8)
1311 static const uint32_t VOLTAGE_SELECT_VOLTAGE_SELECT__1v8 = 1;
1312
1313 // Reset value: 0x00000156
1314 BEGIN_TYPE(GPIO_QSPI_SCLK_t, uint32_t)
1315 // Pad isolation control.
1316 // Remove this once the pad is configured by software.
1317 ADD_BITFIELD_RW(ISO, 8, 1)
1318 // Output disable. Has priority over output enable from peripherals
1319 ADD_BITFIELD_RW(OD, 7, 1)
1320 // Input enable
1321 ADD_BITFIELD_RW(IE, 6, 1)
1322 // Drive strength.
1323 ADD_BITFIELD_RW(DRIVE, 4, 2)
1324 // Pull up enable
1325 ADD_BITFIELD_RW(PUE, 3, 1)
1326 // Pull down enable
1327 ADD_BITFIELD_RW(PDE, 2, 1)
1328 // Enable schmitt trigger
1329 ADD_BITFIELD_RW(SCHMITT, 1, 1)
1330 // Slew rate control. 1 = Fast, 0 = Slow
1331 ADD_BITFIELD_RW(SLEWFAST, 0, 1)
1332 END_TYPE()
1333
1334 static const uint32_t GPIO_QSPI_SCLK_DRIVE__2mA = 0;
1335 static const uint32_t GPIO_QSPI_SCLK_DRIVE__4mA = 1;
1336 static const uint32_t GPIO_QSPI_SCLK_DRIVE__8mA = 2;
1337 static const uint32_t GPIO_QSPI_SCLK_DRIVE__12mA = 3;
1338
1339 // Reset value: 0x00000156
1340 BEGIN_TYPE(GPIO_QSPI_SD_t, uint32_t)
1341 // Pad isolation control.
1342 // Remove this once the pad is configured by software.
1343 ADD_BITFIELD_RW(ISO, 8, 1)
1344 // Output disable. Has priority over output enable from peripherals
1345 ADD_BITFIELD_RW(OD, 7, 1)
1346 // Input enable
1347 ADD_BITFIELD_RW(IE, 6, 1)
1348 // Drive strength.
1349 ADD_BITFIELD_RW(DRIVE, 4, 2)
1350 // Pull up enable
1351 ADD_BITFIELD_RW(PUE, 3, 1)
1352 // Pull down enable
1353 ADD_BITFIELD_RW(PDE, 2, 1)
1354 // Enable schmitt trigger
1355 ADD_BITFIELD_RW(SCHMITT, 1, 1)
1356 // Slew rate control. 1 = Fast, 0 = Slow
1357 ADD_BITFIELD_RW(SLEWFAST, 0, 1)
1358 END_TYPE()
1359
1360 static const uint32_t GPIO_QSPI_SD_DRIVE__2mA = 0;
1361 static const uint32_t GPIO_QSPI_SD_DRIVE__4mA = 1;
1362 static const uint32_t GPIO_QSPI_SD_DRIVE__8mA = 2;
1363 static const uint32_t GPIO_QSPI_SD_DRIVE__12mA = 3;
1364
1365 // Reset value: 0x0000015a
1366 BEGIN_TYPE(GPIO_QSPI_SS_t, uint32_t)
1367 // Pad isolation control.
1368 // Remove this once the pad is configured by software.
1369 ADD_BITFIELD_RW(ISO, 8, 1)
1370 // Output disable. Has priority over output enable from peripherals
1371 ADD_BITFIELD_RW(OD, 7, 1)
1372 // Input enable
1373 ADD_BITFIELD_RW(IE, 6, 1)
1374 // Drive strength.
1375 ADD_BITFIELD_RW(DRIVE, 4, 2)
1376 // Pull up enable
1377 ADD_BITFIELD_RW(PUE, 3, 1)
1378 // Pull down enable
1379 ADD_BITFIELD_RW(PDE, 2, 1)
1380 // Enable schmitt trigger
1381 ADD_BITFIELD_RW(SCHMITT, 1, 1)
1382 // Slew rate control. 1 = Fast, 0 = Slow
1383 ADD_BITFIELD_RW(SLEWFAST, 0, 1)
1384 END_TYPE()
1385
1386 static const uint32_t GPIO_QSPI_SS_DRIVE__2mA = 0;
1387 static const uint32_t GPIO_QSPI_SS_DRIVE__4mA = 1;
1388 static const uint32_t GPIO_QSPI_SS_DRIVE__8mA = 2;
1389 static const uint32_t GPIO_QSPI_SS_DRIVE__12mA = 3;
1390
1392 VOLTAGE_SELECT_t VOLTAGE_SELECT;
1393 GPIO_QSPI_SCLK_t GPIO_QSPI_SCLK;
1394 GPIO_QSPI_SD_t GPIO_QSPI_SD[4];
1395 GPIO_QSPI_SS_t GPIO_QSPI_SS;
1396 };
1397
1398 static PADS_QSPI_t & PADS_QSPI = (*(PADS_QSPI_t *)0x40040000);
1399 static PADS_QSPI_t & PADS_QSPI_XOR = (*(PADS_QSPI_t *)0x40041000);
1400 static PADS_QSPI_t & PADS_QSPI_SET = (*(PADS_QSPI_t *)0x40042000);
1401 static PADS_QSPI_t & PADS_QSPI_CLR = (*(PADS_QSPI_t *)0x40043000);
1402
1403} // _PADS_QSPI_
1404
1405namespace _IO_QSPI_ {
1406
1407 // Reset value: 0x00000000
1408 BEGIN_TYPE(USBPHY_DP_STATUS_t, uint32_t)
1409 // interrupt to processors, after override is applied
1410 ADD_BITFIELD_RO(IRQTOPROC, 26, 1)
1411 // input signal from pad, before filtering and override are applied
1412 ADD_BITFIELD_RO(INFROMPAD, 17, 1)
1413 // output enable to pad after register override is applied
1414 ADD_BITFIELD_RO(OETOPAD, 13, 1)
1415 // output signal to pad after register override is applied
1416 ADD_BITFIELD_RO(OUTTOPAD, 9, 1)
1417 END_TYPE()
1418
1419 // Reset value: 0x0000001f
1420 BEGIN_TYPE(USBPHY_DP_CTRL_t, uint32_t)
1421 ADD_BITFIELD_RW(IRQOVER, 28, 2)
1422 ADD_BITFIELD_RW(INOVER, 16, 2)
1423 ADD_BITFIELD_RW(OEOVER, 14, 2)
1424 ADD_BITFIELD_RW(OUTOVER, 12, 2)
1425 // 0-31 -> selects pin function according to the gpio table 31 == NULL
1426 ADD_BITFIELD_RW(FUNCSEL, 0, 5)
1427 END_TYPE()
1428
1429 // don't invert the interrupt
1430 static const uint32_t USBPHY_DP_CTRL_IRQOVER__NORMAL = 0;
1431 // invert the interrupt
1432 static const uint32_t USBPHY_DP_CTRL_IRQOVER__INVERT = 1;
1433 // drive interrupt low
1434 static const uint32_t USBPHY_DP_CTRL_IRQOVER__LOW = 2;
1435 // drive interrupt high
1436 static const uint32_t USBPHY_DP_CTRL_IRQOVER__HIGH = 3;
1437 // don't invert the peri input
1438 static const uint32_t USBPHY_DP_CTRL_INOVER__NORMAL = 0;
1439 // invert the peri input
1440 static const uint32_t USBPHY_DP_CTRL_INOVER__INVERT = 1;
1441 // drive peri input low
1442 static const uint32_t USBPHY_DP_CTRL_INOVER__LOW = 2;
1443 // drive peri input high
1444 static const uint32_t USBPHY_DP_CTRL_INOVER__HIGH = 3;
1445 // drive output enable from peripheral signal selected by funcsel
1446 static const uint32_t USBPHY_DP_CTRL_OEOVER__NORMAL = 0;
1447 // drive output enable from inverse of peripheral signal selected by funcsel
1448 static const uint32_t USBPHY_DP_CTRL_OEOVER__INVERT = 1;
1449 // disable output
1450 static const uint32_t USBPHY_DP_CTRL_OEOVER__DISABLE = 2;
1451 // enable output
1452 static const uint32_t USBPHY_DP_CTRL_OEOVER__ENABLE = 3;
1453 // drive output from peripheral signal selected by funcsel
1454 static const uint32_t USBPHY_DP_CTRL_OUTOVER__NORMAL = 0;
1455 // drive output from inverse of peripheral signal selected by funcsel
1456 static const uint32_t USBPHY_DP_CTRL_OUTOVER__INVERT = 1;
1457 // drive output low
1458 static const uint32_t USBPHY_DP_CTRL_OUTOVER__LOW = 2;
1459 // drive output high
1460 static const uint32_t USBPHY_DP_CTRL_OUTOVER__HIGH = 3;
1461 static const uint32_t USBPHY_DP_CTRL_FUNCSEL__uart1_tx = 2;
1462 static const uint32_t USBPHY_DP_CTRL_FUNCSEL__i2c0_sda = 3;
1463 static const uint32_t USBPHY_DP_CTRL_FUNCSEL__siob_proc_56 = 5;
1464 static const uint32_t USBPHY_DP_CTRL_FUNCSEL__null = 31;
1465
1466 // Reset value: 0x00000000
1467 BEGIN_TYPE(USBPHY_DM_STATUS_t, uint32_t)
1468 // interrupt to processors, after override is applied
1469 ADD_BITFIELD_RO(IRQTOPROC, 26, 1)
1470 // input signal from pad, before filtering and override are applied
1471 ADD_BITFIELD_RO(INFROMPAD, 17, 1)
1472 // output enable to pad after register override is applied
1473 ADD_BITFIELD_RO(OETOPAD, 13, 1)
1474 // output signal to pad after register override is applied
1475 ADD_BITFIELD_RO(OUTTOPAD, 9, 1)
1476 END_TYPE()
1477
1478 // Reset value: 0x0000001f
1479 BEGIN_TYPE(USBPHY_DM_CTRL_t, uint32_t)
1480 ADD_BITFIELD_RW(IRQOVER, 28, 2)
1481 ADD_BITFIELD_RW(INOVER, 16, 2)
1482 ADD_BITFIELD_RW(OEOVER, 14, 2)
1483 ADD_BITFIELD_RW(OUTOVER, 12, 2)
1484 // 0-31 -> selects pin function according to the gpio table 31 == NULL
1485 ADD_BITFIELD_RW(FUNCSEL, 0, 5)
1486 END_TYPE()
1487
1488 // don't invert the interrupt
1489 static const uint32_t USBPHY_DM_CTRL_IRQOVER__NORMAL = 0;
1490 // invert the interrupt
1491 static const uint32_t USBPHY_DM_CTRL_IRQOVER__INVERT = 1;
1492 // drive interrupt low
1493 static const uint32_t USBPHY_DM_CTRL_IRQOVER__LOW = 2;
1494 // drive interrupt high
1495 static const uint32_t USBPHY_DM_CTRL_IRQOVER__HIGH = 3;
1496 // don't invert the peri input
1497 static const uint32_t USBPHY_DM_CTRL_INOVER__NORMAL = 0;
1498 // invert the peri input
1499 static const uint32_t USBPHY_DM_CTRL_INOVER__INVERT = 1;
1500 // drive peri input low
1501 static const uint32_t USBPHY_DM_CTRL_INOVER__LOW = 2;
1502 // drive peri input high
1503 static const uint32_t USBPHY_DM_CTRL_INOVER__HIGH = 3;
1504 // drive output enable from peripheral signal selected by funcsel
1505 static const uint32_t USBPHY_DM_CTRL_OEOVER__NORMAL = 0;
1506 // drive output enable from inverse of peripheral signal selected by funcsel
1507 static const uint32_t USBPHY_DM_CTRL_OEOVER__INVERT = 1;
1508 // disable output
1509 static const uint32_t USBPHY_DM_CTRL_OEOVER__DISABLE = 2;
1510 // enable output
1511 static const uint32_t USBPHY_DM_CTRL_OEOVER__ENABLE = 3;
1512 // drive output from peripheral signal selected by funcsel
1513 static const uint32_t USBPHY_DM_CTRL_OUTOVER__NORMAL = 0;
1514 // drive output from inverse of peripheral signal selected by funcsel
1515 static const uint32_t USBPHY_DM_CTRL_OUTOVER__INVERT = 1;
1516 // drive output low
1517 static const uint32_t USBPHY_DM_CTRL_OUTOVER__LOW = 2;
1518 // drive output high
1519 static const uint32_t USBPHY_DM_CTRL_OUTOVER__HIGH = 3;
1520 static const uint32_t USBPHY_DM_CTRL_FUNCSEL__uart1_rx = 2;
1521 static const uint32_t USBPHY_DM_CTRL_FUNCSEL__i2c0_scl = 3;
1522 static const uint32_t USBPHY_DM_CTRL_FUNCSEL__siob_proc_57 = 5;
1523 static const uint32_t USBPHY_DM_CTRL_FUNCSEL__null = 31;
1524
1525 // Reset value: 0x00000000
1526 BEGIN_TYPE(GPIO_QSPI_SCLK_STATUS_t, uint32_t)
1527 // interrupt to processors, after override is applied
1528 ADD_BITFIELD_RO(IRQTOPROC, 26, 1)
1529 // input signal from pad, before filtering and override are applied
1530 ADD_BITFIELD_RO(INFROMPAD, 17, 1)
1531 // output enable to pad after register override is applied
1532 ADD_BITFIELD_RO(OETOPAD, 13, 1)
1533 // output signal to pad after register override is applied
1534 ADD_BITFIELD_RO(OUTTOPAD, 9, 1)
1535 END_TYPE()
1536
1537 // Reset value: 0x0000001f
1538 BEGIN_TYPE(GPIO_QSPI_SCLK_CTRL_t, uint32_t)
1539 ADD_BITFIELD_RW(IRQOVER, 28, 2)
1540 ADD_BITFIELD_RW(INOVER, 16, 2)
1541 ADD_BITFIELD_RW(OEOVER, 14, 2)
1542 ADD_BITFIELD_RW(OUTOVER, 12, 2)
1543 // 0-31 -> selects pin function according to the gpio table 31 == NULL
1544 ADD_BITFIELD_RW(FUNCSEL, 0, 5)
1545 END_TYPE()
1546
1547 // don't invert the interrupt
1548 static const uint32_t GPIO_QSPI_SCLK_CTRL_IRQOVER__NORMAL = 0;
1549 // invert the interrupt
1550 static const uint32_t GPIO_QSPI_SCLK_CTRL_IRQOVER__INVERT = 1;
1551 // drive interrupt low
1552 static const uint32_t GPIO_QSPI_SCLK_CTRL_IRQOVER__LOW = 2;
1553 // drive interrupt high
1554 static const uint32_t GPIO_QSPI_SCLK_CTRL_IRQOVER__HIGH = 3;
1555 // don't invert the peri input
1556 static const uint32_t GPIO_QSPI_SCLK_CTRL_INOVER__NORMAL = 0;
1557 // invert the peri input
1558 static const uint32_t GPIO_QSPI_SCLK_CTRL_INOVER__INVERT = 1;
1559 // drive peri input low
1560 static const uint32_t GPIO_QSPI_SCLK_CTRL_INOVER__LOW = 2;
1561 // drive peri input high
1562 static const uint32_t GPIO_QSPI_SCLK_CTRL_INOVER__HIGH = 3;
1563 // drive output enable from peripheral signal selected by funcsel
1564 static const uint32_t GPIO_QSPI_SCLK_CTRL_OEOVER__NORMAL = 0;
1565 // drive output enable from inverse of peripheral signal selected by funcsel
1566 static const uint32_t GPIO_QSPI_SCLK_CTRL_OEOVER__INVERT = 1;
1567 // disable output
1568 static const uint32_t GPIO_QSPI_SCLK_CTRL_OEOVER__DISABLE = 2;
1569 // enable output
1570 static const uint32_t GPIO_QSPI_SCLK_CTRL_OEOVER__ENABLE = 3;
1571 // drive output from peripheral signal selected by funcsel
1572 static const uint32_t GPIO_QSPI_SCLK_CTRL_OUTOVER__NORMAL = 0;
1573 // drive output from inverse of peripheral signal selected by funcsel
1574 static const uint32_t GPIO_QSPI_SCLK_CTRL_OUTOVER__INVERT = 1;
1575 // drive output low
1576 static const uint32_t GPIO_QSPI_SCLK_CTRL_OUTOVER__LOW = 2;
1577 // drive output high
1578 static const uint32_t GPIO_QSPI_SCLK_CTRL_OUTOVER__HIGH = 3;
1579 static const uint32_t GPIO_QSPI_SCLK_CTRL_FUNCSEL__xip_sclk = 0;
1580 static const uint32_t GPIO_QSPI_SCLK_CTRL_FUNCSEL__uart1_cts = 2;
1581 static const uint32_t GPIO_QSPI_SCLK_CTRL_FUNCSEL__i2c1_sda = 3;
1582 static const uint32_t GPIO_QSPI_SCLK_CTRL_FUNCSEL__siob_proc_58 = 5;
1583 static const uint32_t GPIO_QSPI_SCLK_CTRL_FUNCSEL__uart1_tx = 11;
1584 static const uint32_t GPIO_QSPI_SCLK_CTRL_FUNCSEL__null = 31;
1585
1586 // Reset value: 0x00000000
1587 BEGIN_TYPE(GPIO_QSPI_SS_STATUS_t, uint32_t)
1588 // interrupt to processors, after override is applied
1589 ADD_BITFIELD_RO(IRQTOPROC, 26, 1)
1590 // input signal from pad, before filtering and override are applied
1591 ADD_BITFIELD_RO(INFROMPAD, 17, 1)
1592 // output enable to pad after register override is applied
1593 ADD_BITFIELD_RO(OETOPAD, 13, 1)
1594 // output signal to pad after register override is applied
1595 ADD_BITFIELD_RO(OUTTOPAD, 9, 1)
1596 END_TYPE()
1597
1598 // Reset value: 0x0000001f
1599 BEGIN_TYPE(GPIO_QSPI_SS_CTRL_t, uint32_t)
1600 ADD_BITFIELD_RW(IRQOVER, 28, 2)
1601 ADD_BITFIELD_RW(INOVER, 16, 2)
1602 ADD_BITFIELD_RW(OEOVER, 14, 2)
1603 ADD_BITFIELD_RW(OUTOVER, 12, 2)
1604 // 0-31 -> selects pin function according to the gpio table 31 == NULL
1605 ADD_BITFIELD_RW(FUNCSEL, 0, 5)
1606 END_TYPE()
1607
1608 // don't invert the interrupt
1609 static const uint32_t GPIO_QSPI_SS_CTRL_IRQOVER__NORMAL = 0;
1610 // invert the interrupt
1611 static const uint32_t GPIO_QSPI_SS_CTRL_IRQOVER__INVERT = 1;
1612 // drive interrupt low
1613 static const uint32_t GPIO_QSPI_SS_CTRL_IRQOVER__LOW = 2;
1614 // drive interrupt high
1615 static const uint32_t GPIO_QSPI_SS_CTRL_IRQOVER__HIGH = 3;
1616 // don't invert the peri input
1617 static const uint32_t GPIO_QSPI_SS_CTRL_INOVER__NORMAL = 0;
1618 // invert the peri input
1619 static const uint32_t GPIO_QSPI_SS_CTRL_INOVER__INVERT = 1;
1620 // drive peri input low
1621 static const uint32_t GPIO_QSPI_SS_CTRL_INOVER__LOW = 2;
1622 // drive peri input high
1623 static const uint32_t GPIO_QSPI_SS_CTRL_INOVER__HIGH = 3;
1624 // drive output enable from peripheral signal selected by funcsel
1625 static const uint32_t GPIO_QSPI_SS_CTRL_OEOVER__NORMAL = 0;
1626 // drive output enable from inverse of peripheral signal selected by funcsel
1627 static const uint32_t GPIO_QSPI_SS_CTRL_OEOVER__INVERT = 1;
1628 // disable output
1629 static const uint32_t GPIO_QSPI_SS_CTRL_OEOVER__DISABLE = 2;
1630 // enable output
1631 static const uint32_t GPIO_QSPI_SS_CTRL_OEOVER__ENABLE = 3;
1632 // drive output from peripheral signal selected by funcsel
1633 static const uint32_t GPIO_QSPI_SS_CTRL_OUTOVER__NORMAL = 0;
1634 // drive output from inverse of peripheral signal selected by funcsel
1635 static const uint32_t GPIO_QSPI_SS_CTRL_OUTOVER__INVERT = 1;
1636 // drive output low
1637 static const uint32_t GPIO_QSPI_SS_CTRL_OUTOVER__LOW = 2;
1638 // drive output high
1639 static const uint32_t GPIO_QSPI_SS_CTRL_OUTOVER__HIGH = 3;
1640 static const uint32_t GPIO_QSPI_SS_CTRL_FUNCSEL__xip_ss_n_0 = 0;
1641 static const uint32_t GPIO_QSPI_SS_CTRL_FUNCSEL__uart1_rts = 2;
1642 static const uint32_t GPIO_QSPI_SS_CTRL_FUNCSEL__i2c1_scl = 3;
1643 static const uint32_t GPIO_QSPI_SS_CTRL_FUNCSEL__siob_proc_59 = 5;
1644 static const uint32_t GPIO_QSPI_SS_CTRL_FUNCSEL__uart1_rx = 11;
1645 static const uint32_t GPIO_QSPI_SS_CTRL_FUNCSEL__null = 31;
1646
1647 // Reset value: 0x00000000
1648 BEGIN_TYPE(GPIO_QSPI_SD_STATUS_t, uint32_t)
1649 // interrupt to processors, after override is applied
1650 ADD_BITFIELD_RO(IRQTOPROC, 26, 1)
1651 // input signal from pad, before filtering and override are applied
1652 ADD_BITFIELD_RO(INFROMPAD, 17, 1)
1653 // output enable to pad after register override is applied
1654 ADD_BITFIELD_RO(OETOPAD, 13, 1)
1655 // output signal to pad after register override is applied
1656 ADD_BITFIELD_RO(OUTTOPAD, 9, 1)
1657 END_TYPE()
1658
1659 // Reset value: 0x0000001f
1660 BEGIN_TYPE(GPIO_QSPI_SD_CTRL_t, uint32_t)
1661 ADD_BITFIELD_RW(IRQOVER, 28, 2)
1662 ADD_BITFIELD_RW(INOVER, 16, 2)
1663 ADD_BITFIELD_RW(OEOVER, 14, 2)
1664 ADD_BITFIELD_RW(OUTOVER, 12, 2)
1665 // 0-31 -> selects pin function according to the gpio table 31 == NULL
1666 ADD_BITFIELD_RW(FUNCSEL, 0, 5)
1667 END_TYPE()
1668
1669 // don't invert the interrupt
1670 static const uint32_t GPIO_QSPI_SD_CTRL_IRQOVER__NORMAL = 0;
1671 // invert the interrupt
1672 static const uint32_t GPIO_QSPI_SD_CTRL_IRQOVER__INVERT = 1;
1673 // drive interrupt low
1674 static const uint32_t GPIO_QSPI_SD_CTRL_IRQOVER__LOW = 2;
1675 // drive interrupt high
1676 static const uint32_t GPIO_QSPI_SD_CTRL_IRQOVER__HIGH = 3;
1677 // don't invert the peri input
1678 static const uint32_t GPIO_QSPI_SD_CTRL_INOVER__NORMAL = 0;
1679 // invert the peri input
1680 static const uint32_t GPIO_QSPI_SD_CTRL_INOVER__INVERT = 1;
1681 // drive peri input low
1682 static const uint32_t GPIO_QSPI_SD_CTRL_INOVER__LOW = 2;
1683 // drive peri input high
1684 static const uint32_t GPIO_QSPI_SD_CTRL_INOVER__HIGH = 3;
1685 // drive output enable from peripheral signal selected by funcsel
1686 static const uint32_t GPIO_QSPI_SD_CTRL_OEOVER__NORMAL = 0;
1687 // drive output enable from inverse of peripheral signal selected by funcsel
1688 static const uint32_t GPIO_QSPI_SD_CTRL_OEOVER__INVERT = 1;
1689 // disable output
1690 static const uint32_t GPIO_QSPI_SD_CTRL_OEOVER__DISABLE = 2;
1691 // enable output
1692 static const uint32_t GPIO_QSPI_SD_CTRL_OEOVER__ENABLE = 3;
1693 // drive output from peripheral signal selected by funcsel
1694 static const uint32_t GPIO_QSPI_SD_CTRL_OUTOVER__NORMAL = 0;
1695 // drive output from inverse of peripheral signal selected by funcsel
1696 static const uint32_t GPIO_QSPI_SD_CTRL_OUTOVER__INVERT = 1;
1697 // drive output low
1698 static const uint32_t GPIO_QSPI_SD_CTRL_OUTOVER__LOW = 2;
1699 // drive output high
1700 static const uint32_t GPIO_QSPI_SD_CTRL_OUTOVER__HIGH = 3;
1701 static const uint32_t GPIO_QSPI_SD_CTRL_FUNCSEL__xip = 0;
1702 static const uint32_t GPIO_QSPI_SD_CTRL_FUNCSEL__uart = 2;
1703 static const uint32_t GPIO_QSPI_SD_CTRL_FUNCSEL__i2c = 3;
1704 static const uint32_t GPIO_QSPI_SD_CTRL_FUNCSEL__sio = 5;
1705 static const uint32_t GPIO_QSPI_SD_CTRL_FUNCSEL__uart_aux = 11;
1706 static const uint32_t GPIO_QSPI_SD_CTRL_FUNCSEL__null = 31;
1707
1708 // Reset value: 0x00000000
1709 BEGIN_TYPE(IRQSUMMARY_PROC0_SECURE_t, uint32_t)
1710 ADD_BITFIELD_RO(GPIO_QSPI_SD3, 7, 1)
1711 ADD_BITFIELD_RO(GPIO_QSPI_SD2, 6, 1)
1712 ADD_BITFIELD_RO(GPIO_QSPI_SD1, 5, 1)
1713 ADD_BITFIELD_RO(GPIO_QSPI_SD0, 4, 1)
1714 ADD_BITFIELD_RO(GPIO_QSPI_SS, 3, 1)
1715 ADD_BITFIELD_RO(GPIO_QSPI_SCLK, 2, 1)
1716 ADD_BITFIELD_RO(USBPHY_DM, 1, 1)
1717 ADD_BITFIELD_RO(USBPHY_DP, 0, 1)
1718 END_TYPE()
1719
1720 // Reset value: 0x00000000
1721 BEGIN_TYPE(IRQSUMMARY_PROC0_NONSECURE_t, uint32_t)
1722 ADD_BITFIELD_RO(GPIO_QSPI_SD3, 7, 1)
1723 ADD_BITFIELD_RO(GPIO_QSPI_SD2, 6, 1)
1724 ADD_BITFIELD_RO(GPIO_QSPI_SD1, 5, 1)
1725 ADD_BITFIELD_RO(GPIO_QSPI_SD0, 4, 1)
1726 ADD_BITFIELD_RO(GPIO_QSPI_SS, 3, 1)
1727 ADD_BITFIELD_RO(GPIO_QSPI_SCLK, 2, 1)
1728 ADD_BITFIELD_RO(USBPHY_DM, 1, 1)
1729 ADD_BITFIELD_RO(USBPHY_DP, 0, 1)
1730 END_TYPE()
1731
1732 // Reset value: 0x00000000
1733 BEGIN_TYPE(IRQSUMMARY_PROC1_SECURE_t, uint32_t)
1734 ADD_BITFIELD_RO(GPIO_QSPI_SD3, 7, 1)
1735 ADD_BITFIELD_RO(GPIO_QSPI_SD2, 6, 1)
1736 ADD_BITFIELD_RO(GPIO_QSPI_SD1, 5, 1)
1737 ADD_BITFIELD_RO(GPIO_QSPI_SD0, 4, 1)
1738 ADD_BITFIELD_RO(GPIO_QSPI_SS, 3, 1)
1739 ADD_BITFIELD_RO(GPIO_QSPI_SCLK, 2, 1)
1740 ADD_BITFIELD_RO(USBPHY_DM, 1, 1)
1741 ADD_BITFIELD_RO(USBPHY_DP, 0, 1)
1742 END_TYPE()
1743
1744 // Reset value: 0x00000000
1745 BEGIN_TYPE(IRQSUMMARY_PROC1_NONSECURE_t, uint32_t)
1746 ADD_BITFIELD_RO(GPIO_QSPI_SD3, 7, 1)
1747 ADD_BITFIELD_RO(GPIO_QSPI_SD2, 6, 1)
1748 ADD_BITFIELD_RO(GPIO_QSPI_SD1, 5, 1)
1749 ADD_BITFIELD_RO(GPIO_QSPI_SD0, 4, 1)
1750 ADD_BITFIELD_RO(GPIO_QSPI_SS, 3, 1)
1751 ADD_BITFIELD_RO(GPIO_QSPI_SCLK, 2, 1)
1752 ADD_BITFIELD_RO(USBPHY_DM, 1, 1)
1753 ADD_BITFIELD_RO(USBPHY_DP, 0, 1)
1754 END_TYPE()
1755
1756 // Reset value: 0x00000000
1757 BEGIN_TYPE(IRQSUMMARY_DORMANT_WAKE_SECURE_t, uint32_t)
1758 ADD_BITFIELD_RO(GPIO_QSPI_SD3, 7, 1)
1759 ADD_BITFIELD_RO(GPIO_QSPI_SD2, 6, 1)
1760 ADD_BITFIELD_RO(GPIO_QSPI_SD1, 5, 1)
1761 ADD_BITFIELD_RO(GPIO_QSPI_SD0, 4, 1)
1762 ADD_BITFIELD_RO(GPIO_QSPI_SS, 3, 1)
1763 ADD_BITFIELD_RO(GPIO_QSPI_SCLK, 2, 1)
1764 ADD_BITFIELD_RO(USBPHY_DM, 1, 1)
1765 ADD_BITFIELD_RO(USBPHY_DP, 0, 1)
1766 END_TYPE()
1767
1768 // Reset value: 0x00000000
1769 BEGIN_TYPE(IRQSUMMARY_DORMANT_WAKE_NONSECURE_t, uint32_t)
1770 ADD_BITFIELD_RO(GPIO_QSPI_SD3, 7, 1)
1771 ADD_BITFIELD_RO(GPIO_QSPI_SD2, 6, 1)
1772 ADD_BITFIELD_RO(GPIO_QSPI_SD1, 5, 1)
1773 ADD_BITFIELD_RO(GPIO_QSPI_SD0, 4, 1)
1774 ADD_BITFIELD_RO(GPIO_QSPI_SS, 3, 1)
1775 ADD_BITFIELD_RO(GPIO_QSPI_SCLK, 2, 1)
1776 ADD_BITFIELD_RO(USBPHY_DM, 1, 1)
1777 ADD_BITFIELD_RO(USBPHY_DP, 0, 1)
1778 END_TYPE()
1779
1780 // Raw Interrupts
1781 // Reset value: 0x00000000
1782 BEGIN_TYPE(INTR_t, uint32_t)
1783 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
1784 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
1785 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
1786 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
1787 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
1788 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
1789 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
1790 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
1791 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
1792 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
1793 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
1794 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
1795 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
1796 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
1797 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
1798 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
1799 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
1800 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
1801 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
1802 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
1803 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
1804 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
1805 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
1806 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
1807 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
1808 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
1809 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_HIGH, 5, 1)
1810 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_LOW, 4, 1)
1811 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
1812 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
1813 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_HIGH, 1, 1)
1814 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_LOW, 0, 1)
1815 END_TYPE()
1816
1817 // Interrupt Enable for proc0
1818 // Reset value: 0x00000000
1819 BEGIN_TYPE(PROC0_INTE_t, uint32_t)
1820 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
1821 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
1822 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
1823 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
1824 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
1825 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
1826 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
1827 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
1828 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
1829 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
1830 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
1831 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
1832 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
1833 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
1834 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
1835 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
1836 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
1837 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
1838 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
1839 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
1840 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
1841 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
1842 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
1843 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
1844 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
1845 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
1846 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_HIGH, 5, 1)
1847 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_LOW, 4, 1)
1848 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
1849 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
1850 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_HIGH, 1, 1)
1851 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_LOW, 0, 1)
1852 END_TYPE()
1853
1854 // Interrupt Force for proc0
1855 // Reset value: 0x00000000
1856 BEGIN_TYPE(PROC0_INTF_t, uint32_t)
1857 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
1858 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
1859 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
1860 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
1861 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
1862 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
1863 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
1864 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
1865 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
1866 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
1867 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
1868 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
1869 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
1870 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
1871 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
1872 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
1873 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
1874 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
1875 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
1876 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
1877 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
1878 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
1879 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
1880 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
1881 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
1882 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
1883 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_HIGH, 5, 1)
1884 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_LOW, 4, 1)
1885 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
1886 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
1887 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_HIGH, 1, 1)
1888 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_LOW, 0, 1)
1889 END_TYPE()
1890
1891 // Interrupt status after masking & forcing for proc0
1892 // Reset value: 0x00000000
1893 BEGIN_TYPE(PROC0_INTS_t, uint32_t)
1894 ADD_BITFIELD_RO(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
1895 ADD_BITFIELD_RO(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
1896 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
1897 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
1898 ADD_BITFIELD_RO(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
1899 ADD_BITFIELD_RO(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
1900 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
1901 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
1902 ADD_BITFIELD_RO(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
1903 ADD_BITFIELD_RO(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
1904 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
1905 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
1906 ADD_BITFIELD_RO(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
1907 ADD_BITFIELD_RO(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
1908 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
1909 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
1910 ADD_BITFIELD_RO(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
1911 ADD_BITFIELD_RO(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
1912 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
1913 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
1914 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
1915 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
1916 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
1917 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
1918 ADD_BITFIELD_RO(USBPHY_DM_EDGE_HIGH, 7, 1)
1919 ADD_BITFIELD_RO(USBPHY_DM_EDGE_LOW, 6, 1)
1920 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_HIGH, 5, 1)
1921 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_LOW, 4, 1)
1922 ADD_BITFIELD_RO(USBPHY_DP_EDGE_HIGH, 3, 1)
1923 ADD_BITFIELD_RO(USBPHY_DP_EDGE_LOW, 2, 1)
1924 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_HIGH, 1, 1)
1925 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_LOW, 0, 1)
1926 END_TYPE()
1927
1928 // Interrupt Enable for proc1
1929 // Reset value: 0x00000000
1930 BEGIN_TYPE(PROC1_INTE_t, uint32_t)
1931 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
1932 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
1933 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
1934 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
1935 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
1936 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
1937 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
1938 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
1939 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
1940 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
1941 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
1942 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
1943 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
1944 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
1945 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
1946 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
1947 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
1948 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
1949 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
1950 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
1951 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
1952 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
1953 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
1954 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
1955 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
1956 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
1957 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_HIGH, 5, 1)
1958 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_LOW, 4, 1)
1959 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
1960 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
1961 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_HIGH, 1, 1)
1962 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_LOW, 0, 1)
1963 END_TYPE()
1964
1965 // Interrupt Force for proc1
1966 // Reset value: 0x00000000
1967 BEGIN_TYPE(PROC1_INTF_t, uint32_t)
1968 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
1969 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
1970 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
1971 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
1972 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
1973 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
1974 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
1975 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
1976 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
1977 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
1978 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
1979 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
1980 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
1981 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
1982 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
1983 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
1984 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
1985 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
1986 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
1987 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
1988 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
1989 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
1990 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
1991 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
1992 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
1993 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
1994 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_HIGH, 5, 1)
1995 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_LOW, 4, 1)
1996 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
1997 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
1998 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_HIGH, 1, 1)
1999 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_LOW, 0, 1)
2000 END_TYPE()
2001
2002 // Interrupt status after masking & forcing for proc1
2003 // Reset value: 0x00000000
2004 BEGIN_TYPE(PROC1_INTS_t, uint32_t)
2005 ADD_BITFIELD_RO(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
2006 ADD_BITFIELD_RO(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
2007 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
2008 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
2009 ADD_BITFIELD_RO(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
2010 ADD_BITFIELD_RO(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
2011 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
2012 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
2013 ADD_BITFIELD_RO(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
2014 ADD_BITFIELD_RO(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
2015 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
2016 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
2017 ADD_BITFIELD_RO(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
2018 ADD_BITFIELD_RO(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
2019 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
2020 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
2021 ADD_BITFIELD_RO(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
2022 ADD_BITFIELD_RO(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
2023 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
2024 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
2025 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
2026 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
2027 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
2028 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
2029 ADD_BITFIELD_RO(USBPHY_DM_EDGE_HIGH, 7, 1)
2030 ADD_BITFIELD_RO(USBPHY_DM_EDGE_LOW, 6, 1)
2031 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_HIGH, 5, 1)
2032 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_LOW, 4, 1)
2033 ADD_BITFIELD_RO(USBPHY_DP_EDGE_HIGH, 3, 1)
2034 ADD_BITFIELD_RO(USBPHY_DP_EDGE_LOW, 2, 1)
2035 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_HIGH, 1, 1)
2036 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_LOW, 0, 1)
2037 END_TYPE()
2038
2039 // Interrupt Enable for dormant_wake
2040 // Reset value: 0x00000000
2041 BEGIN_TYPE(DORMANT_WAKE_INTE_t, uint32_t)
2042 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
2043 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
2044 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
2045 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
2046 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
2047 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
2048 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
2049 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
2050 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
2051 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
2052 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
2053 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
2054 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
2055 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
2056 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
2057 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
2058 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
2059 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
2060 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
2061 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
2062 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
2063 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
2064 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
2065 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
2066 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
2067 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
2068 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_HIGH, 5, 1)
2069 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_LOW, 4, 1)
2070 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
2071 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
2072 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_HIGH, 1, 1)
2073 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_LOW, 0, 1)
2074 END_TYPE()
2075
2076 // Interrupt Force for dormant_wake
2077 // Reset value: 0x00000000
2078 BEGIN_TYPE(DORMANT_WAKE_INTF_t, uint32_t)
2079 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
2080 ADD_BITFIELD_RW(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
2081 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
2082 ADD_BITFIELD_RW(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
2083 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
2084 ADD_BITFIELD_RW(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
2085 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
2086 ADD_BITFIELD_RW(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
2087 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
2088 ADD_BITFIELD_RW(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
2089 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
2090 ADD_BITFIELD_RW(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
2091 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
2092 ADD_BITFIELD_RW(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
2093 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
2094 ADD_BITFIELD_RW(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
2095 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
2096 ADD_BITFIELD_RW(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
2097 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
2098 ADD_BITFIELD_RW(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
2099 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
2100 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
2101 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
2102 ADD_BITFIELD_RW(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
2103 ADD_BITFIELD_RW(USBPHY_DM_EDGE_HIGH, 7, 1)
2104 ADD_BITFIELD_RW(USBPHY_DM_EDGE_LOW, 6, 1)
2105 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_HIGH, 5, 1)
2106 ADD_BITFIELD_RW(USBPHY_DM_LEVEL_LOW, 4, 1)
2107 ADD_BITFIELD_RW(USBPHY_DP_EDGE_HIGH, 3, 1)
2108 ADD_BITFIELD_RW(USBPHY_DP_EDGE_LOW, 2, 1)
2109 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_HIGH, 1, 1)
2110 ADD_BITFIELD_RW(USBPHY_DP_LEVEL_LOW, 0, 1)
2111 END_TYPE()
2112
2113 // Interrupt status after masking & forcing for dormant_wake
2114 // Reset value: 0x00000000
2115 BEGIN_TYPE(DORMANT_WAKE_INTS_t, uint32_t)
2116 ADD_BITFIELD_RO(GPIO_QSPI_SD3_EDGE_HIGH, 31, 1)
2117 ADD_BITFIELD_RO(GPIO_QSPI_SD3_EDGE_LOW, 30, 1)
2118 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_HIGH, 29, 1)
2119 ADD_BITFIELD_RO(GPIO_QSPI_SD3_LEVEL_LOW, 28, 1)
2120 ADD_BITFIELD_RO(GPIO_QSPI_SD2_EDGE_HIGH, 27, 1)
2121 ADD_BITFIELD_RO(GPIO_QSPI_SD2_EDGE_LOW, 26, 1)
2122 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_HIGH, 25, 1)
2123 ADD_BITFIELD_RO(GPIO_QSPI_SD2_LEVEL_LOW, 24, 1)
2124 ADD_BITFIELD_RO(GPIO_QSPI_SD1_EDGE_HIGH, 23, 1)
2125 ADD_BITFIELD_RO(GPIO_QSPI_SD1_EDGE_LOW, 22, 1)
2126 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_HIGH, 21, 1)
2127 ADD_BITFIELD_RO(GPIO_QSPI_SD1_LEVEL_LOW, 20, 1)
2128 ADD_BITFIELD_RO(GPIO_QSPI_SD0_EDGE_HIGH, 19, 1)
2129 ADD_BITFIELD_RO(GPIO_QSPI_SD0_EDGE_LOW, 18, 1)
2130 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_HIGH, 17, 1)
2131 ADD_BITFIELD_RO(GPIO_QSPI_SD0_LEVEL_LOW, 16, 1)
2132 ADD_BITFIELD_RO(GPIO_QSPI_SS_EDGE_HIGH, 15, 1)
2133 ADD_BITFIELD_RO(GPIO_QSPI_SS_EDGE_LOW, 14, 1)
2134 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_HIGH, 13, 1)
2135 ADD_BITFIELD_RO(GPIO_QSPI_SS_LEVEL_LOW, 12, 1)
2136 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_EDGE_HIGH, 11, 1)
2137 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_EDGE_LOW, 10, 1)
2138 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_HIGH, 9, 1)
2139 ADD_BITFIELD_RO(GPIO_QSPI_SCLK_LEVEL_LOW, 8, 1)
2140 ADD_BITFIELD_RO(USBPHY_DM_EDGE_HIGH, 7, 1)
2141 ADD_BITFIELD_RO(USBPHY_DM_EDGE_LOW, 6, 1)
2142 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_HIGH, 5, 1)
2143 ADD_BITFIELD_RO(USBPHY_DM_LEVEL_LOW, 4, 1)
2144 ADD_BITFIELD_RO(USBPHY_DP_EDGE_HIGH, 3, 1)
2145 ADD_BITFIELD_RO(USBPHY_DP_EDGE_LOW, 2, 1)
2146 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_HIGH, 1, 1)
2147 ADD_BITFIELD_RO(USBPHY_DP_LEVEL_LOW, 0, 1)
2148 END_TYPE()
2149
2150 struct IO_QSPI_t {
2151 USBPHY_DP_STATUS_t USBPHY_DP_STATUS;
2152 USBPHY_DP_CTRL_t USBPHY_DP_CTRL;
2153 USBPHY_DM_STATUS_t USBPHY_DM_STATUS;
2154 USBPHY_DM_CTRL_t USBPHY_DM_CTRL;
2155 GPIO_QSPI_SCLK_STATUS_t GPIO_QSPI_SCLK_STATUS;
2156 GPIO_QSPI_SCLK_CTRL_t GPIO_QSPI_SCLK_CTRL;
2157 GPIO_QSPI_SS_STATUS_t GPIO_QSPI_SS_STATUS;
2158 GPIO_QSPI_SS_CTRL_t GPIO_QSPI_SS_CTRL;
2159 GPIO_QSPI_SD_STATUS_t GPIO_QSPI_SD0_STATUS;
2160 GPIO_QSPI_SD_CTRL_t GPIO_QSPI_SD0_CTRL;
2161 GPIO_QSPI_SD_STATUS_t GPIO_QSPI_SD1_STATUS;
2162 GPIO_QSPI_SD_CTRL_t GPIO_QSPI_SD1_CTRL;
2163 GPIO_QSPI_SD_STATUS_t GPIO_QSPI_SD2_STATUS;
2164 GPIO_QSPI_SD_CTRL_t GPIO_QSPI_SD2_CTRL;
2165 GPIO_QSPI_SD_STATUS_t GPIO_QSPI_SD3_STATUS;
2166 GPIO_QSPI_SD_CTRL_t GPIO_QSPI_SD3_CTRL;
2167 uint32_t reserved0[112];
2168 IRQSUMMARY_PROC0_SECURE_t IRQSUMMARY_PROC0_SECURE;
2169 IRQSUMMARY_PROC0_NONSECURE_t IRQSUMMARY_PROC0_NONSECURE;
2170 IRQSUMMARY_PROC1_SECURE_t IRQSUMMARY_PROC1_SECURE;
2171 IRQSUMMARY_PROC1_NONSECURE_t IRQSUMMARY_PROC1_NONSECURE;
2172 IRQSUMMARY_DORMANT_WAKE_SECURE_t IRQSUMMARY_DORMANT_WAKE_SECURE;
2173 IRQSUMMARY_DORMANT_WAKE_NONSECURE_t IRQSUMMARY_DORMANT_WAKE_NONSECURE;
2174 INTR_t INTR;
2175 PROC0_INTE_t PROC0_INTE;
2176 PROC0_INTF_t PROC0_INTF;
2177 PROC0_INTS_t PROC0_INTS;
2178 PROC1_INTE_t PROC1_INTE;
2179 PROC1_INTF_t PROC1_INTF;
2180 PROC1_INTS_t PROC1_INTS;
2181 DORMANT_WAKE_INTE_t DORMANT_WAKE_INTE;
2182 DORMANT_WAKE_INTF_t DORMANT_WAKE_INTF;
2183 DORMANT_WAKE_INTS_t DORMANT_WAKE_INTS;
2184 };
2185
2186 static IO_QSPI_t & IO_QSPI = (*(IO_QSPI_t *)0x40030000);
2187 static IO_QSPI_t & IO_QSPI_XOR = (*(IO_QSPI_t *)0x40031000);
2188 static IO_QSPI_t & IO_QSPI_SET = (*(IO_QSPI_t *)0x40032000);
2189 static IO_QSPI_t & IO_QSPI_CLR = (*(IO_QSPI_t *)0x40033000);
2190
2191} // _IO_QSPI_
2192
2193namespace _IO_BANK0_ {
2194
2195 // Reset value: 0x00000000
2196 BEGIN_TYPE(GPIO_STATUS_t, uint32_t)
2197 // interrupt to processors, after override is applied
2198 ADD_BITFIELD_RO(IRQTOPROC, 26, 1)
2199 // input signal from pad, before filtering and override are applied
2200 ADD_BITFIELD_RO(INFROMPAD, 17, 1)
2201 // output enable to pad after register override is applied
2202 ADD_BITFIELD_RO(OETOPAD, 13, 1)
2203 // output signal to pad after register override is applied
2204 ADD_BITFIELD_RO(OUTTOPAD, 9, 1)
2205 END_TYPE()
2206
2207 // Reset value: 0x0000001f
2208 BEGIN_TYPE(GPIO_CTRL_t, uint32_t)
2209 ADD_BITFIELD_RW(IRQOVER, 28, 2)
2210 ADD_BITFIELD_RW(INOVER, 16, 2)
2211 ADD_BITFIELD_RW(OEOVER, 14, 2)
2212 ADD_BITFIELD_RW(OUTOVER, 12, 2)
2213 // 0-31 -> selects pin function according to the gpio table 31 == NULL
2214 ADD_BITFIELD_RW(FUNCSEL, 0, 5)
2215 END_TYPE()
2216
2217 // don't invert the interrupt
2218 static const uint32_t GPIO_CTRL_IRQOVER__NORMAL = 0;
2219 // invert the interrupt
2220 static const uint32_t GPIO_CTRL_IRQOVER__INVERT = 1;
2221 // drive interrupt low
2222 static const uint32_t GPIO_CTRL_IRQOVER__LOW = 2;
2223 // drive interrupt high
2224 static const uint32_t GPIO_CTRL_IRQOVER__HIGH = 3;
2225 // don't invert the peri input
2226 static const uint32_t GPIO_CTRL_INOVER__NORMAL = 0;
2227 // invert the peri input
2228 static const uint32_t GPIO_CTRL_INOVER__INVERT = 1;
2229 // drive peri input low
2230 static const uint32_t GPIO_CTRL_INOVER__LOW = 2;
2231 // drive peri input high
2232 static const uint32_t GPIO_CTRL_INOVER__HIGH = 3;
2233 // drive output enable from peripheral signal selected by funcsel
2234 static const uint32_t GPIO_CTRL_OEOVER__NORMAL = 0;
2235 // drive output enable from inverse of peripheral signal selected by funcsel
2236 static const uint32_t GPIO_CTRL_OEOVER__INVERT = 1;
2237 // disable output
2238 static const uint32_t GPIO_CTRL_OEOVER__DISABLE = 2;
2239 // enable output
2240 static const uint32_t GPIO_CTRL_OEOVER__ENABLE = 3;
2241 // drive output from peripheral signal selected by funcsel
2242 static const uint32_t GPIO_CTRL_OUTOVER__NORMAL = 0;
2243 // drive output from inverse of peripheral signal selected by funcsel
2244 static const uint32_t GPIO_CTRL_OUTOVER__INVERT = 1;
2245 // drive output low
2246 static const uint32_t GPIO_CTRL_OUTOVER__LOW = 2;
2247 // drive output high
2248 static const uint32_t GPIO_CTRL_OUTOVER__HIGH = 3;
2249 static const uint32_t GPIO_CTRL_FUNCSEL__jtag = 0;
2250 static const uint32_t GPIO_CTRL_FUNCSEL__spi = 1;
2251 static const uint32_t GPIO_CTRL_FUNCSEL__uart = 2;
2252 static const uint32_t GPIO_CTRL_FUNCSEL__i2c = 3;
2253 static const uint32_t GPIO_CTRL_FUNCSEL__pwm = 4;
2254 static const uint32_t GPIO_CTRL_FUNCSEL__sio = 5;
2255 static const uint32_t GPIO_CTRL_FUNCSEL__pio0 = 6;
2256 static const uint32_t GPIO_CTRL_FUNCSEL__pio1 = 7;
2257 static const uint32_t GPIO_CTRL_FUNCSEL__pio2 = 8;
2258 static const uint32_t GPIO_CTRL_FUNCSEL__clock = 9;
2259 static const uint32_t GPIO_CTRL_FUNCSEL__usb = 10;
2260 static const uint32_t GPIO_CTRL_FUNCSEL__uart_aux = 11;
2261 static const uint32_t GPIO_CTRL_FUNCSEL__null = 31;
2262
2263 // Reset value: 0x00000000
2264 BEGIN_TYPE(IRQSUMMARY_PROC0_SECURE0_t, uint32_t)
2265 ADD_BITFIELD_RO(GPIO31, 31, 1)
2266 ADD_BITFIELD_RO(GPIO30, 30, 1)
2267 ADD_BITFIELD_RO(GPIO29, 29, 1)
2268 ADD_BITFIELD_RO(GPIO28, 28, 1)
2269 ADD_BITFIELD_RO(GPIO27, 27, 1)
2270 ADD_BITFIELD_RO(GPIO26, 26, 1)
2271 ADD_BITFIELD_RO(GPIO25, 25, 1)
2272 ADD_BITFIELD_RO(GPIO24, 24, 1)
2273 ADD_BITFIELD_RO(GPIO23, 23, 1)
2274 ADD_BITFIELD_RO(GPIO22, 22, 1)
2275 ADD_BITFIELD_RO(GPIO21, 21, 1)
2276 ADD_BITFIELD_RO(GPIO20, 20, 1)
2277 ADD_BITFIELD_RO(GPIO19, 19, 1)
2278 ADD_BITFIELD_RO(GPIO18, 18, 1)
2279 ADD_BITFIELD_RO(GPIO17, 17, 1)
2280 ADD_BITFIELD_RO(GPIO16, 16, 1)
2281 ADD_BITFIELD_RO(GPIO15, 15, 1)
2282 ADD_BITFIELD_RO(GPIO14, 14, 1)
2283 ADD_BITFIELD_RO(GPIO13, 13, 1)
2284 ADD_BITFIELD_RO(GPIO12, 12, 1)
2285 ADD_BITFIELD_RO(GPIO11, 11, 1)
2286 ADD_BITFIELD_RO(GPIO10, 10, 1)
2287 ADD_BITFIELD_RO(GPIO9, 9, 1)
2288 ADD_BITFIELD_RO(GPIO8, 8, 1)
2289 ADD_BITFIELD_RO(GPIO7, 7, 1)
2290 ADD_BITFIELD_RO(GPIO6, 6, 1)
2291 ADD_BITFIELD_RO(GPIO5, 5, 1)
2292 ADD_BITFIELD_RO(GPIO4, 4, 1)
2293 ADD_BITFIELD_RO(GPIO3, 3, 1)
2294 ADD_BITFIELD_RO(GPIO2, 2, 1)
2295 ADD_BITFIELD_RO(GPIO1, 1, 1)
2296 ADD_BITFIELD_RO(GPIO0, 0, 1)
2297 END_TYPE()
2298
2299 // Reset value: 0x00000000
2300 BEGIN_TYPE(IRQSUMMARY_PROC0_SECURE1_t, uint32_t)
2301 ADD_BITFIELD_RO(GPIO47, 15, 1)
2302 ADD_BITFIELD_RO(GPIO46, 14, 1)
2303 ADD_BITFIELD_RO(GPIO45, 13, 1)
2304 ADD_BITFIELD_RO(GPIO44, 12, 1)
2305 ADD_BITFIELD_RO(GPIO43, 11, 1)
2306 ADD_BITFIELD_RO(GPIO42, 10, 1)
2307 ADD_BITFIELD_RO(GPIO41, 9, 1)
2308 ADD_BITFIELD_RO(GPIO40, 8, 1)
2309 ADD_BITFIELD_RO(GPIO39, 7, 1)
2310 ADD_BITFIELD_RO(GPIO38, 6, 1)
2311 ADD_BITFIELD_RO(GPIO37, 5, 1)
2312 ADD_BITFIELD_RO(GPIO36, 4, 1)
2313 ADD_BITFIELD_RO(GPIO35, 3, 1)
2314 ADD_BITFIELD_RO(GPIO34, 2, 1)
2315 ADD_BITFIELD_RO(GPIO33, 1, 1)
2316 ADD_BITFIELD_RO(GPIO32, 0, 1)
2317 END_TYPE()
2318
2319 // Reset value: 0x00000000
2320 BEGIN_TYPE(IRQSUMMARY_PROC0_NONSECURE0_t, uint32_t)
2321 ADD_BITFIELD_RO(GPIO31, 31, 1)
2322 ADD_BITFIELD_RO(GPIO30, 30, 1)
2323 ADD_BITFIELD_RO(GPIO29, 29, 1)
2324 ADD_BITFIELD_RO(GPIO28, 28, 1)
2325 ADD_BITFIELD_RO(GPIO27, 27, 1)
2326 ADD_BITFIELD_RO(GPIO26, 26, 1)
2327 ADD_BITFIELD_RO(GPIO25, 25, 1)
2328 ADD_BITFIELD_RO(GPIO24, 24, 1)
2329 ADD_BITFIELD_RO(GPIO23, 23, 1)
2330 ADD_BITFIELD_RO(GPIO22, 22, 1)
2331 ADD_BITFIELD_RO(GPIO21, 21, 1)
2332 ADD_BITFIELD_RO(GPIO20, 20, 1)
2333 ADD_BITFIELD_RO(GPIO19, 19, 1)
2334 ADD_BITFIELD_RO(GPIO18, 18, 1)
2335 ADD_BITFIELD_RO(GPIO17, 17, 1)
2336 ADD_BITFIELD_RO(GPIO16, 16, 1)
2337 ADD_BITFIELD_RO(GPIO15, 15, 1)
2338 ADD_BITFIELD_RO(GPIO14, 14, 1)
2339 ADD_BITFIELD_RO(GPIO13, 13, 1)
2340 ADD_BITFIELD_RO(GPIO12, 12, 1)
2341 ADD_BITFIELD_RO(GPIO11, 11, 1)
2342 ADD_BITFIELD_RO(GPIO10, 10, 1)
2343 ADD_BITFIELD_RO(GPIO9, 9, 1)
2344 ADD_BITFIELD_RO(GPIO8, 8, 1)
2345 ADD_BITFIELD_RO(GPIO7, 7, 1)
2346 ADD_BITFIELD_RO(GPIO6, 6, 1)
2347 ADD_BITFIELD_RO(GPIO5, 5, 1)
2348 ADD_BITFIELD_RO(GPIO4, 4, 1)
2349 ADD_BITFIELD_RO(GPIO3, 3, 1)
2350 ADD_BITFIELD_RO(GPIO2, 2, 1)
2351 ADD_BITFIELD_RO(GPIO1, 1, 1)
2352 ADD_BITFIELD_RO(GPIO0, 0, 1)
2353 END_TYPE()
2354
2355 // Reset value: 0x00000000
2356 BEGIN_TYPE(IRQSUMMARY_PROC0_NONSECURE1_t, uint32_t)
2357 ADD_BITFIELD_RO(GPIO47, 15, 1)
2358 ADD_BITFIELD_RO(GPIO46, 14, 1)
2359 ADD_BITFIELD_RO(GPIO45, 13, 1)
2360 ADD_BITFIELD_RO(GPIO44, 12, 1)
2361 ADD_BITFIELD_RO(GPIO43, 11, 1)
2362 ADD_BITFIELD_RO(GPIO42, 10, 1)
2363 ADD_BITFIELD_RO(GPIO41, 9, 1)
2364 ADD_BITFIELD_RO(GPIO40, 8, 1)
2365 ADD_BITFIELD_RO(GPIO39, 7, 1)
2366 ADD_BITFIELD_RO(GPIO38, 6, 1)
2367 ADD_BITFIELD_RO(GPIO37, 5, 1)
2368 ADD_BITFIELD_RO(GPIO36, 4, 1)
2369 ADD_BITFIELD_RO(GPIO35, 3, 1)
2370 ADD_BITFIELD_RO(GPIO34, 2, 1)
2371 ADD_BITFIELD_RO(GPIO33, 1, 1)
2372 ADD_BITFIELD_RO(GPIO32, 0, 1)
2373 END_TYPE()
2374
2375 // Reset value: 0x00000000
2376 BEGIN_TYPE(IRQSUMMARY_PROC1_SECURE0_t, uint32_t)
2377 ADD_BITFIELD_RO(GPIO31, 31, 1)
2378 ADD_BITFIELD_RO(GPIO30, 30, 1)
2379 ADD_BITFIELD_RO(GPIO29, 29, 1)
2380 ADD_BITFIELD_RO(GPIO28, 28, 1)
2381 ADD_BITFIELD_RO(GPIO27, 27, 1)
2382 ADD_BITFIELD_RO(GPIO26, 26, 1)
2383 ADD_BITFIELD_RO(GPIO25, 25, 1)
2384 ADD_BITFIELD_RO(GPIO24, 24, 1)
2385 ADD_BITFIELD_RO(GPIO23, 23, 1)
2386 ADD_BITFIELD_RO(GPIO22, 22, 1)
2387 ADD_BITFIELD_RO(GPIO21, 21, 1)
2388 ADD_BITFIELD_RO(GPIO20, 20, 1)
2389 ADD_BITFIELD_RO(GPIO19, 19, 1)
2390 ADD_BITFIELD_RO(GPIO18, 18, 1)
2391 ADD_BITFIELD_RO(GPIO17, 17, 1)
2392 ADD_BITFIELD_RO(GPIO16, 16, 1)
2393 ADD_BITFIELD_RO(GPIO15, 15, 1)
2394 ADD_BITFIELD_RO(GPIO14, 14, 1)
2395 ADD_BITFIELD_RO(GPIO13, 13, 1)
2396 ADD_BITFIELD_RO(GPIO12, 12, 1)
2397 ADD_BITFIELD_RO(GPIO11, 11, 1)
2398 ADD_BITFIELD_RO(GPIO10, 10, 1)
2399 ADD_BITFIELD_RO(GPIO9, 9, 1)
2400 ADD_BITFIELD_RO(GPIO8, 8, 1)
2401 ADD_BITFIELD_RO(GPIO7, 7, 1)
2402 ADD_BITFIELD_RO(GPIO6, 6, 1)
2403 ADD_BITFIELD_RO(GPIO5, 5, 1)
2404 ADD_BITFIELD_RO(GPIO4, 4, 1)
2405 ADD_BITFIELD_RO(GPIO3, 3, 1)
2406 ADD_BITFIELD_RO(GPIO2, 2, 1)
2407 ADD_BITFIELD_RO(GPIO1, 1, 1)
2408 ADD_BITFIELD_RO(GPIO0, 0, 1)
2409 END_TYPE()
2410
2411 // Reset value: 0x00000000
2412 BEGIN_TYPE(IRQSUMMARY_PROC1_SECURE1_t, uint32_t)
2413 ADD_BITFIELD_RO(GPIO47, 15, 1)
2414 ADD_BITFIELD_RO(GPIO46, 14, 1)
2415 ADD_BITFIELD_RO(GPIO45, 13, 1)
2416 ADD_BITFIELD_RO(GPIO44, 12, 1)
2417 ADD_BITFIELD_RO(GPIO43, 11, 1)
2418 ADD_BITFIELD_RO(GPIO42, 10, 1)
2419 ADD_BITFIELD_RO(GPIO41, 9, 1)
2420 ADD_BITFIELD_RO(GPIO40, 8, 1)
2421 ADD_BITFIELD_RO(GPIO39, 7, 1)
2422 ADD_BITFIELD_RO(GPIO38, 6, 1)
2423 ADD_BITFIELD_RO(GPIO37, 5, 1)
2424 ADD_BITFIELD_RO(GPIO36, 4, 1)
2425 ADD_BITFIELD_RO(GPIO35, 3, 1)
2426 ADD_BITFIELD_RO(GPIO34, 2, 1)
2427 ADD_BITFIELD_RO(GPIO33, 1, 1)
2428 ADD_BITFIELD_RO(GPIO32, 0, 1)
2429 END_TYPE()
2430
2431 // Reset value: 0x00000000
2432 BEGIN_TYPE(IRQSUMMARY_PROC1_NONSECURE0_t, uint32_t)
2433 ADD_BITFIELD_RO(GPIO31, 31, 1)
2434 ADD_BITFIELD_RO(GPIO30, 30, 1)
2435 ADD_BITFIELD_RO(GPIO29, 29, 1)
2436 ADD_BITFIELD_RO(GPIO28, 28, 1)
2437 ADD_BITFIELD_RO(GPIO27, 27, 1)
2438 ADD_BITFIELD_RO(GPIO26, 26, 1)
2439 ADD_BITFIELD_RO(GPIO25, 25, 1)
2440 ADD_BITFIELD_RO(GPIO24, 24, 1)
2441 ADD_BITFIELD_RO(GPIO23, 23, 1)
2442 ADD_BITFIELD_RO(GPIO22, 22, 1)
2443 ADD_BITFIELD_RO(GPIO21, 21, 1)
2444 ADD_BITFIELD_RO(GPIO20, 20, 1)
2445 ADD_BITFIELD_RO(GPIO19, 19, 1)
2446 ADD_BITFIELD_RO(GPIO18, 18, 1)
2447 ADD_BITFIELD_RO(GPIO17, 17, 1)
2448 ADD_BITFIELD_RO(GPIO16, 16, 1)
2449 ADD_BITFIELD_RO(GPIO15, 15, 1)
2450 ADD_BITFIELD_RO(GPIO14, 14, 1)
2451 ADD_BITFIELD_RO(GPIO13, 13, 1)
2452 ADD_BITFIELD_RO(GPIO12, 12, 1)
2453 ADD_BITFIELD_RO(GPIO11, 11, 1)
2454 ADD_BITFIELD_RO(GPIO10, 10, 1)
2455 ADD_BITFIELD_RO(GPIO9, 9, 1)
2456 ADD_BITFIELD_RO(GPIO8, 8, 1)
2457 ADD_BITFIELD_RO(GPIO7, 7, 1)
2458 ADD_BITFIELD_RO(GPIO6, 6, 1)
2459 ADD_BITFIELD_RO(GPIO5, 5, 1)
2460 ADD_BITFIELD_RO(GPIO4, 4, 1)
2461 ADD_BITFIELD_RO(GPIO3, 3, 1)
2462 ADD_BITFIELD_RO(GPIO2, 2, 1)
2463 ADD_BITFIELD_RO(GPIO1, 1, 1)
2464 ADD_BITFIELD_RO(GPIO0, 0, 1)
2465 END_TYPE()
2466
2467 // Reset value: 0x00000000
2468 BEGIN_TYPE(IRQSUMMARY_PROC1_NONSECURE1_t, uint32_t)
2469 ADD_BITFIELD_RO(GPIO47, 15, 1)
2470 ADD_BITFIELD_RO(GPIO46, 14, 1)
2471 ADD_BITFIELD_RO(GPIO45, 13, 1)
2472 ADD_BITFIELD_RO(GPIO44, 12, 1)
2473 ADD_BITFIELD_RO(GPIO43, 11, 1)
2474 ADD_BITFIELD_RO(GPIO42, 10, 1)
2475 ADD_BITFIELD_RO(GPIO41, 9, 1)
2476 ADD_BITFIELD_RO(GPIO40, 8, 1)
2477 ADD_BITFIELD_RO(GPIO39, 7, 1)
2478 ADD_BITFIELD_RO(GPIO38, 6, 1)
2479 ADD_BITFIELD_RO(GPIO37, 5, 1)
2480 ADD_BITFIELD_RO(GPIO36, 4, 1)
2481 ADD_BITFIELD_RO(GPIO35, 3, 1)
2482 ADD_BITFIELD_RO(GPIO34, 2, 1)
2483 ADD_BITFIELD_RO(GPIO33, 1, 1)
2484 ADD_BITFIELD_RO(GPIO32, 0, 1)
2485 END_TYPE()
2486
2487 // Reset value: 0x00000000
2488 BEGIN_TYPE(IRQSUMMARY_DORMANT_WAKE_SECURE0_t, uint32_t)
2489 ADD_BITFIELD_RO(GPIO31, 31, 1)
2490 ADD_BITFIELD_RO(GPIO30, 30, 1)
2491 ADD_BITFIELD_RO(GPIO29, 29, 1)
2492 ADD_BITFIELD_RO(GPIO28, 28, 1)
2493 ADD_BITFIELD_RO(GPIO27, 27, 1)
2494 ADD_BITFIELD_RO(GPIO26, 26, 1)
2495 ADD_BITFIELD_RO(GPIO25, 25, 1)
2496 ADD_BITFIELD_RO(GPIO24, 24, 1)
2497 ADD_BITFIELD_RO(GPIO23, 23, 1)
2498 ADD_BITFIELD_RO(GPIO22, 22, 1)
2499 ADD_BITFIELD_RO(GPIO21, 21, 1)
2500 ADD_BITFIELD_RO(GPIO20, 20, 1)
2501 ADD_BITFIELD_RO(GPIO19, 19, 1)
2502 ADD_BITFIELD_RO(GPIO18, 18, 1)
2503 ADD_BITFIELD_RO(GPIO17, 17, 1)
2504 ADD_BITFIELD_RO(GPIO16, 16, 1)
2505 ADD_BITFIELD_RO(GPIO15, 15, 1)
2506 ADD_BITFIELD_RO(GPIO14, 14, 1)
2507 ADD_BITFIELD_RO(GPIO13, 13, 1)
2508 ADD_BITFIELD_RO(GPIO12, 12, 1)
2509 ADD_BITFIELD_RO(GPIO11, 11, 1)
2510 ADD_BITFIELD_RO(GPIO10, 10, 1)
2511 ADD_BITFIELD_RO(GPIO9, 9, 1)
2512 ADD_BITFIELD_RO(GPIO8, 8, 1)
2513 ADD_BITFIELD_RO(GPIO7, 7, 1)
2514 ADD_BITFIELD_RO(GPIO6, 6, 1)
2515 ADD_BITFIELD_RO(GPIO5, 5, 1)
2516 ADD_BITFIELD_RO(GPIO4, 4, 1)
2517 ADD_BITFIELD_RO(GPIO3, 3, 1)
2518 ADD_BITFIELD_RO(GPIO2, 2, 1)
2519 ADD_BITFIELD_RO(GPIO1, 1, 1)
2520 ADD_BITFIELD_RO(GPIO0, 0, 1)
2521 END_TYPE()
2522
2523 // Reset value: 0x00000000
2524 BEGIN_TYPE(IRQSUMMARY_DORMANT_WAKE_SECURE1_t, uint32_t)
2525 ADD_BITFIELD_RO(GPIO47, 15, 1)
2526 ADD_BITFIELD_RO(GPIO46, 14, 1)
2527 ADD_BITFIELD_RO(GPIO45, 13, 1)
2528 ADD_BITFIELD_RO(GPIO44, 12, 1)
2529 ADD_BITFIELD_RO(GPIO43, 11, 1)
2530 ADD_BITFIELD_RO(GPIO42, 10, 1)
2531 ADD_BITFIELD_RO(GPIO41, 9, 1)
2532 ADD_BITFIELD_RO(GPIO40, 8, 1)
2533 ADD_BITFIELD_RO(GPIO39, 7, 1)
2534 ADD_BITFIELD_RO(GPIO38, 6, 1)
2535 ADD_BITFIELD_RO(GPIO37, 5, 1)
2536 ADD_BITFIELD_RO(GPIO36, 4, 1)
2537 ADD_BITFIELD_RO(GPIO35, 3, 1)
2538 ADD_BITFIELD_RO(GPIO34, 2, 1)
2539 ADD_BITFIELD_RO(GPIO33, 1, 1)
2540 ADD_BITFIELD_RO(GPIO32, 0, 1)
2541 END_TYPE()
2542
2543 // Reset value: 0x00000000
2544 BEGIN_TYPE(IRQSUMMARY_DORMANT_WAKE_NONSECURE0_t, uint32_t)
2545 ADD_BITFIELD_RO(GPIO31, 31, 1)
2546 ADD_BITFIELD_RO(GPIO30, 30, 1)
2547 ADD_BITFIELD_RO(GPIO29, 29, 1)
2548 ADD_BITFIELD_RO(GPIO28, 28, 1)
2549 ADD_BITFIELD_RO(GPIO27, 27, 1)
2550 ADD_BITFIELD_RO(GPIO26, 26, 1)
2551 ADD_BITFIELD_RO(GPIO25, 25, 1)
2552 ADD_BITFIELD_RO(GPIO24, 24, 1)
2553 ADD_BITFIELD_RO(GPIO23, 23, 1)
2554 ADD_BITFIELD_RO(GPIO22, 22, 1)
2555 ADD_BITFIELD_RO(GPIO21, 21, 1)
2556 ADD_BITFIELD_RO(GPIO20, 20, 1)
2557 ADD_BITFIELD_RO(GPIO19, 19, 1)
2558 ADD_BITFIELD_RO(GPIO18, 18, 1)
2559 ADD_BITFIELD_RO(GPIO17, 17, 1)
2560 ADD_BITFIELD_RO(GPIO16, 16, 1)
2561 ADD_BITFIELD_RO(GPIO15, 15, 1)
2562 ADD_BITFIELD_RO(GPIO14, 14, 1)
2563 ADD_BITFIELD_RO(GPIO13, 13, 1)
2564 ADD_BITFIELD_RO(GPIO12, 12, 1)
2565 ADD_BITFIELD_RO(GPIO11, 11, 1)
2566 ADD_BITFIELD_RO(GPIO10, 10, 1)
2567 ADD_BITFIELD_RO(GPIO9, 9, 1)
2568 ADD_BITFIELD_RO(GPIO8, 8, 1)
2569 ADD_BITFIELD_RO(GPIO7, 7, 1)
2570 ADD_BITFIELD_RO(GPIO6, 6, 1)
2571 ADD_BITFIELD_RO(GPIO5, 5, 1)
2572 ADD_BITFIELD_RO(GPIO4, 4, 1)
2573 ADD_BITFIELD_RO(GPIO3, 3, 1)
2574 ADD_BITFIELD_RO(GPIO2, 2, 1)
2575 ADD_BITFIELD_RO(GPIO1, 1, 1)
2576 ADD_BITFIELD_RO(GPIO0, 0, 1)
2577 END_TYPE()
2578
2579 // Reset value: 0x00000000
2580 BEGIN_TYPE(IRQSUMMARY_DORMANT_WAKE_NONSECURE1_t, uint32_t)
2581 ADD_BITFIELD_RO(GPIO47, 15, 1)
2582 ADD_BITFIELD_RO(GPIO46, 14, 1)
2583 ADD_BITFIELD_RO(GPIO45, 13, 1)
2584 ADD_BITFIELD_RO(GPIO44, 12, 1)
2585 ADD_BITFIELD_RO(GPIO43, 11, 1)
2586 ADD_BITFIELD_RO(GPIO42, 10, 1)
2587 ADD_BITFIELD_RO(GPIO41, 9, 1)
2588 ADD_BITFIELD_RO(GPIO40, 8, 1)
2589 ADD_BITFIELD_RO(GPIO39, 7, 1)
2590 ADD_BITFIELD_RO(GPIO38, 6, 1)
2591 ADD_BITFIELD_RO(GPIO37, 5, 1)
2592 ADD_BITFIELD_RO(GPIO36, 4, 1)
2593 ADD_BITFIELD_RO(GPIO35, 3, 1)
2594 ADD_BITFIELD_RO(GPIO34, 2, 1)
2595 ADD_BITFIELD_RO(GPIO33, 1, 1)
2596 ADD_BITFIELD_RO(GPIO32, 0, 1)
2597 END_TYPE()
2598
2599 // Raw Interrupts
2600 // Reset value: 0x00000000
2601 BEGIN_TYPE(INTR0_t, uint32_t)
2602 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
2603 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
2604 ADD_BITFIELD_RO(GPIO7_LEVEL_HIGH, 29, 1)
2605 ADD_BITFIELD_RO(GPIO7_LEVEL_LOW, 28, 1)
2606 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
2607 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
2608 ADD_BITFIELD_RO(GPIO6_LEVEL_HIGH, 25, 1)
2609 ADD_BITFIELD_RO(GPIO6_LEVEL_LOW, 24, 1)
2610 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
2611 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
2612 ADD_BITFIELD_RO(GPIO5_LEVEL_HIGH, 21, 1)
2613 ADD_BITFIELD_RO(GPIO5_LEVEL_LOW, 20, 1)
2614 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
2615 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
2616 ADD_BITFIELD_RO(GPIO4_LEVEL_HIGH, 17, 1)
2617 ADD_BITFIELD_RO(GPIO4_LEVEL_LOW, 16, 1)
2618 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
2619 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
2620 ADD_BITFIELD_RO(GPIO3_LEVEL_HIGH, 13, 1)
2621 ADD_BITFIELD_RO(GPIO3_LEVEL_LOW, 12, 1)
2622 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
2623 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
2624 ADD_BITFIELD_RO(GPIO2_LEVEL_HIGH, 9, 1)
2625 ADD_BITFIELD_RO(GPIO2_LEVEL_LOW, 8, 1)
2626 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
2627 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
2628 ADD_BITFIELD_RO(GPIO1_LEVEL_HIGH, 5, 1)
2629 ADD_BITFIELD_RO(GPIO1_LEVEL_LOW, 4, 1)
2630 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
2631 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
2632 ADD_BITFIELD_RO(GPIO0_LEVEL_HIGH, 1, 1)
2633 ADD_BITFIELD_RO(GPIO0_LEVEL_LOW, 0, 1)
2634 END_TYPE()
2635
2636 // Raw Interrupts
2637 // Reset value: 0x00000000
2638 BEGIN_TYPE(INTR1_t, uint32_t)
2639 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
2640 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
2641 ADD_BITFIELD_RO(GPIO15_LEVEL_HIGH, 29, 1)
2642 ADD_BITFIELD_RO(GPIO15_LEVEL_LOW, 28, 1)
2643 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
2644 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
2645 ADD_BITFIELD_RO(GPIO14_LEVEL_HIGH, 25, 1)
2646 ADD_BITFIELD_RO(GPIO14_LEVEL_LOW, 24, 1)
2647 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
2648 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
2649 ADD_BITFIELD_RO(GPIO13_LEVEL_HIGH, 21, 1)
2650 ADD_BITFIELD_RO(GPIO13_LEVEL_LOW, 20, 1)
2651 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
2652 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
2653 ADD_BITFIELD_RO(GPIO12_LEVEL_HIGH, 17, 1)
2654 ADD_BITFIELD_RO(GPIO12_LEVEL_LOW, 16, 1)
2655 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
2656 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
2657 ADD_BITFIELD_RO(GPIO11_LEVEL_HIGH, 13, 1)
2658 ADD_BITFIELD_RO(GPIO11_LEVEL_LOW, 12, 1)
2659 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
2660 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
2661 ADD_BITFIELD_RO(GPIO10_LEVEL_HIGH, 9, 1)
2662 ADD_BITFIELD_RO(GPIO10_LEVEL_LOW, 8, 1)
2663 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
2664 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
2665 ADD_BITFIELD_RO(GPIO9_LEVEL_HIGH, 5, 1)
2666 ADD_BITFIELD_RO(GPIO9_LEVEL_LOW, 4, 1)
2667 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
2668 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
2669 ADD_BITFIELD_RO(GPIO8_LEVEL_HIGH, 1, 1)
2670 ADD_BITFIELD_RO(GPIO8_LEVEL_LOW, 0, 1)
2671 END_TYPE()
2672
2673 // Raw Interrupts
2674 // Reset value: 0x00000000
2675 BEGIN_TYPE(INTR2_t, uint32_t)
2676 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
2677 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
2678 ADD_BITFIELD_RO(GPIO23_LEVEL_HIGH, 29, 1)
2679 ADD_BITFIELD_RO(GPIO23_LEVEL_LOW, 28, 1)
2680 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
2681 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
2682 ADD_BITFIELD_RO(GPIO22_LEVEL_HIGH, 25, 1)
2683 ADD_BITFIELD_RO(GPIO22_LEVEL_LOW, 24, 1)
2684 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
2685 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
2686 ADD_BITFIELD_RO(GPIO21_LEVEL_HIGH, 21, 1)
2687 ADD_BITFIELD_RO(GPIO21_LEVEL_LOW, 20, 1)
2688 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
2689 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
2690 ADD_BITFIELD_RO(GPIO20_LEVEL_HIGH, 17, 1)
2691 ADD_BITFIELD_RO(GPIO20_LEVEL_LOW, 16, 1)
2692 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
2693 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
2694 ADD_BITFIELD_RO(GPIO19_LEVEL_HIGH, 13, 1)
2695 ADD_BITFIELD_RO(GPIO19_LEVEL_LOW, 12, 1)
2696 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
2697 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
2698 ADD_BITFIELD_RO(GPIO18_LEVEL_HIGH, 9, 1)
2699 ADD_BITFIELD_RO(GPIO18_LEVEL_LOW, 8, 1)
2700 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
2701 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
2702 ADD_BITFIELD_RO(GPIO17_LEVEL_HIGH, 5, 1)
2703 ADD_BITFIELD_RO(GPIO17_LEVEL_LOW, 4, 1)
2704 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
2705 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
2706 ADD_BITFIELD_RO(GPIO16_LEVEL_HIGH, 1, 1)
2707 ADD_BITFIELD_RO(GPIO16_LEVEL_LOW, 0, 1)
2708 END_TYPE()
2709
2710 // Raw Interrupts
2711 // Reset value: 0x00000000
2712 BEGIN_TYPE(INTR3_t, uint32_t)
2713 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
2714 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
2715 ADD_BITFIELD_RO(GPIO31_LEVEL_HIGH, 29, 1)
2716 ADD_BITFIELD_RO(GPIO31_LEVEL_LOW, 28, 1)
2717 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
2718 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
2719 ADD_BITFIELD_RO(GPIO30_LEVEL_HIGH, 25, 1)
2720 ADD_BITFIELD_RO(GPIO30_LEVEL_LOW, 24, 1)
2721 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
2722 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
2723 ADD_BITFIELD_RO(GPIO29_LEVEL_HIGH, 21, 1)
2724 ADD_BITFIELD_RO(GPIO29_LEVEL_LOW, 20, 1)
2725 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
2726 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
2727 ADD_BITFIELD_RO(GPIO28_LEVEL_HIGH, 17, 1)
2728 ADD_BITFIELD_RO(GPIO28_LEVEL_LOW, 16, 1)
2729 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
2730 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
2731 ADD_BITFIELD_RO(GPIO27_LEVEL_HIGH, 13, 1)
2732 ADD_BITFIELD_RO(GPIO27_LEVEL_LOW, 12, 1)
2733 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
2734 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
2735 ADD_BITFIELD_RO(GPIO26_LEVEL_HIGH, 9, 1)
2736 ADD_BITFIELD_RO(GPIO26_LEVEL_LOW, 8, 1)
2737 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
2738 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
2739 ADD_BITFIELD_RO(GPIO25_LEVEL_HIGH, 5, 1)
2740 ADD_BITFIELD_RO(GPIO25_LEVEL_LOW, 4, 1)
2741 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
2742 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
2743 ADD_BITFIELD_RO(GPIO24_LEVEL_HIGH, 1, 1)
2744 ADD_BITFIELD_RO(GPIO24_LEVEL_LOW, 0, 1)
2745 END_TYPE()
2746
2747 // Raw Interrupts
2748 // Reset value: 0x00000000
2749 BEGIN_TYPE(INTR4_t, uint32_t)
2750 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
2751 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
2752 ADD_BITFIELD_RO(GPIO39_LEVEL_HIGH, 29, 1)
2753 ADD_BITFIELD_RO(GPIO39_LEVEL_LOW, 28, 1)
2754 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
2755 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
2756 ADD_BITFIELD_RO(GPIO38_LEVEL_HIGH, 25, 1)
2757 ADD_BITFIELD_RO(GPIO38_LEVEL_LOW, 24, 1)
2758 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
2759 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
2760 ADD_BITFIELD_RO(GPIO37_LEVEL_HIGH, 21, 1)
2761 ADD_BITFIELD_RO(GPIO37_LEVEL_LOW, 20, 1)
2762 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
2763 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
2764 ADD_BITFIELD_RO(GPIO36_LEVEL_HIGH, 17, 1)
2765 ADD_BITFIELD_RO(GPIO36_LEVEL_LOW, 16, 1)
2766 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
2767 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
2768 ADD_BITFIELD_RO(GPIO35_LEVEL_HIGH, 13, 1)
2769 ADD_BITFIELD_RO(GPIO35_LEVEL_LOW, 12, 1)
2770 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
2771 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
2772 ADD_BITFIELD_RO(GPIO34_LEVEL_HIGH, 9, 1)
2773 ADD_BITFIELD_RO(GPIO34_LEVEL_LOW, 8, 1)
2774 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
2775 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
2776 ADD_BITFIELD_RO(GPIO33_LEVEL_HIGH, 5, 1)
2777 ADD_BITFIELD_RO(GPIO33_LEVEL_LOW, 4, 1)
2778 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
2779 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
2780 ADD_BITFIELD_RO(GPIO32_LEVEL_HIGH, 1, 1)
2781 ADD_BITFIELD_RO(GPIO32_LEVEL_LOW, 0, 1)
2782 END_TYPE()
2783
2784 // Raw Interrupts
2785 // Reset value: 0x00000000
2786 BEGIN_TYPE(INTR5_t, uint32_t)
2787 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
2788 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
2789 ADD_BITFIELD_RO(GPIO47_LEVEL_HIGH, 29, 1)
2790 ADD_BITFIELD_RO(GPIO47_LEVEL_LOW, 28, 1)
2791 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
2792 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
2793 ADD_BITFIELD_RO(GPIO46_LEVEL_HIGH, 25, 1)
2794 ADD_BITFIELD_RO(GPIO46_LEVEL_LOW, 24, 1)
2795 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
2796 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
2797 ADD_BITFIELD_RO(GPIO45_LEVEL_HIGH, 21, 1)
2798 ADD_BITFIELD_RO(GPIO45_LEVEL_LOW, 20, 1)
2799 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
2800 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
2801 ADD_BITFIELD_RO(GPIO44_LEVEL_HIGH, 17, 1)
2802 ADD_BITFIELD_RO(GPIO44_LEVEL_LOW, 16, 1)
2803 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
2804 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
2805 ADD_BITFIELD_RO(GPIO43_LEVEL_HIGH, 13, 1)
2806 ADD_BITFIELD_RO(GPIO43_LEVEL_LOW, 12, 1)
2807 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
2808 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
2809 ADD_BITFIELD_RO(GPIO42_LEVEL_HIGH, 9, 1)
2810 ADD_BITFIELD_RO(GPIO42_LEVEL_LOW, 8, 1)
2811 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
2812 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
2813 ADD_BITFIELD_RO(GPIO41_LEVEL_HIGH, 5, 1)
2814 ADD_BITFIELD_RO(GPIO41_LEVEL_LOW, 4, 1)
2815 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
2816 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
2817 ADD_BITFIELD_RO(GPIO40_LEVEL_HIGH, 1, 1)
2818 ADD_BITFIELD_RO(GPIO40_LEVEL_LOW, 0, 1)
2819 END_TYPE()
2820
2821 // Interrupt Enable for proc0
2822 // Reset value: 0x00000000
2823 BEGIN_TYPE(PROC0_INTE0_t, uint32_t)
2824 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
2825 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
2826 ADD_BITFIELD_RW(GPIO7_LEVEL_HIGH, 29, 1)
2827 ADD_BITFIELD_RW(GPIO7_LEVEL_LOW, 28, 1)
2828 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
2829 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
2830 ADD_BITFIELD_RW(GPIO6_LEVEL_HIGH, 25, 1)
2831 ADD_BITFIELD_RW(GPIO6_LEVEL_LOW, 24, 1)
2832 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
2833 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
2834 ADD_BITFIELD_RW(GPIO5_LEVEL_HIGH, 21, 1)
2835 ADD_BITFIELD_RW(GPIO5_LEVEL_LOW, 20, 1)
2836 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
2837 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
2838 ADD_BITFIELD_RW(GPIO4_LEVEL_HIGH, 17, 1)
2839 ADD_BITFIELD_RW(GPIO4_LEVEL_LOW, 16, 1)
2840 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
2841 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
2842 ADD_BITFIELD_RW(GPIO3_LEVEL_HIGH, 13, 1)
2843 ADD_BITFIELD_RW(GPIO3_LEVEL_LOW, 12, 1)
2844 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
2845 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
2846 ADD_BITFIELD_RW(GPIO2_LEVEL_HIGH, 9, 1)
2847 ADD_BITFIELD_RW(GPIO2_LEVEL_LOW, 8, 1)
2848 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
2849 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
2850 ADD_BITFIELD_RW(GPIO1_LEVEL_HIGH, 5, 1)
2851 ADD_BITFIELD_RW(GPIO1_LEVEL_LOW, 4, 1)
2852 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
2853 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
2854 ADD_BITFIELD_RW(GPIO0_LEVEL_HIGH, 1, 1)
2855 ADD_BITFIELD_RW(GPIO0_LEVEL_LOW, 0, 1)
2856 END_TYPE()
2857
2858 // Interrupt Enable for proc0
2859 // Reset value: 0x00000000
2860 BEGIN_TYPE(PROC0_INTE1_t, uint32_t)
2861 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
2862 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
2863 ADD_BITFIELD_RW(GPIO15_LEVEL_HIGH, 29, 1)
2864 ADD_BITFIELD_RW(GPIO15_LEVEL_LOW, 28, 1)
2865 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
2866 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
2867 ADD_BITFIELD_RW(GPIO14_LEVEL_HIGH, 25, 1)
2868 ADD_BITFIELD_RW(GPIO14_LEVEL_LOW, 24, 1)
2869 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
2870 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
2871 ADD_BITFIELD_RW(GPIO13_LEVEL_HIGH, 21, 1)
2872 ADD_BITFIELD_RW(GPIO13_LEVEL_LOW, 20, 1)
2873 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
2874 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
2875 ADD_BITFIELD_RW(GPIO12_LEVEL_HIGH, 17, 1)
2876 ADD_BITFIELD_RW(GPIO12_LEVEL_LOW, 16, 1)
2877 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
2878 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
2879 ADD_BITFIELD_RW(GPIO11_LEVEL_HIGH, 13, 1)
2880 ADD_BITFIELD_RW(GPIO11_LEVEL_LOW, 12, 1)
2881 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
2882 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
2883 ADD_BITFIELD_RW(GPIO10_LEVEL_HIGH, 9, 1)
2884 ADD_BITFIELD_RW(GPIO10_LEVEL_LOW, 8, 1)
2885 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
2886 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
2887 ADD_BITFIELD_RW(GPIO9_LEVEL_HIGH, 5, 1)
2888 ADD_BITFIELD_RW(GPIO9_LEVEL_LOW, 4, 1)
2889 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
2890 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
2891 ADD_BITFIELD_RW(GPIO8_LEVEL_HIGH, 1, 1)
2892 ADD_BITFIELD_RW(GPIO8_LEVEL_LOW, 0, 1)
2893 END_TYPE()
2894
2895 // Interrupt Enable for proc0
2896 // Reset value: 0x00000000
2897 BEGIN_TYPE(PROC0_INTE2_t, uint32_t)
2898 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
2899 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
2900 ADD_BITFIELD_RW(GPIO23_LEVEL_HIGH, 29, 1)
2901 ADD_BITFIELD_RW(GPIO23_LEVEL_LOW, 28, 1)
2902 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
2903 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
2904 ADD_BITFIELD_RW(GPIO22_LEVEL_HIGH, 25, 1)
2905 ADD_BITFIELD_RW(GPIO22_LEVEL_LOW, 24, 1)
2906 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
2907 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
2908 ADD_BITFIELD_RW(GPIO21_LEVEL_HIGH, 21, 1)
2909 ADD_BITFIELD_RW(GPIO21_LEVEL_LOW, 20, 1)
2910 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
2911 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
2912 ADD_BITFIELD_RW(GPIO20_LEVEL_HIGH, 17, 1)
2913 ADD_BITFIELD_RW(GPIO20_LEVEL_LOW, 16, 1)
2914 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
2915 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
2916 ADD_BITFIELD_RW(GPIO19_LEVEL_HIGH, 13, 1)
2917 ADD_BITFIELD_RW(GPIO19_LEVEL_LOW, 12, 1)
2918 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
2919 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
2920 ADD_BITFIELD_RW(GPIO18_LEVEL_HIGH, 9, 1)
2921 ADD_BITFIELD_RW(GPIO18_LEVEL_LOW, 8, 1)
2922 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
2923 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
2924 ADD_BITFIELD_RW(GPIO17_LEVEL_HIGH, 5, 1)
2925 ADD_BITFIELD_RW(GPIO17_LEVEL_LOW, 4, 1)
2926 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
2927 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
2928 ADD_BITFIELD_RW(GPIO16_LEVEL_HIGH, 1, 1)
2929 ADD_BITFIELD_RW(GPIO16_LEVEL_LOW, 0, 1)
2930 END_TYPE()
2931
2932 // Interrupt Enable for proc0
2933 // Reset value: 0x00000000
2934 BEGIN_TYPE(PROC0_INTE3_t, uint32_t)
2935 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
2936 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
2937 ADD_BITFIELD_RW(GPIO31_LEVEL_HIGH, 29, 1)
2938 ADD_BITFIELD_RW(GPIO31_LEVEL_LOW, 28, 1)
2939 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
2940 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
2941 ADD_BITFIELD_RW(GPIO30_LEVEL_HIGH, 25, 1)
2942 ADD_BITFIELD_RW(GPIO30_LEVEL_LOW, 24, 1)
2943 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
2944 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
2945 ADD_BITFIELD_RW(GPIO29_LEVEL_HIGH, 21, 1)
2946 ADD_BITFIELD_RW(GPIO29_LEVEL_LOW, 20, 1)
2947 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
2948 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
2949 ADD_BITFIELD_RW(GPIO28_LEVEL_HIGH, 17, 1)
2950 ADD_BITFIELD_RW(GPIO28_LEVEL_LOW, 16, 1)
2951 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
2952 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
2953 ADD_BITFIELD_RW(GPIO27_LEVEL_HIGH, 13, 1)
2954 ADD_BITFIELD_RW(GPIO27_LEVEL_LOW, 12, 1)
2955 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
2956 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
2957 ADD_BITFIELD_RW(GPIO26_LEVEL_HIGH, 9, 1)
2958 ADD_BITFIELD_RW(GPIO26_LEVEL_LOW, 8, 1)
2959 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
2960 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
2961 ADD_BITFIELD_RW(GPIO25_LEVEL_HIGH, 5, 1)
2962 ADD_BITFIELD_RW(GPIO25_LEVEL_LOW, 4, 1)
2963 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
2964 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
2965 ADD_BITFIELD_RW(GPIO24_LEVEL_HIGH, 1, 1)
2966 ADD_BITFIELD_RW(GPIO24_LEVEL_LOW, 0, 1)
2967 END_TYPE()
2968
2969 // Interrupt Enable for proc0
2970 // Reset value: 0x00000000
2971 BEGIN_TYPE(PROC0_INTE4_t, uint32_t)
2972 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
2973 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
2974 ADD_BITFIELD_RW(GPIO39_LEVEL_HIGH, 29, 1)
2975 ADD_BITFIELD_RW(GPIO39_LEVEL_LOW, 28, 1)
2976 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
2977 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
2978 ADD_BITFIELD_RW(GPIO38_LEVEL_HIGH, 25, 1)
2979 ADD_BITFIELD_RW(GPIO38_LEVEL_LOW, 24, 1)
2980 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
2981 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
2982 ADD_BITFIELD_RW(GPIO37_LEVEL_HIGH, 21, 1)
2983 ADD_BITFIELD_RW(GPIO37_LEVEL_LOW, 20, 1)
2984 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
2985 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
2986 ADD_BITFIELD_RW(GPIO36_LEVEL_HIGH, 17, 1)
2987 ADD_BITFIELD_RW(GPIO36_LEVEL_LOW, 16, 1)
2988 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
2989 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
2990 ADD_BITFIELD_RW(GPIO35_LEVEL_HIGH, 13, 1)
2991 ADD_BITFIELD_RW(GPIO35_LEVEL_LOW, 12, 1)
2992 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
2993 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
2994 ADD_BITFIELD_RW(GPIO34_LEVEL_HIGH, 9, 1)
2995 ADD_BITFIELD_RW(GPIO34_LEVEL_LOW, 8, 1)
2996 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
2997 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
2998 ADD_BITFIELD_RW(GPIO33_LEVEL_HIGH, 5, 1)
2999 ADD_BITFIELD_RW(GPIO33_LEVEL_LOW, 4, 1)
3000 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
3001 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
3002 ADD_BITFIELD_RW(GPIO32_LEVEL_HIGH, 1, 1)
3003 ADD_BITFIELD_RW(GPIO32_LEVEL_LOW, 0, 1)
3004 END_TYPE()
3005
3006 // Interrupt Enable for proc0
3007 // Reset value: 0x00000000
3008 BEGIN_TYPE(PROC0_INTE5_t, uint32_t)
3009 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
3010 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
3011 ADD_BITFIELD_RW(GPIO47_LEVEL_HIGH, 29, 1)
3012 ADD_BITFIELD_RW(GPIO47_LEVEL_LOW, 28, 1)
3013 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
3014 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
3015 ADD_BITFIELD_RW(GPIO46_LEVEL_HIGH, 25, 1)
3016 ADD_BITFIELD_RW(GPIO46_LEVEL_LOW, 24, 1)
3017 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
3018 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
3019 ADD_BITFIELD_RW(GPIO45_LEVEL_HIGH, 21, 1)
3020 ADD_BITFIELD_RW(GPIO45_LEVEL_LOW, 20, 1)
3021 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
3022 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
3023 ADD_BITFIELD_RW(GPIO44_LEVEL_HIGH, 17, 1)
3024 ADD_BITFIELD_RW(GPIO44_LEVEL_LOW, 16, 1)
3025 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
3026 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
3027 ADD_BITFIELD_RW(GPIO43_LEVEL_HIGH, 13, 1)
3028 ADD_BITFIELD_RW(GPIO43_LEVEL_LOW, 12, 1)
3029 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
3030 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
3031 ADD_BITFIELD_RW(GPIO42_LEVEL_HIGH, 9, 1)
3032 ADD_BITFIELD_RW(GPIO42_LEVEL_LOW, 8, 1)
3033 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
3034 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
3035 ADD_BITFIELD_RW(GPIO41_LEVEL_HIGH, 5, 1)
3036 ADD_BITFIELD_RW(GPIO41_LEVEL_LOW, 4, 1)
3037 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
3038 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
3039 ADD_BITFIELD_RW(GPIO40_LEVEL_HIGH, 1, 1)
3040 ADD_BITFIELD_RW(GPIO40_LEVEL_LOW, 0, 1)
3041 END_TYPE()
3042
3043 // Interrupt Force for proc0
3044 // Reset value: 0x00000000
3045 BEGIN_TYPE(PROC0_INTF0_t, uint32_t)
3046 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
3047 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
3048 ADD_BITFIELD_RW(GPIO7_LEVEL_HIGH, 29, 1)
3049 ADD_BITFIELD_RW(GPIO7_LEVEL_LOW, 28, 1)
3050 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
3051 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
3052 ADD_BITFIELD_RW(GPIO6_LEVEL_HIGH, 25, 1)
3053 ADD_BITFIELD_RW(GPIO6_LEVEL_LOW, 24, 1)
3054 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
3055 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
3056 ADD_BITFIELD_RW(GPIO5_LEVEL_HIGH, 21, 1)
3057 ADD_BITFIELD_RW(GPIO5_LEVEL_LOW, 20, 1)
3058 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
3059 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
3060 ADD_BITFIELD_RW(GPIO4_LEVEL_HIGH, 17, 1)
3061 ADD_BITFIELD_RW(GPIO4_LEVEL_LOW, 16, 1)
3062 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
3063 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
3064 ADD_BITFIELD_RW(GPIO3_LEVEL_HIGH, 13, 1)
3065 ADD_BITFIELD_RW(GPIO3_LEVEL_LOW, 12, 1)
3066 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
3067 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
3068 ADD_BITFIELD_RW(GPIO2_LEVEL_HIGH, 9, 1)
3069 ADD_BITFIELD_RW(GPIO2_LEVEL_LOW, 8, 1)
3070 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
3071 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
3072 ADD_BITFIELD_RW(GPIO1_LEVEL_HIGH, 5, 1)
3073 ADD_BITFIELD_RW(GPIO1_LEVEL_LOW, 4, 1)
3074 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
3075 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
3076 ADD_BITFIELD_RW(GPIO0_LEVEL_HIGH, 1, 1)
3077 ADD_BITFIELD_RW(GPIO0_LEVEL_LOW, 0, 1)
3078 END_TYPE()
3079
3080 // Interrupt Force for proc0
3081 // Reset value: 0x00000000
3082 BEGIN_TYPE(PROC0_INTF1_t, uint32_t)
3083 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
3084 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
3085 ADD_BITFIELD_RW(GPIO15_LEVEL_HIGH, 29, 1)
3086 ADD_BITFIELD_RW(GPIO15_LEVEL_LOW, 28, 1)
3087 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
3088 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
3089 ADD_BITFIELD_RW(GPIO14_LEVEL_HIGH, 25, 1)
3090 ADD_BITFIELD_RW(GPIO14_LEVEL_LOW, 24, 1)
3091 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
3092 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
3093 ADD_BITFIELD_RW(GPIO13_LEVEL_HIGH, 21, 1)
3094 ADD_BITFIELD_RW(GPIO13_LEVEL_LOW, 20, 1)
3095 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
3096 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
3097 ADD_BITFIELD_RW(GPIO12_LEVEL_HIGH, 17, 1)
3098 ADD_BITFIELD_RW(GPIO12_LEVEL_LOW, 16, 1)
3099 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
3100 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
3101 ADD_BITFIELD_RW(GPIO11_LEVEL_HIGH, 13, 1)
3102 ADD_BITFIELD_RW(GPIO11_LEVEL_LOW, 12, 1)
3103 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
3104 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
3105 ADD_BITFIELD_RW(GPIO10_LEVEL_HIGH, 9, 1)
3106 ADD_BITFIELD_RW(GPIO10_LEVEL_LOW, 8, 1)
3107 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
3108 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
3109 ADD_BITFIELD_RW(GPIO9_LEVEL_HIGH, 5, 1)
3110 ADD_BITFIELD_RW(GPIO9_LEVEL_LOW, 4, 1)
3111 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
3112 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
3113 ADD_BITFIELD_RW(GPIO8_LEVEL_HIGH, 1, 1)
3114 ADD_BITFIELD_RW(GPIO8_LEVEL_LOW, 0, 1)
3115 END_TYPE()
3116
3117 // Interrupt Force for proc0
3118 // Reset value: 0x00000000
3119 BEGIN_TYPE(PROC0_INTF2_t, uint32_t)
3120 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
3121 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
3122 ADD_BITFIELD_RW(GPIO23_LEVEL_HIGH, 29, 1)
3123 ADD_BITFIELD_RW(GPIO23_LEVEL_LOW, 28, 1)
3124 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
3125 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
3126 ADD_BITFIELD_RW(GPIO22_LEVEL_HIGH, 25, 1)
3127 ADD_BITFIELD_RW(GPIO22_LEVEL_LOW, 24, 1)
3128 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
3129 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
3130 ADD_BITFIELD_RW(GPIO21_LEVEL_HIGH, 21, 1)
3131 ADD_BITFIELD_RW(GPIO21_LEVEL_LOW, 20, 1)
3132 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
3133 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
3134 ADD_BITFIELD_RW(GPIO20_LEVEL_HIGH, 17, 1)
3135 ADD_BITFIELD_RW(GPIO20_LEVEL_LOW, 16, 1)
3136 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
3137 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
3138 ADD_BITFIELD_RW(GPIO19_LEVEL_HIGH, 13, 1)
3139 ADD_BITFIELD_RW(GPIO19_LEVEL_LOW, 12, 1)
3140 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
3141 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
3142 ADD_BITFIELD_RW(GPIO18_LEVEL_HIGH, 9, 1)
3143 ADD_BITFIELD_RW(GPIO18_LEVEL_LOW, 8, 1)
3144 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
3145 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
3146 ADD_BITFIELD_RW(GPIO17_LEVEL_HIGH, 5, 1)
3147 ADD_BITFIELD_RW(GPIO17_LEVEL_LOW, 4, 1)
3148 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
3149 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
3150 ADD_BITFIELD_RW(GPIO16_LEVEL_HIGH, 1, 1)
3151 ADD_BITFIELD_RW(GPIO16_LEVEL_LOW, 0, 1)
3152 END_TYPE()
3153
3154 // Interrupt Force for proc0
3155 // Reset value: 0x00000000
3156 BEGIN_TYPE(PROC0_INTF3_t, uint32_t)
3157 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
3158 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
3159 ADD_BITFIELD_RW(GPIO31_LEVEL_HIGH, 29, 1)
3160 ADD_BITFIELD_RW(GPIO31_LEVEL_LOW, 28, 1)
3161 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
3162 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
3163 ADD_BITFIELD_RW(GPIO30_LEVEL_HIGH, 25, 1)
3164 ADD_BITFIELD_RW(GPIO30_LEVEL_LOW, 24, 1)
3165 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
3166 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
3167 ADD_BITFIELD_RW(GPIO29_LEVEL_HIGH, 21, 1)
3168 ADD_BITFIELD_RW(GPIO29_LEVEL_LOW, 20, 1)
3169 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
3170 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
3171 ADD_BITFIELD_RW(GPIO28_LEVEL_HIGH, 17, 1)
3172 ADD_BITFIELD_RW(GPIO28_LEVEL_LOW, 16, 1)
3173 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
3174 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
3175 ADD_BITFIELD_RW(GPIO27_LEVEL_HIGH, 13, 1)
3176 ADD_BITFIELD_RW(GPIO27_LEVEL_LOW, 12, 1)
3177 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
3178 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
3179 ADD_BITFIELD_RW(GPIO26_LEVEL_HIGH, 9, 1)
3180 ADD_BITFIELD_RW(GPIO26_LEVEL_LOW, 8, 1)
3181 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
3182 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
3183 ADD_BITFIELD_RW(GPIO25_LEVEL_HIGH, 5, 1)
3184 ADD_BITFIELD_RW(GPIO25_LEVEL_LOW, 4, 1)
3185 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
3186 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
3187 ADD_BITFIELD_RW(GPIO24_LEVEL_HIGH, 1, 1)
3188 ADD_BITFIELD_RW(GPIO24_LEVEL_LOW, 0, 1)
3189 END_TYPE()
3190
3191 // Interrupt Force for proc0
3192 // Reset value: 0x00000000
3193 BEGIN_TYPE(PROC0_INTF4_t, uint32_t)
3194 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
3195 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
3196 ADD_BITFIELD_RW(GPIO39_LEVEL_HIGH, 29, 1)
3197 ADD_BITFIELD_RW(GPIO39_LEVEL_LOW, 28, 1)
3198 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
3199 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
3200 ADD_BITFIELD_RW(GPIO38_LEVEL_HIGH, 25, 1)
3201 ADD_BITFIELD_RW(GPIO38_LEVEL_LOW, 24, 1)
3202 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
3203 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
3204 ADD_BITFIELD_RW(GPIO37_LEVEL_HIGH, 21, 1)
3205 ADD_BITFIELD_RW(GPIO37_LEVEL_LOW, 20, 1)
3206 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
3207 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
3208 ADD_BITFIELD_RW(GPIO36_LEVEL_HIGH, 17, 1)
3209 ADD_BITFIELD_RW(GPIO36_LEVEL_LOW, 16, 1)
3210 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
3211 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
3212 ADD_BITFIELD_RW(GPIO35_LEVEL_HIGH, 13, 1)
3213 ADD_BITFIELD_RW(GPIO35_LEVEL_LOW, 12, 1)
3214 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
3215 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
3216 ADD_BITFIELD_RW(GPIO34_LEVEL_HIGH, 9, 1)
3217 ADD_BITFIELD_RW(GPIO34_LEVEL_LOW, 8, 1)
3218 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
3219 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
3220 ADD_BITFIELD_RW(GPIO33_LEVEL_HIGH, 5, 1)
3221 ADD_BITFIELD_RW(GPIO33_LEVEL_LOW, 4, 1)
3222 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
3223 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
3224 ADD_BITFIELD_RW(GPIO32_LEVEL_HIGH, 1, 1)
3225 ADD_BITFIELD_RW(GPIO32_LEVEL_LOW, 0, 1)
3226 END_TYPE()
3227
3228 // Interrupt Force for proc0
3229 // Reset value: 0x00000000
3230 BEGIN_TYPE(PROC0_INTF5_t, uint32_t)
3231 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
3232 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
3233 ADD_BITFIELD_RW(GPIO47_LEVEL_HIGH, 29, 1)
3234 ADD_BITFIELD_RW(GPIO47_LEVEL_LOW, 28, 1)
3235 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
3236 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
3237 ADD_BITFIELD_RW(GPIO46_LEVEL_HIGH, 25, 1)
3238 ADD_BITFIELD_RW(GPIO46_LEVEL_LOW, 24, 1)
3239 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
3240 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
3241 ADD_BITFIELD_RW(GPIO45_LEVEL_HIGH, 21, 1)
3242 ADD_BITFIELD_RW(GPIO45_LEVEL_LOW, 20, 1)
3243 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
3244 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
3245 ADD_BITFIELD_RW(GPIO44_LEVEL_HIGH, 17, 1)
3246 ADD_BITFIELD_RW(GPIO44_LEVEL_LOW, 16, 1)
3247 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
3248 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
3249 ADD_BITFIELD_RW(GPIO43_LEVEL_HIGH, 13, 1)
3250 ADD_BITFIELD_RW(GPIO43_LEVEL_LOW, 12, 1)
3251 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
3252 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
3253 ADD_BITFIELD_RW(GPIO42_LEVEL_HIGH, 9, 1)
3254 ADD_BITFIELD_RW(GPIO42_LEVEL_LOW, 8, 1)
3255 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
3256 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
3257 ADD_BITFIELD_RW(GPIO41_LEVEL_HIGH, 5, 1)
3258 ADD_BITFIELD_RW(GPIO41_LEVEL_LOW, 4, 1)
3259 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
3260 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
3261 ADD_BITFIELD_RW(GPIO40_LEVEL_HIGH, 1, 1)
3262 ADD_BITFIELD_RW(GPIO40_LEVEL_LOW, 0, 1)
3263 END_TYPE()
3264
3265 // Interrupt status after masking & forcing for proc0
3266 // Reset value: 0x00000000
3267 BEGIN_TYPE(PROC0_INTS0_t, uint32_t)
3268 ADD_BITFIELD_RO(GPIO7_EDGE_HIGH, 31, 1)
3269 ADD_BITFIELD_RO(GPIO7_EDGE_LOW, 30, 1)
3270 ADD_BITFIELD_RO(GPIO7_LEVEL_HIGH, 29, 1)
3271 ADD_BITFIELD_RO(GPIO7_LEVEL_LOW, 28, 1)
3272 ADD_BITFIELD_RO(GPIO6_EDGE_HIGH, 27, 1)
3273 ADD_BITFIELD_RO(GPIO6_EDGE_LOW, 26, 1)
3274 ADD_BITFIELD_RO(GPIO6_LEVEL_HIGH, 25, 1)
3275 ADD_BITFIELD_RO(GPIO6_LEVEL_LOW, 24, 1)
3276 ADD_BITFIELD_RO(GPIO5_EDGE_HIGH, 23, 1)
3277 ADD_BITFIELD_RO(GPIO5_EDGE_LOW, 22, 1)
3278 ADD_BITFIELD_RO(GPIO5_LEVEL_HIGH, 21, 1)
3279 ADD_BITFIELD_RO(GPIO5_LEVEL_LOW, 20, 1)
3280 ADD_BITFIELD_RO(GPIO4_EDGE_HIGH, 19, 1)
3281 ADD_BITFIELD_RO(GPIO4_EDGE_LOW, 18, 1)
3282 ADD_BITFIELD_RO(GPIO4_LEVEL_HIGH, 17, 1)
3283 ADD_BITFIELD_RO(GPIO4_LEVEL_LOW, 16, 1)
3284 ADD_BITFIELD_RO(GPIO3_EDGE_HIGH, 15, 1)
3285 ADD_BITFIELD_RO(GPIO3_EDGE_LOW, 14, 1)
3286 ADD_BITFIELD_RO(GPIO3_LEVEL_HIGH, 13, 1)
3287 ADD_BITFIELD_RO(GPIO3_LEVEL_LOW, 12, 1)
3288 ADD_BITFIELD_RO(GPIO2_EDGE_HIGH, 11, 1)
3289 ADD_BITFIELD_RO(GPIO2_EDGE_LOW, 10, 1)
3290 ADD_BITFIELD_RO(GPIO2_LEVEL_HIGH, 9, 1)
3291 ADD_BITFIELD_RO(GPIO2_LEVEL_LOW, 8, 1)
3292 ADD_BITFIELD_RO(GPIO1_EDGE_HIGH, 7, 1)
3293 ADD_BITFIELD_RO(GPIO1_EDGE_LOW, 6, 1)
3294 ADD_BITFIELD_RO(GPIO1_LEVEL_HIGH, 5, 1)
3295 ADD_BITFIELD_RO(GPIO1_LEVEL_LOW, 4, 1)
3296 ADD_BITFIELD_RO(GPIO0_EDGE_HIGH, 3, 1)
3297 ADD_BITFIELD_RO(GPIO0_EDGE_LOW, 2, 1)
3298 ADD_BITFIELD_RO(GPIO0_LEVEL_HIGH, 1, 1)
3299 ADD_BITFIELD_RO(GPIO0_LEVEL_LOW, 0, 1)
3300 END_TYPE()
3301
3302 // Interrupt status after masking & forcing for proc0
3303 // Reset value: 0x00000000
3304 BEGIN_TYPE(PROC0_INTS1_t, uint32_t)
3305 ADD_BITFIELD_RO(GPIO15_EDGE_HIGH, 31, 1)
3306 ADD_BITFIELD_RO(GPIO15_EDGE_LOW, 30, 1)
3307 ADD_BITFIELD_RO(GPIO15_LEVEL_HIGH, 29, 1)
3308 ADD_BITFIELD_RO(GPIO15_LEVEL_LOW, 28, 1)
3309 ADD_BITFIELD_RO(GPIO14_EDGE_HIGH, 27, 1)
3310 ADD_BITFIELD_RO(GPIO14_EDGE_LOW, 26, 1)
3311 ADD_BITFIELD_RO(GPIO14_LEVEL_HIGH, 25, 1)
3312 ADD_BITFIELD_RO(GPIO14_LEVEL_LOW, 24, 1)
3313 ADD_BITFIELD_RO(GPIO13_EDGE_HIGH, 23, 1)
3314 ADD_BITFIELD_RO(GPIO13_EDGE_LOW, 22, 1)
3315 ADD_BITFIELD_RO(GPIO13_LEVEL_HIGH, 21, 1)
3316 ADD_BITFIELD_RO(GPIO13_LEVEL_LOW, 20, 1)
3317 ADD_BITFIELD_RO(GPIO12_EDGE_HIGH, 19, 1)
3318 ADD_BITFIELD_RO(GPIO12_EDGE_LOW, 18, 1)
3319 ADD_BITFIELD_RO(GPIO12_LEVEL_HIGH, 17, 1)
3320 ADD_BITFIELD_RO(GPIO12_LEVEL_LOW, 16, 1)
3321 ADD_BITFIELD_RO(GPIO11_EDGE_HIGH, 15, 1)
3322 ADD_BITFIELD_RO(GPIO11_EDGE_LOW, 14, 1)
3323 ADD_BITFIELD_RO(GPIO11_LEVEL_HIGH, 13, 1)
3324 ADD_BITFIELD_RO(GPIO11_LEVEL_LOW, 12, 1)
3325 ADD_BITFIELD_RO(GPIO10_EDGE_HIGH, 11, 1)
3326 ADD_BITFIELD_RO(GPIO10_EDGE_LOW, 10, 1)
3327 ADD_BITFIELD_RO(GPIO10_LEVEL_HIGH, 9, 1)
3328 ADD_BITFIELD_RO(GPIO10_LEVEL_LOW, 8, 1)
3329 ADD_BITFIELD_RO(GPIO9_EDGE_HIGH, 7, 1)
3330 ADD_BITFIELD_RO(GPIO9_EDGE_LOW, 6, 1)
3331 ADD_BITFIELD_RO(GPIO9_LEVEL_HIGH, 5, 1)
3332 ADD_BITFIELD_RO(GPIO9_LEVEL_LOW, 4, 1)
3333 ADD_BITFIELD_RO(GPIO8_EDGE_HIGH, 3, 1)
3334 ADD_BITFIELD_RO(GPIO8_EDGE_LOW, 2, 1)
3335 ADD_BITFIELD_RO(GPIO8_LEVEL_HIGH, 1, 1)
3336 ADD_BITFIELD_RO(GPIO8_LEVEL_LOW, 0, 1)
3337 END_TYPE()
3338
3339 // Interrupt status after masking & forcing for proc0
3340 // Reset value: 0x00000000
3341 BEGIN_TYPE(PROC0_INTS2_t, uint32_t)
3342 ADD_BITFIELD_RO(GPIO23_EDGE_HIGH, 31, 1)
3343 ADD_BITFIELD_RO(GPIO23_EDGE_LOW, 30, 1)
3344 ADD_BITFIELD_RO(GPIO23_LEVEL_HIGH, 29, 1)
3345 ADD_BITFIELD_RO(GPIO23_LEVEL_LOW, 28, 1)
3346 ADD_BITFIELD_RO(GPIO22_EDGE_HIGH, 27, 1)
3347 ADD_BITFIELD_RO(GPIO22_EDGE_LOW, 26, 1)
3348 ADD_BITFIELD_RO(GPIO22_LEVEL_HIGH, 25, 1)
3349 ADD_BITFIELD_RO(GPIO22_LEVEL_LOW, 24, 1)
3350 ADD_BITFIELD_RO(GPIO21_EDGE_HIGH, 23, 1)
3351 ADD_BITFIELD_RO(GPIO21_EDGE_LOW, 22, 1)
3352 ADD_BITFIELD_RO(GPIO21_LEVEL_HIGH, 21, 1)
3353 ADD_BITFIELD_RO(GPIO21_LEVEL_LOW, 20, 1)
3354 ADD_BITFIELD_RO(GPIO20_EDGE_HIGH, 19, 1)
3355 ADD_BITFIELD_RO(GPIO20_EDGE_LOW, 18, 1)
3356 ADD_BITFIELD_RO(GPIO20_LEVEL_HIGH, 17, 1)
3357 ADD_BITFIELD_RO(GPIO20_LEVEL_LOW, 16, 1)
3358 ADD_BITFIELD_RO(GPIO19_EDGE_HIGH, 15, 1)
3359 ADD_BITFIELD_RO(GPIO19_EDGE_LOW, 14, 1)
3360 ADD_BITFIELD_RO(GPIO19_LEVEL_HIGH, 13, 1)
3361 ADD_BITFIELD_RO(GPIO19_LEVEL_LOW, 12, 1)
3362 ADD_BITFIELD_RO(GPIO18_EDGE_HIGH, 11, 1)
3363 ADD_BITFIELD_RO(GPIO18_EDGE_LOW, 10, 1)
3364 ADD_BITFIELD_RO(GPIO18_LEVEL_HIGH, 9, 1)
3365 ADD_BITFIELD_RO(GPIO18_LEVEL_LOW, 8, 1)
3366 ADD_BITFIELD_RO(GPIO17_EDGE_HIGH, 7, 1)
3367 ADD_BITFIELD_RO(GPIO17_EDGE_LOW, 6, 1)
3368 ADD_BITFIELD_RO(GPIO17_LEVEL_HIGH, 5, 1)
3369 ADD_BITFIELD_RO(GPIO17_LEVEL_LOW, 4, 1)
3370 ADD_BITFIELD_RO(GPIO16_EDGE_HIGH, 3, 1)
3371 ADD_BITFIELD_RO(GPIO16_EDGE_LOW, 2, 1)
3372 ADD_BITFIELD_RO(GPIO16_LEVEL_HIGH, 1, 1)
3373 ADD_BITFIELD_RO(GPIO16_LEVEL_LOW, 0, 1)
3374 END_TYPE()
3375
3376 // Interrupt status after masking & forcing for proc0
3377 // Reset value: 0x00000000
3378 BEGIN_TYPE(PROC0_INTS3_t, uint32_t)
3379 ADD_BITFIELD_RO(GPIO31_EDGE_HIGH, 31, 1)
3380 ADD_BITFIELD_RO(GPIO31_EDGE_LOW, 30, 1)
3381 ADD_BITFIELD_RO(GPIO31_LEVEL_HIGH, 29, 1)
3382 ADD_BITFIELD_RO(GPIO31_LEVEL_LOW, 28, 1)
3383 ADD_BITFIELD_RO(GPIO30_EDGE_HIGH, 27, 1)
3384 ADD_BITFIELD_RO(GPIO30_EDGE_LOW, 26, 1)
3385 ADD_BITFIELD_RO(GPIO30_LEVEL_HIGH, 25, 1)
3386 ADD_BITFIELD_RO(GPIO30_LEVEL_LOW, 24, 1)
3387 ADD_BITFIELD_RO(GPIO29_EDGE_HIGH, 23, 1)
3388 ADD_BITFIELD_RO(GPIO29_EDGE_LOW, 22, 1)
3389 ADD_BITFIELD_RO(GPIO29_LEVEL_HIGH, 21, 1)
3390 ADD_BITFIELD_RO(GPIO29_LEVEL_LOW, 20, 1)
3391 ADD_BITFIELD_RO(GPIO28_EDGE_HIGH, 19, 1)
3392 ADD_BITFIELD_RO(GPIO28_EDGE_LOW, 18, 1)
3393 ADD_BITFIELD_RO(GPIO28_LEVEL_HIGH, 17, 1)
3394 ADD_BITFIELD_RO(GPIO28_LEVEL_LOW, 16, 1)
3395 ADD_BITFIELD_RO(GPIO27_EDGE_HIGH, 15, 1)
3396 ADD_BITFIELD_RO(GPIO27_EDGE_LOW, 14, 1)
3397 ADD_BITFIELD_RO(GPIO27_LEVEL_HIGH, 13, 1)
3398 ADD_BITFIELD_RO(GPIO27_LEVEL_LOW, 12, 1)
3399 ADD_BITFIELD_RO(GPIO26_EDGE_HIGH, 11, 1)
3400 ADD_BITFIELD_RO(GPIO26_EDGE_LOW, 10, 1)
3401 ADD_BITFIELD_RO(GPIO26_LEVEL_HIGH, 9, 1)
3402 ADD_BITFIELD_RO(GPIO26_LEVEL_LOW, 8, 1)
3403 ADD_BITFIELD_RO(GPIO25_EDGE_HIGH, 7, 1)
3404 ADD_BITFIELD_RO(GPIO25_EDGE_LOW, 6, 1)
3405 ADD_BITFIELD_RO(GPIO25_LEVEL_HIGH, 5, 1)
3406 ADD_BITFIELD_RO(GPIO25_LEVEL_LOW, 4, 1)
3407 ADD_BITFIELD_RO(GPIO24_EDGE_HIGH, 3, 1)
3408 ADD_BITFIELD_RO(GPIO24_EDGE_LOW, 2, 1)
3409 ADD_BITFIELD_RO(GPIO24_LEVEL_HIGH, 1, 1)
3410 ADD_BITFIELD_RO(GPIO24_LEVEL_LOW, 0, 1)
3411 END_TYPE()
3412
3413 // Interrupt status after masking & forcing for proc0
3414 // Reset value: 0x00000000
3415 BEGIN_TYPE(PROC0_INTS4_t, uint32_t)
3416 ADD_BITFIELD_RO(GPIO39_EDGE_HIGH, 31, 1)
3417 ADD_BITFIELD_RO(GPIO39_EDGE_LOW, 30, 1)
3418 ADD_BITFIELD_RO(GPIO39_LEVEL_HIGH, 29, 1)
3419 ADD_BITFIELD_RO(GPIO39_LEVEL_LOW, 28, 1)
3420 ADD_BITFIELD_RO(GPIO38_EDGE_HIGH, 27, 1)
3421 ADD_BITFIELD_RO(GPIO38_EDGE_LOW, 26, 1)
3422 ADD_BITFIELD_RO(GPIO38_LEVEL_HIGH, 25, 1)
3423 ADD_BITFIELD_RO(GPIO38_LEVEL_LOW, 24, 1)
3424 ADD_BITFIELD_RO(GPIO37_EDGE_HIGH, 23, 1)
3425 ADD_BITFIELD_RO(GPIO37_EDGE_LOW, 22, 1)
3426 ADD_BITFIELD_RO(GPIO37_LEVEL_HIGH, 21, 1)
3427 ADD_BITFIELD_RO(GPIO37_LEVEL_LOW, 20, 1)
3428 ADD_BITFIELD_RO(GPIO36_EDGE_HIGH, 19, 1)
3429 ADD_BITFIELD_RO(GPIO36_EDGE_LOW, 18, 1)
3430 ADD_BITFIELD_RO(GPIO36_LEVEL_HIGH, 17, 1)
3431 ADD_BITFIELD_RO(GPIO36_LEVEL_LOW, 16, 1)
3432 ADD_BITFIELD_RO(GPIO35_EDGE_HIGH, 15, 1)
3433 ADD_BITFIELD_RO(GPIO35_EDGE_LOW, 14, 1)
3434 ADD_BITFIELD_RO(GPIO35_LEVEL_HIGH, 13, 1)
3435 ADD_BITFIELD_RO(GPIO35_LEVEL_LOW, 12, 1)
3436 ADD_BITFIELD_RO(GPIO34_EDGE_HIGH, 11, 1)
3437 ADD_BITFIELD_RO(GPIO34_EDGE_LOW, 10, 1)
3438 ADD_BITFIELD_RO(GPIO34_LEVEL_HIGH, 9, 1)
3439 ADD_BITFIELD_RO(GPIO34_LEVEL_LOW, 8, 1)
3440 ADD_BITFIELD_RO(GPIO33_EDGE_HIGH, 7, 1)
3441 ADD_BITFIELD_RO(GPIO33_EDGE_LOW, 6, 1)
3442 ADD_BITFIELD_RO(GPIO33_LEVEL_HIGH, 5, 1)
3443 ADD_BITFIELD_RO(GPIO33_LEVEL_LOW, 4, 1)
3444 ADD_BITFIELD_RO(GPIO32_EDGE_HIGH, 3, 1)
3445 ADD_BITFIELD_RO(GPIO32_EDGE_LOW, 2, 1)
3446 ADD_BITFIELD_RO(GPIO32_LEVEL_HIGH, 1, 1)
3447 ADD_BITFIELD_RO(GPIO32_LEVEL_LOW, 0, 1)
3448 END_TYPE()
3449
3450 // Interrupt status after masking & forcing for proc0
3451 // Reset value: 0x00000000
3452 BEGIN_TYPE(PROC0_INTS5_t, uint32_t)
3453 ADD_BITFIELD_RO(GPIO47_EDGE_HIGH, 31, 1)
3454 ADD_BITFIELD_RO(GPIO47_EDGE_LOW, 30, 1)
3455 ADD_BITFIELD_RO(GPIO47_LEVEL_HIGH, 29, 1)
3456 ADD_BITFIELD_RO(GPIO47_LEVEL_LOW, 28, 1)
3457 ADD_BITFIELD_RO(GPIO46_EDGE_HIGH, 27, 1)
3458 ADD_BITFIELD_RO(GPIO46_EDGE_LOW, 26, 1)
3459 ADD_BITFIELD_RO(GPIO46_LEVEL_HIGH, 25, 1)
3460 ADD_BITFIELD_RO(GPIO46_LEVEL_LOW, 24, 1)
3461 ADD_BITFIELD_RO(GPIO45_EDGE_HIGH, 23, 1)
3462 ADD_BITFIELD_RO(GPIO45_EDGE_LOW, 22, 1)
3463 ADD_BITFIELD_RO(GPIO45_LEVEL_HIGH, 21, 1)
3464 ADD_BITFIELD_RO(GPIO45_LEVEL_LOW, 20, 1)
3465 ADD_BITFIELD_RO(GPIO44_EDGE_HIGH, 19, 1)
3466 ADD_BITFIELD_RO(GPIO44_EDGE_LOW, 18, 1)
3467 ADD_BITFIELD_RO(GPIO44_LEVEL_HIGH, 17, 1)
3468 ADD_BITFIELD_RO(GPIO44_LEVEL_LOW, 16, 1)
3469 ADD_BITFIELD_RO(GPIO43_EDGE_HIGH, 15, 1)
3470 ADD_BITFIELD_RO(GPIO43_EDGE_LOW, 14, 1)
3471 ADD_BITFIELD_RO(GPIO43_LEVEL_HIGH, 13, 1)
3472 ADD_BITFIELD_RO(GPIO43_LEVEL_LOW, 12, 1)
3473 ADD_BITFIELD_RO(GPIO42_EDGE_HIGH, 11, 1)
3474 ADD_BITFIELD_RO(GPIO42_EDGE_LOW, 10, 1)
3475 ADD_BITFIELD_RO(GPIO42_LEVEL_HIGH, 9, 1)
3476 ADD_BITFIELD_RO(GPIO42_LEVEL_LOW, 8, 1)
3477 ADD_BITFIELD_RO(GPIO41_EDGE_HIGH, 7, 1)
3478 ADD_BITFIELD_RO(GPIO41_EDGE_LOW, 6, 1)
3479 ADD_BITFIELD_RO(GPIO41_LEVEL_HIGH, 5, 1)
3480 ADD_BITFIELD_RO(GPIO41_LEVEL_LOW, 4, 1)
3481 ADD_BITFIELD_RO(GPIO40_EDGE_HIGH, 3, 1)
3482 ADD_BITFIELD_RO(GPIO40_EDGE_LOW, 2, 1)
3483 ADD_BITFIELD_RO(GPIO40_LEVEL_HIGH, 1, 1)
3484 ADD_BITFIELD_RO(GPIO40_LEVEL_LOW, 0, 1)
3485 END_TYPE()
3486
3487 // Interrupt Enable for proc1
3488 // Reset value: 0x00000000
3489 BEGIN_TYPE(PROC1_INTE0_t, uint32_t)
3490 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
3491 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
3492 ADD_BITFIELD_RW(GPIO7_LEVEL_HIGH, 29, 1)
3493 ADD_BITFIELD_RW(GPIO7_LEVEL_LOW, 28, 1)
3494 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
3495 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
3496 ADD_BITFIELD_RW(GPIO6_LEVEL_HIGH, 25, 1)
3497 ADD_BITFIELD_RW(GPIO6_LEVEL_LOW, 24, 1)
3498 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
3499 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
3500 ADD_BITFIELD_RW(GPIO5_LEVEL_HIGH, 21, 1)
3501 ADD_BITFIELD_RW(GPIO5_LEVEL_LOW, 20, 1)
3502 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
3503 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
3504 ADD_BITFIELD_RW(GPIO4_LEVEL_HIGH, 17, 1)
3505 ADD_BITFIELD_RW(GPIO4_LEVEL_LOW, 16, 1)
3506 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
3507 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
3508 ADD_BITFIELD_RW(GPIO3_LEVEL_HIGH, 13, 1)
3509 ADD_BITFIELD_RW(GPIO3_LEVEL_LOW, 12, 1)
3510 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
3511 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
3512 ADD_BITFIELD_RW(GPIO2_LEVEL_HIGH, 9, 1)
3513 ADD_BITFIELD_RW(GPIO2_LEVEL_LOW, 8, 1)
3514 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
3515 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
3516 ADD_BITFIELD_RW(GPIO1_LEVEL_HIGH, 5, 1)
3517 ADD_BITFIELD_RW(GPIO1_LEVEL_LOW, 4, 1)
3518 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
3519 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
3520 ADD_BITFIELD_RW(GPIO0_LEVEL_HIGH, 1, 1)
3521 ADD_BITFIELD_RW(GPIO0_LEVEL_LOW, 0, 1)
3522 END_TYPE()
3523
3524 // Interrupt Enable for proc1
3525 // Reset value: 0x00000000
3526 BEGIN_TYPE(PROC1_INTE1_t, uint32_t)
3527 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
3528 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
3529 ADD_BITFIELD_RW(GPIO15_LEVEL_HIGH, 29, 1)
3530 ADD_BITFIELD_RW(GPIO15_LEVEL_LOW, 28, 1)
3531 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
3532 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
3533 ADD_BITFIELD_RW(GPIO14_LEVEL_HIGH, 25, 1)
3534 ADD_BITFIELD_RW(GPIO14_LEVEL_LOW, 24, 1)
3535 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
3536 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
3537 ADD_BITFIELD_RW(GPIO13_LEVEL_HIGH, 21, 1)
3538 ADD_BITFIELD_RW(GPIO13_LEVEL_LOW, 20, 1)
3539 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
3540 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
3541 ADD_BITFIELD_RW(GPIO12_LEVEL_HIGH, 17, 1)
3542 ADD_BITFIELD_RW(GPIO12_LEVEL_LOW, 16, 1)
3543 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
3544 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
3545 ADD_BITFIELD_RW(GPIO11_LEVEL_HIGH, 13, 1)
3546 ADD_BITFIELD_RW(GPIO11_LEVEL_LOW, 12, 1)
3547 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
3548 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
3549 ADD_BITFIELD_RW(GPIO10_LEVEL_HIGH, 9, 1)
3550 ADD_BITFIELD_RW(GPIO10_LEVEL_LOW, 8, 1)
3551 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
3552 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
3553 ADD_BITFIELD_RW(GPIO9_LEVEL_HIGH, 5, 1)
3554 ADD_BITFIELD_RW(GPIO9_LEVEL_LOW, 4, 1)
3555 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
3556 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
3557 ADD_BITFIELD_RW(GPIO8_LEVEL_HIGH, 1, 1)
3558 ADD_BITFIELD_RW(GPIO8_LEVEL_LOW, 0, 1)
3559 END_TYPE()
3560
3561 // Interrupt Enable for proc1
3562 // Reset value: 0x00000000
3563 BEGIN_TYPE(PROC1_INTE2_t, uint32_t)
3564 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
3565 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
3566 ADD_BITFIELD_RW(GPIO23_LEVEL_HIGH, 29, 1)
3567 ADD_BITFIELD_RW(GPIO23_LEVEL_LOW, 28, 1)
3568 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
3569 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
3570 ADD_BITFIELD_RW(GPIO22_LEVEL_HIGH, 25, 1)
3571 ADD_BITFIELD_RW(GPIO22_LEVEL_LOW, 24, 1)
3572 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
3573 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
3574 ADD_BITFIELD_RW(GPIO21_LEVEL_HIGH, 21, 1)
3575 ADD_BITFIELD_RW(GPIO21_LEVEL_LOW, 20, 1)
3576 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
3577 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
3578 ADD_BITFIELD_RW(GPIO20_LEVEL_HIGH, 17, 1)
3579 ADD_BITFIELD_RW(GPIO20_LEVEL_LOW, 16, 1)
3580 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
3581 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
3582 ADD_BITFIELD_RW(GPIO19_LEVEL_HIGH, 13, 1)
3583 ADD_BITFIELD_RW(GPIO19_LEVEL_LOW, 12, 1)
3584 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
3585 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
3586 ADD_BITFIELD_RW(GPIO18_LEVEL_HIGH, 9, 1)
3587 ADD_BITFIELD_RW(GPIO18_LEVEL_LOW, 8, 1)
3588 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
3589 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
3590 ADD_BITFIELD_RW(GPIO17_LEVEL_HIGH, 5, 1)
3591 ADD_BITFIELD_RW(GPIO17_LEVEL_LOW, 4, 1)
3592 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
3593 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
3594 ADD_BITFIELD_RW(GPIO16_LEVEL_HIGH, 1, 1)
3595 ADD_BITFIELD_RW(GPIO16_LEVEL_LOW, 0, 1)
3596 END_TYPE()
3597
3598 // Interrupt Enable for proc1
3599 // Reset value: 0x00000000
3600 BEGIN_TYPE(PROC1_INTE3_t, uint32_t)
3601 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
3602 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
3603 ADD_BITFIELD_RW(GPIO31_LEVEL_HIGH, 29, 1)
3604 ADD_BITFIELD_RW(GPIO31_LEVEL_LOW, 28, 1)
3605 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
3606 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
3607 ADD_BITFIELD_RW(GPIO30_LEVEL_HIGH, 25, 1)
3608 ADD_BITFIELD_RW(GPIO30_LEVEL_LOW, 24, 1)
3609 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
3610 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
3611 ADD_BITFIELD_RW(GPIO29_LEVEL_HIGH, 21, 1)
3612 ADD_BITFIELD_RW(GPIO29_LEVEL_LOW, 20, 1)
3613 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
3614 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
3615 ADD_BITFIELD_RW(GPIO28_LEVEL_HIGH, 17, 1)
3616 ADD_BITFIELD_RW(GPIO28_LEVEL_LOW, 16, 1)
3617 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
3618 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
3619 ADD_BITFIELD_RW(GPIO27_LEVEL_HIGH, 13, 1)
3620 ADD_BITFIELD_RW(GPIO27_LEVEL_LOW, 12, 1)
3621 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
3622 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
3623 ADD_BITFIELD_RW(GPIO26_LEVEL_HIGH, 9, 1)
3624 ADD_BITFIELD_RW(GPIO26_LEVEL_LOW, 8, 1)
3625 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
3626 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
3627 ADD_BITFIELD_RW(GPIO25_LEVEL_HIGH, 5, 1)
3628 ADD_BITFIELD_RW(GPIO25_LEVEL_LOW, 4, 1)
3629 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
3630 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
3631 ADD_BITFIELD_RW(GPIO24_LEVEL_HIGH, 1, 1)
3632 ADD_BITFIELD_RW(GPIO24_LEVEL_LOW, 0, 1)
3633 END_TYPE()
3634
3635 // Interrupt Enable for proc1
3636 // Reset value: 0x00000000
3637 BEGIN_TYPE(PROC1_INTE4_t, uint32_t)
3638 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
3639 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
3640 ADD_BITFIELD_RW(GPIO39_LEVEL_HIGH, 29, 1)
3641 ADD_BITFIELD_RW(GPIO39_LEVEL_LOW, 28, 1)
3642 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
3643 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
3644 ADD_BITFIELD_RW(GPIO38_LEVEL_HIGH, 25, 1)
3645 ADD_BITFIELD_RW(GPIO38_LEVEL_LOW, 24, 1)
3646 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
3647 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
3648 ADD_BITFIELD_RW(GPIO37_LEVEL_HIGH, 21, 1)
3649 ADD_BITFIELD_RW(GPIO37_LEVEL_LOW, 20, 1)
3650 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
3651 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
3652 ADD_BITFIELD_RW(GPIO36_LEVEL_HIGH, 17, 1)
3653 ADD_BITFIELD_RW(GPIO36_LEVEL_LOW, 16, 1)
3654 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
3655 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
3656 ADD_BITFIELD_RW(GPIO35_LEVEL_HIGH, 13, 1)
3657 ADD_BITFIELD_RW(GPIO35_LEVEL_LOW, 12, 1)
3658 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
3659 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
3660 ADD_BITFIELD_RW(GPIO34_LEVEL_HIGH, 9, 1)
3661 ADD_BITFIELD_RW(GPIO34_LEVEL_LOW, 8, 1)
3662 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
3663 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
3664 ADD_BITFIELD_RW(GPIO33_LEVEL_HIGH, 5, 1)
3665 ADD_BITFIELD_RW(GPIO33_LEVEL_LOW, 4, 1)
3666 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
3667 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
3668 ADD_BITFIELD_RW(GPIO32_LEVEL_HIGH, 1, 1)
3669 ADD_BITFIELD_RW(GPIO32_LEVEL_LOW, 0, 1)
3670 END_TYPE()
3671
3672 // Interrupt Enable for proc1
3673 // Reset value: 0x00000000
3674 BEGIN_TYPE(PROC1_INTE5_t, uint32_t)
3675 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
3676 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
3677 ADD_BITFIELD_RW(GPIO47_LEVEL_HIGH, 29, 1)
3678 ADD_BITFIELD_RW(GPIO47_LEVEL_LOW, 28, 1)
3679 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
3680 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
3681 ADD_BITFIELD_RW(GPIO46_LEVEL_HIGH, 25, 1)
3682 ADD_BITFIELD_RW(GPIO46_LEVEL_LOW, 24, 1)
3683 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
3684 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
3685 ADD_BITFIELD_RW(GPIO45_LEVEL_HIGH, 21, 1)
3686 ADD_BITFIELD_RW(GPIO45_LEVEL_LOW, 20, 1)
3687 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
3688 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
3689 ADD_BITFIELD_RW(GPIO44_LEVEL_HIGH, 17, 1)
3690 ADD_BITFIELD_RW(GPIO44_LEVEL_LOW, 16, 1)
3691 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
3692 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
3693 ADD_BITFIELD_RW(GPIO43_LEVEL_HIGH, 13, 1)
3694 ADD_BITFIELD_RW(GPIO43_LEVEL_LOW, 12, 1)
3695 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
3696 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
3697 ADD_BITFIELD_RW(GPIO42_LEVEL_HIGH, 9, 1)
3698 ADD_BITFIELD_RW(GPIO42_LEVEL_LOW, 8, 1)
3699 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
3700 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
3701 ADD_BITFIELD_RW(GPIO41_LEVEL_HIGH, 5, 1)
3702 ADD_BITFIELD_RW(GPIO41_LEVEL_LOW, 4, 1)
3703 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
3704 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
3705 ADD_BITFIELD_RW(GPIO40_LEVEL_HIGH, 1, 1)
3706 ADD_BITFIELD_RW(GPIO40_LEVEL_LOW, 0, 1)
3707 END_TYPE()
3708
3709 // Interrupt Force for proc1
3710 // Reset value: 0x00000000
3711 BEGIN_TYPE(PROC1_INTF0_t, uint32_t)
3712 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
3713 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
3714 ADD_BITFIELD_RW(GPIO7_LEVEL_HIGH, 29, 1)
3715 ADD_BITFIELD_RW(GPIO7_LEVEL_LOW, 28, 1)
3716 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
3717 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
3718 ADD_BITFIELD_RW(GPIO6_LEVEL_HIGH, 25, 1)
3719 ADD_BITFIELD_RW(GPIO6_LEVEL_LOW, 24, 1)
3720 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
3721 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
3722 ADD_BITFIELD_RW(GPIO5_LEVEL_HIGH, 21, 1)
3723 ADD_BITFIELD_RW(GPIO5_LEVEL_LOW, 20, 1)
3724 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
3725 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
3726 ADD_BITFIELD_RW(GPIO4_LEVEL_HIGH, 17, 1)
3727 ADD_BITFIELD_RW(GPIO4_LEVEL_LOW, 16, 1)
3728 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
3729 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
3730 ADD_BITFIELD_RW(GPIO3_LEVEL_HIGH, 13, 1)
3731 ADD_BITFIELD_RW(GPIO3_LEVEL_LOW, 12, 1)
3732 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
3733 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
3734 ADD_BITFIELD_RW(GPIO2_LEVEL_HIGH, 9, 1)
3735 ADD_BITFIELD_RW(GPIO2_LEVEL_LOW, 8, 1)
3736 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
3737 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
3738 ADD_BITFIELD_RW(GPIO1_LEVEL_HIGH, 5, 1)
3739 ADD_BITFIELD_RW(GPIO1_LEVEL_LOW, 4, 1)
3740 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
3741 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
3742 ADD_BITFIELD_RW(GPIO0_LEVEL_HIGH, 1, 1)
3743 ADD_BITFIELD_RW(GPIO0_LEVEL_LOW, 0, 1)
3744 END_TYPE()
3745
3746 // Interrupt Force for proc1
3747 // Reset value: 0x00000000
3748 BEGIN_TYPE(PROC1_INTF1_t, uint32_t)
3749 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
3750 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
3751 ADD_BITFIELD_RW(GPIO15_LEVEL_HIGH, 29, 1)
3752 ADD_BITFIELD_RW(GPIO15_LEVEL_LOW, 28, 1)
3753 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
3754 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
3755 ADD_BITFIELD_RW(GPIO14_LEVEL_HIGH, 25, 1)
3756 ADD_BITFIELD_RW(GPIO14_LEVEL_LOW, 24, 1)
3757 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
3758 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
3759 ADD_BITFIELD_RW(GPIO13_LEVEL_HIGH, 21, 1)
3760 ADD_BITFIELD_RW(GPIO13_LEVEL_LOW, 20, 1)
3761 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
3762 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
3763 ADD_BITFIELD_RW(GPIO12_LEVEL_HIGH, 17, 1)
3764 ADD_BITFIELD_RW(GPIO12_LEVEL_LOW, 16, 1)
3765 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
3766 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
3767 ADD_BITFIELD_RW(GPIO11_LEVEL_HIGH, 13, 1)
3768 ADD_BITFIELD_RW(GPIO11_LEVEL_LOW, 12, 1)
3769 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
3770 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
3771 ADD_BITFIELD_RW(GPIO10_LEVEL_HIGH, 9, 1)
3772 ADD_BITFIELD_RW(GPIO10_LEVEL_LOW, 8, 1)
3773 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
3774 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
3775 ADD_BITFIELD_RW(GPIO9_LEVEL_HIGH, 5, 1)
3776 ADD_BITFIELD_RW(GPIO9_LEVEL_LOW, 4, 1)
3777 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
3778 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
3779 ADD_BITFIELD_RW(GPIO8_LEVEL_HIGH, 1, 1)
3780 ADD_BITFIELD_RW(GPIO8_LEVEL_LOW, 0, 1)
3781 END_TYPE()
3782
3783 // Interrupt Force for proc1
3784 // Reset value: 0x00000000
3785 BEGIN_TYPE(PROC1_INTF2_t, uint32_t)
3786 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
3787 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
3788 ADD_BITFIELD_RW(GPIO23_LEVEL_HIGH, 29, 1)
3789 ADD_BITFIELD_RW(GPIO23_LEVEL_LOW, 28, 1)
3790 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
3791 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
3792 ADD_BITFIELD_RW(GPIO22_LEVEL_HIGH, 25, 1)
3793 ADD_BITFIELD_RW(GPIO22_LEVEL_LOW, 24, 1)
3794 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
3795 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
3796 ADD_BITFIELD_RW(GPIO21_LEVEL_HIGH, 21, 1)
3797 ADD_BITFIELD_RW(GPIO21_LEVEL_LOW, 20, 1)
3798 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
3799 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
3800 ADD_BITFIELD_RW(GPIO20_LEVEL_HIGH, 17, 1)
3801 ADD_BITFIELD_RW(GPIO20_LEVEL_LOW, 16, 1)
3802 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
3803 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
3804 ADD_BITFIELD_RW(GPIO19_LEVEL_HIGH, 13, 1)
3805 ADD_BITFIELD_RW(GPIO19_LEVEL_LOW, 12, 1)
3806 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
3807 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
3808 ADD_BITFIELD_RW(GPIO18_LEVEL_HIGH, 9, 1)
3809 ADD_BITFIELD_RW(GPIO18_LEVEL_LOW, 8, 1)
3810 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
3811 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
3812 ADD_BITFIELD_RW(GPIO17_LEVEL_HIGH, 5, 1)
3813 ADD_BITFIELD_RW(GPIO17_LEVEL_LOW, 4, 1)
3814 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
3815 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
3816 ADD_BITFIELD_RW(GPIO16_LEVEL_HIGH, 1, 1)
3817 ADD_BITFIELD_RW(GPIO16_LEVEL_LOW, 0, 1)
3818 END_TYPE()
3819
3820 // Interrupt Force for proc1
3821 // Reset value: 0x00000000
3822 BEGIN_TYPE(PROC1_INTF3_t, uint32_t)
3823 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
3824 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
3825 ADD_BITFIELD_RW(GPIO31_LEVEL_HIGH, 29, 1)
3826 ADD_BITFIELD_RW(GPIO31_LEVEL_LOW, 28, 1)
3827 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
3828 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
3829 ADD_BITFIELD_RW(GPIO30_LEVEL_HIGH, 25, 1)
3830 ADD_BITFIELD_RW(GPIO30_LEVEL_LOW, 24, 1)
3831 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
3832 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
3833 ADD_BITFIELD_RW(GPIO29_LEVEL_HIGH, 21, 1)
3834 ADD_BITFIELD_RW(GPIO29_LEVEL_LOW, 20, 1)
3835 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
3836 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
3837 ADD_BITFIELD_RW(GPIO28_LEVEL_HIGH, 17, 1)
3838 ADD_BITFIELD_RW(GPIO28_LEVEL_LOW, 16, 1)
3839 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
3840 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
3841 ADD_BITFIELD_RW(GPIO27_LEVEL_HIGH, 13, 1)
3842 ADD_BITFIELD_RW(GPIO27_LEVEL_LOW, 12, 1)
3843 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
3844 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
3845 ADD_BITFIELD_RW(GPIO26_LEVEL_HIGH, 9, 1)
3846 ADD_BITFIELD_RW(GPIO26_LEVEL_LOW, 8, 1)
3847 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
3848 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
3849 ADD_BITFIELD_RW(GPIO25_LEVEL_HIGH, 5, 1)
3850 ADD_BITFIELD_RW(GPIO25_LEVEL_LOW, 4, 1)
3851 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
3852 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
3853 ADD_BITFIELD_RW(GPIO24_LEVEL_HIGH, 1, 1)
3854 ADD_BITFIELD_RW(GPIO24_LEVEL_LOW, 0, 1)
3855 END_TYPE()
3856
3857 // Interrupt Force for proc1
3858 // Reset value: 0x00000000
3859 BEGIN_TYPE(PROC1_INTF4_t, uint32_t)
3860 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
3861 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
3862 ADD_BITFIELD_RW(GPIO39_LEVEL_HIGH, 29, 1)
3863 ADD_BITFIELD_RW(GPIO39_LEVEL_LOW, 28, 1)
3864 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
3865 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
3866 ADD_BITFIELD_RW(GPIO38_LEVEL_HIGH, 25, 1)
3867 ADD_BITFIELD_RW(GPIO38_LEVEL_LOW, 24, 1)
3868 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
3869 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
3870 ADD_BITFIELD_RW(GPIO37_LEVEL_HIGH, 21, 1)
3871 ADD_BITFIELD_RW(GPIO37_LEVEL_LOW, 20, 1)
3872 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
3873 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
3874 ADD_BITFIELD_RW(GPIO36_LEVEL_HIGH, 17, 1)
3875 ADD_BITFIELD_RW(GPIO36_LEVEL_LOW, 16, 1)
3876 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
3877 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
3878 ADD_BITFIELD_RW(GPIO35_LEVEL_HIGH, 13, 1)
3879 ADD_BITFIELD_RW(GPIO35_LEVEL_LOW, 12, 1)
3880 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
3881 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
3882 ADD_BITFIELD_RW(GPIO34_LEVEL_HIGH, 9, 1)
3883 ADD_BITFIELD_RW(GPIO34_LEVEL_LOW, 8, 1)
3884 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
3885 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
3886 ADD_BITFIELD_RW(GPIO33_LEVEL_HIGH, 5, 1)
3887 ADD_BITFIELD_RW(GPIO33_LEVEL_LOW, 4, 1)
3888 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
3889 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
3890 ADD_BITFIELD_RW(GPIO32_LEVEL_HIGH, 1, 1)
3891 ADD_BITFIELD_RW(GPIO32_LEVEL_LOW, 0, 1)
3892 END_TYPE()
3893
3894 // Interrupt Force for proc1
3895 // Reset value: 0x00000000
3896 BEGIN_TYPE(PROC1_INTF5_t, uint32_t)
3897 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
3898 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
3899 ADD_BITFIELD_RW(GPIO47_LEVEL_HIGH, 29, 1)
3900 ADD_BITFIELD_RW(GPIO47_LEVEL_LOW, 28, 1)
3901 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
3902 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
3903 ADD_BITFIELD_RW(GPIO46_LEVEL_HIGH, 25, 1)
3904 ADD_BITFIELD_RW(GPIO46_LEVEL_LOW, 24, 1)
3905 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
3906 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
3907 ADD_BITFIELD_RW(GPIO45_LEVEL_HIGH, 21, 1)
3908 ADD_BITFIELD_RW(GPIO45_LEVEL_LOW, 20, 1)
3909 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
3910 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
3911 ADD_BITFIELD_RW(GPIO44_LEVEL_HIGH, 17, 1)
3912 ADD_BITFIELD_RW(GPIO44_LEVEL_LOW, 16, 1)
3913 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
3914 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
3915 ADD_BITFIELD_RW(GPIO43_LEVEL_HIGH, 13, 1)
3916 ADD_BITFIELD_RW(GPIO43_LEVEL_LOW, 12, 1)
3917 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
3918 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
3919 ADD_BITFIELD_RW(GPIO42_LEVEL_HIGH, 9, 1)
3920 ADD_BITFIELD_RW(GPIO42_LEVEL_LOW, 8, 1)
3921 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
3922 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
3923 ADD_BITFIELD_RW(GPIO41_LEVEL_HIGH, 5, 1)
3924 ADD_BITFIELD_RW(GPIO41_LEVEL_LOW, 4, 1)
3925 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
3926 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
3927 ADD_BITFIELD_RW(GPIO40_LEVEL_HIGH, 1, 1)
3928 ADD_BITFIELD_RW(GPIO40_LEVEL_LOW, 0, 1)
3929 END_TYPE()
3930
3931 // Interrupt status after masking & forcing for proc1
3932 // Reset value: 0x00000000
3933 BEGIN_TYPE(PROC1_INTS0_t, uint32_t)
3934 ADD_BITFIELD_RO(GPIO7_EDGE_HIGH, 31, 1)
3935 ADD_BITFIELD_RO(GPIO7_EDGE_LOW, 30, 1)
3936 ADD_BITFIELD_RO(GPIO7_LEVEL_HIGH, 29, 1)
3937 ADD_BITFIELD_RO(GPIO7_LEVEL_LOW, 28, 1)
3938 ADD_BITFIELD_RO(GPIO6_EDGE_HIGH, 27, 1)
3939 ADD_BITFIELD_RO(GPIO6_EDGE_LOW, 26, 1)
3940 ADD_BITFIELD_RO(GPIO6_LEVEL_HIGH, 25, 1)
3941 ADD_BITFIELD_RO(GPIO6_LEVEL_LOW, 24, 1)
3942 ADD_BITFIELD_RO(GPIO5_EDGE_HIGH, 23, 1)
3943 ADD_BITFIELD_RO(GPIO5_EDGE_LOW, 22, 1)
3944 ADD_BITFIELD_RO(GPIO5_LEVEL_HIGH, 21, 1)
3945 ADD_BITFIELD_RO(GPIO5_LEVEL_LOW, 20, 1)
3946 ADD_BITFIELD_RO(GPIO4_EDGE_HIGH, 19, 1)
3947 ADD_BITFIELD_RO(GPIO4_EDGE_LOW, 18, 1)
3948 ADD_BITFIELD_RO(GPIO4_LEVEL_HIGH, 17, 1)
3949 ADD_BITFIELD_RO(GPIO4_LEVEL_LOW, 16, 1)
3950 ADD_BITFIELD_RO(GPIO3_EDGE_HIGH, 15, 1)
3951 ADD_BITFIELD_RO(GPIO3_EDGE_LOW, 14, 1)
3952 ADD_BITFIELD_RO(GPIO3_LEVEL_HIGH, 13, 1)
3953 ADD_BITFIELD_RO(GPIO3_LEVEL_LOW, 12, 1)
3954 ADD_BITFIELD_RO(GPIO2_EDGE_HIGH, 11, 1)
3955 ADD_BITFIELD_RO(GPIO2_EDGE_LOW, 10, 1)
3956 ADD_BITFIELD_RO(GPIO2_LEVEL_HIGH, 9, 1)
3957 ADD_BITFIELD_RO(GPIO2_LEVEL_LOW, 8, 1)
3958 ADD_BITFIELD_RO(GPIO1_EDGE_HIGH, 7, 1)
3959 ADD_BITFIELD_RO(GPIO1_EDGE_LOW, 6, 1)
3960 ADD_BITFIELD_RO(GPIO1_LEVEL_HIGH, 5, 1)
3961 ADD_BITFIELD_RO(GPIO1_LEVEL_LOW, 4, 1)
3962 ADD_BITFIELD_RO(GPIO0_EDGE_HIGH, 3, 1)
3963 ADD_BITFIELD_RO(GPIO0_EDGE_LOW, 2, 1)
3964 ADD_BITFIELD_RO(GPIO0_LEVEL_HIGH, 1, 1)
3965 ADD_BITFIELD_RO(GPIO0_LEVEL_LOW, 0, 1)
3966 END_TYPE()
3967
3968 // Interrupt status after masking & forcing for proc1
3969 // Reset value: 0x00000000
3970 BEGIN_TYPE(PROC1_INTS1_t, uint32_t)
3971 ADD_BITFIELD_RO(GPIO15_EDGE_HIGH, 31, 1)
3972 ADD_BITFIELD_RO(GPIO15_EDGE_LOW, 30, 1)
3973 ADD_BITFIELD_RO(GPIO15_LEVEL_HIGH, 29, 1)
3974 ADD_BITFIELD_RO(GPIO15_LEVEL_LOW, 28, 1)
3975 ADD_BITFIELD_RO(GPIO14_EDGE_HIGH, 27, 1)
3976 ADD_BITFIELD_RO(GPIO14_EDGE_LOW, 26, 1)
3977 ADD_BITFIELD_RO(GPIO14_LEVEL_HIGH, 25, 1)
3978 ADD_BITFIELD_RO(GPIO14_LEVEL_LOW, 24, 1)
3979 ADD_BITFIELD_RO(GPIO13_EDGE_HIGH, 23, 1)
3980 ADD_BITFIELD_RO(GPIO13_EDGE_LOW, 22, 1)
3981 ADD_BITFIELD_RO(GPIO13_LEVEL_HIGH, 21, 1)
3982 ADD_BITFIELD_RO(GPIO13_LEVEL_LOW, 20, 1)
3983 ADD_BITFIELD_RO(GPIO12_EDGE_HIGH, 19, 1)
3984 ADD_BITFIELD_RO(GPIO12_EDGE_LOW, 18, 1)
3985 ADD_BITFIELD_RO(GPIO12_LEVEL_HIGH, 17, 1)
3986 ADD_BITFIELD_RO(GPIO12_LEVEL_LOW, 16, 1)
3987 ADD_BITFIELD_RO(GPIO11_EDGE_HIGH, 15, 1)
3988 ADD_BITFIELD_RO(GPIO11_EDGE_LOW, 14, 1)
3989 ADD_BITFIELD_RO(GPIO11_LEVEL_HIGH, 13, 1)
3990 ADD_BITFIELD_RO(GPIO11_LEVEL_LOW, 12, 1)
3991 ADD_BITFIELD_RO(GPIO10_EDGE_HIGH, 11, 1)
3992 ADD_BITFIELD_RO(GPIO10_EDGE_LOW, 10, 1)
3993 ADD_BITFIELD_RO(GPIO10_LEVEL_HIGH, 9, 1)
3994 ADD_BITFIELD_RO(GPIO10_LEVEL_LOW, 8, 1)
3995 ADD_BITFIELD_RO(GPIO9_EDGE_HIGH, 7, 1)
3996 ADD_BITFIELD_RO(GPIO9_EDGE_LOW, 6, 1)
3997 ADD_BITFIELD_RO(GPIO9_LEVEL_HIGH, 5, 1)
3998 ADD_BITFIELD_RO(GPIO9_LEVEL_LOW, 4, 1)
3999 ADD_BITFIELD_RO(GPIO8_EDGE_HIGH, 3, 1)
4000 ADD_BITFIELD_RO(GPIO8_EDGE_LOW, 2, 1)
4001 ADD_BITFIELD_RO(GPIO8_LEVEL_HIGH, 1, 1)
4002 ADD_BITFIELD_RO(GPIO8_LEVEL_LOW, 0, 1)
4003 END_TYPE()
4004
4005 // Interrupt status after masking & forcing for proc1
4006 // Reset value: 0x00000000
4007 BEGIN_TYPE(PROC1_INTS2_t, uint32_t)
4008 ADD_BITFIELD_RO(GPIO23_EDGE_HIGH, 31, 1)
4009 ADD_BITFIELD_RO(GPIO23_EDGE_LOW, 30, 1)
4010 ADD_BITFIELD_RO(GPIO23_LEVEL_HIGH, 29, 1)
4011 ADD_BITFIELD_RO(GPIO23_LEVEL_LOW, 28, 1)
4012 ADD_BITFIELD_RO(GPIO22_EDGE_HIGH, 27, 1)
4013 ADD_BITFIELD_RO(GPIO22_EDGE_LOW, 26, 1)
4014 ADD_BITFIELD_RO(GPIO22_LEVEL_HIGH, 25, 1)
4015 ADD_BITFIELD_RO(GPIO22_LEVEL_LOW, 24, 1)
4016 ADD_BITFIELD_RO(GPIO21_EDGE_HIGH, 23, 1)
4017 ADD_BITFIELD_RO(GPIO21_EDGE_LOW, 22, 1)
4018 ADD_BITFIELD_RO(GPIO21_LEVEL_HIGH, 21, 1)
4019 ADD_BITFIELD_RO(GPIO21_LEVEL_LOW, 20, 1)
4020 ADD_BITFIELD_RO(GPIO20_EDGE_HIGH, 19, 1)
4021 ADD_BITFIELD_RO(GPIO20_EDGE_LOW, 18, 1)
4022 ADD_BITFIELD_RO(GPIO20_LEVEL_HIGH, 17, 1)
4023 ADD_BITFIELD_RO(GPIO20_LEVEL_LOW, 16, 1)
4024 ADD_BITFIELD_RO(GPIO19_EDGE_HIGH, 15, 1)
4025 ADD_BITFIELD_RO(GPIO19_EDGE_LOW, 14, 1)
4026 ADD_BITFIELD_RO(GPIO19_LEVEL_HIGH, 13, 1)
4027 ADD_BITFIELD_RO(GPIO19_LEVEL_LOW, 12, 1)
4028 ADD_BITFIELD_RO(GPIO18_EDGE_HIGH, 11, 1)
4029 ADD_BITFIELD_RO(GPIO18_EDGE_LOW, 10, 1)
4030 ADD_BITFIELD_RO(GPIO18_LEVEL_HIGH, 9, 1)
4031 ADD_BITFIELD_RO(GPIO18_LEVEL_LOW, 8, 1)
4032 ADD_BITFIELD_RO(GPIO17_EDGE_HIGH, 7, 1)
4033 ADD_BITFIELD_RO(GPIO17_EDGE_LOW, 6, 1)
4034 ADD_BITFIELD_RO(GPIO17_LEVEL_HIGH, 5, 1)
4035 ADD_BITFIELD_RO(GPIO17_LEVEL_LOW, 4, 1)
4036 ADD_BITFIELD_RO(GPIO16_EDGE_HIGH, 3, 1)
4037 ADD_BITFIELD_RO(GPIO16_EDGE_LOW, 2, 1)
4038 ADD_BITFIELD_RO(GPIO16_LEVEL_HIGH, 1, 1)
4039 ADD_BITFIELD_RO(GPIO16_LEVEL_LOW, 0, 1)
4040 END_TYPE()
4041
4042 // Interrupt status after masking & forcing for proc1
4043 // Reset value: 0x00000000
4044 BEGIN_TYPE(PROC1_INTS3_t, uint32_t)
4045 ADD_BITFIELD_RO(GPIO31_EDGE_HIGH, 31, 1)
4046 ADD_BITFIELD_RO(GPIO31_EDGE_LOW, 30, 1)
4047 ADD_BITFIELD_RO(GPIO31_LEVEL_HIGH, 29, 1)
4048 ADD_BITFIELD_RO(GPIO31_LEVEL_LOW, 28, 1)
4049 ADD_BITFIELD_RO(GPIO30_EDGE_HIGH, 27, 1)
4050 ADD_BITFIELD_RO(GPIO30_EDGE_LOW, 26, 1)
4051 ADD_BITFIELD_RO(GPIO30_LEVEL_HIGH, 25, 1)
4052 ADD_BITFIELD_RO(GPIO30_LEVEL_LOW, 24, 1)
4053 ADD_BITFIELD_RO(GPIO29_EDGE_HIGH, 23, 1)
4054 ADD_BITFIELD_RO(GPIO29_EDGE_LOW, 22, 1)
4055 ADD_BITFIELD_RO(GPIO29_LEVEL_HIGH, 21, 1)
4056 ADD_BITFIELD_RO(GPIO29_LEVEL_LOW, 20, 1)
4057 ADD_BITFIELD_RO(GPIO28_EDGE_HIGH, 19, 1)
4058 ADD_BITFIELD_RO(GPIO28_EDGE_LOW, 18, 1)
4059 ADD_BITFIELD_RO(GPIO28_LEVEL_HIGH, 17, 1)
4060 ADD_BITFIELD_RO(GPIO28_LEVEL_LOW, 16, 1)
4061 ADD_BITFIELD_RO(GPIO27_EDGE_HIGH, 15, 1)
4062 ADD_BITFIELD_RO(GPIO27_EDGE_LOW, 14, 1)
4063 ADD_BITFIELD_RO(GPIO27_LEVEL_HIGH, 13, 1)
4064 ADD_BITFIELD_RO(GPIO27_LEVEL_LOW, 12, 1)
4065 ADD_BITFIELD_RO(GPIO26_EDGE_HIGH, 11, 1)
4066 ADD_BITFIELD_RO(GPIO26_EDGE_LOW, 10, 1)
4067 ADD_BITFIELD_RO(GPIO26_LEVEL_HIGH, 9, 1)
4068 ADD_BITFIELD_RO(GPIO26_LEVEL_LOW, 8, 1)
4069 ADD_BITFIELD_RO(GPIO25_EDGE_HIGH, 7, 1)
4070 ADD_BITFIELD_RO(GPIO25_EDGE_LOW, 6, 1)
4071 ADD_BITFIELD_RO(GPIO25_LEVEL_HIGH, 5, 1)
4072 ADD_BITFIELD_RO(GPIO25_LEVEL_LOW, 4, 1)
4073 ADD_BITFIELD_RO(GPIO24_EDGE_HIGH, 3, 1)
4074 ADD_BITFIELD_RO(GPIO24_EDGE_LOW, 2, 1)
4075 ADD_BITFIELD_RO(GPIO24_LEVEL_HIGH, 1, 1)
4076 ADD_BITFIELD_RO(GPIO24_LEVEL_LOW, 0, 1)
4077 END_TYPE()
4078
4079 // Interrupt status after masking & forcing for proc1
4080 // Reset value: 0x00000000
4081 BEGIN_TYPE(PROC1_INTS4_t, uint32_t)
4082 ADD_BITFIELD_RO(GPIO39_EDGE_HIGH, 31, 1)
4083 ADD_BITFIELD_RO(GPIO39_EDGE_LOW, 30, 1)
4084 ADD_BITFIELD_RO(GPIO39_LEVEL_HIGH, 29, 1)
4085 ADD_BITFIELD_RO(GPIO39_LEVEL_LOW, 28, 1)
4086 ADD_BITFIELD_RO(GPIO38_EDGE_HIGH, 27, 1)
4087 ADD_BITFIELD_RO(GPIO38_EDGE_LOW, 26, 1)
4088 ADD_BITFIELD_RO(GPIO38_LEVEL_HIGH, 25, 1)
4089 ADD_BITFIELD_RO(GPIO38_LEVEL_LOW, 24, 1)
4090 ADD_BITFIELD_RO(GPIO37_EDGE_HIGH, 23, 1)
4091 ADD_BITFIELD_RO(GPIO37_EDGE_LOW, 22, 1)
4092 ADD_BITFIELD_RO(GPIO37_LEVEL_HIGH, 21, 1)
4093 ADD_BITFIELD_RO(GPIO37_LEVEL_LOW, 20, 1)
4094 ADD_BITFIELD_RO(GPIO36_EDGE_HIGH, 19, 1)
4095 ADD_BITFIELD_RO(GPIO36_EDGE_LOW, 18, 1)
4096 ADD_BITFIELD_RO(GPIO36_LEVEL_HIGH, 17, 1)
4097 ADD_BITFIELD_RO(GPIO36_LEVEL_LOW, 16, 1)
4098 ADD_BITFIELD_RO(GPIO35_EDGE_HIGH, 15, 1)
4099 ADD_BITFIELD_RO(GPIO35_EDGE_LOW, 14, 1)
4100 ADD_BITFIELD_RO(GPIO35_LEVEL_HIGH, 13, 1)
4101 ADD_BITFIELD_RO(GPIO35_LEVEL_LOW, 12, 1)
4102 ADD_BITFIELD_RO(GPIO34_EDGE_HIGH, 11, 1)
4103 ADD_BITFIELD_RO(GPIO34_EDGE_LOW, 10, 1)
4104 ADD_BITFIELD_RO(GPIO34_LEVEL_HIGH, 9, 1)
4105 ADD_BITFIELD_RO(GPIO34_LEVEL_LOW, 8, 1)
4106 ADD_BITFIELD_RO(GPIO33_EDGE_HIGH, 7, 1)
4107 ADD_BITFIELD_RO(GPIO33_EDGE_LOW, 6, 1)
4108 ADD_BITFIELD_RO(GPIO33_LEVEL_HIGH, 5, 1)
4109 ADD_BITFIELD_RO(GPIO33_LEVEL_LOW, 4, 1)
4110 ADD_BITFIELD_RO(GPIO32_EDGE_HIGH, 3, 1)
4111 ADD_BITFIELD_RO(GPIO32_EDGE_LOW, 2, 1)
4112 ADD_BITFIELD_RO(GPIO32_LEVEL_HIGH, 1, 1)
4113 ADD_BITFIELD_RO(GPIO32_LEVEL_LOW, 0, 1)
4114 END_TYPE()
4115
4116 // Interrupt status after masking & forcing for proc1
4117 // Reset value: 0x00000000
4118 BEGIN_TYPE(PROC1_INTS5_t, uint32_t)
4119 ADD_BITFIELD_RO(GPIO47_EDGE_HIGH, 31, 1)
4120 ADD_BITFIELD_RO(GPIO47_EDGE_LOW, 30, 1)
4121 ADD_BITFIELD_RO(GPIO47_LEVEL_HIGH, 29, 1)
4122 ADD_BITFIELD_RO(GPIO47_LEVEL_LOW, 28, 1)
4123 ADD_BITFIELD_RO(GPIO46_EDGE_HIGH, 27, 1)
4124 ADD_BITFIELD_RO(GPIO46_EDGE_LOW, 26, 1)
4125 ADD_BITFIELD_RO(GPIO46_LEVEL_HIGH, 25, 1)
4126 ADD_BITFIELD_RO(GPIO46_LEVEL_LOW, 24, 1)
4127 ADD_BITFIELD_RO(GPIO45_EDGE_HIGH, 23, 1)
4128 ADD_BITFIELD_RO(GPIO45_EDGE_LOW, 22, 1)
4129 ADD_BITFIELD_RO(GPIO45_LEVEL_HIGH, 21, 1)
4130 ADD_BITFIELD_RO(GPIO45_LEVEL_LOW, 20, 1)
4131 ADD_BITFIELD_RO(GPIO44_EDGE_HIGH, 19, 1)
4132 ADD_BITFIELD_RO(GPIO44_EDGE_LOW, 18, 1)
4133 ADD_BITFIELD_RO(GPIO44_LEVEL_HIGH, 17, 1)
4134 ADD_BITFIELD_RO(GPIO44_LEVEL_LOW, 16, 1)
4135 ADD_BITFIELD_RO(GPIO43_EDGE_HIGH, 15, 1)
4136 ADD_BITFIELD_RO(GPIO43_EDGE_LOW, 14, 1)
4137 ADD_BITFIELD_RO(GPIO43_LEVEL_HIGH, 13, 1)
4138 ADD_BITFIELD_RO(GPIO43_LEVEL_LOW, 12, 1)
4139 ADD_BITFIELD_RO(GPIO42_EDGE_HIGH, 11, 1)
4140 ADD_BITFIELD_RO(GPIO42_EDGE_LOW, 10, 1)
4141 ADD_BITFIELD_RO(GPIO42_LEVEL_HIGH, 9, 1)
4142 ADD_BITFIELD_RO(GPIO42_LEVEL_LOW, 8, 1)
4143 ADD_BITFIELD_RO(GPIO41_EDGE_HIGH, 7, 1)
4144 ADD_BITFIELD_RO(GPIO41_EDGE_LOW, 6, 1)
4145 ADD_BITFIELD_RO(GPIO41_LEVEL_HIGH, 5, 1)
4146 ADD_BITFIELD_RO(GPIO41_LEVEL_LOW, 4, 1)
4147 ADD_BITFIELD_RO(GPIO40_EDGE_HIGH, 3, 1)
4148 ADD_BITFIELD_RO(GPIO40_EDGE_LOW, 2, 1)
4149 ADD_BITFIELD_RO(GPIO40_LEVEL_HIGH, 1, 1)
4150 ADD_BITFIELD_RO(GPIO40_LEVEL_LOW, 0, 1)
4151 END_TYPE()
4152
4153 // Interrupt Enable for dormant_wake
4154 // Reset value: 0x00000000
4155 BEGIN_TYPE(DORMANT_WAKE_INTE0_t, uint32_t)
4156 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
4157 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
4158 ADD_BITFIELD_RW(GPIO7_LEVEL_HIGH, 29, 1)
4159 ADD_BITFIELD_RW(GPIO7_LEVEL_LOW, 28, 1)
4160 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
4161 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
4162 ADD_BITFIELD_RW(GPIO6_LEVEL_HIGH, 25, 1)
4163 ADD_BITFIELD_RW(GPIO6_LEVEL_LOW, 24, 1)
4164 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
4165 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
4166 ADD_BITFIELD_RW(GPIO5_LEVEL_HIGH, 21, 1)
4167 ADD_BITFIELD_RW(GPIO5_LEVEL_LOW, 20, 1)
4168 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
4169 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
4170 ADD_BITFIELD_RW(GPIO4_LEVEL_HIGH, 17, 1)
4171 ADD_BITFIELD_RW(GPIO4_LEVEL_LOW, 16, 1)
4172 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
4173 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
4174 ADD_BITFIELD_RW(GPIO3_LEVEL_HIGH, 13, 1)
4175 ADD_BITFIELD_RW(GPIO3_LEVEL_LOW, 12, 1)
4176 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
4177 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
4178 ADD_BITFIELD_RW(GPIO2_LEVEL_HIGH, 9, 1)
4179 ADD_BITFIELD_RW(GPIO2_LEVEL_LOW, 8, 1)
4180 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
4181 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
4182 ADD_BITFIELD_RW(GPIO1_LEVEL_HIGH, 5, 1)
4183 ADD_BITFIELD_RW(GPIO1_LEVEL_LOW, 4, 1)
4184 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
4185 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
4186 ADD_BITFIELD_RW(GPIO0_LEVEL_HIGH, 1, 1)
4187 ADD_BITFIELD_RW(GPIO0_LEVEL_LOW, 0, 1)
4188 END_TYPE()
4189
4190 // Interrupt Enable for dormant_wake
4191 // Reset value: 0x00000000
4192 BEGIN_TYPE(DORMANT_WAKE_INTE1_t, uint32_t)
4193 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
4194 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
4195 ADD_BITFIELD_RW(GPIO15_LEVEL_HIGH, 29, 1)
4196 ADD_BITFIELD_RW(GPIO15_LEVEL_LOW, 28, 1)
4197 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
4198 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
4199 ADD_BITFIELD_RW(GPIO14_LEVEL_HIGH, 25, 1)
4200 ADD_BITFIELD_RW(GPIO14_LEVEL_LOW, 24, 1)
4201 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
4202 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
4203 ADD_BITFIELD_RW(GPIO13_LEVEL_HIGH, 21, 1)
4204 ADD_BITFIELD_RW(GPIO13_LEVEL_LOW, 20, 1)
4205 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
4206 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
4207 ADD_BITFIELD_RW(GPIO12_LEVEL_HIGH, 17, 1)
4208 ADD_BITFIELD_RW(GPIO12_LEVEL_LOW, 16, 1)
4209 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
4210 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
4211 ADD_BITFIELD_RW(GPIO11_LEVEL_HIGH, 13, 1)
4212 ADD_BITFIELD_RW(GPIO11_LEVEL_LOW, 12, 1)
4213 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
4214 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
4215 ADD_BITFIELD_RW(GPIO10_LEVEL_HIGH, 9, 1)
4216 ADD_BITFIELD_RW(GPIO10_LEVEL_LOW, 8, 1)
4217 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
4218 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
4219 ADD_BITFIELD_RW(GPIO9_LEVEL_HIGH, 5, 1)
4220 ADD_BITFIELD_RW(GPIO9_LEVEL_LOW, 4, 1)
4221 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
4222 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
4223 ADD_BITFIELD_RW(GPIO8_LEVEL_HIGH, 1, 1)
4224 ADD_BITFIELD_RW(GPIO8_LEVEL_LOW, 0, 1)
4225 END_TYPE()
4226
4227 // Interrupt Enable for dormant_wake
4228 // Reset value: 0x00000000
4229 BEGIN_TYPE(DORMANT_WAKE_INTE2_t, uint32_t)
4230 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
4231 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
4232 ADD_BITFIELD_RW(GPIO23_LEVEL_HIGH, 29, 1)
4233 ADD_BITFIELD_RW(GPIO23_LEVEL_LOW, 28, 1)
4234 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
4235 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
4236 ADD_BITFIELD_RW(GPIO22_LEVEL_HIGH, 25, 1)
4237 ADD_BITFIELD_RW(GPIO22_LEVEL_LOW, 24, 1)
4238 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
4239 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
4240 ADD_BITFIELD_RW(GPIO21_LEVEL_HIGH, 21, 1)
4241 ADD_BITFIELD_RW(GPIO21_LEVEL_LOW, 20, 1)
4242 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
4243 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
4244 ADD_BITFIELD_RW(GPIO20_LEVEL_HIGH, 17, 1)
4245 ADD_BITFIELD_RW(GPIO20_LEVEL_LOW, 16, 1)
4246 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
4247 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
4248 ADD_BITFIELD_RW(GPIO19_LEVEL_HIGH, 13, 1)
4249 ADD_BITFIELD_RW(GPIO19_LEVEL_LOW, 12, 1)
4250 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
4251 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
4252 ADD_BITFIELD_RW(GPIO18_LEVEL_HIGH, 9, 1)
4253 ADD_BITFIELD_RW(GPIO18_LEVEL_LOW, 8, 1)
4254 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
4255 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
4256 ADD_BITFIELD_RW(GPIO17_LEVEL_HIGH, 5, 1)
4257 ADD_BITFIELD_RW(GPIO17_LEVEL_LOW, 4, 1)
4258 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
4259 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
4260 ADD_BITFIELD_RW(GPIO16_LEVEL_HIGH, 1, 1)
4261 ADD_BITFIELD_RW(GPIO16_LEVEL_LOW, 0, 1)
4262 END_TYPE()
4263
4264 // Interrupt Enable for dormant_wake
4265 // Reset value: 0x00000000
4266 BEGIN_TYPE(DORMANT_WAKE_INTE3_t, uint32_t)
4267 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
4268 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
4269 ADD_BITFIELD_RW(GPIO31_LEVEL_HIGH, 29, 1)
4270 ADD_BITFIELD_RW(GPIO31_LEVEL_LOW, 28, 1)
4271 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
4272 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
4273 ADD_BITFIELD_RW(GPIO30_LEVEL_HIGH, 25, 1)
4274 ADD_BITFIELD_RW(GPIO30_LEVEL_LOW, 24, 1)
4275 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
4276 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
4277 ADD_BITFIELD_RW(GPIO29_LEVEL_HIGH, 21, 1)
4278 ADD_BITFIELD_RW(GPIO29_LEVEL_LOW, 20, 1)
4279 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
4280 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
4281 ADD_BITFIELD_RW(GPIO28_LEVEL_HIGH, 17, 1)
4282 ADD_BITFIELD_RW(GPIO28_LEVEL_LOW, 16, 1)
4283 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
4284 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
4285 ADD_BITFIELD_RW(GPIO27_LEVEL_HIGH, 13, 1)
4286 ADD_BITFIELD_RW(GPIO27_LEVEL_LOW, 12, 1)
4287 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
4288 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
4289 ADD_BITFIELD_RW(GPIO26_LEVEL_HIGH, 9, 1)
4290 ADD_BITFIELD_RW(GPIO26_LEVEL_LOW, 8, 1)
4291 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
4292 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
4293 ADD_BITFIELD_RW(GPIO25_LEVEL_HIGH, 5, 1)
4294 ADD_BITFIELD_RW(GPIO25_LEVEL_LOW, 4, 1)
4295 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
4296 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
4297 ADD_BITFIELD_RW(GPIO24_LEVEL_HIGH, 1, 1)
4298 ADD_BITFIELD_RW(GPIO24_LEVEL_LOW, 0, 1)
4299 END_TYPE()
4300
4301 // Interrupt Enable for dormant_wake
4302 // Reset value: 0x00000000
4303 BEGIN_TYPE(DORMANT_WAKE_INTE4_t, uint32_t)
4304 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
4305 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
4306 ADD_BITFIELD_RW(GPIO39_LEVEL_HIGH, 29, 1)
4307 ADD_BITFIELD_RW(GPIO39_LEVEL_LOW, 28, 1)
4308 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
4309 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
4310 ADD_BITFIELD_RW(GPIO38_LEVEL_HIGH, 25, 1)
4311 ADD_BITFIELD_RW(GPIO38_LEVEL_LOW, 24, 1)
4312 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
4313 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
4314 ADD_BITFIELD_RW(GPIO37_LEVEL_HIGH, 21, 1)
4315 ADD_BITFIELD_RW(GPIO37_LEVEL_LOW, 20, 1)
4316 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
4317 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
4318 ADD_BITFIELD_RW(GPIO36_LEVEL_HIGH, 17, 1)
4319 ADD_BITFIELD_RW(GPIO36_LEVEL_LOW, 16, 1)
4320 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
4321 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
4322 ADD_BITFIELD_RW(GPIO35_LEVEL_HIGH, 13, 1)
4323 ADD_BITFIELD_RW(GPIO35_LEVEL_LOW, 12, 1)
4324 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
4325 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
4326 ADD_BITFIELD_RW(GPIO34_LEVEL_HIGH, 9, 1)
4327 ADD_BITFIELD_RW(GPIO34_LEVEL_LOW, 8, 1)
4328 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
4329 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
4330 ADD_BITFIELD_RW(GPIO33_LEVEL_HIGH, 5, 1)
4331 ADD_BITFIELD_RW(GPIO33_LEVEL_LOW, 4, 1)
4332 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
4333 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
4334 ADD_BITFIELD_RW(GPIO32_LEVEL_HIGH, 1, 1)
4335 ADD_BITFIELD_RW(GPIO32_LEVEL_LOW, 0, 1)
4336 END_TYPE()
4337
4338 // Interrupt Enable for dormant_wake
4339 // Reset value: 0x00000000
4340 BEGIN_TYPE(DORMANT_WAKE_INTE5_t, uint32_t)
4341 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
4342 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
4343 ADD_BITFIELD_RW(GPIO47_LEVEL_HIGH, 29, 1)
4344 ADD_BITFIELD_RW(GPIO47_LEVEL_LOW, 28, 1)
4345 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
4346 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
4347 ADD_BITFIELD_RW(GPIO46_LEVEL_HIGH, 25, 1)
4348 ADD_BITFIELD_RW(GPIO46_LEVEL_LOW, 24, 1)
4349 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
4350 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
4351 ADD_BITFIELD_RW(GPIO45_LEVEL_HIGH, 21, 1)
4352 ADD_BITFIELD_RW(GPIO45_LEVEL_LOW, 20, 1)
4353 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
4354 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
4355 ADD_BITFIELD_RW(GPIO44_LEVEL_HIGH, 17, 1)
4356 ADD_BITFIELD_RW(GPIO44_LEVEL_LOW, 16, 1)
4357 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
4358 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
4359 ADD_BITFIELD_RW(GPIO43_LEVEL_HIGH, 13, 1)
4360 ADD_BITFIELD_RW(GPIO43_LEVEL_LOW, 12, 1)
4361 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
4362 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
4363 ADD_BITFIELD_RW(GPIO42_LEVEL_HIGH, 9, 1)
4364 ADD_BITFIELD_RW(GPIO42_LEVEL_LOW, 8, 1)
4365 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
4366 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
4367 ADD_BITFIELD_RW(GPIO41_LEVEL_HIGH, 5, 1)
4368 ADD_BITFIELD_RW(GPIO41_LEVEL_LOW, 4, 1)
4369 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
4370 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
4371 ADD_BITFIELD_RW(GPIO40_LEVEL_HIGH, 1, 1)
4372 ADD_BITFIELD_RW(GPIO40_LEVEL_LOW, 0, 1)
4373 END_TYPE()
4374
4375 // Interrupt Force for dormant_wake
4376 // Reset value: 0x00000000
4377 BEGIN_TYPE(DORMANT_WAKE_INTF0_t, uint32_t)
4378 ADD_BITFIELD_RW(GPIO7_EDGE_HIGH, 31, 1)
4379 ADD_BITFIELD_RW(GPIO7_EDGE_LOW, 30, 1)
4380 ADD_BITFIELD_RW(GPIO7_LEVEL_HIGH, 29, 1)
4381 ADD_BITFIELD_RW(GPIO7_LEVEL_LOW, 28, 1)
4382 ADD_BITFIELD_RW(GPIO6_EDGE_HIGH, 27, 1)
4383 ADD_BITFIELD_RW(GPIO6_EDGE_LOW, 26, 1)
4384 ADD_BITFIELD_RW(GPIO6_LEVEL_HIGH, 25, 1)
4385 ADD_BITFIELD_RW(GPIO6_LEVEL_LOW, 24, 1)
4386 ADD_BITFIELD_RW(GPIO5_EDGE_HIGH, 23, 1)
4387 ADD_BITFIELD_RW(GPIO5_EDGE_LOW, 22, 1)
4388 ADD_BITFIELD_RW(GPIO5_LEVEL_HIGH, 21, 1)
4389 ADD_BITFIELD_RW(GPIO5_LEVEL_LOW, 20, 1)
4390 ADD_BITFIELD_RW(GPIO4_EDGE_HIGH, 19, 1)
4391 ADD_BITFIELD_RW(GPIO4_EDGE_LOW, 18, 1)
4392 ADD_BITFIELD_RW(GPIO4_LEVEL_HIGH, 17, 1)
4393 ADD_BITFIELD_RW(GPIO4_LEVEL_LOW, 16, 1)
4394 ADD_BITFIELD_RW(GPIO3_EDGE_HIGH, 15, 1)
4395 ADD_BITFIELD_RW(GPIO3_EDGE_LOW, 14, 1)
4396 ADD_BITFIELD_RW(GPIO3_LEVEL_HIGH, 13, 1)
4397 ADD_BITFIELD_RW(GPIO3_LEVEL_LOW, 12, 1)
4398 ADD_BITFIELD_RW(GPIO2_EDGE_HIGH, 11, 1)
4399 ADD_BITFIELD_RW(GPIO2_EDGE_LOW, 10, 1)
4400 ADD_BITFIELD_RW(GPIO2_LEVEL_HIGH, 9, 1)
4401 ADD_BITFIELD_RW(GPIO2_LEVEL_LOW, 8, 1)
4402 ADD_BITFIELD_RW(GPIO1_EDGE_HIGH, 7, 1)
4403 ADD_BITFIELD_RW(GPIO1_EDGE_LOW, 6, 1)
4404 ADD_BITFIELD_RW(GPIO1_LEVEL_HIGH, 5, 1)
4405 ADD_BITFIELD_RW(GPIO1_LEVEL_LOW, 4, 1)
4406 ADD_BITFIELD_RW(GPIO0_EDGE_HIGH, 3, 1)
4407 ADD_BITFIELD_RW(GPIO0_EDGE_LOW, 2, 1)
4408 ADD_BITFIELD_RW(GPIO0_LEVEL_HIGH, 1, 1)
4409 ADD_BITFIELD_RW(GPIO0_LEVEL_LOW, 0, 1)
4410 END_TYPE()
4411
4412 // Interrupt Force for dormant_wake
4413 // Reset value: 0x00000000
4414 BEGIN_TYPE(DORMANT_WAKE_INTF1_t, uint32_t)
4415 ADD_BITFIELD_RW(GPIO15_EDGE_HIGH, 31, 1)
4416 ADD_BITFIELD_RW(GPIO15_EDGE_LOW, 30, 1)
4417 ADD_BITFIELD_RW(GPIO15_LEVEL_HIGH, 29, 1)
4418 ADD_BITFIELD_RW(GPIO15_LEVEL_LOW, 28, 1)
4419 ADD_BITFIELD_RW(GPIO14_EDGE_HIGH, 27, 1)
4420 ADD_BITFIELD_RW(GPIO14_EDGE_LOW, 26, 1)
4421 ADD_BITFIELD_RW(GPIO14_LEVEL_HIGH, 25, 1)
4422 ADD_BITFIELD_RW(GPIO14_LEVEL_LOW, 24, 1)
4423 ADD_BITFIELD_RW(GPIO13_EDGE_HIGH, 23, 1)
4424 ADD_BITFIELD_RW(GPIO13_EDGE_LOW, 22, 1)
4425 ADD_BITFIELD_RW(GPIO13_LEVEL_HIGH, 21, 1)
4426 ADD_BITFIELD_RW(GPIO13_LEVEL_LOW, 20, 1)
4427 ADD_BITFIELD_RW(GPIO12_EDGE_HIGH, 19, 1)
4428 ADD_BITFIELD_RW(GPIO12_EDGE_LOW, 18, 1)
4429 ADD_BITFIELD_RW(GPIO12_LEVEL_HIGH, 17, 1)
4430 ADD_BITFIELD_RW(GPIO12_LEVEL_LOW, 16, 1)
4431 ADD_BITFIELD_RW(GPIO11_EDGE_HIGH, 15, 1)
4432 ADD_BITFIELD_RW(GPIO11_EDGE_LOW, 14, 1)
4433 ADD_BITFIELD_RW(GPIO11_LEVEL_HIGH, 13, 1)
4434 ADD_BITFIELD_RW(GPIO11_LEVEL_LOW, 12, 1)
4435 ADD_BITFIELD_RW(GPIO10_EDGE_HIGH, 11, 1)
4436 ADD_BITFIELD_RW(GPIO10_EDGE_LOW, 10, 1)
4437 ADD_BITFIELD_RW(GPIO10_LEVEL_HIGH, 9, 1)
4438 ADD_BITFIELD_RW(GPIO10_LEVEL_LOW, 8, 1)
4439 ADD_BITFIELD_RW(GPIO9_EDGE_HIGH, 7, 1)
4440 ADD_BITFIELD_RW(GPIO9_EDGE_LOW, 6, 1)
4441 ADD_BITFIELD_RW(GPIO9_LEVEL_HIGH, 5, 1)
4442 ADD_BITFIELD_RW(GPIO9_LEVEL_LOW, 4, 1)
4443 ADD_BITFIELD_RW(GPIO8_EDGE_HIGH, 3, 1)
4444 ADD_BITFIELD_RW(GPIO8_EDGE_LOW, 2, 1)
4445 ADD_BITFIELD_RW(GPIO8_LEVEL_HIGH, 1, 1)
4446 ADD_BITFIELD_RW(GPIO8_LEVEL_LOW, 0, 1)
4447 END_TYPE()
4448
4449 // Interrupt Force for dormant_wake
4450 // Reset value: 0x00000000
4451 BEGIN_TYPE(DORMANT_WAKE_INTF2_t, uint32_t)
4452 ADD_BITFIELD_RW(GPIO23_EDGE_HIGH, 31, 1)
4453 ADD_BITFIELD_RW(GPIO23_EDGE_LOW, 30, 1)
4454 ADD_BITFIELD_RW(GPIO23_LEVEL_HIGH, 29, 1)
4455 ADD_BITFIELD_RW(GPIO23_LEVEL_LOW, 28, 1)
4456 ADD_BITFIELD_RW(GPIO22_EDGE_HIGH, 27, 1)
4457 ADD_BITFIELD_RW(GPIO22_EDGE_LOW, 26, 1)
4458 ADD_BITFIELD_RW(GPIO22_LEVEL_HIGH, 25, 1)
4459 ADD_BITFIELD_RW(GPIO22_LEVEL_LOW, 24, 1)
4460 ADD_BITFIELD_RW(GPIO21_EDGE_HIGH, 23, 1)
4461 ADD_BITFIELD_RW(GPIO21_EDGE_LOW, 22, 1)
4462 ADD_BITFIELD_RW(GPIO21_LEVEL_HIGH, 21, 1)
4463 ADD_BITFIELD_RW(GPIO21_LEVEL_LOW, 20, 1)
4464 ADD_BITFIELD_RW(GPIO20_EDGE_HIGH, 19, 1)
4465 ADD_BITFIELD_RW(GPIO20_EDGE_LOW, 18, 1)
4466 ADD_BITFIELD_RW(GPIO20_LEVEL_HIGH, 17, 1)
4467 ADD_BITFIELD_RW(GPIO20_LEVEL_LOW, 16, 1)
4468 ADD_BITFIELD_RW(GPIO19_EDGE_HIGH, 15, 1)
4469 ADD_BITFIELD_RW(GPIO19_EDGE_LOW, 14, 1)
4470 ADD_BITFIELD_RW(GPIO19_LEVEL_HIGH, 13, 1)
4471 ADD_BITFIELD_RW(GPIO19_LEVEL_LOW, 12, 1)
4472 ADD_BITFIELD_RW(GPIO18_EDGE_HIGH, 11, 1)
4473 ADD_BITFIELD_RW(GPIO18_EDGE_LOW, 10, 1)
4474 ADD_BITFIELD_RW(GPIO18_LEVEL_HIGH, 9, 1)
4475 ADD_BITFIELD_RW(GPIO18_LEVEL_LOW, 8, 1)
4476 ADD_BITFIELD_RW(GPIO17_EDGE_HIGH, 7, 1)
4477 ADD_BITFIELD_RW(GPIO17_EDGE_LOW, 6, 1)
4478 ADD_BITFIELD_RW(GPIO17_LEVEL_HIGH, 5, 1)
4479 ADD_BITFIELD_RW(GPIO17_LEVEL_LOW, 4, 1)
4480 ADD_BITFIELD_RW(GPIO16_EDGE_HIGH, 3, 1)
4481 ADD_BITFIELD_RW(GPIO16_EDGE_LOW, 2, 1)
4482 ADD_BITFIELD_RW(GPIO16_LEVEL_HIGH, 1, 1)
4483 ADD_BITFIELD_RW(GPIO16_LEVEL_LOW, 0, 1)
4484 END_TYPE()
4485
4486 // Interrupt Force for dormant_wake
4487 // Reset value: 0x00000000
4488 BEGIN_TYPE(DORMANT_WAKE_INTF3_t, uint32_t)
4489 ADD_BITFIELD_RW(GPIO31_EDGE_HIGH, 31, 1)
4490 ADD_BITFIELD_RW(GPIO31_EDGE_LOW, 30, 1)
4491 ADD_BITFIELD_RW(GPIO31_LEVEL_HIGH, 29, 1)
4492 ADD_BITFIELD_RW(GPIO31_LEVEL_LOW, 28, 1)
4493 ADD_BITFIELD_RW(GPIO30_EDGE_HIGH, 27, 1)
4494 ADD_BITFIELD_RW(GPIO30_EDGE_LOW, 26, 1)
4495 ADD_BITFIELD_RW(GPIO30_LEVEL_HIGH, 25, 1)
4496 ADD_BITFIELD_RW(GPIO30_LEVEL_LOW, 24, 1)
4497 ADD_BITFIELD_RW(GPIO29_EDGE_HIGH, 23, 1)
4498 ADD_BITFIELD_RW(GPIO29_EDGE_LOW, 22, 1)
4499 ADD_BITFIELD_RW(GPIO29_LEVEL_HIGH, 21, 1)
4500 ADD_BITFIELD_RW(GPIO29_LEVEL_LOW, 20, 1)
4501 ADD_BITFIELD_RW(GPIO28_EDGE_HIGH, 19, 1)
4502 ADD_BITFIELD_RW(GPIO28_EDGE_LOW, 18, 1)
4503 ADD_BITFIELD_RW(GPIO28_LEVEL_HIGH, 17, 1)
4504 ADD_BITFIELD_RW(GPIO28_LEVEL_LOW, 16, 1)
4505 ADD_BITFIELD_RW(GPIO27_EDGE_HIGH, 15, 1)
4506 ADD_BITFIELD_RW(GPIO27_EDGE_LOW, 14, 1)
4507 ADD_BITFIELD_RW(GPIO27_LEVEL_HIGH, 13, 1)
4508 ADD_BITFIELD_RW(GPIO27_LEVEL_LOW, 12, 1)
4509 ADD_BITFIELD_RW(GPIO26_EDGE_HIGH, 11, 1)
4510 ADD_BITFIELD_RW(GPIO26_EDGE_LOW, 10, 1)
4511 ADD_BITFIELD_RW(GPIO26_LEVEL_HIGH, 9, 1)
4512 ADD_BITFIELD_RW(GPIO26_LEVEL_LOW, 8, 1)
4513 ADD_BITFIELD_RW(GPIO25_EDGE_HIGH, 7, 1)
4514 ADD_BITFIELD_RW(GPIO25_EDGE_LOW, 6, 1)
4515 ADD_BITFIELD_RW(GPIO25_LEVEL_HIGH, 5, 1)
4516 ADD_BITFIELD_RW(GPIO25_LEVEL_LOW, 4, 1)
4517 ADD_BITFIELD_RW(GPIO24_EDGE_HIGH, 3, 1)
4518 ADD_BITFIELD_RW(GPIO24_EDGE_LOW, 2, 1)
4519 ADD_BITFIELD_RW(GPIO24_LEVEL_HIGH, 1, 1)
4520 ADD_BITFIELD_RW(GPIO24_LEVEL_LOW, 0, 1)
4521 END_TYPE()
4522
4523 // Interrupt Force for dormant_wake
4524 // Reset value: 0x00000000
4525 BEGIN_TYPE(DORMANT_WAKE_INTF4_t, uint32_t)
4526 ADD_BITFIELD_RW(GPIO39_EDGE_HIGH, 31, 1)
4527 ADD_BITFIELD_RW(GPIO39_EDGE_LOW, 30, 1)
4528 ADD_BITFIELD_RW(GPIO39_LEVEL_HIGH, 29, 1)
4529 ADD_BITFIELD_RW(GPIO39_LEVEL_LOW, 28, 1)
4530 ADD_BITFIELD_RW(GPIO38_EDGE_HIGH, 27, 1)
4531 ADD_BITFIELD_RW(GPIO38_EDGE_LOW, 26, 1)
4532 ADD_BITFIELD_RW(GPIO38_LEVEL_HIGH, 25, 1)
4533 ADD_BITFIELD_RW(GPIO38_LEVEL_LOW, 24, 1)
4534 ADD_BITFIELD_RW(GPIO37_EDGE_HIGH, 23, 1)
4535 ADD_BITFIELD_RW(GPIO37_EDGE_LOW, 22, 1)
4536 ADD_BITFIELD_RW(GPIO37_LEVEL_HIGH, 21, 1)
4537 ADD_BITFIELD_RW(GPIO37_LEVEL_LOW, 20, 1)
4538 ADD_BITFIELD_RW(GPIO36_EDGE_HIGH, 19, 1)
4539 ADD_BITFIELD_RW(GPIO36_EDGE_LOW, 18, 1)
4540 ADD_BITFIELD_RW(GPIO36_LEVEL_HIGH, 17, 1)
4541 ADD_BITFIELD_RW(GPIO36_LEVEL_LOW, 16, 1)
4542 ADD_BITFIELD_RW(GPIO35_EDGE_HIGH, 15, 1)
4543 ADD_BITFIELD_RW(GPIO35_EDGE_LOW, 14, 1)
4544 ADD_BITFIELD_RW(GPIO35_LEVEL_HIGH, 13, 1)
4545 ADD_BITFIELD_RW(GPIO35_LEVEL_LOW, 12, 1)
4546 ADD_BITFIELD_RW(GPIO34_EDGE_HIGH, 11, 1)
4547 ADD_BITFIELD_RW(GPIO34_EDGE_LOW, 10, 1)
4548 ADD_BITFIELD_RW(GPIO34_LEVEL_HIGH, 9, 1)
4549 ADD_BITFIELD_RW(GPIO34_LEVEL_LOW, 8, 1)
4550 ADD_BITFIELD_RW(GPIO33_EDGE_HIGH, 7, 1)
4551 ADD_BITFIELD_RW(GPIO33_EDGE_LOW, 6, 1)
4552 ADD_BITFIELD_RW(GPIO33_LEVEL_HIGH, 5, 1)
4553 ADD_BITFIELD_RW(GPIO33_LEVEL_LOW, 4, 1)
4554 ADD_BITFIELD_RW(GPIO32_EDGE_HIGH, 3, 1)
4555 ADD_BITFIELD_RW(GPIO32_EDGE_LOW, 2, 1)
4556 ADD_BITFIELD_RW(GPIO32_LEVEL_HIGH, 1, 1)
4557 ADD_BITFIELD_RW(GPIO32_LEVEL_LOW, 0, 1)
4558 END_TYPE()
4559
4560 // Interrupt Force for dormant_wake
4561 // Reset value: 0x00000000
4562 BEGIN_TYPE(DORMANT_WAKE_INTF5_t, uint32_t)
4563 ADD_BITFIELD_RW(GPIO47_EDGE_HIGH, 31, 1)
4564 ADD_BITFIELD_RW(GPIO47_EDGE_LOW, 30, 1)
4565 ADD_BITFIELD_RW(GPIO47_LEVEL_HIGH, 29, 1)
4566 ADD_BITFIELD_RW(GPIO47_LEVEL_LOW, 28, 1)
4567 ADD_BITFIELD_RW(GPIO46_EDGE_HIGH, 27, 1)
4568 ADD_BITFIELD_RW(GPIO46_EDGE_LOW, 26, 1)
4569 ADD_BITFIELD_RW(GPIO46_LEVEL_HIGH, 25, 1)
4570 ADD_BITFIELD_RW(GPIO46_LEVEL_LOW, 24, 1)
4571 ADD_BITFIELD_RW(GPIO45_EDGE_HIGH, 23, 1)
4572 ADD_BITFIELD_RW(GPIO45_EDGE_LOW, 22, 1)
4573 ADD_BITFIELD_RW(GPIO45_LEVEL_HIGH, 21, 1)
4574 ADD_BITFIELD_RW(GPIO45_LEVEL_LOW, 20, 1)
4575 ADD_BITFIELD_RW(GPIO44_EDGE_HIGH, 19, 1)
4576 ADD_BITFIELD_RW(GPIO44_EDGE_LOW, 18, 1)
4577 ADD_BITFIELD_RW(GPIO44_LEVEL_HIGH, 17, 1)
4578 ADD_BITFIELD_RW(GPIO44_LEVEL_LOW, 16, 1)
4579 ADD_BITFIELD_RW(GPIO43_EDGE_HIGH, 15, 1)
4580 ADD_BITFIELD_RW(GPIO43_EDGE_LOW, 14, 1)
4581 ADD_BITFIELD_RW(GPIO43_LEVEL_HIGH, 13, 1)
4582 ADD_BITFIELD_RW(GPIO43_LEVEL_LOW, 12, 1)
4583 ADD_BITFIELD_RW(GPIO42_EDGE_HIGH, 11, 1)
4584 ADD_BITFIELD_RW(GPIO42_EDGE_LOW, 10, 1)
4585 ADD_BITFIELD_RW(GPIO42_LEVEL_HIGH, 9, 1)
4586 ADD_BITFIELD_RW(GPIO42_LEVEL_LOW, 8, 1)
4587 ADD_BITFIELD_RW(GPIO41_EDGE_HIGH, 7, 1)
4588 ADD_BITFIELD_RW(GPIO41_EDGE_LOW, 6, 1)
4589 ADD_BITFIELD_RW(GPIO41_LEVEL_HIGH, 5, 1)
4590 ADD_BITFIELD_RW(GPIO41_LEVEL_LOW, 4, 1)
4591 ADD_BITFIELD_RW(GPIO40_EDGE_HIGH, 3, 1)
4592 ADD_BITFIELD_RW(GPIO40_EDGE_LOW, 2, 1)
4593 ADD_BITFIELD_RW(GPIO40_LEVEL_HIGH, 1, 1)
4594 ADD_BITFIELD_RW(GPIO40_LEVEL_LOW, 0, 1)
4595 END_TYPE()
4596
4597 // Interrupt status after masking & forcing for dormant_wake
4598 // Reset value: 0x00000000
4599 BEGIN_TYPE(DORMANT_WAKE_INTS0_t, uint32_t)
4600 ADD_BITFIELD_RO(GPIO7_EDGE_HIGH, 31, 1)
4601 ADD_BITFIELD_RO(GPIO7_EDGE_LOW, 30, 1)
4602 ADD_BITFIELD_RO(GPIO7_LEVEL_HIGH, 29, 1)
4603 ADD_BITFIELD_RO(GPIO7_LEVEL_LOW, 28, 1)
4604 ADD_BITFIELD_RO(GPIO6_EDGE_HIGH, 27, 1)
4605 ADD_BITFIELD_RO(GPIO6_EDGE_LOW, 26, 1)
4606 ADD_BITFIELD_RO(GPIO6_LEVEL_HIGH, 25, 1)
4607 ADD_BITFIELD_RO(GPIO6_LEVEL_LOW, 24, 1)
4608 ADD_BITFIELD_RO(GPIO5_EDGE_HIGH, 23, 1)
4609 ADD_BITFIELD_RO(GPIO5_EDGE_LOW, 22, 1)
4610 ADD_BITFIELD_RO(GPIO5_LEVEL_HIGH, 21, 1)
4611 ADD_BITFIELD_RO(GPIO5_LEVEL_LOW, 20, 1)
4612 ADD_BITFIELD_RO(GPIO4_EDGE_HIGH, 19, 1)
4613 ADD_BITFIELD_RO(GPIO4_EDGE_LOW, 18, 1)
4614 ADD_BITFIELD_RO(GPIO4_LEVEL_HIGH, 17, 1)
4615 ADD_BITFIELD_RO(GPIO4_LEVEL_LOW, 16, 1)
4616 ADD_BITFIELD_RO(GPIO3_EDGE_HIGH, 15, 1)
4617 ADD_BITFIELD_RO(GPIO3_EDGE_LOW, 14, 1)
4618 ADD_BITFIELD_RO(GPIO3_LEVEL_HIGH, 13, 1)
4619 ADD_BITFIELD_RO(GPIO3_LEVEL_LOW, 12, 1)
4620 ADD_BITFIELD_RO(GPIO2_EDGE_HIGH, 11, 1)
4621 ADD_BITFIELD_RO(GPIO2_EDGE_LOW, 10, 1)
4622 ADD_BITFIELD_RO(GPIO2_LEVEL_HIGH, 9, 1)
4623 ADD_BITFIELD_RO(GPIO2_LEVEL_LOW, 8, 1)
4624 ADD_BITFIELD_RO(GPIO1_EDGE_HIGH, 7, 1)
4625 ADD_BITFIELD_RO(GPIO1_EDGE_LOW, 6, 1)
4626 ADD_BITFIELD_RO(GPIO1_LEVEL_HIGH, 5, 1)
4627 ADD_BITFIELD_RO(GPIO1_LEVEL_LOW, 4, 1)
4628 ADD_BITFIELD_RO(GPIO0_EDGE_HIGH, 3, 1)
4629 ADD_BITFIELD_RO(GPIO0_EDGE_LOW, 2, 1)
4630 ADD_BITFIELD_RO(GPIO0_LEVEL_HIGH, 1, 1)
4631 ADD_BITFIELD_RO(GPIO0_LEVEL_LOW, 0, 1)
4632 END_TYPE()
4633
4634 // Interrupt status after masking & forcing for dormant_wake
4635 // Reset value: 0x00000000
4636 BEGIN_TYPE(DORMANT_WAKE_INTS1_t, uint32_t)
4637 ADD_BITFIELD_RO(GPIO15_EDGE_HIGH, 31, 1)
4638 ADD_BITFIELD_RO(GPIO15_EDGE_LOW, 30, 1)
4639 ADD_BITFIELD_RO(GPIO15_LEVEL_HIGH, 29, 1)
4640 ADD_BITFIELD_RO(GPIO15_LEVEL_LOW, 28, 1)
4641 ADD_BITFIELD_RO(GPIO14_EDGE_HIGH, 27, 1)
4642 ADD_BITFIELD_RO(GPIO14_EDGE_LOW, 26, 1)
4643 ADD_BITFIELD_RO(GPIO14_LEVEL_HIGH, 25, 1)
4644 ADD_BITFIELD_RO(GPIO14_LEVEL_LOW, 24, 1)
4645 ADD_BITFIELD_RO(GPIO13_EDGE_HIGH, 23, 1)
4646 ADD_BITFIELD_RO(GPIO13_EDGE_LOW, 22, 1)
4647 ADD_BITFIELD_RO(GPIO13_LEVEL_HIGH, 21, 1)
4648 ADD_BITFIELD_RO(GPIO13_LEVEL_LOW, 20, 1)
4649 ADD_BITFIELD_RO(GPIO12_EDGE_HIGH, 19, 1)
4650 ADD_BITFIELD_RO(GPIO12_EDGE_LOW, 18, 1)
4651 ADD_BITFIELD_RO(GPIO12_LEVEL_HIGH, 17, 1)
4652 ADD_BITFIELD_RO(GPIO12_LEVEL_LOW, 16, 1)
4653 ADD_BITFIELD_RO(GPIO11_EDGE_HIGH, 15, 1)
4654 ADD_BITFIELD_RO(GPIO11_EDGE_LOW, 14, 1)
4655 ADD_BITFIELD_RO(GPIO11_LEVEL_HIGH, 13, 1)
4656 ADD_BITFIELD_RO(GPIO11_LEVEL_LOW, 12, 1)
4657 ADD_BITFIELD_RO(GPIO10_EDGE_HIGH, 11, 1)
4658 ADD_BITFIELD_RO(GPIO10_EDGE_LOW, 10, 1)
4659 ADD_BITFIELD_RO(GPIO10_LEVEL_HIGH, 9, 1)
4660 ADD_BITFIELD_RO(GPIO10_LEVEL_LOW, 8, 1)
4661 ADD_BITFIELD_RO(GPIO9_EDGE_HIGH, 7, 1)
4662 ADD_BITFIELD_RO(GPIO9_EDGE_LOW, 6, 1)
4663 ADD_BITFIELD_RO(GPIO9_LEVEL_HIGH, 5, 1)
4664 ADD_BITFIELD_RO(GPIO9_LEVEL_LOW, 4, 1)
4665 ADD_BITFIELD_RO(GPIO8_EDGE_HIGH, 3, 1)
4666 ADD_BITFIELD_RO(GPIO8_EDGE_LOW, 2, 1)
4667 ADD_BITFIELD_RO(GPIO8_LEVEL_HIGH, 1, 1)
4668 ADD_BITFIELD_RO(GPIO8_LEVEL_LOW, 0, 1)
4669 END_TYPE()
4670
4671 // Interrupt status after masking & forcing for dormant_wake
4672 // Reset value: 0x00000000
4673 BEGIN_TYPE(DORMANT_WAKE_INTS2_t, uint32_t)
4674 ADD_BITFIELD_RO(GPIO23_EDGE_HIGH, 31, 1)
4675 ADD_BITFIELD_RO(GPIO23_EDGE_LOW, 30, 1)
4676 ADD_BITFIELD_RO(GPIO23_LEVEL_HIGH, 29, 1)
4677 ADD_BITFIELD_RO(GPIO23_LEVEL_LOW, 28, 1)
4678 ADD_BITFIELD_RO(GPIO22_EDGE_HIGH, 27, 1)
4679 ADD_BITFIELD_RO(GPIO22_EDGE_LOW, 26, 1)
4680 ADD_BITFIELD_RO(GPIO22_LEVEL_HIGH, 25, 1)
4681 ADD_BITFIELD_RO(GPIO22_LEVEL_LOW, 24, 1)
4682 ADD_BITFIELD_RO(GPIO21_EDGE_HIGH, 23, 1)
4683 ADD_BITFIELD_RO(GPIO21_EDGE_LOW, 22, 1)
4684 ADD_BITFIELD_RO(GPIO21_LEVEL_HIGH, 21, 1)
4685 ADD_BITFIELD_RO(GPIO21_LEVEL_LOW, 20, 1)
4686 ADD_BITFIELD_RO(GPIO20_EDGE_HIGH, 19, 1)
4687 ADD_BITFIELD_RO(GPIO20_EDGE_LOW, 18, 1)
4688 ADD_BITFIELD_RO(GPIO20_LEVEL_HIGH, 17, 1)
4689 ADD_BITFIELD_RO(GPIO20_LEVEL_LOW, 16, 1)
4690 ADD_BITFIELD_RO(GPIO19_EDGE_HIGH, 15, 1)
4691 ADD_BITFIELD_RO(GPIO19_EDGE_LOW, 14, 1)
4692 ADD_BITFIELD_RO(GPIO19_LEVEL_HIGH, 13, 1)
4693 ADD_BITFIELD_RO(GPIO19_LEVEL_LOW, 12, 1)
4694 ADD_BITFIELD_RO(GPIO18_EDGE_HIGH, 11, 1)
4695 ADD_BITFIELD_RO(GPIO18_EDGE_LOW, 10, 1)
4696 ADD_BITFIELD_RO(GPIO18_LEVEL_HIGH, 9, 1)
4697 ADD_BITFIELD_RO(GPIO18_LEVEL_LOW, 8, 1)
4698 ADD_BITFIELD_RO(GPIO17_EDGE_HIGH, 7, 1)
4699 ADD_BITFIELD_RO(GPIO17_EDGE_LOW, 6, 1)
4700 ADD_BITFIELD_RO(GPIO17_LEVEL_HIGH, 5, 1)
4701 ADD_BITFIELD_RO(GPIO17_LEVEL_LOW, 4, 1)
4702 ADD_BITFIELD_RO(GPIO16_EDGE_HIGH, 3, 1)
4703 ADD_BITFIELD_RO(GPIO16_EDGE_LOW, 2, 1)
4704 ADD_BITFIELD_RO(GPIO16_LEVEL_HIGH, 1, 1)
4705 ADD_BITFIELD_RO(GPIO16_LEVEL_LOW, 0, 1)
4706 END_TYPE()
4707
4708 // Interrupt status after masking & forcing for dormant_wake
4709 // Reset value: 0x00000000
4710 BEGIN_TYPE(DORMANT_WAKE_INTS3_t, uint32_t)
4711 ADD_BITFIELD_RO(GPIO31_EDGE_HIGH, 31, 1)
4712 ADD_BITFIELD_RO(GPIO31_EDGE_LOW, 30, 1)
4713 ADD_BITFIELD_RO(GPIO31_LEVEL_HIGH, 29, 1)
4714 ADD_BITFIELD_RO(GPIO31_LEVEL_LOW, 28, 1)
4715 ADD_BITFIELD_RO(GPIO30_EDGE_HIGH, 27, 1)
4716 ADD_BITFIELD_RO(GPIO30_EDGE_LOW, 26, 1)
4717 ADD_BITFIELD_RO(GPIO30_LEVEL_HIGH, 25, 1)
4718 ADD_BITFIELD_RO(GPIO30_LEVEL_LOW, 24, 1)
4719 ADD_BITFIELD_RO(GPIO29_EDGE_HIGH, 23, 1)
4720 ADD_BITFIELD_RO(GPIO29_EDGE_LOW, 22, 1)
4721 ADD_BITFIELD_RO(GPIO29_LEVEL_HIGH, 21, 1)
4722 ADD_BITFIELD_RO(GPIO29_LEVEL_LOW, 20, 1)
4723 ADD_BITFIELD_RO(GPIO28_EDGE_HIGH, 19, 1)
4724 ADD_BITFIELD_RO(GPIO28_EDGE_LOW, 18, 1)
4725 ADD_BITFIELD_RO(GPIO28_LEVEL_HIGH, 17, 1)
4726 ADD_BITFIELD_RO(GPIO28_LEVEL_LOW, 16, 1)
4727 ADD_BITFIELD_RO(GPIO27_EDGE_HIGH, 15, 1)
4728 ADD_BITFIELD_RO(GPIO27_EDGE_LOW, 14, 1)
4729 ADD_BITFIELD_RO(GPIO27_LEVEL_HIGH, 13, 1)
4730 ADD_BITFIELD_RO(GPIO27_LEVEL_LOW, 12, 1)
4731 ADD_BITFIELD_RO(GPIO26_EDGE_HIGH, 11, 1)
4732 ADD_BITFIELD_RO(GPIO26_EDGE_LOW, 10, 1)
4733 ADD_BITFIELD_RO(GPIO26_LEVEL_HIGH, 9, 1)
4734 ADD_BITFIELD_RO(GPIO26_LEVEL_LOW, 8, 1)
4735 ADD_BITFIELD_RO(GPIO25_EDGE_HIGH, 7, 1)
4736 ADD_BITFIELD_RO(GPIO25_EDGE_LOW, 6, 1)
4737 ADD_BITFIELD_RO(GPIO25_LEVEL_HIGH, 5, 1)
4738 ADD_BITFIELD_RO(GPIO25_LEVEL_LOW, 4, 1)
4739 ADD_BITFIELD_RO(GPIO24_EDGE_HIGH, 3, 1)
4740 ADD_BITFIELD_RO(GPIO24_EDGE_LOW, 2, 1)
4741 ADD_BITFIELD_RO(GPIO24_LEVEL_HIGH, 1, 1)
4742 ADD_BITFIELD_RO(GPIO24_LEVEL_LOW, 0, 1)
4743 END_TYPE()
4744
4745 // Interrupt status after masking & forcing for dormant_wake
4746 // Reset value: 0x00000000
4747 BEGIN_TYPE(DORMANT_WAKE_INTS4_t, uint32_t)
4748 ADD_BITFIELD_RO(GPIO39_EDGE_HIGH, 31, 1)
4749 ADD_BITFIELD_RO(GPIO39_EDGE_LOW, 30, 1)
4750 ADD_BITFIELD_RO(GPIO39_LEVEL_HIGH, 29, 1)
4751 ADD_BITFIELD_RO(GPIO39_LEVEL_LOW, 28, 1)
4752 ADD_BITFIELD_RO(GPIO38_EDGE_HIGH, 27, 1)
4753 ADD_BITFIELD_RO(GPIO38_EDGE_LOW, 26, 1)
4754 ADD_BITFIELD_RO(GPIO38_LEVEL_HIGH, 25, 1)
4755 ADD_BITFIELD_RO(GPIO38_LEVEL_LOW, 24, 1)
4756 ADD_BITFIELD_RO(GPIO37_EDGE_HIGH, 23, 1)
4757 ADD_BITFIELD_RO(GPIO37_EDGE_LOW, 22, 1)
4758 ADD_BITFIELD_RO(GPIO37_LEVEL_HIGH, 21, 1)
4759 ADD_BITFIELD_RO(GPIO37_LEVEL_LOW, 20, 1)
4760 ADD_BITFIELD_RO(GPIO36_EDGE_HIGH, 19, 1)
4761 ADD_BITFIELD_RO(GPIO36_EDGE_LOW, 18, 1)
4762 ADD_BITFIELD_RO(GPIO36_LEVEL_HIGH, 17, 1)
4763 ADD_BITFIELD_RO(GPIO36_LEVEL_LOW, 16, 1)
4764 ADD_BITFIELD_RO(GPIO35_EDGE_HIGH, 15, 1)
4765 ADD_BITFIELD_RO(GPIO35_EDGE_LOW, 14, 1)
4766 ADD_BITFIELD_RO(GPIO35_LEVEL_HIGH, 13, 1)
4767 ADD_BITFIELD_RO(GPIO35_LEVEL_LOW, 12, 1)
4768 ADD_BITFIELD_RO(GPIO34_EDGE_HIGH, 11, 1)
4769 ADD_BITFIELD_RO(GPIO34_EDGE_LOW, 10, 1)
4770 ADD_BITFIELD_RO(GPIO34_LEVEL_HIGH, 9, 1)
4771 ADD_BITFIELD_RO(GPIO34_LEVEL_LOW, 8, 1)
4772 ADD_BITFIELD_RO(GPIO33_EDGE_HIGH, 7, 1)
4773 ADD_BITFIELD_RO(GPIO33_EDGE_LOW, 6, 1)
4774 ADD_BITFIELD_RO(GPIO33_LEVEL_HIGH, 5, 1)
4775 ADD_BITFIELD_RO(GPIO33_LEVEL_LOW, 4, 1)
4776 ADD_BITFIELD_RO(GPIO32_EDGE_HIGH, 3, 1)
4777 ADD_BITFIELD_RO(GPIO32_EDGE_LOW, 2, 1)
4778 ADD_BITFIELD_RO(GPIO32_LEVEL_HIGH, 1, 1)
4779 ADD_BITFIELD_RO(GPIO32_LEVEL_LOW, 0, 1)
4780 END_TYPE()
4781
4782 // Interrupt status after masking & forcing for dormant_wake
4783 // Reset value: 0x00000000
4784 BEGIN_TYPE(DORMANT_WAKE_INTS5_t, uint32_t)
4785 ADD_BITFIELD_RO(GPIO47_EDGE_HIGH, 31, 1)
4786 ADD_BITFIELD_RO(GPIO47_EDGE_LOW, 30, 1)
4787 ADD_BITFIELD_RO(GPIO47_LEVEL_HIGH, 29, 1)
4788 ADD_BITFIELD_RO(GPIO47_LEVEL_LOW, 28, 1)
4789 ADD_BITFIELD_RO(GPIO46_EDGE_HIGH, 27, 1)
4790 ADD_BITFIELD_RO(GPIO46_EDGE_LOW, 26, 1)
4791 ADD_BITFIELD_RO(GPIO46_LEVEL_HIGH, 25, 1)
4792 ADD_BITFIELD_RO(GPIO46_LEVEL_LOW, 24, 1)
4793 ADD_BITFIELD_RO(GPIO45_EDGE_HIGH, 23, 1)
4794 ADD_BITFIELD_RO(GPIO45_EDGE_LOW, 22, 1)
4795 ADD_BITFIELD_RO(GPIO45_LEVEL_HIGH, 21, 1)
4796 ADD_BITFIELD_RO(GPIO45_LEVEL_LOW, 20, 1)
4797 ADD_BITFIELD_RO(GPIO44_EDGE_HIGH, 19, 1)
4798 ADD_BITFIELD_RO(GPIO44_EDGE_LOW, 18, 1)
4799 ADD_BITFIELD_RO(GPIO44_LEVEL_HIGH, 17, 1)
4800 ADD_BITFIELD_RO(GPIO44_LEVEL_LOW, 16, 1)
4801 ADD_BITFIELD_RO(GPIO43_EDGE_HIGH, 15, 1)
4802 ADD_BITFIELD_RO(GPIO43_EDGE_LOW, 14, 1)
4803 ADD_BITFIELD_RO(GPIO43_LEVEL_HIGH, 13, 1)
4804 ADD_BITFIELD_RO(GPIO43_LEVEL_LOW, 12, 1)
4805 ADD_BITFIELD_RO(GPIO42_EDGE_HIGH, 11, 1)
4806 ADD_BITFIELD_RO(GPIO42_EDGE_LOW, 10, 1)
4807 ADD_BITFIELD_RO(GPIO42_LEVEL_HIGH, 9, 1)
4808 ADD_BITFIELD_RO(GPIO42_LEVEL_LOW, 8, 1)
4809 ADD_BITFIELD_RO(GPIO41_EDGE_HIGH, 7, 1)
4810 ADD_BITFIELD_RO(GPIO41_EDGE_LOW, 6, 1)
4811 ADD_BITFIELD_RO(GPIO41_LEVEL_HIGH, 5, 1)
4812 ADD_BITFIELD_RO(GPIO41_LEVEL_LOW, 4, 1)
4813 ADD_BITFIELD_RO(GPIO40_EDGE_HIGH, 3, 1)
4814 ADD_BITFIELD_RO(GPIO40_EDGE_LOW, 2, 1)
4815 ADD_BITFIELD_RO(GPIO40_LEVEL_HIGH, 1, 1)
4816 ADD_BITFIELD_RO(GPIO40_LEVEL_LOW, 0, 1)
4817 END_TYPE()
4818
4819 struct IO_BANK0_t {
4820 GPIO_STATUS_t GPIO0_STATUS;
4821 GPIO_CTRL_t GPIO0_CTRL;
4822 GPIO_STATUS_t GPIO1_STATUS;
4823 GPIO_CTRL_t GPIO1_CTRL;
4824 GPIO_STATUS_t GPIO2_STATUS;
4825 GPIO_CTRL_t GPIO2_CTRL;
4826 GPIO_STATUS_t GPIO3_STATUS;
4827 GPIO_CTRL_t GPIO3_CTRL;
4828 GPIO_STATUS_t GPIO4_STATUS;
4829 GPIO_CTRL_t GPIO4_CTRL;
4830 GPIO_STATUS_t GPIO5_STATUS;
4831 GPIO_CTRL_t GPIO5_CTRL;
4832 GPIO_STATUS_t GPIO6_STATUS;
4833 GPIO_CTRL_t GPIO6_CTRL;
4834 GPIO_STATUS_t GPIO7_STATUS;
4835 GPIO_CTRL_t GPIO7_CTRL;
4836 GPIO_STATUS_t GPIO8_STATUS;
4837 GPIO_CTRL_t GPIO8_CTRL;
4838 GPIO_STATUS_t GPIO9_STATUS;
4839 GPIO_CTRL_t GPIO9_CTRL;
4840 GPIO_STATUS_t GPIO10_STATUS;
4841 GPIO_CTRL_t GPIO10_CTRL;
4842 GPIO_STATUS_t GPIO11_STATUS;
4843 GPIO_CTRL_t GPIO11_CTRL;
4844 GPIO_STATUS_t GPIO12_STATUS;
4845 GPIO_CTRL_t GPIO12_CTRL;
4846 GPIO_STATUS_t GPIO13_STATUS;
4847 GPIO_CTRL_t GPIO13_CTRL;
4848 GPIO_STATUS_t GPIO14_STATUS;
4849 GPIO_CTRL_t GPIO14_CTRL;
4850 GPIO_STATUS_t GPIO15_STATUS;
4851 GPIO_CTRL_t GPIO15_CTRL;
4852 GPIO_STATUS_t GPIO16_STATUS;
4853 GPIO_CTRL_t GPIO16_CTRL;
4854 GPIO_STATUS_t GPIO17_STATUS;
4855 GPIO_CTRL_t GPIO17_CTRL;
4856 GPIO_STATUS_t GPIO18_STATUS;
4857 GPIO_CTRL_t GPIO18_CTRL;
4858 GPIO_STATUS_t GPIO19_STATUS;
4859 GPIO_CTRL_t GPIO19_CTRL;
4860 GPIO_STATUS_t GPIO20_STATUS;
4861 GPIO_CTRL_t GPIO20_CTRL;
4862 GPIO_STATUS_t GPIO21_STATUS;
4863 GPIO_CTRL_t GPIO21_CTRL;
4864 GPIO_STATUS_t GPIO22_STATUS;
4865 GPIO_CTRL_t GPIO22_CTRL;
4866 GPIO_STATUS_t GPIO23_STATUS;
4867 GPIO_CTRL_t GPIO23_CTRL;
4868 GPIO_STATUS_t GPIO24_STATUS;
4869 GPIO_CTRL_t GPIO24_CTRL;
4870 GPIO_STATUS_t GPIO25_STATUS;
4871 GPIO_CTRL_t GPIO25_CTRL;
4872 GPIO_STATUS_t GPIO26_STATUS;
4873 GPIO_CTRL_t GPIO26_CTRL;
4874 GPIO_STATUS_t GPIO27_STATUS;
4875 GPIO_CTRL_t GPIO27_CTRL;
4876 GPIO_STATUS_t GPIO28_STATUS;
4877 GPIO_CTRL_t GPIO28_CTRL;
4878 GPIO_STATUS_t GPIO29_STATUS;
4879 GPIO_CTRL_t GPIO29_CTRL;
4880 GPIO_STATUS_t GPIO30_STATUS;
4881 GPIO_CTRL_t GPIO30_CTRL;
4882 GPIO_STATUS_t GPIO31_STATUS;
4883 GPIO_CTRL_t GPIO31_CTRL;
4884 GPIO_STATUS_t GPIO32_STATUS;
4885 GPIO_CTRL_t GPIO32_CTRL;
4886 GPIO_STATUS_t GPIO33_STATUS;
4887 GPIO_CTRL_t GPIO33_CTRL;
4888 GPIO_STATUS_t GPIO34_STATUS;
4889 GPIO_CTRL_t GPIO34_CTRL;
4890 GPIO_STATUS_t GPIO35_STATUS;
4891 GPIO_CTRL_t GPIO35_CTRL;
4892 GPIO_STATUS_t GPIO36_STATUS;
4893 GPIO_CTRL_t GPIO36_CTRL;
4894 GPIO_STATUS_t GPIO37_STATUS;
4895 GPIO_CTRL_t GPIO37_CTRL;
4896 GPIO_STATUS_t GPIO38_STATUS;
4897 GPIO_CTRL_t GPIO38_CTRL;
4898 GPIO_STATUS_t GPIO39_STATUS;
4899 GPIO_CTRL_t GPIO39_CTRL;
4900 GPIO_STATUS_t GPIO40_STATUS;
4901 GPIO_CTRL_t GPIO40_CTRL;
4902 GPIO_STATUS_t GPIO41_STATUS;
4903 GPIO_CTRL_t GPIO41_CTRL;
4904 GPIO_STATUS_t GPIO42_STATUS;
4905 GPIO_CTRL_t GPIO42_CTRL;
4906 GPIO_STATUS_t GPIO43_STATUS;
4907 GPIO_CTRL_t GPIO43_CTRL;
4908 GPIO_STATUS_t GPIO44_STATUS;
4909 GPIO_CTRL_t GPIO44_CTRL;
4910 GPIO_STATUS_t GPIO45_STATUS;
4911 GPIO_CTRL_t GPIO45_CTRL;
4912 GPIO_STATUS_t GPIO46_STATUS;
4913 GPIO_CTRL_t GPIO46_CTRL;
4914 GPIO_STATUS_t GPIO47_STATUS;
4915 GPIO_CTRL_t GPIO47_CTRL;
4916 uint32_t reserved0[32];
4917 IRQSUMMARY_PROC0_SECURE0_t IRQSUMMARY_PROC0_SECURE0;
4918 IRQSUMMARY_PROC0_SECURE1_t IRQSUMMARY_PROC0_SECURE1;
4919 IRQSUMMARY_PROC0_NONSECURE0_t IRQSUMMARY_PROC0_NONSECURE0;
4920 IRQSUMMARY_PROC0_NONSECURE1_t IRQSUMMARY_PROC0_NONSECURE1;
4921 IRQSUMMARY_PROC1_SECURE0_t IRQSUMMARY_PROC1_SECURE0;
4922 IRQSUMMARY_PROC1_SECURE1_t IRQSUMMARY_PROC1_SECURE1;
4923 IRQSUMMARY_PROC1_NONSECURE0_t IRQSUMMARY_PROC1_NONSECURE0;
4924 IRQSUMMARY_PROC1_NONSECURE1_t IRQSUMMARY_PROC1_NONSECURE1;
4925 IRQSUMMARY_DORMANT_WAKE_SECURE0_t IRQSUMMARY_DORMANT_WAKE_SECURE0;
4926 IRQSUMMARY_DORMANT_WAKE_SECURE1_t IRQSUMMARY_DORMANT_WAKE_SECURE1;
4927 IRQSUMMARY_DORMANT_WAKE_NONSECURE0_t IRQSUMMARY_DORMANT_WAKE_NONSECURE0;
4928 IRQSUMMARY_DORMANT_WAKE_NONSECURE1_t IRQSUMMARY_DORMANT_WAKE_NONSECURE1;
4929 INTR0_t INTR0;
4930 INTR1_t INTR1;
4931 INTR2_t INTR2;
4932 INTR3_t INTR3;
4933 INTR4_t INTR4;
4934 INTR5_t INTR5;
4935 PROC0_INTE0_t PROC0_INTE0;
4936 PROC0_INTE1_t PROC0_INTE1;
4937 PROC0_INTE2_t PROC0_INTE2;
4938 PROC0_INTE3_t PROC0_INTE3;
4939 PROC0_INTE4_t PROC0_INTE4;
4940 PROC0_INTE5_t PROC0_INTE5;
4941 PROC0_INTF0_t PROC0_INTF0;
4942 PROC0_INTF1_t PROC0_INTF1;
4943 PROC0_INTF2_t PROC0_INTF2;
4944 PROC0_INTF3_t PROC0_INTF3;
4945 PROC0_INTF4_t PROC0_INTF4;
4946 PROC0_INTF5_t PROC0_INTF5;
4947 PROC0_INTS0_t PROC0_INTS0;
4948 PROC0_INTS1_t PROC0_INTS1;
4949 PROC0_INTS2_t PROC0_INTS2;
4950 PROC0_INTS3_t PROC0_INTS3;
4951 PROC0_INTS4_t PROC0_INTS4;
4952 PROC0_INTS5_t PROC0_INTS5;
4953 PROC1_INTE0_t PROC1_INTE0;
4954 PROC1_INTE1_t PROC1_INTE1;
4955 PROC1_INTE2_t PROC1_INTE2;
4956 PROC1_INTE3_t PROC1_INTE3;
4957 PROC1_INTE4_t PROC1_INTE4;
4958 PROC1_INTE5_t PROC1_INTE5;
4959 PROC1_INTF0_t PROC1_INTF0;
4960 PROC1_INTF1_t PROC1_INTF1;
4961 PROC1_INTF2_t PROC1_INTF2;
4962 PROC1_INTF3_t PROC1_INTF3;
4963 PROC1_INTF4_t PROC1_INTF4;
4964 PROC1_INTF5_t PROC1_INTF5;
4965 PROC1_INTS0_t PROC1_INTS0;
4966 PROC1_INTS1_t PROC1_INTS1;
4967 PROC1_INTS2_t PROC1_INTS2;
4968 PROC1_INTS3_t PROC1_INTS3;
4969 PROC1_INTS4_t PROC1_INTS4;
4970 PROC1_INTS5_t PROC1_INTS5;
4971 DORMANT_WAKE_INTE0_t DORMANT_WAKE_INTE0;
4972 DORMANT_WAKE_INTE1_t DORMANT_WAKE_INTE1;
4973 DORMANT_WAKE_INTE2_t DORMANT_WAKE_INTE2;
4974 DORMANT_WAKE_INTE3_t DORMANT_WAKE_INTE3;
4975 DORMANT_WAKE_INTE4_t DORMANT_WAKE_INTE4;
4976 DORMANT_WAKE_INTE5_t DORMANT_WAKE_INTE5;
4977 DORMANT_WAKE_INTF0_t DORMANT_WAKE_INTF0;
4978 DORMANT_WAKE_INTF1_t DORMANT_WAKE_INTF1;
4979 DORMANT_WAKE_INTF2_t DORMANT_WAKE_INTF2;
4980 DORMANT_WAKE_INTF3_t DORMANT_WAKE_INTF3;
4981 DORMANT_WAKE_INTF4_t DORMANT_WAKE_INTF4;
4982 DORMANT_WAKE_INTF5_t DORMANT_WAKE_INTF5;
4983 DORMANT_WAKE_INTS0_t DORMANT_WAKE_INTS0;
4984 DORMANT_WAKE_INTS1_t DORMANT_WAKE_INTS1;
4985 DORMANT_WAKE_INTS2_t DORMANT_WAKE_INTS2;
4986 DORMANT_WAKE_INTS3_t DORMANT_WAKE_INTS3;
4987 DORMANT_WAKE_INTS4_t DORMANT_WAKE_INTS4;
4988 DORMANT_WAKE_INTS5_t DORMANT_WAKE_INTS5;
4989 };
4990
4991 static IO_BANK0_t & IO_BANK0 = (*(IO_BANK0_t *)0x40028000);
4992 static IO_BANK0_t & IO_BANK0_XOR = (*(IO_BANK0_t *)0x40029000);
4993 static IO_BANK0_t & IO_BANK0_SET = (*(IO_BANK0_t *)0x4002a000);
4994 static IO_BANK0_t & IO_BANK0_CLR = (*(IO_BANK0_t *)0x4002b000);
4995
4996} // _IO_BANK0_
4997
4998namespace _SYSINFO_ {
4999
5000 // JEDEC JEP-106 compliant chip identifier.
5001 // Reset value: 0x00000001
5002 BEGIN_TYPE(CHIP_ID_t, uint32_t)
5003 ADD_BITFIELD_RO(REVISION, 28, 4)
5004 ADD_BITFIELD_RO(PART, 12, 16)
5005 ADD_BITFIELD_RO(MANUFACTURER, 1, 11)
5006 ADD_BITFIELD_RO(STOP_BIT, 0, 1)
5007 END_TYPE()
5008
5009 // Reset value: 0x00000000
5010 BEGIN_TYPE(PACKAGE_SEL_t, uint32_t)
5011 ADD_BITFIELD_RO(PACKAGE_SEL, 0, 1)
5012 END_TYPE()
5013
5014 // Platform register. Allows software to know what environment it is running
5015 // in during pre-production development. Post-production, the PLATFORM is
5016 // always ASIC, non-SIM.
5017 // Reset value: 0x00000000
5018 BEGIN_TYPE(PLATFORM_t, uint32_t)
5019 ADD_BITFIELD_RO(GATESIM, 4, 1)
5020 ADD_BITFIELD_RO(BATCHSIM, 3, 1)
5021 ADD_BITFIELD_RO(HDLSIM, 2, 1)
5022 ADD_BITFIELD_RO(ASIC, 1, 1)
5023 ADD_BITFIELD_RO(FPGA, 0, 1)
5024 END_TYPE()
5025
5026 // Git hash of the chip source. Used to identify chip version.
5027 BEGIN_TYPE(GITREF_RP2350_t, uint32_t)
5028 ADD_BITFIELD_RO(GITREF_RP2350, 0, 32)
5029 END_TYPE()
5030
5031 struct SYSINFO_t {
5032 CHIP_ID_t CHIP_ID;
5033 PACKAGE_SEL_t PACKAGE_SEL;
5034 PLATFORM_t PLATFORM;
5035 uint32_t reserved0[2];
5036 GITREF_RP2350_t GITREF_RP2350;
5037 };
5038
5039 static SYSINFO_t & SYSINFO = (*(SYSINFO_t *)0x40000000);
5040 static SYSINFO_t & SYSINFO_XOR = (*(SYSINFO_t *)0x40001000);
5041 static SYSINFO_t & SYSINFO_SET = (*(SYSINFO_t *)0x40002000);
5042 static SYSINFO_t & SYSINFO_CLR = (*(SYSINFO_t *)0x40003000);
5043
5044} // _SYSINFO_
5045
5046// SHA-256 hash function implementation
5047namespace _SHA256_ {
5048
5049 // Control and status register
5050 // Reset value: 0x00001206
5051 BEGIN_TYPE(CSR_t, uint32_t)
5052 // Enable byte swapping of 32-bit values at the point they are committed to the
5053 // SHA message scheduler. This block's bus interface assembles byte/halfword
5054 // data into message words in little-endian order, so that DMAing the same buffer
5055 // with different transfer sizes always gives the same result on a little-endian
5056 // system like RP2350.
5057 // However, when marshalling bytes into blocks, SHA expects that the first byte
5058 // is the *most significant* in each message word. To resolve this, once the bus
5059 // interface has accumulated 32 bits of data (either a word write, two halfword
5060 // writes in little-endian order, or four byte writes in little-endian order)
5061 // the final value can be byte-swapped before passing to the actual SHA core.
5062 // This feature is enabled by default because using the SHA core to checksum
5063 // byte buffers is expected to be more common than having preformatted SHA
5064 // message words lying around.
5065 ADD_BITFIELD_RW(BSWAP, 12, 1)
5066 // Configure DREQ logic for the correct DMA data size. Must be configured before
5067 // the DMA channel is triggered. The SHA-256 core's DREQ logic requests one
5068 // entire block of data at once, since there is no FIFO, and data goes straight
5069 // into the core's message schedule and digest hardware. Therefore, when
5070 // transferring data with DMA, CSR_DMA_SIZE must be configured in advance so that
5071 // the correct number of transfers can be requested per block.
5072 ADD_BITFIELD_RW(DMA_SIZE, 8, 2)
5073 // Set when a write occurs whilst the SHA-256 core is not ready for data
5074 // (WDATA_RDY is low). Write one to clear.
5075 ADD_BITFIELD_RW(ERR_WDATA_NOT_RDY, 4, 1)
5076 // If 1, the SHA-256 checksum presented in registers SUM0 through SUM7 is
5077 // currently valid. Goes low when WDATA is first written, then returns high
5078 // once 16 words have been written and the digest of the current 512-bit
5079 // block has subsequently completed.
5080 ADD_BITFIELD_RO(SUM_VLD, 2, 1)
5081 // If 1, the SHA-256 core is ready to accept more data through the WDATA
5082 // register. After writing 16 words, this flag will go low for 57 cycles
5083 // whilst the core completes its digest.
5084 ADD_BITFIELD_RO(WDATA_RDY, 1, 1)
5085 // Write 1 to prepare the SHA-256 core for a new checksum.
5086 // The SUMx registers are initialised to the proper values (fractional
5087 // bits of square roots of first 8 primes) and internal counters are cleared.
5088 // This immediately forces WDATA_RDY and SUM_VLD high.
5089 // START must be written before initiating a DMA transfer to the SHA-256 core,
5090 // because the core will always request 16 transfers at a time (1 512-bit block).
5091 // Additionally, the DMA channel should be configured for a multiple of 16 32-bit
5092 // transfers.
5093 ADD_BITFIELD_WO(START, 0, 1)
5094 END_TYPE()
5095
5096 static const uint32_t CSR_DMA_SIZE__8bit = 0;
5097 static const uint32_t CSR_DMA_SIZE__16bit = 1;
5098 static const uint32_t CSR_DMA_SIZE__32bit = 2;
5099
5100 // Write data register
5101 // Reset value: 0x00000000
5102 BEGIN_TYPE(WDATA_t, uint32_t)
5103 // After pulsing START and writing 16 words of data to this register,
5104 // WDATA_RDY will go low and the SHA-256 core will complete the digest
5105 // of the current 512-bit block.
5106 // Software is responsible for ensuring the data is correctly padded and
5107 // terminated to a whole number of 512-bit blocks.
5108 // After this, WDATA_RDY will return high, and more data can be written (if any).
5109 // This register supports word, halfword and byte writes, so that DMA from
5110 // non-word-aligned buffers can be supported. The total amount of data per
5111 // block remains the same (16 words, 32 halfwords or 64 bytes) and byte/halfword
5112 // transfers must not be mixed within a block.
5113 ADD_BITFIELD_WO(WDATA, 0, 32)
5114 END_TYPE()
5115
5116 // 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0.
5117 // Reset value: 0x00000000
5118 typedef uint32_t SUM_t;
5119
5120 struct SHA256_t {
5121 CSR_t CSR;
5122 WDATA_t WDATA;
5123 SUM_t SUM[8];
5124 };
5125
5126 static SHA256_t & SHA256 = (*(SHA256_t *)0x400f8000);
5127 static SHA256_t & SHA256_XOR = (*(SHA256_t *)0x400f9000);
5128 static SHA256_t & SHA256_SET = (*(SHA256_t *)0x400fa000);
5129 static SHA256_t & SHA256_CLR = (*(SHA256_t *)0x400fb000);
5130
5131} // _SHA256_
5132
5133// FIFO status and write access for HSTX
5134namespace _HSTX_FIFO_ {
5135
5136 // FIFO status
5137 // Reset value: 0x00000000
5138 BEGIN_TYPE(STAT_t, uint32_t)
5139 // FIFO was written when full. Write 1 to clear.
5140 ADD_BITFIELD_RW(WOF, 10, 1)
5141 ADD_BITFIELD_RO(EMPTY, 9, 1)
5142 ADD_BITFIELD_RO(FULL, 8, 1)
5143 ADD_BITFIELD_RO(LEVEL, 0, 8)
5144 END_TYPE()
5145
5146 // Write access to FIFO
5147 // Reset value: 0x00000000
5148 BEGIN_TYPE(FIFO_t, uint32_t)
5149 ADD_BITFIELD_WO(FIFO, 0, 32)
5150 END_TYPE()
5151
5153 STAT_t STAT;
5154 FIFO_t FIFO;
5155 };
5156
5157 static HSTX_FIFO_t & HSTX_FIFO = (*(HSTX_FIFO_t *)0x50600000);
5158 static HSTX_FIFO_t & HSTX_FIFO_XOR = (*(HSTX_FIFO_t *)0x50601000);
5159 static HSTX_FIFO_t & HSTX_FIFO_SET = (*(HSTX_FIFO_t *)0x50602000);
5160 static HSTX_FIFO_t & HSTX_FIFO_CLR = (*(HSTX_FIFO_t *)0x50603000);
5161
5162} // _HSTX_FIFO_
5163
5164// Control interface to HSTX. For FIFO write access and status,
5165// see the HSTX_FIFO register block.
5166namespace _HSTX_CTRL_ {
5167
5168 // Reset value: 0x10050600
5169 BEGIN_TYPE(CSR_t, uint32_t)
5170 // Clock period of the generated clock, measured in HSTX clock cycles.
5171 // Can be odd or even. The generated clock advances only on cycles where
5172 // the shift register shifts.
5173 // For example, a clkdiv of 5 would generate a complete output clock period
5174 // for every 5 HSTX clocks (or every 10 half-clocks).
5175 // A CLKDIV value of 0 is mapped to a period of 16 HSTX clock cycles.
5176 ADD_BITFIELD_RW(CLKDIV, 28, 4)
5177 // Set the initial phase of the generated clock.
5178 // A CLKPHASE of 0 means the clock is initially low, and the first rising
5179 // edge occurs after one half period of the generated clock (i.e. CLKDIV/2
5180 // cycles of clk_hstx). Incrementing CLKPHASE by 1 will advance the initial
5181 // clock phase by one half clk_hstx period. For example, if CLKDIV=2 and
5182 // CLKPHASE=1:
5183 //
5184 // * The clock will be initially low
5185 // * The first rising edge will be 0.5 clk_hstx cycles after asserting first data
5186 // * The first falling edge will be 1.5 clk_hstx cycles after asserting first data
5187 //
5188 // This configuration would be suitable for serialising at a bit rate of clk_hstx
5189 // with a centre-aligned DDR clock.
5190 // When the HSTX is halted by clearing CSR_EN, the clock generator will return
5191 // to its initial phase as configured by the CLKPHASE field.
5192 // Note CLKPHASE must be strictly less than double the value of CLKDIV
5193 // (one full period), else its operation is undefined.
5194 ADD_BITFIELD_RW(CLKPHASE, 24, 4)
5195 // Number of times to shift the shift register before refilling it from
5196 // the FIFO. (A count of how many times it has been shifted, *not* the total
5197 // shift distance). A register value of 0 means shift 32 times.
5198 ADD_BITFIELD_RW(N_SHIFTS, 16, 5)
5199 // How many bits to right-rotate the shift register by each cycle.
5200 // The use of a rotate rather than a shift allows left shifts to be
5201 // emulated, by subtracting the left-shift amount from 32. It also
5202 // allows data to be repeated, when the product of SHIFT and N_SHIFTS
5203 // is greater than 32.
5204 ADD_BITFIELD_RW(SHIFT, 8, 5)
5205 // Select which PIO to use for coupled mode operation.
5206 ADD_BITFIELD_RW(COUPLED_SEL, 5, 2)
5207 // Enable the PIO-to-HSTX 1:1 connection. The HSTX must be clocked *directly*
5208 // from the system clock (not just from some other clock source of the same
5209 // frequency) for this synchronous interface to function correctly.
5210 // When COUPLED_MODE is set, BITx_SEL_P and SEL_N indices 24 through 31 will
5211 // select bits from the 8-bit PIO-to-HSTX path, rather than shifter bits.
5212 // Indices of 0 through 23 will still index the shift register as normal.
5213 // The PIO outputs connected to the PIO-to-HSTX bus are those same outputs
5214 // that would appear on the HSTX-capable pins if those pins' FUNCSELs
5215 // were set to PIO instead of HSTX.
5216 // For example, if HSTX is on GPIOs 12 through 19, then PIO outputs 12 through
5217 // 19 are connected to the HSTX when coupled mode is engaged.
5218 ADD_BITFIELD_RW(COUPLED_MODE, 4, 1)
5219 // Enable the command expander. When 0, raw FIFO data is passed directly to the
5220 // output shift register. When 1, the command expander can perform simple operations
5221 // such as run length decoding on data between the FIFO and the shift register.
5222 // Do not change CXPD_EN whilst EN is set. It's safe to set CXPD_EN simultaneously
5223 // with setting EN.
5224 ADD_BITFIELD_RW(EXPAND_EN, 1, 1)
5225 // When EN is 1, the HSTX will shift out data as it appears in the FIFO. As long
5226 // as there is data, the HSTX shift register will shift once per clock cycle, and
5227 // the frequency of popping from the FIFO is determined by the ratio of SHIFT and
5228 // SHIFT_THRESH.
5229 // When EN is 0, the FIFO is not popped. The shift counter and clock generator
5230 // are also reset to their initial state for as long as EN is low. Note the initial
5231 // phase of the clock generator can be configured by the CLKPHASE field.
5232 // Once the HSTX is enabled again, and data is pushed to the FIFO, the generated
5233 // clock's first rising edge will be one half-period after the first data is
5234 // launched.
5235 ADD_BITFIELD_RW(EN, 0, 1)
5236 END_TYPE()
5237
5238 // Data control register for output bit 0
5239 // Reset value: 0x00000000
5240 BEGIN_TYPE(BIT_t, uint32_t)
5241 // Connect this output to the generated clock, rather than the data shift register.
5242 // SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to
5243 // generate an antiphase clock.
5244 ADD_BITFIELD_RW(CLK, 17, 1)
5245 // Invert this data output (logical NOT)
5246 ADD_BITFIELD_RW(INV, 16, 1)
5247 // Shift register data bit select for the second half of the HSTX clock cycle
5248 ADD_BITFIELD_RW(SEL_N, 8, 5)
5249 // Shift register data bit select for the first half of the HSTX clock cycle
5250 ADD_BITFIELD_RW(SEL_P, 0, 5)
5251 END_TYPE()
5252
5253 // Configure the optional shifter inside the command expander
5254 // Reset value: 0x01000100
5255 BEGIN_TYPE(EXPAND_SHIFT_t, uint32_t)
5256 // Number of times to consume from the shift register before refilling it from
5257 // the FIFO, when the current command is an encoded data command (e.g. TMDS).
5258 // A register value of 0 means shift 32 times.
5259 ADD_BITFIELD_RW(ENC_N_SHIFTS, 24, 5)
5260 // How many bits to right-rotate the shift register by each time data is pushed
5261 // to the output shifter, when the current command is an encoded data command
5262 // (e.g. TMDS).
5263 ADD_BITFIELD_RW(ENC_SHIFT, 16, 5)
5264 // Number of times to consume from the shift register before refilling it from
5265 // the FIFO, when the current command is a raw data command. A register value of
5266 // 0 means shift 32 times.
5267 ADD_BITFIELD_RW(RAW_N_SHIFTS, 8, 5)
5268 // How many bits to right-rotate the shift register by each time data is pushed
5269 // to the output shifter, when the current command is a raw data command.
5270 ADD_BITFIELD_RW(RAW_SHIFT, 0, 5)
5271 END_TYPE()
5272
5273 // Configure the optional TMDS encoder inside the command expander
5274 // Reset value: 0x00000000
5275 BEGIN_TYPE(EXPAND_TMDS_t, uint32_t)
5276 // Number of valid data bits for the lane 2 TMDS encoder, starting from bit 7 of
5277 // the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits.
5278 ADD_BITFIELD_RW(L2_NBITS, 21, 3)
5279 // Right-rotate applied to the current shifter data before the lane 2 TMDS encoder.
5280 ADD_BITFIELD_RW(L2_ROT, 16, 5)
5281 // Number of valid data bits for the lane 1 TMDS encoder, starting from bit 7 of
5282 // the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits.
5283 ADD_BITFIELD_RW(L1_NBITS, 13, 3)
5284 // Right-rotate applied to the current shifter data before the lane 1 TMDS encoder.
5285 ADD_BITFIELD_RW(L1_ROT, 8, 5)
5286 // Number of valid data bits for the lane 0 TMDS encoder, starting from bit 7 of
5287 // the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits.
5288 ADD_BITFIELD_RW(L0_NBITS, 5, 3)
5289 // Right-rotate applied to the current shifter data before the lane 0 TMDS encoder.
5290 ADD_BITFIELD_RW(L0_ROT, 0, 5)
5291 END_TYPE()
5292
5294 CSR_t CSR;
5295 BIT_t BIT[8];
5296 EXPAND_SHIFT_t EXPAND_SHIFT;
5297 EXPAND_TMDS_t EXPAND_TMDS;
5298 };
5299
5300 static HSTX_CTRL_t & HSTX_CTRL = (*(HSTX_CTRL_t *)0x400c0000);
5301 static HSTX_CTRL_t & HSTX_CTRL_XOR = (*(HSTX_CTRL_t *)0x400c1000);
5302 static HSTX_CTRL_t & HSTX_CTRL_SET = (*(HSTX_CTRL_t *)0x400c2000);
5303 static HSTX_CTRL_t & HSTX_CTRL_CLR = (*(HSTX_CTRL_t *)0x400c3000);
5304
5305} // _HSTX_CTRL_
5306
5307// Cortex-M33 EPPB vendor register block for RP2350
5308namespace _EPPB_ {
5309
5310 // NMI mask for IRQs 0 through 31. This register is core-local, and is reset by a processor warm reset.
5311 // Reset value: 0x00000000
5312 BEGIN_TYPE(NMI_MASK0_t, uint32_t)
5313 ADD_BITFIELD_RW(NMI_MASK0, 0, 32)
5314 END_TYPE()
5315
5316 // NMI mask for IRQs 0 though 51. This register is core-local, and is reset by a processor warm reset.
5317 // Reset value: 0x00000000
5318 BEGIN_TYPE(NMI_MASK1_t, uint32_t)
5319 ADD_BITFIELD_RW(NMI_MASK1, 0, 20)
5320 END_TYPE()
5321
5322 // Nonstandard sleep control register
5323 // Reset value: 0x00000002
5324 BEGIN_TYPE(SLEEPCTRL_t, uint32_t)
5325 // Status signal from the processor's interrupt controller. Changes to WICENREQ are eventually reflected in WICENACK.
5326 ADD_BITFIELD_RO(WICENACK, 2, 1)
5327 // Request that the next processor deep sleep is a WIC sleep. After setting this bit, before sleeping, poll WICENACK to ensure the processor interrupt controller has acknowledged the change.
5328 ADD_BITFIELD_RW(WICENREQ, 1, 1)
5329 // By default, any processor sleep will deassert the system-level clock request. Reenabling the clocks incurs 5 cycles of additional latency on wakeup. Setting LIGHT_SLEEP to 1 keeps the clock request asserted during a normal sleep (Arm SCR.SLEEPDEEP = 0), for faster wakeup. Processor deep sleep (Arm SCR.SLEEPDEEP = 1) is not affected, and will always deassert the system-level clock request.
5330 ADD_BITFIELD_RW(LIGHT_SLEEP, 0, 1)
5331 END_TYPE()
5332
5333 struct EPPB_t {
5334 NMI_MASK0_t NMI_MASK0;
5335 NMI_MASK1_t NMI_MASK1;
5336 SLEEPCTRL_t SLEEPCTRL;
5337 };
5338
5339 static EPPB_t & EPPB = (*(EPPB_t *)0xe0080000);
5340
5341} // _EPPB_
5342
5343// TEAL registers accessible through the debug interface
5344namespace _PPB_ {
5345
5346 // Provides the interface for generating Instrumentation packets
5347 // Reset value: 0x00000000
5348 BEGIN_TYPE(ITM_STIM_t, uint32_t)
5349 // Data to write to the Stimulus Port FIFO, for forwarding as an Instrumentation packet. The size of write access determines the type of Instrumentation packet generated.
5350 ADD_BITFIELD_RW(STIMULUS, 0, 32)
5351 END_TYPE()
5352
5353 // Provide an individual enable bit for each ITM_STIM register
5354 // Reset value: 0x00000000
5355 BEGIN_TYPE(ITM_TER0_t, uint32_t)
5356 // For STIMENA[m] in ITM_TER*n, controls whether ITM_STIM(32*n + m) is enabled
5357 ADD_BITFIELD_RW(STIMENA, 0, 32)
5358 END_TYPE()
5359
5360 // Controls which stimulus ports can be accessed by unprivileged code
5361 // Reset value: 0x00000000
5362 BEGIN_TYPE(ITM_TPR_t, uint32_t)
5363 // Bit mask to enable tracing on ITM stimulus ports
5364 ADD_BITFIELD_RW(PRIVMASK, 0, 4)
5365 END_TYPE()
5366
5367 // Configures and controls transfers through the ITM interface
5368 // Reset value: 0x00000000
5369 BEGIN_TYPE(ITM_TCR_t, uint32_t)
5370 // Indicates whether the ITM is currently processing events
5371 ADD_BITFIELD_RO(BUSY, 23, 1)
5372 // Identifier for multi-source trace stream formatting. If multi-source trace is in use, the debugger must write a unique non-zero trace ID value to this field
5373 ADD_BITFIELD_RW(TRACEBUSID, 16, 7)
5374 // Defines how often the ITM generates a global timestamp, based on the global timestamp clock frequency, or disables generation of global timestamps
5375 ADD_BITFIELD_RW(GTSFREQ, 10, 2)
5376 // Local timestamp prescaler, used with the trace packet reference clock
5377 ADD_BITFIELD_RW(TSPRESCALE, 8, 2)
5378 // Stall the PE to guarantee delivery of Data Trace packets.
5379 ADD_BITFIELD_RW(STALLENA, 5, 1)
5380 // Enables asynchronous clocking of the timestamp counter
5381 ADD_BITFIELD_RW(SWOENA, 4, 1)
5382 // Enables forwarding of hardware event packet from the DWT unit to the ITM for output to the TPIU
5383 ADD_BITFIELD_RW(TXENA, 3, 1)
5384 // Enables Synchronization packet transmission for a synchronous TPIU
5385 ADD_BITFIELD_RW(SYNCENA, 2, 1)
5386 // Enables Local timestamp generation
5387 ADD_BITFIELD_RW(TSENA, 1, 1)
5388 // Enables the ITM
5389 ADD_BITFIELD_RW(ITMENA, 0, 1)
5390 END_TYPE()
5391
5392 // Integration Mode: Read ATB Ready
5393 // Reset value: 0x00000000
5394 BEGIN_TYPE(INT_ATREADY_t, uint32_t)
5395 // A read of this bit returns the value of AFVALID
5396 ADD_BITFIELD_RO(AFVALID, 1, 1)
5397 // A read of this bit returns the value of ATREADY
5398 ADD_BITFIELD_RO(ATREADY, 0, 1)
5399 END_TYPE()
5400
5401 // Integration Mode: Write ATB Valid
5402 // Reset value: 0x00000000
5403 BEGIN_TYPE(INT_ATVALID_t, uint32_t)
5404 // A write to this bit gives the value of AFREADY
5405 ADD_BITFIELD_RW(AFREADY, 1, 1)
5406 // A write to this bit gives the value of ATVALID
5407 ADD_BITFIELD_RW(ATREADY, 0, 1)
5408 END_TYPE()
5409
5410 // Integration Mode Control Register
5411 // Reset value: 0x00000000
5412 BEGIN_TYPE(ITM_ITCTRL_t, uint32_t)
5413 // Integration mode enable bit - The possible values are: 0 - The trace unit is not in integration mode. 1 - The trace unit is in integration mode. This mode enables: A debug agent to perform topology detection. SoC test software to perform integration testing.
5414 ADD_BITFIELD_RW(IME, 0, 1)
5415 END_TYPE()
5416
5417 // Provides CoreSight discovery information for the ITM
5418 // Reset value: 0x47701a01
5419 BEGIN_TYPE(ITM_DEVARCH_t, uint32_t)
5420 // Defines the architect of the component. Bits [31:28] are the JEP106 continuation code (JEP106 bank ID, minus 1) and bits [27:21] are the JEP106 ID code.
5421 ADD_BITFIELD_RO(ARCHITECT, 21, 11)
5422 // Defines that the DEVARCH register is present
5423 ADD_BITFIELD_RO(PRESENT, 20, 1)
5424 // Defines the architecture revision of the component
5425 ADD_BITFIELD_RO(REVISION, 16, 4)
5426 // Defines the architecture version of the component
5427 ADD_BITFIELD_RO(ARCHVER, 12, 4)
5428 // Defines the architecture of the component
5429 ADD_BITFIELD_RO(ARCHPART, 0, 12)
5430 END_TYPE()
5431
5432 // Provides CoreSight discovery information for the ITM
5433 // Reset value: 0x00000043
5434 BEGIN_TYPE(ITM_DEVTYPE_t, uint32_t)
5435 // Component sub-type
5436 ADD_BITFIELD_RO(SUB, 4, 4)
5437 // Component major type
5438 ADD_BITFIELD_RO(MAJOR, 0, 4)
5439 END_TYPE()
5440
5441 // Provides CoreSight discovery information for the ITM
5442 // Reset value: 0x00000004
5443 BEGIN_TYPE(ITM_PIDR4_t, uint32_t)
5444 // See CoreSight Architecture Specification
5445 ADD_BITFIELD_RO(SIZE, 4, 4)
5446 // See CoreSight Architecture Specification
5447 ADD_BITFIELD_RO(DES_2, 0, 4)
5448 END_TYPE()
5449
5450 // Provides CoreSight discovery information for the ITM
5451 // Reset value: 0x00000000
5452 BEGIN_TYPE(ITM_PIDR5_t, uint32_t)
5453 ADD_BITFIELD_RW(ITM_PIDR5, 0, 32)
5454 END_TYPE()
5455
5456 // Provides CoreSight discovery information for the ITM
5457 // Reset value: 0x00000000
5458 BEGIN_TYPE(ITM_PIDR6_t, uint32_t)
5459 ADD_BITFIELD_RW(ITM_PIDR6, 0, 32)
5460 END_TYPE()
5461
5462 // Provides CoreSight discovery information for the ITM
5463 // Reset value: 0x00000000
5464 BEGIN_TYPE(ITM_PIDR7_t, uint32_t)
5465 ADD_BITFIELD_RW(ITM_PIDR7, 0, 32)
5466 END_TYPE()
5467
5468 // Provides CoreSight discovery information for the ITM
5469 // Reset value: 0x00000021
5470 BEGIN_TYPE(ITM_PIDR0_t, uint32_t)
5471 // See CoreSight Architecture Specification
5472 ADD_BITFIELD_RO(PART_0, 0, 8)
5473 END_TYPE()
5474
5475 // Provides CoreSight discovery information for the ITM
5476 // Reset value: 0x000000bd
5477 BEGIN_TYPE(ITM_PIDR1_t, uint32_t)
5478 // See CoreSight Architecture Specification
5479 ADD_BITFIELD_RO(DES_0, 4, 4)
5480 // See CoreSight Architecture Specification
5481 ADD_BITFIELD_RO(PART_1, 0, 4)
5482 END_TYPE()
5483
5484 // Provides CoreSight discovery information for the ITM
5485 // Reset value: 0x0000000b
5486 BEGIN_TYPE(ITM_PIDR2_t, uint32_t)
5487 // See CoreSight Architecture Specification
5488 ADD_BITFIELD_RO(REVISION, 4, 4)
5489 // See CoreSight Architecture Specification
5490 ADD_BITFIELD_RO(JEDEC, 3, 1)
5491 // See CoreSight Architecture Specification
5492 ADD_BITFIELD_RO(DES_1, 0, 3)
5493 END_TYPE()
5494
5495 // Provides CoreSight discovery information for the ITM
5496 // Reset value: 0x00000000
5497 BEGIN_TYPE(ITM_PIDR3_t, uint32_t)
5498 // See CoreSight Architecture Specification
5499 ADD_BITFIELD_RO(REVAND, 4, 4)
5500 // See CoreSight Architecture Specification
5501 ADD_BITFIELD_RO(CMOD, 0, 4)
5502 END_TYPE()
5503
5504 // Provides CoreSight discovery information for the ITM
5505 // Reset value: 0x0000000d
5506 BEGIN_TYPE(ITM_CIDR0_t, uint32_t)
5507 // See CoreSight Architecture Specification
5508 ADD_BITFIELD_RO(PRMBL_0, 0, 8)
5509 END_TYPE()
5510
5511 // Provides CoreSight discovery information for the ITM
5512 // Reset value: 0x00000090
5513 BEGIN_TYPE(ITM_CIDR1_t, uint32_t)
5514 // See CoreSight Architecture Specification
5515 ADD_BITFIELD_RO(CLASS, 4, 4)
5516 // See CoreSight Architecture Specification
5517 ADD_BITFIELD_RO(PRMBL_1, 0, 4)
5518 END_TYPE()
5519
5520 // Provides CoreSight discovery information for the ITM
5521 // Reset value: 0x00000005
5522 BEGIN_TYPE(ITM_CIDR2_t, uint32_t)
5523 // See CoreSight Architecture Specification
5524 ADD_BITFIELD_RO(PRMBL_2, 0, 8)
5525 END_TYPE()
5526
5527 // Provides CoreSight discovery information for the ITM
5528 // Reset value: 0x000000b1
5529 BEGIN_TYPE(ITM_CIDR3_t, uint32_t)
5530 // See CoreSight Architecture Specification
5531 ADD_BITFIELD_RO(PRMBL_3, 0, 8)
5532 END_TYPE()
5533
5534 // Provides configuration and status information for the DWT unit, and used to control features of the unit
5535 // Reset value: 0x73741824
5536 BEGIN_TYPE(DWT_CTRL_t, uint32_t)
5537 // Number of DWT comparators implemented
5538 ADD_BITFIELD_RO(NUMCOMP, 28, 4)
5539 // Indicates whether the implementation does not support trace
5540 ADD_BITFIELD_RO(NOTRCPKT, 27, 1)
5541 // Reserved, RAZ
5542 ADD_BITFIELD_RO(NOEXTTRIG, 26, 1)
5543 // Indicates whether the implementation does not include a cycle counter
5544 ADD_BITFIELD_RO(NOCYCCNT, 25, 1)
5545 // Indicates whether the implementation does not include the profiling counters
5546 ADD_BITFIELD_RO(NOPRFCNT, 24, 1)
5547 // Controls whether the cycle counter is disabled in Secure state
5548 ADD_BITFIELD_RW(CYCDISS, 23, 1)
5549 // Enables Event Counter packet generation on POSTCNT underflow
5550 ADD_BITFIELD_RW(CYCEVTENA, 22, 1)
5551 // Enables DWT_FOLDCNT counter
5552 ADD_BITFIELD_RW(FOLDEVTENA, 21, 1)
5553 // Enables DWT_LSUCNT counter
5554 ADD_BITFIELD_RW(LSUEVTENA, 20, 1)
5555 // Enable DWT_SLEEPCNT counter
5556 ADD_BITFIELD_RW(SLEEPEVTENA, 19, 1)
5557 // Enables DWT_EXCCNT counter
5558 ADD_BITFIELD_RW(EXCEVTENA, 18, 1)
5559 // Enables DWT_CPICNT counter
5560 ADD_BITFIELD_RW(CPIEVTENA, 17, 1)
5561 // Enables generation of Exception Trace packets
5562 ADD_BITFIELD_RW(EXTTRCENA, 16, 1)
5563 // Enables use of POSTCNT counter as a timer for Periodic PC Sample packet generation
5564 ADD_BITFIELD_RW(PCSAMPLENA, 12, 1)
5565 // Selects the position of the synchronization packet counter tap on the CYCCNT counter. This determines the Synchronization packet rate
5566 ADD_BITFIELD_RW(SYNCTAP, 10, 2)
5567 // Selects the position of the POSTCNT tap on the CYCCNT counter
5568 ADD_BITFIELD_RW(CYCTAP, 9, 1)
5569 // Initial value for the POSTCNT counter
5570 ADD_BITFIELD_RW(POSTINIT, 5, 4)
5571 // Reload value for the POSTCNT counter
5572 ADD_BITFIELD_RW(POSTPRESET, 1, 4)
5573 // Enables CYCCNT
5574 ADD_BITFIELD_RW(CYCCNTENA, 0, 1)
5575 END_TYPE()
5576
5577 // Shows or sets the value of the processor cycle counter, CYCCNT
5578 // Reset value: 0x00000000
5579 BEGIN_TYPE(DWT_CYCCNT_t, uint32_t)
5580 // Increments one on each processor clock cycle when DWT_CTRL.CYCCNTENA == 1 and DEMCR.TRCENA == 1. On overflow, CYCCNT wraps to zero
5581 ADD_BITFIELD_RW(CYCCNT, 0, 32)
5582 END_TYPE()
5583
5584 // Counts the total cycles spent in exception processing
5585 // Reset value: 0x00000000
5586 BEGIN_TYPE(DWT_EXCCNT_t, uint32_t)
5587 // Counts one on each cycle when all of the following are true: - DWT_CTRL.EXCEVTENA == 1 and DEMCR.TRCENA == 1. - No instruction is executed, see DWT_CPICNT. - An exception-entry or exception-exit related operation is in progress. - Either SecureNoninvasiveDebugAllowed() == TRUE, or NS-Req for the operation is set to Non-secure and NoninvasiveDebugAllowed() == TRUE.
5588 ADD_BITFIELD_RW(EXCCNT, 0, 8)
5589 END_TYPE()
5590
5591 // Increments on the additional cycles required to execute all load or store instructions
5592 // Reset value: 0x00000000
5593 BEGIN_TYPE(DWT_LSUCNT_t, uint32_t)
5594 // Counts one on each cycle when all of the following are true: - DWT_CTRL.LSUEVTENA == 1 and DEMCR.TRCENA == 1. - No instruction is executed, see DWT_CPICNT. - No exception-entry or exception-exit operation is in progress, see DWT_EXCCNT. - A load-store operation is in progress. - Either SecureNoninvasiveDebugAllowed() == TRUE, or NS-Req for the operation is set to Non-secure and NoninvasiveDebugAllowed() == TRUE.
5595 ADD_BITFIELD_RW(LSUCNT, 0, 8)
5596 END_TYPE()
5597
5598 // Increments on the additional cycles required to execute all load or store instructions
5599 // Reset value: 0x00000000
5600 BEGIN_TYPE(DWT_FOLDCNT_t, uint32_t)
5601 // Counts on each cycle when all of the following are true: - DWT_CTRL.FOLDEVTENA == 1 and DEMCR.TRCENA == 1. - At least two instructions are executed, see DWT_CPICNT. - Either SecureNoninvasiveDebugAllowed() == TRUE, or the PE is in Non-secure state and NoninvasiveDebugAllowed() == TRUE. The counter is incremented by the number of instructions executed, minus one
5602 ADD_BITFIELD_RW(FOLDCNT, 0, 8)
5603 END_TYPE()
5604
5605 // Provides a reference value for use by watchpoint comparator 0
5606 // Reset value: 0x00000000
5607 BEGIN_TYPE(DWT_COMP0_t, uint32_t)
5608 ADD_BITFIELD_RW(DWT_COMP0, 0, 32)
5609 END_TYPE()
5610
5611 // Controls the operation of watchpoint comparator 0
5612 // Reset value: 0x58000000
5613 BEGIN_TYPE(DWT_FUNCTION0_t, uint32_t)
5614 // Identifies the capabilities for MATCH for comparator *n
5615 ADD_BITFIELD_RO(ID, 27, 5)
5616 // Set to 1 when the comparator matches
5617 ADD_BITFIELD_RO(MATCHED, 24, 1)
5618 // Defines the size of the object being watched for by Data Value and Data Address comparators
5619 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
5620 // Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH
5621 ADD_BITFIELD_RW(ACTION, 4, 2)
5622 // Controls the type of match generated by this comparator
5623 ADD_BITFIELD_RW(MATCH, 0, 4)
5624 END_TYPE()
5625
5626 // Provides a reference value for use by watchpoint comparator 1
5627 // Reset value: 0x00000000
5628 BEGIN_TYPE(DWT_COMP1_t, uint32_t)
5629 ADD_BITFIELD_RW(DWT_COMP1, 0, 32)
5630 END_TYPE()
5631
5632 // Controls the operation of watchpoint comparator 1
5633 // Reset value: 0x89000828
5634 BEGIN_TYPE(DWT_FUNCTION1_t, uint32_t)
5635 // Identifies the capabilities for MATCH for comparator *n
5636 ADD_BITFIELD_RO(ID, 27, 5)
5637 // Set to 1 when the comparator matches
5638 ADD_BITFIELD_RO(MATCHED, 24, 1)
5639 // Defines the size of the object being watched for by Data Value and Data Address comparators
5640 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
5641 // Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH
5642 ADD_BITFIELD_RW(ACTION, 4, 2)
5643 // Controls the type of match generated by this comparator
5644 ADD_BITFIELD_RW(MATCH, 0, 4)
5645 END_TYPE()
5646
5647 // Provides a reference value for use by watchpoint comparator 2
5648 // Reset value: 0x00000000
5649 BEGIN_TYPE(DWT_COMP2_t, uint32_t)
5650 ADD_BITFIELD_RW(DWT_COMP2, 0, 32)
5651 END_TYPE()
5652
5653 // Controls the operation of watchpoint comparator 2
5654 // Reset value: 0x50000000
5655 BEGIN_TYPE(DWT_FUNCTION2_t, uint32_t)
5656 // Identifies the capabilities for MATCH for comparator *n
5657 ADD_BITFIELD_RO(ID, 27, 5)
5658 // Set to 1 when the comparator matches
5659 ADD_BITFIELD_RO(MATCHED, 24, 1)
5660 // Defines the size of the object being watched for by Data Value and Data Address comparators
5661 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
5662 // Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH
5663 ADD_BITFIELD_RW(ACTION, 4, 2)
5664 // Controls the type of match generated by this comparator
5665 ADD_BITFIELD_RW(MATCH, 0, 4)
5666 END_TYPE()
5667
5668 // Provides a reference value for use by watchpoint comparator 3
5669 // Reset value: 0x00000000
5670 BEGIN_TYPE(DWT_COMP3_t, uint32_t)
5671 ADD_BITFIELD_RW(DWT_COMP3, 0, 32)
5672 END_TYPE()
5673
5674 // Controls the operation of watchpoint comparator 3
5675 // Reset value: 0x20000800
5676 BEGIN_TYPE(DWT_FUNCTION3_t, uint32_t)
5677 // Identifies the capabilities for MATCH for comparator *n
5678 ADD_BITFIELD_RO(ID, 27, 5)
5679 // Set to 1 when the comparator matches
5680 ADD_BITFIELD_RO(MATCHED, 24, 1)
5681 // Defines the size of the object being watched for by Data Value and Data Address comparators
5682 ADD_BITFIELD_RW(DATAVSIZE, 10, 2)
5683 // Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH
5684 ADD_BITFIELD_RW(ACTION, 4, 2)
5685 // Controls the type of match generated by this comparator
5686 ADD_BITFIELD_RW(MATCH, 0, 4)
5687 END_TYPE()
5688
5689 // Provides CoreSight discovery information for the DWT
5690 // Reset value: 0x47701a02
5691 BEGIN_TYPE(DWT_DEVARCH_t, uint32_t)
5692 // Defines the architect of the component. Bits [31:28] are the JEP106 continuation code (JEP106 bank ID, minus 1) and bits [27:21] are the JEP106 ID code.
5693 ADD_BITFIELD_RO(ARCHITECT, 21, 11)
5694 // Defines that the DEVARCH register is present
5695 ADD_BITFIELD_RO(PRESENT, 20, 1)
5696 // Defines the architecture revision of the component
5697 ADD_BITFIELD_RO(REVISION, 16, 4)
5698 // Defines the architecture version of the component
5699 ADD_BITFIELD_RO(ARCHVER, 12, 4)
5700 // Defines the architecture of the component
5701 ADD_BITFIELD_RO(ARCHPART, 0, 12)
5702 END_TYPE()
5703
5704 // Provides CoreSight discovery information for the DWT
5705 // Reset value: 0x00000000
5706 BEGIN_TYPE(DWT_DEVTYPE_t, uint32_t)
5707 // Component sub-type
5708 ADD_BITFIELD_RO(SUB, 4, 4)
5709 // Component major type
5710 ADD_BITFIELD_RO(MAJOR, 0, 4)
5711 END_TYPE()
5712
5713 // Provides CoreSight discovery information for the DWT
5714 // Reset value: 0x00000004
5715 BEGIN_TYPE(DWT_PIDR4_t, uint32_t)
5716 // See CoreSight Architecture Specification
5717 ADD_BITFIELD_RO(SIZE, 4, 4)
5718 // See CoreSight Architecture Specification
5719 ADD_BITFIELD_RO(DES_2, 0, 4)
5720 END_TYPE()
5721
5722 // Provides CoreSight discovery information for the DWT
5723 // Reset value: 0x00000000
5724 BEGIN_TYPE(DWT_PIDR5_t, uint32_t)
5725 ADD_BITFIELD_RW(DWT_PIDR5, 0, 32)
5726 END_TYPE()
5727
5728 // Provides CoreSight discovery information for the DWT
5729 // Reset value: 0x00000000
5730 BEGIN_TYPE(DWT_PIDR6_t, uint32_t)
5731 ADD_BITFIELD_RW(DWT_PIDR6, 0, 32)
5732 END_TYPE()
5733
5734 // Provides CoreSight discovery information for the DWT
5735 // Reset value: 0x00000000
5736 BEGIN_TYPE(DWT_PIDR7_t, uint32_t)
5737 ADD_BITFIELD_RW(DWT_PIDR7, 0, 32)
5738 END_TYPE()
5739
5740 // Provides CoreSight discovery information for the DWT
5741 // Reset value: 0x00000021
5742 BEGIN_TYPE(DWT_PIDR0_t, uint32_t)
5743 // See CoreSight Architecture Specification
5744 ADD_BITFIELD_RO(PART_0, 0, 8)
5745 END_TYPE()
5746
5747 // Provides CoreSight discovery information for the DWT
5748 // Reset value: 0x000000bd
5749 BEGIN_TYPE(DWT_PIDR1_t, uint32_t)
5750 // See CoreSight Architecture Specification
5751 ADD_BITFIELD_RO(DES_0, 4, 4)
5752 // See CoreSight Architecture Specification
5753 ADD_BITFIELD_RO(PART_1, 0, 4)
5754 END_TYPE()
5755
5756 // Provides CoreSight discovery information for the DWT
5757 // Reset value: 0x0000000b
5758 BEGIN_TYPE(DWT_PIDR2_t, uint32_t)
5759 // See CoreSight Architecture Specification
5760 ADD_BITFIELD_RO(REVISION, 4, 4)
5761 // See CoreSight Architecture Specification
5762 ADD_BITFIELD_RO(JEDEC, 3, 1)
5763 // See CoreSight Architecture Specification
5764 ADD_BITFIELD_RO(DES_1, 0, 3)
5765 END_TYPE()
5766
5767 // Provides CoreSight discovery information for the DWT
5768 // Reset value: 0x00000000
5769 BEGIN_TYPE(DWT_PIDR3_t, uint32_t)
5770 // See CoreSight Architecture Specification
5771 ADD_BITFIELD_RO(REVAND, 4, 4)
5772 // See CoreSight Architecture Specification
5773 ADD_BITFIELD_RO(CMOD, 0, 4)
5774 END_TYPE()
5775
5776 // Provides CoreSight discovery information for the DWT
5777 // Reset value: 0x0000000d
5778 BEGIN_TYPE(DWT_CIDR0_t, uint32_t)
5779 // See CoreSight Architecture Specification
5780 ADD_BITFIELD_RO(PRMBL_0, 0, 8)
5781 END_TYPE()
5782
5783 // Provides CoreSight discovery information for the DWT
5784 // Reset value: 0x00000090
5785 BEGIN_TYPE(DWT_CIDR1_t, uint32_t)
5786 // See CoreSight Architecture Specification
5787 ADD_BITFIELD_RO(CLASS, 4, 4)
5788 // See CoreSight Architecture Specification
5789 ADD_BITFIELD_RO(PRMBL_1, 0, 4)
5790 END_TYPE()
5791
5792 // Provides CoreSight discovery information for the DWT
5793 // Reset value: 0x00000005
5794 BEGIN_TYPE(DWT_CIDR2_t, uint32_t)
5795 // See CoreSight Architecture Specification
5796 ADD_BITFIELD_RO(PRMBL_2, 0, 8)
5797 END_TYPE()
5798
5799 // Provides CoreSight discovery information for the DWT
5800 // Reset value: 0x000000b1
5801 BEGIN_TYPE(DWT_CIDR3_t, uint32_t)
5802 // See CoreSight Architecture Specification
5803 ADD_BITFIELD_RO(PRMBL_3, 0, 8)
5804 END_TYPE()
5805
5806 // Provides FPB implementation information, and the global enable for the FPB unit
5807 // Reset value: 0x60005580
5808 BEGIN_TYPE(FP_CTRL_t, uint32_t)
5809 // Flash Patch and Breakpoint Unit architecture revision
5810 ADD_BITFIELD_RO(REV, 28, 4)
5811 // Indicates the number of implemented instruction address comparators. Zero indicates no Instruction Address comparators are implemented. The Instruction Address comparators are numbered from 0 to NUM_CODE - 1
5812 ADD_BITFIELD_RO(NUM_CODE_14_12_, 12, 3)
5813 // Indicates the number of implemented literal address comparators. The Literal Address comparators are numbered from NUM_CODE to NUM_CODE + NUM_LIT - 1
5814 ADD_BITFIELD_RO(NUM_LIT, 8, 4)
5815 // Indicates the number of implemented instruction address comparators. Zero indicates no Instruction Address comparators are implemented. The Instruction Address comparators are numbered from 0 to NUM_CODE - 1
5816 ADD_BITFIELD_RO(NUM_CODE_7_4_, 4, 4)
5817 // Writes to the FP_CTRL are ignored unless KEY is concurrently written to one
5818 ADD_BITFIELD_RW(KEY, 1, 1)
5819 // Enables the FPB
5820 ADD_BITFIELD_RW(ENABLE, 0, 1)
5821 END_TYPE()
5822
5823 // Indicates whether the implementation supports Flash Patch remap and, if it does, holds the target address for remap
5824 // Reset value: 0x00000000
5825 BEGIN_TYPE(FP_REMAP_t, uint32_t)
5826 // Indicates whether the FPB unit supports the Flash Patch remap function
5827 ADD_BITFIELD_RO(RMPSPT, 29, 1)
5828 // Holds the bits[28:5] of the Flash Patch remap address
5829 ADD_BITFIELD_RO(REMAP, 5, 24)
5830 END_TYPE()
5831
5832 // Holds an address for comparison. The effect of the match depends on the configuration of the FPB and whether the comparator is an instruction address comparator or a literal address comparator
5833 // Reset value: 0x00000000
5834 BEGIN_TYPE(FP_COMP_t, uint32_t)
5835 // Selects between flashpatch and breakpoint functionality
5836 ADD_BITFIELD_RW(BE, 0, 1)
5837 END_TYPE()
5838
5839 // Provides CoreSight discovery information for the FPB
5840 // Reset value: 0x47701a03
5841 BEGIN_TYPE(FP_DEVARCH_t, uint32_t)
5842 // Defines the architect of the component. Bits [31:28] are the JEP106 continuation code (JEP106 bank ID, minus 1) and bits [27:21] are the JEP106 ID code.
5843 ADD_BITFIELD_RO(ARCHITECT, 21, 11)
5844 // Defines that the DEVARCH register is present
5845 ADD_BITFIELD_RO(PRESENT, 20, 1)
5846 // Defines the architecture revision of the component
5847 ADD_BITFIELD_RO(REVISION, 16, 4)
5848 // Defines the architecture version of the component
5849 ADD_BITFIELD_RO(ARCHVER, 12, 4)
5850 // Defines the architecture of the component
5851 ADD_BITFIELD_RO(ARCHPART, 0, 12)
5852 END_TYPE()
5853
5854 // Provides CoreSight discovery information for the FPB
5855 // Reset value: 0x00000000
5856 BEGIN_TYPE(FP_DEVTYPE_t, uint32_t)
5857 // Component sub-type
5858 ADD_BITFIELD_RO(SUB, 4, 4)
5859 // Component major type
5860 ADD_BITFIELD_RO(MAJOR, 0, 4)
5861 END_TYPE()
5862
5863 // Provides CoreSight discovery information for the FP
5864 // Reset value: 0x00000004
5865 BEGIN_TYPE(FP_PIDR4_t, uint32_t)
5866 // See CoreSight Architecture Specification
5867 ADD_BITFIELD_RO(SIZE, 4, 4)
5868 // See CoreSight Architecture Specification
5869 ADD_BITFIELD_RO(DES_2, 0, 4)
5870 END_TYPE()
5871
5872 // Provides CoreSight discovery information for the FP
5873 // Reset value: 0x00000000
5874 BEGIN_TYPE(FP_PIDR5_t, uint32_t)
5875 ADD_BITFIELD_RW(FP_PIDR5, 0, 32)
5876 END_TYPE()
5877
5878 // Provides CoreSight discovery information for the FP
5879 // Reset value: 0x00000000
5880 BEGIN_TYPE(FP_PIDR6_t, uint32_t)
5881 ADD_BITFIELD_RW(FP_PIDR6, 0, 32)
5882 END_TYPE()
5883
5884 // Provides CoreSight discovery information for the FP
5885 // Reset value: 0x00000000
5886 BEGIN_TYPE(FP_PIDR7_t, uint32_t)
5887 ADD_BITFIELD_RW(FP_PIDR7, 0, 32)
5888 END_TYPE()
5889
5890 // Provides CoreSight discovery information for the FP
5891 // Reset value: 0x00000021
5892 BEGIN_TYPE(FP_PIDR0_t, uint32_t)
5893 // See CoreSight Architecture Specification
5894 ADD_BITFIELD_RO(PART_0, 0, 8)
5895 END_TYPE()
5896
5897 // Provides CoreSight discovery information for the FP
5898 // Reset value: 0x000000bd
5899 BEGIN_TYPE(FP_PIDR1_t, uint32_t)
5900 // See CoreSight Architecture Specification
5901 ADD_BITFIELD_RO(DES_0, 4, 4)
5902 // See CoreSight Architecture Specification
5903 ADD_BITFIELD_RO(PART_1, 0, 4)
5904 END_TYPE()
5905
5906 // Provides CoreSight discovery information for the FP
5907 // Reset value: 0x0000000b
5908 BEGIN_TYPE(FP_PIDR2_t, uint32_t)
5909 // See CoreSight Architecture Specification
5910 ADD_BITFIELD_RO(REVISION, 4, 4)
5911 // See CoreSight Architecture Specification
5912 ADD_BITFIELD_RO(JEDEC, 3, 1)
5913 // See CoreSight Architecture Specification
5914 ADD_BITFIELD_RO(DES_1, 0, 3)
5915 END_TYPE()
5916
5917 // Provides CoreSight discovery information for the FP
5918 // Reset value: 0x00000000
5919 BEGIN_TYPE(FP_PIDR3_t, uint32_t)
5920 // See CoreSight Architecture Specification
5921 ADD_BITFIELD_RO(REVAND, 4, 4)
5922 // See CoreSight Architecture Specification
5923 ADD_BITFIELD_RO(CMOD, 0, 4)
5924 END_TYPE()
5925
5926 // Provides CoreSight discovery information for the FP
5927 // Reset value: 0x0000000d
5928 BEGIN_TYPE(FP_CIDR0_t, uint32_t)
5929 // See CoreSight Architecture Specification
5930 ADD_BITFIELD_RO(PRMBL_0, 0, 8)
5931 END_TYPE()
5932
5933 // Provides CoreSight discovery information for the FP
5934 // Reset value: 0x00000090
5935 BEGIN_TYPE(FP_CIDR1_t, uint32_t)
5936 // See CoreSight Architecture Specification
5937 ADD_BITFIELD_RO(CLASS, 4, 4)
5938 // See CoreSight Architecture Specification
5939 ADD_BITFIELD_RO(PRMBL_1, 0, 4)
5940 END_TYPE()
5941
5942 // Provides CoreSight discovery information for the FP
5943 // Reset value: 0x00000005
5944 BEGIN_TYPE(FP_CIDR2_t, uint32_t)
5945 // See CoreSight Architecture Specification
5946 ADD_BITFIELD_RO(PRMBL_2, 0, 8)
5947 END_TYPE()
5948
5949 // Provides CoreSight discovery information for the FP
5950 // Reset value: 0x000000b1
5951 BEGIN_TYPE(FP_CIDR3_t, uint32_t)
5952 // See CoreSight Architecture Specification
5953 ADD_BITFIELD_RO(PRMBL_3, 0, 8)
5954 END_TYPE()
5955
5956 // Provides information about the interrupt controller
5957 // Reset value: 0x00000001
5958 BEGIN_TYPE(ICTR_t, uint32_t)
5959 // Indicates the number of the highest implemented register in each of the NVIC control register sets, or in the case of NVIC_IPR*n, 4×INTLINESNUM
5960 ADD_BITFIELD_RO(INTLINESNUM, 0, 4)
5961 END_TYPE()
5962
5963 // Provides IMPLEMENTATION DEFINED configuration and control options
5964 // Reset value: 0x00000000
5965 BEGIN_TYPE(ACTLR_t, uint32_t)
5966 // External Exclusives Allowed with no MPU
5967 ADD_BITFIELD_RW(EXTEXCLALL, 29, 1)
5968 // Disable ATB Flush
5969 ADD_BITFIELD_RW(DISITMATBFLUSH, 12, 1)
5970 // Disable FPU exception outputs
5971 ADD_BITFIELD_RW(FPEXCODIS, 10, 1)
5972 // Disable out-of-order FP instruction completion
5973 ADD_BITFIELD_RW(DISOOFP, 9, 1)
5974 // Disable dual-issue.
5975 ADD_BITFIELD_RW(DISFOLD, 2, 1)
5976 // Disable dual-issue.
5977 ADD_BITFIELD_RW(DISMCYCINT, 0, 1)
5978 END_TYPE()
5979
5980 // Use the SysTick Control and Status Register to enable the SysTick features.
5981 // Reset value: 0x00000000
5982 BEGIN_TYPE(SYST_CSR_t, uint32_t)
5983 // Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger.
5984 ADD_BITFIELD_RO(COUNTFLAG, 16, 1)
5985 // SysTick clock source. Always reads as one if SYST_CALIB reports NOREF. Selects the SysTick timer clock source: 0 = External reference clock. 1 = Processor clock.
5986 ADD_BITFIELD_RW(CLKSOURCE, 2, 1)
5987 // Enables SysTick exception request: 0 = Counting down to zero does not assert the SysTick exception request. 1 = Counting down to zero to asserts the SysTick exception request.
5988 ADD_BITFIELD_RW(TICKINT, 1, 1)
5989 // Enable SysTick counter: 0 = Counter disabled. 1 = Counter enabled.
5990 ADD_BITFIELD_RW(ENABLE, 0, 1)
5991 END_TYPE()
5992
5993 // Use the SysTick Reload Value Register to specify the start value to load into the current value register when the counter reaches 0. It can be any value between 0 and 0x00FFFFFF. A start value of 0 is possible, but has no effect because the SysTick interrupt and COUNTFLAG are activated when counting from 1 to 0. The reset value of this register is UNKNOWN. To generate a multi-shot timer with a period of N processor clock cycles, use a RELOAD value of N-1. For example, if the SysTick interrupt is required every 100 clock pulses, set RELOAD to 99.
5994 // Reset value: 0x00000000
5995 BEGIN_TYPE(SYST_RVR_t, uint32_t)
5996 // Value to load into the SysTick Current Value Register when the counter reaches 0.
5997 ADD_BITFIELD_RW(RELOAD, 0, 24)
5998 END_TYPE()
5999
6000 // Use the SysTick Current Value Register to find the current value in the register. The reset value of this register is UNKNOWN.
6001 // Reset value: 0x00000000
6002 BEGIN_TYPE(SYST_CVR_t, uint32_t)
6003 // Reads return the current value of the SysTick counter. This register is write-clear. Writing to it with any value clears the register to 0. Clearing this register also clears the COUNTFLAG bit of the SysTick Control and Status Register.
6004 ADD_BITFIELD_RW(CURRENT, 0, 24)
6005 END_TYPE()
6006
6007 // Use the SysTick Calibration Value Register to enable software to scale to any required speed using divide and multiply.
6008 // Reset value: 0x00000000
6009 BEGIN_TYPE(SYST_CALIB_t, uint32_t)
6010 // If reads as 1, the Reference clock is not provided - the CLKSOURCE bit of the SysTick Control and Status register will be forced to 1 and cannot be cleared to 0.
6011 ADD_BITFIELD_RO(NOREF, 31, 1)
6012 // If reads as 1, the calibration value for 10ms is inexact (due to clock frequency).
6013 ADD_BITFIELD_RO(SKEW, 30, 1)
6014 // An optional Reload value to be used for 10ms (100Hz) timing, subject to system clock skew errors. If the value reads as 0, the calibration value is not known.
6015 ADD_BITFIELD_RO(TENMS, 0, 24)
6016 END_TYPE()
6017
6018 // Enables or reads the enabled state of each group of 32 interrupts
6019 // Reset value: 0x00000000
6020 BEGIN_TYPE(NVIC_ISER0_t, uint32_t)
6021 // For SETENA[m] in NVIC_ISER*n, indicates whether interrupt 32*n + m is enabled
6022 ADD_BITFIELD_RW(SETENA, 0, 32)
6023 END_TYPE()
6024
6025 // Enables or reads the enabled state of each group of 32 interrupts
6026 // Reset value: 0x00000000
6027 BEGIN_TYPE(NVIC_ISER1_t, uint32_t)
6028 // For SETENA[m] in NVIC_ISER*n, indicates whether interrupt 32*n + m is enabled
6029 ADD_BITFIELD_RW(SETENA, 0, 32)
6030 END_TYPE()
6031
6032 // Clears or reads the enabled state of each group of 32 interrupts
6033 // Reset value: 0x00000000
6034 BEGIN_TYPE(NVIC_ICER0_t, uint32_t)
6035 // For CLRENA[m] in NVIC_ICER*n, indicates whether interrupt 32*n + m is enabled
6036 ADD_BITFIELD_RW(CLRENA, 0, 32)
6037 END_TYPE()
6038
6039 // Clears or reads the enabled state of each group of 32 interrupts
6040 // Reset value: 0x00000000
6041 BEGIN_TYPE(NVIC_ICER1_t, uint32_t)
6042 // For CLRENA[m] in NVIC_ICER*n, indicates whether interrupt 32*n + m is enabled
6043 ADD_BITFIELD_RW(CLRENA, 0, 32)
6044 END_TYPE()
6045
6046 // Enables or reads the pending state of each group of 32 interrupts
6047 // Reset value: 0x00000000
6048 BEGIN_TYPE(NVIC_ISPR0_t, uint32_t)
6049 // For SETPEND[m] in NVIC_ISPR*n, indicates whether interrupt 32*n + m is pending
6050 ADD_BITFIELD_RW(SETPEND, 0, 32)
6051 END_TYPE()
6052
6053 // Enables or reads the pending state of each group of 32 interrupts
6054 // Reset value: 0x00000000
6055 BEGIN_TYPE(NVIC_ISPR1_t, uint32_t)
6056 // For SETPEND[m] in NVIC_ISPR*n, indicates whether interrupt 32*n + m is pending
6057 ADD_BITFIELD_RW(SETPEND, 0, 32)
6058 END_TYPE()
6059
6060 // Clears or reads the pending state of each group of 32 interrupts
6061 // Reset value: 0x00000000
6062 BEGIN_TYPE(NVIC_ICPR0_t, uint32_t)
6063 // For CLRPEND[m] in NVIC_ICPR*n, indicates whether interrupt 32*n + m is pending
6064 ADD_BITFIELD_RW(CLRPEND, 0, 32)
6065 END_TYPE()
6066
6067 // Clears or reads the pending state of each group of 32 interrupts
6068 // Reset value: 0x00000000
6069 BEGIN_TYPE(NVIC_ICPR1_t, uint32_t)
6070 // For CLRPEND[m] in NVIC_ICPR*n, indicates whether interrupt 32*n + m is pending
6071 ADD_BITFIELD_RW(CLRPEND, 0, 32)
6072 END_TYPE()
6073
6074 // For each group of 32 interrupts, shows the active state of each interrupt
6075 // Reset value: 0x00000000
6076 BEGIN_TYPE(NVIC_IABR0_t, uint32_t)
6077 // For ACTIVE[m] in NVIC_IABR*n, indicates the active state for interrupt 32*n+m
6078 ADD_BITFIELD_RW(ACTIVE, 0, 32)
6079 END_TYPE()
6080
6081 // For each group of 32 interrupts, shows the active state of each interrupt
6082 // Reset value: 0x00000000
6083 BEGIN_TYPE(NVIC_IABR1_t, uint32_t)
6084 // For ACTIVE[m] in NVIC_IABR*n, indicates the active state for interrupt 32*n+m
6085 ADD_BITFIELD_RW(ACTIVE, 0, 32)
6086 END_TYPE()
6087
6088 // For each group of 32 interrupts, determines whether each interrupt targets Non-secure or Secure state
6089 // Reset value: 0x00000000
6090 BEGIN_TYPE(NVIC_ITNS0_t, uint32_t)
6091 // For ITNS[m] in NVIC_ITNS*n, `IAAMO the target Security state for interrupt 32*n+m
6092 ADD_BITFIELD_RW(ITNS, 0, 32)
6093 END_TYPE()
6094
6095 // For each group of 32 interrupts, determines whether each interrupt targets Non-secure or Secure state
6096 // Reset value: 0x00000000
6097 BEGIN_TYPE(NVIC_ITNS1_t, uint32_t)
6098 // For ITNS[m] in NVIC_ITNS*n, `IAAMO the target Security state for interrupt 32*n+m
6099 ADD_BITFIELD_RW(ITNS, 0, 32)
6100 END_TYPE()
6101
6102 // Sets or reads interrupt priorities
6103 // Reset value: 0x00000000
6104 BEGIN_TYPE(NVIC_IPR_t, uint32_t)
6105 // For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt
6106 ADD_BITFIELD_RW(PRI_N3, 28, 4)
6107 // For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt
6108 ADD_BITFIELD_RW(PRI_N2, 20, 4)
6109 // For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt
6110 ADD_BITFIELD_RW(PRI_N1, 12, 4)
6111 // For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt
6112 ADD_BITFIELD_RW(PRI_N0, 4, 4)
6113 END_TYPE()
6114
6115 // Provides identification information for the PE, including an implementer code for the device and a device ID number
6116 // Reset value: 0x411fd210
6117 BEGIN_TYPE(CPUID_t, uint32_t)
6118 // This field must hold an implementer code that has been assigned by ARM
6119 ADD_BITFIELD_RO(IMPLEMENTER, 24, 8)
6120 // IMPLEMENTATION DEFINED variant number. Typically, this field is used to distinguish between different product variants, or major revisions of a product
6121 ADD_BITFIELD_RO(VARIANT, 20, 4)
6122 // Defines the Architecture implemented by the PE
6123 ADD_BITFIELD_RO(ARCHITECTURE, 16, 4)
6124 // IMPLEMENTATION DEFINED primary part number for the device
6125 ADD_BITFIELD_RO(PARTNO, 4, 12)
6126 // IMPLEMENTATION DEFINED revision number for the device
6127 ADD_BITFIELD_RO(REVISION, 0, 4)
6128 END_TYPE()
6129
6130 // Controls and provides status information for NMI, PendSV, SysTick and interrupts
6131 // Reset value: 0x00000000
6132 BEGIN_TYPE(ICSR_t, uint32_t)
6133 // Indicates whether the NMI exception is pending or set this exception
6134 ADD_BITFIELD_RW(PENDNMISET, 31, 1)
6135 // Allows the NMI exception pend state to be cleared
6136 ADD_BITFIELD_WO(PENDNMICLR, 30, 1)
6137 // Indicates whether the PendSV exception is pending or set this exception
6138 ADD_BITFIELD_RW(PENDSVSET, 28, 1)
6139 // Allows the PendSV exception pend state to be cleared
6140 ADD_BITFIELD_WO(PENDSVCLR, 27, 1)
6141 // Indicates whether the SysTick exception is pending or set this exception
6142 ADD_BITFIELD_RW(PENDSTSET, 26, 1)
6143 // Allows the SysTick exception pend state to be cleared
6144 ADD_BITFIELD_WO(PENDSTCLR, 25, 1)
6145 // Controls whether in a single SysTick implementation, the SysTick is Secure or Non-secure
6146 ADD_BITFIELD_RW(STTNS, 24, 1)
6147 // Indicates whether a pending exception will be serviced on exit from debug halt state
6148 ADD_BITFIELD_RO(ISRPREEMPT, 23, 1)
6149 // Indicates whether an external interrupt, generated by the NVIC, is pending
6150 ADD_BITFIELD_RO(ISRPENDING, 22, 1)
6151 // The exception number of the highest priority pending and enabled interrupt
6152 ADD_BITFIELD_RO(VECTPENDING, 12, 9)
6153 // In Handler mode, indicates whether there is more than one active exception
6154 ADD_BITFIELD_RO(RETTOBASE, 11, 1)
6155 // The exception number of the current executing exception
6156 ADD_BITFIELD_RO(VECTACTIVE, 0, 9)
6157 END_TYPE()
6158
6159 // The VTOR indicates the offset of the vector table base address from memory address 0x00000000.
6160 // Reset value: 0x00000000
6161 BEGIN_TYPE(VTOR_t, uint32_t)
6162 // Vector table base offset field. It contains bits[31:7] of the offset of the table base from the bottom of the memory map.
6163 ADD_BITFIELD_RW(TBLOFF, 7, 25)
6164 END_TYPE()
6165
6166 // Use the Application Interrupt and Reset Control Register to: determine data endianness, clear all active state information from debug halt mode, request a system reset.
6167 // Reset value: 0x00000000
6168 BEGIN_TYPE(AIRCR_t, uint32_t)
6169 // Register key: Reads as Unknown On writes, write 0x05FA to VECTKEY, otherwise the write is ignored.
6170 ADD_BITFIELD_RW(VECTKEY, 16, 16)
6171 // Data endianness implemented: 0 = Little-endian.
6172 ADD_BITFIELD_RO(ENDIANESS, 15, 1)
6173 // Prioritize Secure exceptions. The value of this bit defines whether Secure exception priority boosting is enabled. 0 Priority ranges of Secure and Non-secure exceptions are identical. 1 Non-secure exceptions are de-prioritized.
6174 ADD_BITFIELD_RW(PRIS, 14, 1)
6175 // BusFault, HardFault, and NMI Non-secure enable. 0 BusFault, HardFault, and NMI are Secure. 1 BusFault and NMI are Non-secure and exceptions can target Non-secure HardFault.
6176 ADD_BITFIELD_RW(BFHFNMINS, 13, 1)
6177 // Interrupt priority grouping field. This field determines the split of group priority from subpriority. See https://developer.arm.com/documentation/100235/0004/the-cortex-m33-peripherals/system-control-block/application-interrupt-and-reset-control-register?lang=en
6178 ADD_BITFIELD_RW(PRIGROUP, 8, 3)
6179 // System reset request, Secure state only. 0 SYSRESETREQ functionality is available to both Security states. 1 SYSRESETREQ functionality is only available to Secure state.
6180 ADD_BITFIELD_RW(SYSRESETREQS, 3, 1)
6181 // Writing 1 to this bit causes the SYSRESETREQ signal to the outer system to be asserted to request a reset. The intention is to force a large system reset of all major components except for debug. The C_HALT bit in the DHCSR is cleared as a result of the system reset requested. The debugger does not lose contact with the device.
6182 ADD_BITFIELD_RW(SYSRESETREQ, 2, 1)
6183 // Clears all active state information for fixed and configurable exceptions. This bit: is self-clearing, can only be set by the DAP when the core is halted. When set: clears all active exception status of the processor, forces a return to Thread mode, forces an IPSR of 0. A debugger must re-initialize the stack.
6184 ADD_BITFIELD_RW(VECTCLRACTIVE, 1, 1)
6185 END_TYPE()
6186
6187 // System Control Register. Use the System Control Register for power-management functions: signal to the system when the processor can enter a low power state, control how the processor enters and exits low power states.
6188 // Reset value: 0x00000000
6189 BEGIN_TYPE(SCR_t, uint32_t)
6190 // Send Event on Pending bit: 0 = Only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded. 1 = Enabled events and all interrupts, including disabled interrupts, can wakeup the processor. When an event or interrupt becomes pending, the event signal wakes up the processor from WFE. If the processor is not waiting for an event, the event is registered and affects the next WFE. The processor also wakes up on execution of an SEV instruction or an external event.
6191 ADD_BITFIELD_RW(SEVONPEND, 4, 1)
6192 // 0 SLEEPDEEP is available to both security states 1 SLEEPDEEP is only available to Secure state
6193 ADD_BITFIELD_RW(SLEEPDEEPS, 3, 1)
6194 // Controls whether the processor uses sleep or deep sleep as its low power mode: 0 = Sleep. 1 = Deep sleep.
6195 ADD_BITFIELD_RW(SLEEPDEEP, 2, 1)
6196 // Indicates sleep-on-exit when returning from Handler mode to Thread mode: 0 = Do not sleep when returning to Thread mode. 1 = Enter sleep, or deep sleep, on return from an ISR to Thread mode. Setting this bit to 1 enables an interrupt driven application to avoid returning to an empty main application.
6197 ADD_BITFIELD_RW(SLEEPONEXIT, 1, 1)
6198 END_TYPE()
6199
6200 // Sets or returns configuration and control data
6201 // Reset value: 0x00000201
6202 BEGIN_TYPE(CCR_t, uint32_t)
6203 // Enables program flow prediction `FTSSS
6204 ADD_BITFIELD_RO(BP, 18, 1)
6205 // This is a global enable bit for instruction caches in the selected Security state
6206 ADD_BITFIELD_RO(IC, 17, 1)
6207 // Enables data caching of all data accesses to Normal memory `FTSSS
6208 ADD_BITFIELD_RO(DC, 16, 1)
6209 // Controls the effect of a stack limit violation while executing at a requested priority less than 0
6210 ADD_BITFIELD_RW(STKOFHFNMIGN, 10, 1)
6211 // Reserved, RES1
6212 ADD_BITFIELD_RO(RES1, 9, 1)
6213 // Determines the effect of precise BusFaults on handlers running at a requested priority less than 0
6214 ADD_BITFIELD_RW(BFHFNMIGN, 8, 1)
6215 // Controls the generation of a DIVBYZERO UsageFault when attempting to perform integer division by zero
6216 ADD_BITFIELD_RW(DIV_0_TRP, 4, 1)
6217 // Controls the trapping of unaligned word or halfword accesses
6218 ADD_BITFIELD_RW(UNALIGN_TRP, 3, 1)
6219 // Determines whether unprivileged accesses are permitted to pend interrupts via the STIR
6220 ADD_BITFIELD_RW(USERSETMPEND, 1, 1)
6221 // Reserved, RES1
6222 ADD_BITFIELD_RO(RES1_1, 0, 1)
6223 END_TYPE()
6224
6225 // Sets or returns priority for system handlers 4 - 7
6226 // Reset value: 0x00000000
6227 BEGIN_TYPE(SHPR1_t, uint32_t)
6228 // Priority of system handler 7, SecureFault
6229 ADD_BITFIELD_RW(PRI_7_4, 28, 4)
6230 // Priority of system handler 6, UsageFault
6231 ADD_BITFIELD_RW(PRI_6_4, 20, 4)
6232 // Priority of system handler 5, BusFault
6233 ADD_BITFIELD_RW(PRI_5_4, 12, 4)
6234 // Priority of system handler 4, MemoryManagement
6235 ADD_BITFIELD_RW(PRI_4_4, 4, 4)
6236 END_TYPE()
6237
6238 // Sets or returns priority for system handlers 8 - 11
6239 // Reset value: 0x00000000
6240 BEGIN_TYPE(SHPR2_t, uint32_t)
6241 // Priority of system handler 11, SVCall
6242 ADD_BITFIELD_RW(PRI_11_4, 28, 4)
6243 // Reserved, RES0
6244 ADD_BITFIELD_RO(PRI_10, 16, 8)
6245 // Reserved, RES0
6246 ADD_BITFIELD_RO(PRI_9, 8, 8)
6247 // Reserved, RES0
6248 ADD_BITFIELD_RO(PRI_8, 0, 8)
6249 END_TYPE()
6250
6251 // Sets or returns priority for system handlers 12 - 15
6252 // Reset value: 0x00000000
6253 BEGIN_TYPE(SHPR3_t, uint32_t)
6254 // Priority of system handler 15, SysTick
6255 ADD_BITFIELD_RW(PRI_15_4, 28, 4)
6256 // Priority of system handler 14, PendSV
6257 ADD_BITFIELD_RW(PRI_14_4, 20, 4)
6258 // Reserved, RES0
6259 ADD_BITFIELD_RO(PRI_13, 8, 8)
6260 // Priority of system handler 12, DebugMonitor
6261 ADD_BITFIELD_RW(PRI_12_4, 4, 4)
6262 END_TYPE()
6263
6264 // Provides access to the active and pending status of system exceptions
6265 // Reset value: 0x00000000
6266 BEGIN_TYPE(SHCSR_t, uint32_t)
6267 // `IAAMO the pending state of the HardFault exception `CTTSSS
6268 ADD_BITFIELD_RW(HARDFAULTPENDED, 21, 1)
6269 // `IAAMO the pending state of the SecureFault exception
6270 ADD_BITFIELD_RW(SECUREFAULTPENDED, 20, 1)
6271 // `DW the SecureFault exception is enabled
6272 ADD_BITFIELD_RW(SECUREFAULTENA, 19, 1)
6273 // `DW the UsageFault exception is enabled `FTSSS
6274 ADD_BITFIELD_RW(USGFAULTENA, 18, 1)
6275 // `DW the BusFault exception is enabled
6276 ADD_BITFIELD_RW(BUSFAULTENA, 17, 1)
6277 // `DW the MemManage exception is enabled `FTSSS
6278 ADD_BITFIELD_RW(MEMFAULTENA, 16, 1)
6279 // `IAAMO the pending state of the SVCall exception `FTSSS
6280 ADD_BITFIELD_RW(SVCALLPENDED, 15, 1)
6281 // `IAAMO the pending state of the BusFault exception
6282 ADD_BITFIELD_RW(BUSFAULTPENDED, 14, 1)
6283 // `IAAMO the pending state of the MemManage exception `FTSSS
6284 ADD_BITFIELD_RW(MEMFAULTPENDED, 13, 1)
6285 // The UsageFault exception is banked between Security states, `IAAMO the pending state of the UsageFault exception `FTSSS
6286 ADD_BITFIELD_RW(USGFAULTPENDED, 12, 1)
6287 // `IAAMO the active state of the SysTick exception `FTSSS
6288 ADD_BITFIELD_RW(SYSTICKACT, 11, 1)
6289 // `IAAMO the active state of the PendSV exception `FTSSS
6290 ADD_BITFIELD_RW(PENDSVACT, 10, 1)
6291 // `IAAMO the active state of the DebugMonitor exception
6292 ADD_BITFIELD_RW(MONITORACT, 8, 1)
6293 // `IAAMO the active state of the SVCall exception `FTSSS
6294 ADD_BITFIELD_RW(SVCALLACT, 7, 1)
6295 // `IAAMO the active state of the NMI exception
6296 ADD_BITFIELD_RW(NMIACT, 5, 1)
6297 // `IAAMO the active state of the SecureFault exception
6298 ADD_BITFIELD_RW(SECUREFAULTACT, 4, 1)
6299 // `IAAMO the active state of the UsageFault exception `FTSSS
6300 ADD_BITFIELD_RW(USGFAULTACT, 3, 1)
6301 // Indicates and allows limited modification of the active state of the HardFault exception `FTSSS
6302 ADD_BITFIELD_RW(HARDFAULTACT, 2, 1)
6303 // `IAAMO the active state of the BusFault exception
6304 ADD_BITFIELD_RW(BUSFAULTACT, 1, 1)
6305 // `IAAMO the active state of the MemManage exception `FTSSS
6306 ADD_BITFIELD_RW(MEMFAULTACT, 0, 1)
6307 END_TYPE()
6308
6309 // Contains the three Configurable Fault Status Registers. 31:16 UFSR: Provides information on UsageFault exceptions 15:8 BFSR: Provides information on BusFault exceptions 7:0 MMFSR: Provides information on MemManage exceptions
6310 // Reset value: 0x00000000
6311 BEGIN_TYPE(CFSR_t, uint32_t)
6312 // Sticky flag indicating whether an integer division by zero error has occurred
6313 ADD_BITFIELD_RW(UFSR_DIVBYZERO, 25, 1)
6314 // Sticky flag indicating whether an unaligned access error has occurred
6315 ADD_BITFIELD_RW(UFSR_UNALIGNED, 24, 1)
6316 // Sticky flag indicating whether a stack overflow error has occurred
6317 ADD_BITFIELD_RW(UFSR_STKOF, 20, 1)
6318 // Sticky flag indicating whether a coprocessor disabled or not present error has occurred
6319 ADD_BITFIELD_RW(UFSR_NOCP, 19, 1)
6320 // Sticky flag indicating whether an integrity check error has occurred
6321 ADD_BITFIELD_RW(UFSR_INVPC, 18, 1)
6322 // Sticky flag indicating whether an EPSR.T or EPSR.IT validity error has occurred
6323 ADD_BITFIELD_RW(UFSR_INVSTATE, 17, 1)
6324 // Sticky flag indicating whether an undefined instruction error has occurred
6325 ADD_BITFIELD_RW(UFSR_UNDEFINSTR, 16, 1)
6326 // Indicates validity of the contents of the BFAR register
6327 ADD_BITFIELD_RW(BFSR_BFARVALID, 15, 1)
6328 // Records whether a BusFault occurred during FP lazy state preservation
6329 ADD_BITFIELD_RW(BFSR_LSPERR, 13, 1)
6330 // Records whether a derived BusFault occurred during exception entry stacking
6331 ADD_BITFIELD_RW(BFSR_STKERR, 12, 1)
6332 // Records whether a derived BusFault occurred during exception return unstacking
6333 ADD_BITFIELD_RW(BFSR_UNSTKERR, 11, 1)
6334 // Records whether an imprecise data access error has occurred
6335 ADD_BITFIELD_RW(BFSR_IMPRECISERR, 10, 1)
6336 // Records whether a precise data access error has occurred
6337 ADD_BITFIELD_RW(BFSR_PRECISERR, 9, 1)
6338 // Records whether a BusFault on an instruction prefetch has occurred
6339 ADD_BITFIELD_RW(BFSR_IBUSERR, 8, 1)
6340 // Provides information on MemManage exceptions
6341 ADD_BITFIELD_RW(MMFSR, 0, 8)
6342 END_TYPE()
6343
6344 // Shows the cause of any HardFaults
6345 // Reset value: 0x00000000
6346 BEGIN_TYPE(HFSR_t, uint32_t)
6347 // Indicates when a Debug event has occurred
6348 ADD_BITFIELD_RW(DEBUGEVT, 31, 1)
6349 // Indicates that a fault with configurable priority has been escalated to a HardFault exception, because it could not be made active, because of priority, or because it was disabled
6350 ADD_BITFIELD_RW(FORCED, 30, 1)
6351 // Indicates when a fault has occurred because of a vector table read error on exception processing
6352 ADD_BITFIELD_RW(VECTTBL, 1, 1)
6353 END_TYPE()
6354
6355 // Shows which debug event occurred
6356 // Reset value: 0x00000000
6357 BEGIN_TYPE(DFSR_t, uint32_t)
6358 // Sticky flag indicating whether an External debug request debug event has occurred
6359 ADD_BITFIELD_RW(EXTERNAL, 4, 1)
6360 // Sticky flag indicating whether a Vector catch debug event has occurred
6361 ADD_BITFIELD_RW(VCATCH, 3, 1)
6362 // Sticky flag indicating whether a Watchpoint debug event has occurred
6363 ADD_BITFIELD_RW(DWTTRAP, 2, 1)
6364 // Sticky flag indicating whether a Breakpoint debug event has occurred
6365 ADD_BITFIELD_RW(BKPT, 1, 1)
6366 // Sticky flag indicating that a Halt request debug event or Step debug event has occurred
6367 ADD_BITFIELD_RW(HALTED, 0, 1)
6368 END_TYPE()
6369
6370 // Shows the address of the memory location that caused an MPU fault
6371 // Reset value: 0x00000000
6372 BEGIN_TYPE(MMFAR_t, uint32_t)
6373 // This register is updated with the address of a location that produced a MemManage fault. The MMFSR shows the cause of the fault, and whether this field is valid. This field is valid only when MMFSR.MMARVALID is set, otherwise it is UNKNOWN
6374 ADD_BITFIELD_RW(ADDRESS, 0, 32)
6375 END_TYPE()
6376
6377 // Shows the address associated with a precise data access BusFault
6378 // Reset value: 0x00000000
6379 BEGIN_TYPE(BFAR_t, uint32_t)
6380 // This register is updated with the address of a location that produced a BusFault. The BFSR shows the reason for the fault. This field is valid only when BFSR.BFARVALID is set, otherwise it is UNKNOWN
6381 ADD_BITFIELD_RW(ADDRESS, 0, 32)
6382 END_TYPE()
6383
6384 // Gives top-level information about the instruction set supported by the PE
6385 // Reset value: 0x00000030
6386 BEGIN_TYPE(ID_PFR0_t, uint32_t)
6387 // T32 instruction set support
6388 ADD_BITFIELD_RO(STATE1, 4, 4)
6389 // A32 instruction set support
6390 ADD_BITFIELD_RO(STATE0, 0, 4)
6391 END_TYPE()
6392
6393 // Gives information about the programmers' model and Extensions support
6394 // Reset value: 0x00000520
6395 BEGIN_TYPE(ID_PFR1_t, uint32_t)
6396 // Identifies support for the M-Profile programmers' model support
6397 ADD_BITFIELD_RO(MPROGMOD, 8, 4)
6398 // Identifies whether the Security Extension is implemented
6399 ADD_BITFIELD_RO(SECURITY, 4, 4)
6400 END_TYPE()
6401
6402 // Provides top level information about the debug system
6403 // Reset value: 0x00200000
6404 BEGIN_TYPE(ID_DFR0_t, uint32_t)
6405 // Indicates the supported M-profile debug architecture
6406 ADD_BITFIELD_RO(MPROFDBG, 20, 4)
6407 END_TYPE()
6408
6409 // Provides information about the IMPLEMENTATION DEFINED features of the PE
6410 // Reset value: 0x00000000
6411 BEGIN_TYPE(ID_AFR0_t, uint32_t)
6412 // IMPLEMENTATION DEFINED meaning
6413 ADD_BITFIELD_RO(IMPDEF3, 12, 4)
6414 // IMPLEMENTATION DEFINED meaning
6415 ADD_BITFIELD_RO(IMPDEF2, 8, 4)
6416 // IMPLEMENTATION DEFINED meaning
6417 ADD_BITFIELD_RO(IMPDEF1, 4, 4)
6418 // IMPLEMENTATION DEFINED meaning
6419 ADD_BITFIELD_RO(IMPDEF0, 0, 4)
6420 END_TYPE()
6421
6422 // Provides information about the implemented memory model and memory management support
6423 // Reset value: 0x00101f40
6424 BEGIN_TYPE(ID_MMFR0_t, uint32_t)
6425 // Indicates support for Auxiliary Control Registers
6426 ADD_BITFIELD_RO(AUXREG, 20, 4)
6427 // Indicates support for tightly coupled memories (TCMs)
6428 ADD_BITFIELD_RO(TCM, 16, 4)
6429 // Indicates the number of shareability levels implemented
6430 ADD_BITFIELD_RO(SHARELVL, 12, 4)
6431 // Indicates the outermost shareability domain implemented
6432 ADD_BITFIELD_RO(OUTERSHR, 8, 4)
6433 // Indicates support for the protected memory system architecture (PMSA)
6434 ADD_BITFIELD_RO(PMSA, 4, 4)
6435 END_TYPE()
6436
6437 // Provides information about the implemented memory model and memory management support
6438 // Reset value: 0x00000000
6439 BEGIN_TYPE(ID_MMFR1_t, uint32_t)
6440 ADD_BITFIELD_RW(ID_MMFR1, 0, 32)
6441 END_TYPE()
6442
6443 // Provides information about the implemented memory model and memory management support
6444 // Reset value: 0x01000000
6445 BEGIN_TYPE(ID_MMFR2_t, uint32_t)
6446 // Indicates the support for Wait For Interrupt (WFI) stalling
6447 ADD_BITFIELD_RO(WFISTALL, 24, 4)
6448 END_TYPE()
6449
6450 // Provides information about the implemented memory model and memory management support
6451 // Reset value: 0x00000000
6452 BEGIN_TYPE(ID_MMFR3_t, uint32_t)
6453 // Indicates the supported branch predictor maintenance
6454 ADD_BITFIELD_RO(BPMAINT, 8, 4)
6455 // Indicates the supported cache maintenance operations by set/way
6456 ADD_BITFIELD_RO(CMAINTSW, 4, 4)
6457 // Indicates the supported cache maintenance operations by address
6458 ADD_BITFIELD_RO(CMAINTVA, 0, 4)
6459 END_TYPE()
6460
6461 // Provides information about the instruction set implemented by the PE
6462 // Reset value: 0x08092300
6463 BEGIN_TYPE(ID_ISAR0_t, uint32_t)
6464 // Indicates the supported Divide instructions
6465 ADD_BITFIELD_RO(DIVIDE, 24, 4)
6466 // Indicates the implemented Debug instructions
6467 ADD_BITFIELD_RO(DEBUG, 20, 4)
6468 // Indicates the supported Coprocessor instructions
6469 ADD_BITFIELD_RO(COPROC, 16, 4)
6470 // Indicates the supported combined Compare and Branch instructions
6471 ADD_BITFIELD_RO(CMPBRANCH, 12, 4)
6472 // Indicates the supported bit field instructions
6473 ADD_BITFIELD_RO(BITFIELD, 8, 4)
6474 // Indicates the supported bit count instructions
6475 ADD_BITFIELD_RO(BITCOUNT, 4, 4)
6476 END_TYPE()
6477
6478 // Provides information about the instruction set implemented by the PE
6479 // Reset value: 0x05725000
6480 BEGIN_TYPE(ID_ISAR1_t, uint32_t)
6481 // Indicates the implemented Interworking instructions
6482 ADD_BITFIELD_RO(INTERWORK, 24, 4)
6483 // Indicates the implemented for data-processing instructions with long immediates
6484 ADD_BITFIELD_RO(IMMEDIATE, 20, 4)
6485 // Indicates the implemented If-Then instructions
6486 ADD_BITFIELD_RO(IFTHEN, 16, 4)
6487 // Indicates the implemented Extend instructions
6488 ADD_BITFIELD_RO(EXTEND, 12, 4)
6489 END_TYPE()
6490
6491 // Provides information about the instruction set implemented by the PE
6492 // Reset value: 0x30173426
6493 BEGIN_TYPE(ID_ISAR2_t, uint32_t)
6494 // Indicates the implemented Reversal instructions
6495 ADD_BITFIELD_RO(REVERSAL, 28, 4)
6496 // Indicates the implemented advanced unsigned Multiply instructions
6497 ADD_BITFIELD_RO(MULTU, 20, 4)
6498 // Indicates the implemented advanced signed Multiply instructions
6499 ADD_BITFIELD_RO(MULTS, 16, 4)
6500 // Indicates the implemented additional Multiply instructions
6501 ADD_BITFIELD_RO(MULT, 12, 4)
6502 // Indicates the support for interruptible multi-access instructions
6503 ADD_BITFIELD_RO(MULTIACCESSINT, 8, 4)
6504 // Indicates the implemented Memory Hint instructions
6505 ADD_BITFIELD_RO(MEMHINT, 4, 4)
6506 // Indicates the implemented additional load/store instructions
6507 ADD_BITFIELD_RO(LOADSTORE, 0, 4)
6508 END_TYPE()
6509
6510 // Provides information about the instruction set implemented by the PE
6511 // Reset value: 0x07895729
6512 BEGIN_TYPE(ID_ISAR3_t, uint32_t)
6513 // Indicates the implemented true NOP instructions
6514 ADD_BITFIELD_RO(TRUENOP, 24, 4)
6515 // Indicates the support for T32 non flag-setting MOV instructions
6516 ADD_BITFIELD_RO(T32COPY, 20, 4)
6517 // Indicates the implemented Table Branch instructions
6518 ADD_BITFIELD_RO(TABBRANCH, 16, 4)
6519 // Used in conjunction with ID_ISAR4.SynchPrim_frac to indicate the implemented Synchronization Primitive instructions
6520 ADD_BITFIELD_RO(SYNCHPRIM, 12, 4)
6521 // Indicates the implemented SVC instructions
6522 ADD_BITFIELD_RO(SVC, 8, 4)
6523 // Indicates the implemented SIMD instructions
6524 ADD_BITFIELD_RO(SIMD, 4, 4)
6525 // Indicates the implemented saturating instructions
6526 ADD_BITFIELD_RO(SATURATE, 0, 4)
6527 END_TYPE()
6528
6529 // Provides information about the instruction set implemented by the PE
6530 // Reset value: 0x01310132
6531 BEGIN_TYPE(ID_ISAR4_t, uint32_t)
6532 // Indicates the implemented M profile instructions to modify the PSRs
6533 ADD_BITFIELD_RO(PSR_M, 24, 4)
6534 // Used in conjunction with ID_ISAR3.SynchPrim to indicate the implemented Synchronization Primitive instructions
6535 ADD_BITFIELD_RO(SYNCPRIM_FRAC, 20, 4)
6536 // Indicates the implemented Barrier instructions
6537 ADD_BITFIELD_RO(BARRIER, 16, 4)
6538 // Indicates the support for writeback addressing modes
6539 ADD_BITFIELD_RO(WRITEBACK, 8, 4)
6540 // Indicates the support for writeback addressing modes
6541 ADD_BITFIELD_RO(WITHSHIFTS, 4, 4)
6542 // Indicates the implemented unprivileged instructions
6543 ADD_BITFIELD_RO(UNPRIV, 0, 4)
6544 END_TYPE()
6545
6546 // Provides information about the instruction set implemented by the PE
6547 // Reset value: 0x00000000
6548 BEGIN_TYPE(ID_ISAR5_t, uint32_t)
6549 ADD_BITFIELD_RW(ID_ISAR5, 0, 32)
6550 END_TYPE()
6551
6552 // Provides information about the architecture of the caches. CTR is RES0 if CLIDR is zero.
6553 // Reset value: 0x8000c000
6554 BEGIN_TYPE(CTR_t, uint32_t)
6555 // Reserved, RES1
6556 ADD_BITFIELD_RO(RES1, 31, 1)
6557 // Log2 of the number of words of the maximum size of memory that can be overwritten as a result of the eviction of a cache entry that has had a memory location in it modified
6558 ADD_BITFIELD_RO(CWG, 24, 4)
6559 // Log2 of the number of words of the maximum size of the reservation granule that has been implemented for the Load-Exclusive and Store-Exclusive instructions
6560 ADD_BITFIELD_RO(ERG, 20, 4)
6561 // Log2 of the number of words in the smallest cache line of all the data caches and unified caches that are controlled by the PE
6562 ADD_BITFIELD_RO(DMINLINE, 16, 4)
6563 // Reserved, RES1
6564 ADD_BITFIELD_RO(RES1_1, 14, 2)
6565 // Log2 of the number of words in the smallest cache line of all the instruction caches that are controlled by the PE
6566 ADD_BITFIELD_RO(IMINLINE, 0, 4)
6567 END_TYPE()
6568
6569 // Specifies the access privileges for coprocessors and the FP Extension
6570 // Reset value: 0x00000000
6571 BEGIN_TYPE(CPACR_t, uint32_t)
6572 // The value in this field is ignored. If the implementation does not include the FP Extension, this field is RAZ/WI. If the value of this bit is not programmed to the same value as the CP10 field, then the value is UNKNOWN
6573 ADD_BITFIELD_RW(CP11, 22, 2)
6574 // Defines the access rights for the floating-point functionality
6575 ADD_BITFIELD_RW(CP10, 20, 2)
6576 // Controls access privileges for coprocessor 7
6577 ADD_BITFIELD_RW(CP7, 14, 2)
6578 // Controls access privileges for coprocessor 6
6579 ADD_BITFIELD_RW(CP6, 12, 2)
6580 // Controls access privileges for coprocessor 5
6581 ADD_BITFIELD_RW(CP5, 10, 2)
6582 // Controls access privileges for coprocessor 4
6583 ADD_BITFIELD_RW(CP4, 8, 2)
6584 // Controls access privileges for coprocessor 3
6585 ADD_BITFIELD_RW(CP3, 6, 2)
6586 // Controls access privileges for coprocessor 2
6587 ADD_BITFIELD_RW(CP2, 4, 2)
6588 // Controls access privileges for coprocessor 1
6589 ADD_BITFIELD_RW(CP1, 2, 2)
6590 // Controls access privileges for coprocessor 0
6591 ADD_BITFIELD_RW(CP0, 0, 2)
6592 END_TYPE()
6593
6594 // Defines the Non-secure access permissions for both the FP Extension and coprocessors CP0 to CP7
6595 // Reset value: 0x00000000
6596 BEGIN_TYPE(NSACR_t, uint32_t)
6597 // Enables Non-secure access to the Floating-point Extension
6598 ADD_BITFIELD_RW(CP11, 11, 1)
6599 // Enables Non-secure access to the Floating-point Extension
6600 ADD_BITFIELD_RW(CP10, 10, 1)
6601 // Enables Non-secure access to coprocessor CP7
6602 ADD_BITFIELD_RW(CP7, 7, 1)
6603 // Enables Non-secure access to coprocessor CP6
6604 ADD_BITFIELD_RW(CP6, 6, 1)
6605 // Enables Non-secure access to coprocessor CP5
6606 ADD_BITFIELD_RW(CP5, 5, 1)
6607 // Enables Non-secure access to coprocessor CP4
6608 ADD_BITFIELD_RW(CP4, 4, 1)
6609 // Enables Non-secure access to coprocessor CP3
6610 ADD_BITFIELD_RW(CP3, 3, 1)
6611 // Enables Non-secure access to coprocessor CP2
6612 ADD_BITFIELD_RW(CP2, 2, 1)
6613 // Enables Non-secure access to coprocessor CP1
6614 ADD_BITFIELD_RW(CP1, 1, 1)
6615 // Enables Non-secure access to coprocessor CP0
6616 ADD_BITFIELD_RW(CP0, 0, 1)
6617 END_TYPE()
6618
6619 // The MPU Type Register indicates how many regions the MPU `FTSSS supports
6620 // Reset value: 0x00000800
6621 BEGIN_TYPE(MPU_TYPE_t, uint32_t)
6622 // Number of regions supported by the MPU
6623 ADD_BITFIELD_RO(DREGION, 8, 8)
6624 // Indicates support for separate instructions and data address regions
6625 ADD_BITFIELD_RO(SEPARATE, 0, 1)
6626 END_TYPE()
6627
6628 // Enables the MPU and, when the MPU is enabled, controls whether the default memory map is enabled as a background region for privileged accesses, and whether the MPU is enabled for HardFaults, NMIs, and exception handlers when FAULTMASK is set to 1
6629 // Reset value: 0x00000000
6630 BEGIN_TYPE(MPU_CTRL_t, uint32_t)
6631 // Controls whether the default memory map is enabled for privileged software
6632 ADD_BITFIELD_RW(PRIVDEFENA, 2, 1)
6633 // Controls whether handlers executing with priority less than 0 access memory with the MPU enabled or disabled. This applies to HardFaults, NMIs, and exception handlers when FAULTMASK is set to 1
6634 ADD_BITFIELD_RW(HFNMIENA, 1, 1)
6635 // Enables the MPU
6636 ADD_BITFIELD_RW(ENABLE, 0, 1)
6637 END_TYPE()
6638
6639 // Selects the region currently accessed by MPU_RBAR and MPU_RLAR
6640 // Reset value: 0x00000000
6641 BEGIN_TYPE(MPU_RNR_t, uint32_t)
6642 // Indicates the memory region accessed by MPU_RBAR and MPU_RLAR
6643 ADD_BITFIELD_RW(REGION, 0, 3)
6644 END_TYPE()
6645
6646 // Provides indirect read and write access to the base address of the currently selected MPU region `FTSSS
6647 // Reset value: 0x00000000
6648 BEGIN_TYPE(MPU_RBAR_t, uint32_t)
6649 // Contains bits [31:5] of the lower inclusive limit of the selected MPU memory region. This value is zero extended to provide the base address to be checked against
6650 ADD_BITFIELD_RW(BASE, 5, 27)
6651 // Defines the Shareability domain of this region for Normal memory
6652 ADD_BITFIELD_RW(SH, 3, 2)
6653 // Defines the access permissions for this region
6654 ADD_BITFIELD_RW(AP, 1, 2)
6655 // Defines whether code can be executed from this region
6656 ADD_BITFIELD_RW(XN, 0, 1)
6657 END_TYPE()
6658
6659 // Provides indirect read and write access to the limit address of the currently selected MPU region `FTSSS
6660 // Reset value: 0x00000000
6661 BEGIN_TYPE(MPU_RLAR_t, uint32_t)
6662 // Contains bits [31:5] of the upper inclusive limit of the selected MPU memory region. This value is postfixed with 0x1F to provide the limit address to be checked against
6663 ADD_BITFIELD_RW(LIMIT, 5, 27)
6664 // Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields
6665 ADD_BITFIELD_RW(ATTRINDX, 1, 3)
6666 // Region enable
6667 ADD_BITFIELD_RW(EN, 0, 1)
6668 END_TYPE()
6669
6670 // Provides indirect read and write access to the base address of the MPU region selected by MPU_RNR[7:2]:(1[1:0]) `FTSSS
6671 // Reset value: 0x00000000
6672 BEGIN_TYPE(MPU_RBAR_A1_t, uint32_t)
6673 // Contains bits [31:5] of the lower inclusive limit of the selected MPU memory region. This value is zero extended to provide the base address to be checked against
6674 ADD_BITFIELD_RW(BASE, 5, 27)
6675 // Defines the Shareability domain of this region for Normal memory
6676 ADD_BITFIELD_RW(SH, 3, 2)
6677 // Defines the access permissions for this region
6678 ADD_BITFIELD_RW(AP, 1, 2)
6679 // Defines whether code can be executed from this region
6680 ADD_BITFIELD_RW(XN, 0, 1)
6681 END_TYPE()
6682
6683 // Provides indirect read and write access to the limit address of the currently selected MPU region selected by MPU_RNR[7:2]:(1[1:0]) `FTSSS
6684 // Reset value: 0x00000000
6685 BEGIN_TYPE(MPU_RLAR_A1_t, uint32_t)
6686 // Contains bits [31:5] of the upper inclusive limit of the selected MPU memory region. This value is postfixed with 0x1F to provide the limit address to be checked against
6687 ADD_BITFIELD_RW(LIMIT, 5, 27)
6688 // Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields
6689 ADD_BITFIELD_RW(ATTRINDX, 1, 3)
6690 // Region enable
6691 ADD_BITFIELD_RW(EN, 0, 1)
6692 END_TYPE()
6693
6694 // Provides indirect read and write access to the base address of the MPU region selected by MPU_RNR[7:2]:(2[1:0]) `FTSSS
6695 // Reset value: 0x00000000
6696 BEGIN_TYPE(MPU_RBAR_A2_t, uint32_t)
6697 // Contains bits [31:5] of the lower inclusive limit of the selected MPU memory region. This value is zero extended to provide the base address to be checked against
6698 ADD_BITFIELD_RW(BASE, 5, 27)
6699 // Defines the Shareability domain of this region for Normal memory
6700 ADD_BITFIELD_RW(SH, 3, 2)
6701 // Defines the access permissions for this region
6702 ADD_BITFIELD_RW(AP, 1, 2)
6703 // Defines whether code can be executed from this region
6704 ADD_BITFIELD_RW(XN, 0, 1)
6705 END_TYPE()
6706
6707 // Provides indirect read and write access to the limit address of the currently selected MPU region selected by MPU_RNR[7:2]:(2[1:0]) `FTSSS
6708 // Reset value: 0x00000000
6709 BEGIN_TYPE(MPU_RLAR_A2_t, uint32_t)
6710 // Contains bits [31:5] of the upper inclusive limit of the selected MPU memory region. This value is postfixed with 0x1F to provide the limit address to be checked against
6711 ADD_BITFIELD_RW(LIMIT, 5, 27)
6712 // Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields
6713 ADD_BITFIELD_RW(ATTRINDX, 1, 3)
6714 // Region enable
6715 ADD_BITFIELD_RW(EN, 0, 1)
6716 END_TYPE()
6717
6718 // Provides indirect read and write access to the base address of the MPU region selected by MPU_RNR[7:2]:(3[1:0]) `FTSSS
6719 // Reset value: 0x00000000
6720 BEGIN_TYPE(MPU_RBAR_A3_t, uint32_t)
6721 // Contains bits [31:5] of the lower inclusive limit of the selected MPU memory region. This value is zero extended to provide the base address to be checked against
6722 ADD_BITFIELD_RW(BASE, 5, 27)
6723 // Defines the Shareability domain of this region for Normal memory
6724 ADD_BITFIELD_RW(SH, 3, 2)
6725 // Defines the access permissions for this region
6726 ADD_BITFIELD_RW(AP, 1, 2)
6727 // Defines whether code can be executed from this region
6728 ADD_BITFIELD_RW(XN, 0, 1)
6729 END_TYPE()
6730
6731 // Provides indirect read and write access to the limit address of the currently selected MPU region selected by MPU_RNR[7:2]:(3[1:0]) `FTSSS
6732 // Reset value: 0x00000000
6733 BEGIN_TYPE(MPU_RLAR_A3_t, uint32_t)
6734 // Contains bits [31:5] of the upper inclusive limit of the selected MPU memory region. This value is postfixed with 0x1F to provide the limit address to be checked against
6735 ADD_BITFIELD_RW(LIMIT, 5, 27)
6736 // Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields
6737 ADD_BITFIELD_RW(ATTRINDX, 1, 3)
6738 // Region enable
6739 ADD_BITFIELD_RW(EN, 0, 1)
6740 END_TYPE()
6741
6742 // Along with MPU_MAIR1, provides the memory attribute encodings corresponding to the AttrIndex values
6743 // Reset value: 0x00000000
6744 BEGIN_TYPE(MPU_MAIR0_t, uint32_t)
6745 // Memory attribute encoding for MPU regions with an AttrIndex of 3
6746 ADD_BITFIELD_RW(ATTR3, 24, 8)
6747 // Memory attribute encoding for MPU regions with an AttrIndex of 2
6748 ADD_BITFIELD_RW(ATTR2, 16, 8)
6749 // Memory attribute encoding for MPU regions with an AttrIndex of 1
6750 ADD_BITFIELD_RW(ATTR1, 8, 8)
6751 // Memory attribute encoding for MPU regions with an AttrIndex of 0
6752 ADD_BITFIELD_RW(ATTR0, 0, 8)
6753 END_TYPE()
6754
6755 // Along with MPU_MAIR0, provides the memory attribute encodings corresponding to the AttrIndex values
6756 // Reset value: 0x00000000
6757 BEGIN_TYPE(MPU_MAIR1_t, uint32_t)
6758 // Memory attribute encoding for MPU regions with an AttrIndex of 7
6759 ADD_BITFIELD_RW(ATTR7, 24, 8)
6760 // Memory attribute encoding for MPU regions with an AttrIndex of 6
6761 ADD_BITFIELD_RW(ATTR6, 16, 8)
6762 // Memory attribute encoding for MPU regions with an AttrIndex of 5
6763 ADD_BITFIELD_RW(ATTR5, 8, 8)
6764 // Memory attribute encoding for MPU regions with an AttrIndex of 4
6765 ADD_BITFIELD_RW(ATTR4, 0, 8)
6766 END_TYPE()
6767
6768 // Allows enabling of the Security Attribution Unit
6769 // Reset value: 0x00000000
6770 BEGIN_TYPE(SAU_CTRL_t, uint32_t)
6771 // When SAU_CTRL.ENABLE is 0 this bit controls if the memory is marked as Non-secure or Secure
6772 ADD_BITFIELD_RW(ALLNS, 1, 1)
6773 // Enables the SAU
6774 ADD_BITFIELD_RW(ENABLE, 0, 1)
6775 END_TYPE()
6776
6777 // Indicates the number of regions implemented by the Security Attribution Unit
6778 // Reset value: 0x00000008
6779 BEGIN_TYPE(SAU_TYPE_t, uint32_t)
6780 // The number of implemented SAU regions
6781 ADD_BITFIELD_RO(SREGION, 0, 8)
6782 END_TYPE()
6783
6784 // Selects the region currently accessed by SAU_RBAR and SAU_RLAR
6785 // Reset value: 0x00000000
6786 BEGIN_TYPE(SAU_RNR_t, uint32_t)
6787 // Indicates the SAU region accessed by SAU_RBAR and SAU_RLAR
6788 ADD_BITFIELD_RW(REGION, 0, 8)
6789 END_TYPE()
6790
6791 // Provides indirect read and write access to the base address of the currently selected SAU region
6792 // Reset value: 0x00000000
6793 BEGIN_TYPE(SAU_RBAR_t, uint32_t)
6794 // Holds bits [31:5] of the base address for the selected SAU region
6795 ADD_BITFIELD_RW(BADDR, 5, 27)
6796 END_TYPE()
6797
6798 // Provides indirect read and write access to the limit address of the currently selected SAU region
6799 // Reset value: 0x00000000
6800 BEGIN_TYPE(SAU_RLAR_t, uint32_t)
6801 // Holds bits [31:5] of the limit address for the selected SAU region
6802 ADD_BITFIELD_RW(LADDR, 5, 27)
6803 // Controls whether Non-secure state is permitted to execute an SG instruction from this region
6804 ADD_BITFIELD_RW(NSC, 1, 1)
6805 // SAU region enable
6806 ADD_BITFIELD_RW(ENABLE, 0, 1)
6807 END_TYPE()
6808
6809 // Provides information about any security related faults
6810 // Reset value: 0x00000000
6811 BEGIN_TYPE(SFSR_t, uint32_t)
6812 // Sticky flag indicating that an error occurred during lazy state activation or deactivation
6813 ADD_BITFIELD_RW(LSERR, 7, 1)
6814 // This bit is set when the SFAR register contains a valid value. As with similar fields, such as BFSR.BFARVALID and MMFSR.MMARVALID, this bit can be cleared by other exceptions, such as BusFault
6815 ADD_BITFIELD_RW(SFARVALID, 6, 1)
6816 // Stick flag indicating that an SAU or IDAU violation occurred during the lazy preservation of floating-point state
6817 ADD_BITFIELD_RW(LSPERR, 5, 1)
6818 // Sticky flag indicating that an exception was raised due to a branch that was not flagged as being domain crossing causing a transition from Secure to Non-secure memory
6819 ADD_BITFIELD_RW(INVTRAN, 4, 1)
6820 // Sticky flag indicating that an attempt was made to access parts of the address space that are marked as Secure with NS-Req for the transaction set to Non-secure. This bit is not set if the violation occurred during lazy state preservation. See LSPERR
6821 ADD_BITFIELD_RW(AUVIOL, 3, 1)
6822 // This can be caused by EXC_RETURN.DCRS being set to 0 when returning from an exception in the Non-secure state, or by EXC_RETURN.ES being set to 1 when returning from an exception in the Non-secure state
6823 ADD_BITFIELD_RW(INVER, 2, 1)
6824 // This bit is set if the integrity signature in an exception stack frame is found to be invalid during the unstacking operation
6825 ADD_BITFIELD_RW(INVIS, 1, 1)
6826 // This bit is set if a function call from the Non-secure state or exception targets a non-SG instruction in the Secure state. This bit is also set if the target address is a SG instruction, but there is no matching SAU/IDAU region with the NSC flag set
6827 ADD_BITFIELD_RW(INVEP, 0, 1)
6828 END_TYPE()
6829
6830 // Shows the address of the memory location that caused a Security violation
6831 // Reset value: 0x00000000
6832 BEGIN_TYPE(SFAR_t, uint32_t)
6833 // The address of an access that caused a attribution unit violation. This field is only valid when SFSR.SFARVALID is set. This allows the actual flip flops associated with this register to be shared with other fault address registers. If an implementation chooses to share the storage in this way, care must be taken to not leak Secure address information to the Non-secure state. One way of achieving this is to share the SFAR register with the MMFAR_S register, which is not accessible to the Non-secure state
6834 ADD_BITFIELD_RW(ADDRESS, 0, 32)
6835 END_TYPE()
6836
6837 // Controls halting debug
6838 // Reset value: 0x00000000
6839 BEGIN_TYPE(DHCSR_t, uint32_t)
6840 // Indicates the PE has processed a request to clear DHCSR.C_HALT to 0. That is, either a write to DHCSR that clears DHCSR.C_HALT from 1 to 0, or an External Restart Request
6841 ADD_BITFIELD_RO(S_RESTART_ST, 26, 1)
6842 // Indicates whether the PE has been reset since the last read of the DHCSR
6843 ADD_BITFIELD_RO(S_RESET_ST, 25, 1)
6844 // Set to 1 every time the PE retires one of more instructions
6845 ADD_BITFIELD_RO(S_RETIRE_ST, 24, 1)
6846 // Indicates whether Secure invasive debug is allowed
6847 ADD_BITFIELD_RO(S_SDE, 20, 1)
6848 // Indicates whether the PE is in Lockup state
6849 ADD_BITFIELD_RO(S_LOCKUP, 19, 1)
6850 // Indicates whether the PE is sleeping
6851 ADD_BITFIELD_RO(S_SLEEP, 18, 1)
6852 // Indicates whether the PE is in Debug state
6853 ADD_BITFIELD_RO(S_HALT, 17, 1)
6854 // Handshake flag to transfers through the DCRDR
6855 ADD_BITFIELD_RO(S_REGRDY, 16, 1)
6856 // Allow imprecise entry to Debug state
6857 ADD_BITFIELD_RW(C_SNAPSTALL, 5, 1)
6858 // When debug is enabled, the debugger can write to this bit to mask PendSV, SysTick and external configurable interrupts
6859 ADD_BITFIELD_RW(C_MASKINTS, 3, 1)
6860 // Enable single instruction step
6861 ADD_BITFIELD_RW(C_STEP, 2, 1)
6862 // PE enter Debug state halt request
6863 ADD_BITFIELD_RW(C_HALT, 1, 1)
6864 // Enable Halting debug
6865 ADD_BITFIELD_RW(C_DEBUGEN, 0, 1)
6866 END_TYPE()
6867
6868 // With the DCRDR, provides debug access to the general-purpose registers, special-purpose registers, and the FP extension registers. A write to the DCRSR specifies the register to transfer, whether the transfer is a read or write, and starts the transfer
6869 // Reset value: 0x00000000
6870 BEGIN_TYPE(DCRSR_t, uint32_t)
6871 // Specifies the access type for the transfer
6872 ADD_BITFIELD_RW(REGWNR, 16, 1)
6873 // Specifies the general-purpose register, special-purpose register, or FP register to transfer
6874 ADD_BITFIELD_RW(REGSEL, 0, 7)
6875 END_TYPE()
6876
6877 // With the DCRSR, provides debug access to the general-purpose registers, special-purpose registers, and the FP Extension registers. If the Main Extension is implemented, it can also be used for message passing between an external debugger and a debug agent running on the PE
6878 // Reset value: 0x00000000
6879 BEGIN_TYPE(DCRDR_t, uint32_t)
6880 // Provides debug access for reading and writing the general-purpose registers, special-purpose registers, and Floating-point Extension registers
6881 ADD_BITFIELD_RW(DBGTMP, 0, 32)
6882 END_TYPE()
6883
6884 // Manages vector catch behavior and DebugMonitor handling when debugging
6885 // Reset value: 0x00000000
6886 BEGIN_TYPE(DEMCR_t, uint32_t)
6887 // Global enable for all DWT and ITM features
6888 ADD_BITFIELD_RW(TRCENA, 24, 1)
6889 // Indicates whether the DebugMonitor targets the Secure or the Non-secure state and whether debug events are allowed in Secure state
6890 ADD_BITFIELD_RO(SDME, 20, 1)
6891 // DebugMonitor semaphore bit
6892 ADD_BITFIELD_RW(MON_REQ, 19, 1)
6893 // Enable DebugMonitor stepping
6894 ADD_BITFIELD_RW(MON_STEP, 18, 1)
6895 // Sets or clears the pending state of the DebugMonitor exception
6896 ADD_BITFIELD_RW(MON_PEND, 17, 1)
6897 // Enable the DebugMonitor exception
6898 ADD_BITFIELD_RW(MON_EN, 16, 1)
6899 // SecureFault exception halting debug vector catch enable
6900 ADD_BITFIELD_RW(VC_SFERR, 11, 1)
6901 // HardFault exception halting debug vector catch enable
6902 ADD_BITFIELD_RW(VC_HARDERR, 10, 1)
6903 // Enable halting debug vector catch for faults during exception entry and return
6904 ADD_BITFIELD_RW(VC_INTERR, 9, 1)
6905 // BusFault exception halting debug vector catch enable
6906 ADD_BITFIELD_RW(VC_BUSERR, 8, 1)
6907 // Enable halting debug trap on a UsageFault exception caused by a state information error, for example an Undefined Instruction exception
6908 ADD_BITFIELD_RW(VC_STATERR, 7, 1)
6909 // Enable halting debug trap on a UsageFault exception caused by a checking error, for example an alignment check error
6910 ADD_BITFIELD_RW(VC_CHKERR, 6, 1)
6911 // Enable halting debug trap on a UsageFault caused by an access to a coprocessor
6912 ADD_BITFIELD_RW(VC_NOCPERR, 5, 1)
6913 // Enable halting debug trap on a MemManage exception
6914 ADD_BITFIELD_RW(VC_MMERR, 4, 1)
6915 // Enable Reset Vector Catch. This causes a warm reset to halt a running system
6916 ADD_BITFIELD_RW(VC_CORERESET, 0, 1)
6917 END_TYPE()
6918
6919 // Provides control and status information for Secure debug
6920 // Reset value: 0x00000000
6921 BEGIN_TYPE(DSCSR_t, uint32_t)
6922 // Writes to the CDS bit are ignored unless CDSKEY is concurrently written to zero
6923 ADD_BITFIELD_RW(CDSKEY, 17, 1)
6924 // This field indicates the current Security state of the processor
6925 ADD_BITFIELD_RW(CDS, 16, 1)
6926 // If SBRSELEN is 1 this bit selects whether the Non-secure or the Secure version of the memory-mapped Banked registers are accessible to the debugger
6927 ADD_BITFIELD_RW(SBRSEL, 1, 1)
6928 // Controls whether the SBRSEL field or the current Security state of the processor selects which version of the memory-mapped Banked registers are accessed to the debugger
6929 ADD_BITFIELD_RW(SBRSELEN, 0, 1)
6930 END_TYPE()
6931
6932 // Provides a mechanism for software to generate an interrupt
6933 // Reset value: 0x00000000
6934 BEGIN_TYPE(STIR_t, uint32_t)
6935 // Indicates the interrupt to be pended. The value written is (ExceptionNumber - 16)
6936 ADD_BITFIELD_RW(INTID, 0, 9)
6937 END_TYPE()
6938
6939 // Holds control data for the Floating-point extension
6940 // Reset value: 0x20000472
6941 BEGIN_TYPE(FPCCR_t, uint32_t)
6942 // When this bit is set to 1, execution of a floating-point instruction sets the CONTROL.FPCA bit to 1
6943 ADD_BITFIELD_RW(ASPEN, 31, 1)
6944 // Enables lazy context save of floating-point state
6945 ADD_BITFIELD_RW(LSPEN, 30, 1)
6946 // This bit controls whether the LSPEN bit is writeable from the Non-secure state
6947 ADD_BITFIELD_RW(LSPENS, 29, 1)
6948 // Clear floating-point caller saved registers on exception return
6949 ADD_BITFIELD_RW(CLRONRET, 28, 1)
6950 // This bit controls whether the CLRONRET bit is writeable from the Non-secure state
6951 ADD_BITFIELD_RW(CLRONRETS, 27, 1)
6952 // Treat floating-point registers as Secure enable
6953 ADD_BITFIELD_RW(TS, 26, 1)
6954 // Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the UsageFault exception to pending
6955 ADD_BITFIELD_RW(UFRDY, 10, 1)
6956 // This bit is banked between the Security states and indicates whether the floating-point context violates the stack pointer limit that was active when lazy state preservation was activated. SPLIMVIOL modifies the lazy floating-point state preservation behavior
6957 ADD_BITFIELD_RW(SPLIMVIOL, 9, 1)
6958 // Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the DebugMonitor exception to pending
6959 ADD_BITFIELD_RW(MONRDY, 8, 1)
6960 // Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the SecureFault exception to pending. This bit is only present in the Secure version of the register, and behaves as RAZ/WI when accessed from the Non-secure state
6961 ADD_BITFIELD_RW(SFRDY, 7, 1)
6962 // Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the BusFault exception to pending
6963 ADD_BITFIELD_RW(BFRDY, 6, 1)
6964 // Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the MemManage exception to pending
6965 ADD_BITFIELD_RW(MMRDY, 5, 1)
6966 // Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the HardFault exception to pending
6967 ADD_BITFIELD_RW(HFRDY, 4, 1)
6968 // Indicates the PE mode when it allocated the floating-point stack frame
6969 ADD_BITFIELD_RW(THREAD, 3, 1)
6970 // Security status of the floating-point context. This bit is only present in the Secure version of the register, and behaves as RAZ/WI when accessed from the Non-secure state. This bit is updated whenever lazy state preservation is activated, or when a floating-point instruction is executed
6971 ADD_BITFIELD_RW(S, 2, 1)
6972 // Indicates the privilege level of the software executing when the PE allocated the floating-point stack frame
6973 ADD_BITFIELD_RW(USER, 1, 1)
6974 // Indicates whether lazy preservation of the floating-point state is active
6975 ADD_BITFIELD_RW(LSPACT, 0, 1)
6976 END_TYPE()
6977
6978 // Holds the location of the unpopulated floating-point register space allocated on an exception stack frame
6979 // Reset value: 0x00000000
6980 BEGIN_TYPE(FPCAR_t, uint32_t)
6981 // The location of the unpopulated floating-point register space allocated on an exception stack frame
6982 ADD_BITFIELD_RW(ADDRESS, 3, 29)
6983 END_TYPE()
6984
6985 // Holds the default values for the floating-point status control data that the PE assigns to the FPSCR when it creates a new floating-point context
6986 // Reset value: 0x00000000
6987 BEGIN_TYPE(FPDSCR_t, uint32_t)
6988 // Default value for FPSCR.AHP
6989 ADD_BITFIELD_RW(AHP, 26, 1)
6990 // Default value for FPSCR.DN
6991 ADD_BITFIELD_RW(DN, 25, 1)
6992 // Default value for FPSCR.FZ
6993 ADD_BITFIELD_RW(FZ, 24, 1)
6994 // Default value for FPSCR.RMode
6995 ADD_BITFIELD_RW(RMODE, 22, 2)
6996 END_TYPE()
6997
6998 // Describes the features provided by the Floating-point Extension
6999 // Reset value: 0x60540601
7000 BEGIN_TYPE(MVFR0_t, uint32_t)
7001 // Indicates the rounding modes supported by the FP Extension
7002 ADD_BITFIELD_RO(FPROUND, 28, 4)
7003 // Indicates the support for FP square root operations
7004 ADD_BITFIELD_RO(FPSQRT, 20, 4)
7005 // Indicates the support for FP divide operations
7006 ADD_BITFIELD_RO(FPDIVIDE, 16, 4)
7007 // Indicates support for FP double-precision operations
7008 ADD_BITFIELD_RO(FPDP, 8, 4)
7009 // Indicates support for FP single-precision operations
7010 ADD_BITFIELD_RO(FPSP, 4, 4)
7011 // Indicates size of FP register file
7012 ADD_BITFIELD_RO(SIMDREG, 0, 4)
7013 END_TYPE()
7014
7015 // Describes the features provided by the Floating-point Extension
7016 // Reset value: 0x85000089
7017 BEGIN_TYPE(MVFR1_t, uint32_t)
7018 // Indicates whether the FP Extension implements the fused multiply accumulate instructions
7019 ADD_BITFIELD_RO(FMAC, 28, 4)
7020 // Indicates whether the FP Extension implements half-precision FP conversion instructions
7021 ADD_BITFIELD_RO(FPHP, 24, 4)
7022 // Indicates whether the FP hardware implementation supports NaN propagation
7023 ADD_BITFIELD_RO(FPDNAN, 4, 4)
7024 // Indicates whether subnormals are always flushed-to-zero
7025 ADD_BITFIELD_RO(FPFTZ, 0, 4)
7026 END_TYPE()
7027
7028 // Describes the features provided by the Floating-point Extension
7029 // Reset value: 0x00000060
7030 BEGIN_TYPE(MVFR2_t, uint32_t)
7031 // Indicates support for miscellaneous FP features
7032 ADD_BITFIELD_RO(FPMISC, 4, 4)
7033 END_TYPE()
7034
7035 // Provides CoreSight discovery information for the SCS
7036 // Reset value: 0x47702a04
7037 BEGIN_TYPE(DDEVARCH_t, uint32_t)
7038 // Defines the architect of the component. Bits [31:28] are the JEP106 continuation code (JEP106 bank ID, minus 1) and bits [27:21] are the JEP106 ID code.
7039 ADD_BITFIELD_RO(ARCHITECT, 21, 11)
7040 // Defines that the DEVARCH register is present
7041 ADD_BITFIELD_RO(PRESENT, 20, 1)
7042 // Defines the architecture revision of the component
7043 ADD_BITFIELD_RO(REVISION, 16, 4)
7044 // Defines the architecture version of the component
7045 ADD_BITFIELD_RO(ARCHVER, 12, 4)
7046 // Defines the architecture of the component
7047 ADD_BITFIELD_RO(ARCHPART, 0, 12)
7048 END_TYPE()
7049
7050 // Provides CoreSight discovery information for the SCS
7051 // Reset value: 0x00000000
7052 BEGIN_TYPE(DDEVTYPE_t, uint32_t)
7053 // Component sub-type
7054 ADD_BITFIELD_RO(SUB, 4, 4)
7055 // CoreSight major type
7056 ADD_BITFIELD_RO(MAJOR, 0, 4)
7057 END_TYPE()
7058
7059 // Provides CoreSight discovery information for the SCS
7060 // Reset value: 0x00000004
7061 BEGIN_TYPE(DPIDR4_t, uint32_t)
7062 // See CoreSight Architecture Specification
7063 ADD_BITFIELD_RO(SIZE, 4, 4)
7064 // See CoreSight Architecture Specification
7065 ADD_BITFIELD_RO(DES_2, 0, 4)
7066 END_TYPE()
7067
7068 // Provides CoreSight discovery information for the SCS
7069 // Reset value: 0x00000000
7070 BEGIN_TYPE(DPIDR5_t, uint32_t)
7071 ADD_BITFIELD_RW(DPIDR5, 0, 32)
7072 END_TYPE()
7073
7074 // Provides CoreSight discovery information for the SCS
7075 // Reset value: 0x00000000
7076 BEGIN_TYPE(DPIDR6_t, uint32_t)
7077 ADD_BITFIELD_RW(DPIDR6, 0, 32)
7078 END_TYPE()
7079
7080 // Provides CoreSight discovery information for the SCS
7081 // Reset value: 0x00000000
7082 BEGIN_TYPE(DPIDR7_t, uint32_t)
7083 ADD_BITFIELD_RW(DPIDR7, 0, 32)
7084 END_TYPE()
7085
7086 // Provides CoreSight discovery information for the SCS
7087 // Reset value: 0x00000021
7088 BEGIN_TYPE(DPIDR0_t, uint32_t)
7089 // See CoreSight Architecture Specification
7090 ADD_BITFIELD_RO(PART_0, 0, 8)
7091 END_TYPE()
7092
7093 // Provides CoreSight discovery information for the SCS
7094 // Reset value: 0x000000bd
7095 BEGIN_TYPE(DPIDR1_t, uint32_t)
7096 // See CoreSight Architecture Specification
7097 ADD_BITFIELD_RO(DES_0, 4, 4)
7098 // See CoreSight Architecture Specification
7099 ADD_BITFIELD_RO(PART_1, 0, 4)
7100 END_TYPE()
7101
7102 // Provides CoreSight discovery information for the SCS
7103 // Reset value: 0x0000000b
7104 BEGIN_TYPE(DPIDR2_t, uint32_t)
7105 // See CoreSight Architecture Specification
7106 ADD_BITFIELD_RO(REVISION, 4, 4)
7107 // See CoreSight Architecture Specification
7108 ADD_BITFIELD_RO(JEDEC, 3, 1)
7109 // See CoreSight Architecture Specification
7110 ADD_BITFIELD_RO(DES_1, 0, 3)
7111 END_TYPE()
7112
7113 // Provides CoreSight discovery information for the SCS
7114 // Reset value: 0x00000000
7115 BEGIN_TYPE(DPIDR3_t, uint32_t)
7116 // See CoreSight Architecture Specification
7117 ADD_BITFIELD_RO(REVAND, 4, 4)
7118 // See CoreSight Architecture Specification
7119 ADD_BITFIELD_RO(CMOD, 0, 4)
7120 END_TYPE()
7121
7122 // Provides CoreSight discovery information for the SCS
7123 // Reset value: 0x0000000d
7124 BEGIN_TYPE(DCIDR0_t, uint32_t)
7125 // See CoreSight Architecture Specification
7126 ADD_BITFIELD_RO(PRMBL_0, 0, 8)
7127 END_TYPE()
7128
7129 // Provides CoreSight discovery information for the SCS
7130 // Reset value: 0x00000090
7131 BEGIN_TYPE(DCIDR1_t, uint32_t)
7132 // See CoreSight Architecture Specification
7133 ADD_BITFIELD_RO(CLASS, 4, 4)
7134 // See CoreSight Architecture Specification
7135 ADD_BITFIELD_RO(PRMBL_1, 0, 4)
7136 END_TYPE()
7137
7138 // Provides CoreSight discovery information for the SCS
7139 // Reset value: 0x00000005
7140 BEGIN_TYPE(DCIDR2_t, uint32_t)
7141 // See CoreSight Architecture Specification
7142 ADD_BITFIELD_RO(PRMBL_2, 0, 8)
7143 END_TYPE()
7144
7145 // Provides CoreSight discovery information for the SCS
7146 // Reset value: 0x000000b1
7147 BEGIN_TYPE(DCIDR3_t, uint32_t)
7148 // See CoreSight Architecture Specification
7149 ADD_BITFIELD_RO(PRMBL_3, 0, 8)
7150 END_TYPE()
7151
7152 // Programming Control Register
7153 // Reset value: 0x00000000
7154 BEGIN_TYPE(TRCPRGCTLR_t, uint32_t)
7155 // Trace Unit Enable
7156 ADD_BITFIELD_RW(EN, 0, 1)
7157 END_TYPE()
7158
7159 // The TRCSTATR indicates the ETM-Teal status
7160 // Reset value: 0x00000000
7161 BEGIN_TYPE(TRCSTATR_t, uint32_t)
7162 // Indicates whether the ETM-Teal registers are stable and can be read
7163 ADD_BITFIELD_RO(PMSTABLE, 1, 1)
7164 // Indicates that the trace unit is inactive
7165 ADD_BITFIELD_RO(IDLE, 0, 1)
7166 END_TYPE()
7167
7168 // The TRCCONFIGR sets the basic tracing options for the trace unit
7169 // Reset value: 0x00000000
7170 BEGIN_TYPE(TRCCONFIGR_t, uint32_t)
7171 // Return stack enable
7172 ADD_BITFIELD_RW(RS, 12, 1)
7173 // Global timestamp tracing
7174 ADD_BITFIELD_RW(TS, 11, 1)
7175 // Conditional instruction tracing
7176 ADD_BITFIELD_RW(COND, 5, 6)
7177 // Cycle counting in instruction trace
7178 ADD_BITFIELD_RW(CCI, 4, 1)
7179 // Branch broadcast mode
7180 ADD_BITFIELD_RW(BB, 3, 1)
7181 END_TYPE()
7182
7183 // The TRCEVENTCTL0R controls the tracing of events in the trace stream. The events also drive the ETM-Teal external outputs.
7184 // Reset value: 0x00000000
7185 BEGIN_TYPE(TRCEVENTCTL0R_t, uint32_t)
7186 // Selects the resource type for event 1
7187 ADD_BITFIELD_RW(TYPE1, 15, 1)
7188 // Selects the resource number, based on the value of TYPE1: When TYPE1 is 0, selects a single selected resource from 0-15 defined by SEL1[2:0]. When TYPE1 is 1, selects a Boolean combined resource pair from 0-7 defined by SEL1[2:0]
7189 ADD_BITFIELD_RW(SEL1, 8, 3)
7190 // Selects the resource type for event 0
7191 ADD_BITFIELD_RW(TYPE0, 7, 1)
7192 // Selects the resource number, based on the value of TYPE0: When TYPE1 is 0, selects a single selected resource from 0-15 defined by SEL0[2:0]. When TYPE1 is 1, selects a Boolean combined resource pair from 0-7 defined by SEL0[2:0]
7193 ADD_BITFIELD_RW(SEL0, 0, 3)
7194 END_TYPE()
7195
7196 // The TRCEVENTCTL1R controls how the events selected by TRCEVENTCTL0R behave
7197 // Reset value: 0x00000000
7198 BEGIN_TYPE(TRCEVENTCTL1R_t, uint32_t)
7199 // Low power state behavior override
7200 ADD_BITFIELD_RW(LPOVERRIDE, 12, 1)
7201 // ATB enabled
7202 ADD_BITFIELD_RW(ATB, 11, 1)
7203 // One bit per event, to enable generation of an event element in the instruction trace stream when the selected event occurs
7204 ADD_BITFIELD_RW(INSTEN1, 1, 1)
7205 // One bit per event, to enable generation of an event element in the instruction trace stream when the selected event occurs
7206 ADD_BITFIELD_RW(INSTEN0, 0, 1)
7207 END_TYPE()
7208
7209 // The TRCSTALLCTLR enables ETM-Teal to stall the processor if the ETM-Teal FIFO goes over the programmed level to minimize risk of overflow
7210 // Reset value: 0x00000000
7211 BEGIN_TYPE(TRCSTALLCTLR_t, uint32_t)
7212 // Reserved, RES0
7213 ADD_BITFIELD_RO(INSTPRIORITY, 10, 1)
7214 // Stall processor based on instruction trace buffer space
7215 ADD_BITFIELD_RW(ISTALL, 8, 1)
7216 // Threshold at which stalling becomes active. This provides four levels. This level can be varied to optimize the level of invasion caused by stalling, balanced against the risk of a FIFO overflow
7217 ADD_BITFIELD_RW(LEVEL, 2, 2)
7218 END_TYPE()
7219
7220 // The TRCTSCTLR controls the insertion of global timestamps into the trace stream. A timestamp is always inserted into the instruction trace stream
7221 // Reset value: 0x00000000
7222 BEGIN_TYPE(TRCTSCTLR_t, uint32_t)
7223 // Selects the resource type for event 0
7224 ADD_BITFIELD_RW(TYPE0, 7, 1)
7225 // Selects the resource number, based on the value of TYPE0: When TYPE1 is 0, selects a single selected resource from 0-15 defined by SEL0[2:0]. When TYPE1 is 1, selects a Boolean combined resource pair from 0-7 defined by SEL0[2:0]
7226 ADD_BITFIELD_RW(SEL0, 0, 2)
7227 END_TYPE()
7228
7229 // The TRCSYNCPR specifies the period of trace synchronization of the trace streams. TRCSYNCPR defines a number of bytes of trace between requests for trace synchronization. This value is always a power of two
7230 // Reset value: 0x0000000a
7231 BEGIN_TYPE(TRCSYNCPR_t, uint32_t)
7232 // Defines the number of bytes of trace between trace synchronization requests as a total of the number of bytes generated by the instruction stream. The number of bytes is 2N where N is the value of this field: - A value of zero disables these periodic trace synchronization requests, but does not disable other trace synchronization requests. - The minimum value that can be programmed, other than zero, is 8, providing a minimum trace synchronization period of 256 bytes. - The maximum value is 20, providing a maximum trace synchronization period of 2^20 bytes
7233 ADD_BITFIELD_RO(PERIOD, 0, 5)
7234 END_TYPE()
7235
7236 // The TRCCCCTLR sets the threshold value for instruction trace cycle counting. The threshold represents the minimum interval between cycle count trace packets
7237 // Reset value: 0x00000000
7238 BEGIN_TYPE(TRCCCCTLR_t, uint32_t)
7239 // Instruction trace cycle count threshold
7240 ADD_BITFIELD_RW(THRESHOLD, 0, 12)
7241 END_TYPE()
7242
7243 // The TRCVICTLR controls instruction trace filtering
7244 // Reset value: 0x00000000
7245 BEGIN_TYPE(TRCVICTLR_t, uint32_t)
7246 // In Secure state, each bit controls whether instruction tracing is enabled for the corresponding exception level
7247 ADD_BITFIELD_RW(EXLEVEL_S3, 19, 1)
7248 // In Secure state, each bit controls whether instruction tracing is enabled for the corresponding exception level
7249 ADD_BITFIELD_RW(EXLEVEL_S0, 16, 1)
7250 // Selects whether a system error exception must always be traced
7251 ADD_BITFIELD_RW(TRCERR, 11, 1)
7252 // Selects whether a reset exception must always be traced
7253 ADD_BITFIELD_RW(TRCRESET, 10, 1)
7254 // Indicates the current status of the start/stop logic
7255 ADD_BITFIELD_RW(SSSTATUS, 9, 1)
7256 // Selects the resource type for event 0
7257 ADD_BITFIELD_RW(TYPE0, 7, 1)
7258 // Selects the resource number, based on the value of TYPE0: When TYPE1 is 0, selects a single selected resource from 0-15 defined by SEL0[2:0]. When TYPE1 is 1, selects a Boolean combined resource pair from 0-7 defined by SEL0[2:0]
7259 ADD_BITFIELD_RW(SEL0, 0, 2)
7260 END_TYPE()
7261
7262 // The TRCCNTRLDVR defines the reload value for the reduced function counter
7263 // Reset value: 0x00000000
7264 BEGIN_TYPE(TRCCNTRLDVR0_t, uint32_t)
7265 // Defines the reload value for the counter. This value is loaded into the counter each time the reload event occurs
7266 ADD_BITFIELD_RW(VALUE, 0, 16)
7267 END_TYPE()
7268
7269 // TRCIDR8
7270 // Reset value: 0x00000000
7271 BEGIN_TYPE(TRCIDR8_t, uint32_t)
7272 // reads as `ImpDef
7273 ADD_BITFIELD_RO(MAXSPEC, 0, 32)
7274 END_TYPE()
7275
7276 // TRCIDR9
7277 // Reset value: 0x00000000
7278 BEGIN_TYPE(TRCIDR9_t, uint32_t)
7279 // reads as `ImpDef
7280 ADD_BITFIELD_RO(NUMP0KEY, 0, 32)
7281 END_TYPE()
7282
7283 // TRCIDR10
7284 // Reset value: 0x00000000
7285 BEGIN_TYPE(TRCIDR10_t, uint32_t)
7286 // reads as `ImpDef
7287 ADD_BITFIELD_RO(NUMP1KEY, 0, 32)
7288 END_TYPE()
7289
7290 // TRCIDR11
7291 // Reset value: 0x00000000
7292 BEGIN_TYPE(TRCIDR11_t, uint32_t)
7293 // reads as `ImpDef
7294 ADD_BITFIELD_RO(NUMP1SPC, 0, 32)
7295 END_TYPE()
7296
7297 // TRCIDR12
7298 // Reset value: 0x00000001
7299 BEGIN_TYPE(TRCIDR12_t, uint32_t)
7300 // reads as `ImpDef
7301 ADD_BITFIELD_RO(NUMCONDKEY, 0, 32)
7302 END_TYPE()
7303
7304 // TRCIDR13
7305 // Reset value: 0x00000000
7306 BEGIN_TYPE(TRCIDR13_t, uint32_t)
7307 // reads as `ImpDef
7308 ADD_BITFIELD_RO(NUMCONDSPC, 0, 32)
7309 END_TYPE()
7310
7311 // The TRCIMSPEC shows the presence of any IMPLEMENTATION SPECIFIC features, and enables any features that are provided
7312 // Reset value: 0x00000000
7313 BEGIN_TYPE(TRCIMSPEC_t, uint32_t)
7314 // Reserved, RES0
7315 ADD_BITFIELD_RO(SUPPORT, 0, 4)
7316 END_TYPE()
7317
7318 // TRCIDR0
7319 // Reset value: 0x280006e1
7320 BEGIN_TYPE(TRCIDR0_t, uint32_t)
7321 // reads as `ImpDef
7322 ADD_BITFIELD_RO(COMMOPT, 29, 1)
7323 // reads as `ImpDef
7324 ADD_BITFIELD_RO(TSSIZE, 24, 5)
7325 // reads as `ImpDef
7326 ADD_BITFIELD_RO(TRCEXDATA, 17, 1)
7327 // reads as `ImpDef
7328 ADD_BITFIELD_RO(QSUPP, 15, 2)
7329 // reads as `ImpDef
7330 ADD_BITFIELD_RO(QFILT, 14, 1)
7331 // reads as `ImpDef
7332 ADD_BITFIELD_RO(CONDTYPE, 12, 2)
7333 // reads as `ImpDef
7334 ADD_BITFIELD_RO(NUMEVENT, 10, 2)
7335 // reads as `ImpDef
7336 ADD_BITFIELD_RO(RETSTACK, 9, 1)
7337 // reads as `ImpDef
7338 ADD_BITFIELD_RO(TRCCCI, 7, 1)
7339 // reads as `ImpDef
7340 ADD_BITFIELD_RO(TRCCOND, 6, 1)
7341 // reads as `ImpDef
7342 ADD_BITFIELD_RO(TRCBB, 5, 1)
7343 // reads as `ImpDef
7344 ADD_BITFIELD_RO(TRCDATA, 3, 2)
7345 // reads as `ImpDef
7346 ADD_BITFIELD_RO(INSTP0, 1, 2)
7347 // Reserved, RES1
7348 ADD_BITFIELD_RO(RES1, 0, 1)
7349 END_TYPE()
7350
7351 // TRCIDR1
7352 // Reset value: 0x4100f421
7353 BEGIN_TYPE(TRCIDR1_t, uint32_t)
7354 // reads as `ImpDef
7355 ADD_BITFIELD_RO(DESIGNER, 24, 8)
7356 // Reserved, RES1
7357 ADD_BITFIELD_RO(RES1, 12, 4)
7358 // reads as 0b0100
7359 ADD_BITFIELD_RO(TRCARCHMAJ, 8, 4)
7360 // reads as 0b0000
7361 ADD_BITFIELD_RO(TRCARCHMIN, 4, 4)
7362 // reads as `ImpDef
7363 ADD_BITFIELD_RO(REVISION, 0, 4)
7364 END_TYPE()
7365
7366 // TRCIDR2
7367 // Reset value: 0x00000004
7368 BEGIN_TYPE(TRCIDR2_t, uint32_t)
7369 // reads as `ImpDef
7370 ADD_BITFIELD_RO(CCSIZE, 25, 4)
7371 // reads as `ImpDef
7372 ADD_BITFIELD_RO(DVSIZE, 20, 5)
7373 // reads as `ImpDef
7374 ADD_BITFIELD_RO(DASIZE, 15, 5)
7375 // reads as `ImpDef
7376 ADD_BITFIELD_RO(VMIDSIZE, 10, 5)
7377 // reads as `ImpDef
7378 ADD_BITFIELD_RO(CIDSIZE, 5, 5)
7379 // reads as `ImpDef
7380 ADD_BITFIELD_RO(IASIZE, 0, 5)
7381 END_TYPE()
7382
7383 // TRCIDR3
7384 // Reset value: 0x0f090004
7385 BEGIN_TYPE(TRCIDR3_t, uint32_t)
7386 // reads as `ImpDef
7387 ADD_BITFIELD_RO(NOOVERFLOW, 31, 1)
7388 // reads as `ImpDef
7389 ADD_BITFIELD_RO(NUMPROC, 28, 3)
7390 // reads as `ImpDef
7391 ADD_BITFIELD_RO(SYSSTALL, 27, 1)
7392 // reads as `ImpDef
7393 ADD_BITFIELD_RO(STALLCTL, 26, 1)
7394 // reads as `ImpDef
7395 ADD_BITFIELD_RO(SYNCPR, 25, 1)
7396 // reads as `ImpDef
7397 ADD_BITFIELD_RO(TRCERR, 24, 1)
7398 // reads as `ImpDef
7399 ADD_BITFIELD_RO(EXLEVEL_NS, 20, 4)
7400 // reads as `ImpDef
7401 ADD_BITFIELD_RO(EXLEVEL_S, 16, 4)
7402 // reads as `ImpDef
7403 ADD_BITFIELD_RO(CCITMIN, 0, 12)
7404 END_TYPE()
7405
7406 // TRCIDR4
7407 // Reset value: 0x00114000
7408 BEGIN_TYPE(TRCIDR4_t, uint32_t)
7409 // reads as `ImpDef
7410 ADD_BITFIELD_RO(NUMVMIDC, 28, 4)
7411 // reads as `ImpDef
7412 ADD_BITFIELD_RO(NUMCIDC, 24, 4)
7413 // reads as `ImpDef
7414 ADD_BITFIELD_RO(NUMSSCC, 20, 4)
7415 // reads as `ImpDef
7416 ADD_BITFIELD_RO(NUMRSPAIR, 16, 4)
7417 // reads as `ImpDef
7418 ADD_BITFIELD_RO(NUMPC, 12, 4)
7419 // reads as `ImpDef
7420 ADD_BITFIELD_RO(SUPPDAC, 8, 1)
7421 // reads as `ImpDef
7422 ADD_BITFIELD_RO(NUMDVC, 4, 4)
7423 // reads as `ImpDef
7424 ADD_BITFIELD_RO(NUMACPAIRS, 0, 4)
7425 END_TYPE()
7426
7427 // TRCIDR5
7428 // Reset value: 0x90c70004
7429 BEGIN_TYPE(TRCIDR5_t, uint32_t)
7430 // reads as `ImpDef
7431 ADD_BITFIELD_RO(REDFUNCNTR, 31, 1)
7432 // reads as `ImpDef
7433 ADD_BITFIELD_RO(NUMCNTR, 28, 3)
7434 // reads as `ImpDef
7435 ADD_BITFIELD_RO(NUMSEQSTATE, 25, 3)
7436 // reads as `ImpDef
7437 ADD_BITFIELD_RO(LPOVERRIDE, 23, 1)
7438 // reads as `ImpDef
7439 ADD_BITFIELD_RO(ATBTRIG, 22, 1)
7440 // reads as 0x07
7441 ADD_BITFIELD_RO(TRACEIDSIZE, 16, 6)
7442 // reads as `ImpDef
7443 ADD_BITFIELD_RO(NUMEXTINSEL, 9, 3)
7444 // reads as `ImpDef
7445 ADD_BITFIELD_RO(NUMEXTIN, 0, 9)
7446 END_TYPE()
7447
7448 // TRCIDR6
7449 // Reset value: 0x00000000
7450 BEGIN_TYPE(TRCIDR6_t, uint32_t)
7451 ADD_BITFIELD_RW(TRCIDR6, 0, 32)
7452 END_TYPE()
7453
7454 // TRCIDR7
7455 // Reset value: 0x00000000
7456 BEGIN_TYPE(TRCIDR7_t, uint32_t)
7457 ADD_BITFIELD_RW(TRCIDR7, 0, 32)
7458 END_TYPE()
7459
7460 // The TRCRSCTLR controls the trace resources
7461 // Reset value: 0x00000000
7462 BEGIN_TYPE(TRCRSCTLR2_t, uint32_t)
7463 // Inverts the result of a combined pair of resources. This bit is only implemented on the lower register for a pair of resource selectors
7464 ADD_BITFIELD_RW(PAIRINV, 21, 1)
7465 // Inverts the selected resources
7466 ADD_BITFIELD_RW(INV, 20, 1)
7467 // Selects a group of resource
7468 ADD_BITFIELD_RW(GROUP, 16, 3)
7469 // Selects one or more resources from the wanted group. One bit is provided per resource from the group
7470 ADD_BITFIELD_RW(SELECT, 0, 8)
7471 END_TYPE()
7472
7473 // The TRCRSCTLR controls the trace resources
7474 // Reset value: 0x00000000
7475 BEGIN_TYPE(TRCRSCTLR3_t, uint32_t)
7476 // Inverts the result of a combined pair of resources. This bit is only implemented on the lower register for a pair of resource selectors
7477 ADD_BITFIELD_RW(PAIRINV, 21, 1)
7478 // Inverts the selected resources
7479 ADD_BITFIELD_RW(INV, 20, 1)
7480 // Selects a group of resource
7481 ADD_BITFIELD_RW(GROUP, 16, 3)
7482 // Selects one or more resources from the wanted group. One bit is provided per resource from the group
7483 ADD_BITFIELD_RW(SELECT, 0, 8)
7484 END_TYPE()
7485
7486 // Controls the corresponding single-shot comparator resource
7487 // Reset value: 0x00000000
7488 BEGIN_TYPE(TRCSSCSR_t, uint32_t)
7489 // Single-shot status bit. Indicates if any of the comparators, that TRCSSCCRn.SAC or TRCSSCCRn.ARC selects, have matched
7490 ADD_BITFIELD_RW(STATUS, 31, 1)
7491 // Reserved, RES1
7492 ADD_BITFIELD_RO(PC, 3, 1)
7493 // Reserved, RES0
7494 ADD_BITFIELD_RO(DV, 2, 1)
7495 // Reserved, RES0
7496 ADD_BITFIELD_RO(DA, 1, 1)
7497 // Reserved, RES0
7498 ADD_BITFIELD_RO(INST, 0, 1)
7499 END_TYPE()
7500
7501 // Selects the PE comparator inputs for Single-shot control
7502 // Reset value: 0x00000000
7503 BEGIN_TYPE(TRCSSPCICR_t, uint32_t)
7504 // Selects one or more PE comparator inputs for Single-shot control. TRCIDR4.NUMPC defines the size of the PC field. 1 bit is provided for each implemented PE comparator input. For example, if bit[1] == 1 this selects PE comparator input 1 for Single-shot control
7505 ADD_BITFIELD_RW(PC, 0, 4)
7506 END_TYPE()
7507
7508 // Requests the system to provide power to the trace unit
7509 // Reset value: 0x00000000
7510 BEGIN_TYPE(TRCPDCR_t, uint32_t)
7511 // Powerup request bit:
7512 ADD_BITFIELD_RW(PU, 3, 1)
7513 END_TYPE()
7514
7515 // Returns the following information about the trace unit: - OS Lock status. - Core power domain status. - Power interruption status
7516 // Reset value: 0x00000003
7517 BEGIN_TYPE(TRCPDSR_t, uint32_t)
7518 // OS Lock status bit:
7519 ADD_BITFIELD_RO(OSLK, 5, 1)
7520 // Sticky powerdown status bit. Indicates whether the trace register state is valid:
7521 ADD_BITFIELD_RO(STICKYPD, 1, 1)
7522 // Power status bit:
7523 ADD_BITFIELD_RO(POWER, 0, 1)
7524 END_TYPE()
7525
7526 // Trace Integration ATB Identification Register
7527 // Reset value: 0x00000000
7528 BEGIN_TYPE(TRCITATBIDR_t, uint32_t)
7529 // Trace ID
7530 ADD_BITFIELD_RW(ID, 0, 7)
7531 END_TYPE()
7532
7533 // Trace Integration Instruction ATB In Register
7534 // Reset value: 0x00000000
7535 BEGIN_TYPE(TRCITIATBINR_t, uint32_t)
7536 // Integration Mode instruction AFVALIDM in
7537 ADD_BITFIELD_RW(AFVALIDM, 1, 1)
7538 // Integration Mode instruction ATREADYM in
7539 ADD_BITFIELD_RW(ATREADYM, 0, 1)
7540 END_TYPE()
7541
7542 // Trace Integration Instruction ATB Out Register
7543 // Reset value: 0x00000000
7544 BEGIN_TYPE(TRCITIATBOUTR_t, uint32_t)
7545 // Integration Mode instruction AFREADY out
7546 ADD_BITFIELD_RW(AFREADY, 1, 1)
7547 // Integration Mode instruction ATVALID out
7548 ADD_BITFIELD_RW(ATVALID, 0, 1)
7549 END_TYPE()
7550
7551 // Claim Tag Set Register
7552 // Reset value: 0x0000000f
7553 BEGIN_TYPE(TRCCLAIMSET_t, uint32_t)
7554 // When a write to one of these bits occurs, with the value:
7555 ADD_BITFIELD_RW(SET3, 3, 1)
7556 // When a write to one of these bits occurs, with the value:
7557 ADD_BITFIELD_RW(SET2, 2, 1)
7558 // When a write to one of these bits occurs, with the value:
7559 ADD_BITFIELD_RW(SET1, 1, 1)
7560 // When a write to one of these bits occurs, with the value:
7561 ADD_BITFIELD_RW(SET0, 0, 1)
7562 END_TYPE()
7563
7564 // Claim Tag Clear Register
7565 // Reset value: 0x00000000
7566 BEGIN_TYPE(TRCCLAIMCLR_t, uint32_t)
7567 // When a write to one of these bits occurs, with the value:
7568 ADD_BITFIELD_RW(CLR3, 3, 1)
7569 // When a write to one of these bits occurs, with the value:
7570 ADD_BITFIELD_RW(CLR2, 2, 1)
7571 // When a write to one of these bits occurs, with the value:
7572 ADD_BITFIELD_RW(CLR1, 1, 1)
7573 // When a write to one of these bits occurs, with the value:
7574 ADD_BITFIELD_RW(CLR0, 0, 1)
7575 END_TYPE()
7576
7577 // Returns the level of tracing that the trace unit can support
7578 // Reset value: 0x00000000
7579 BEGIN_TYPE(TRCAUTHSTATUS_t, uint32_t)
7580 // Indicates whether the system enables the trace unit to support Secure non-invasive debug:
7581 ADD_BITFIELD_RO(SNID, 6, 2)
7582 // Indicates whether the trace unit supports Secure invasive debug:
7583 ADD_BITFIELD_RO(SID, 4, 2)
7584 // Indicates whether the system enables the trace unit to support Non-secure non-invasive debug:
7585 ADD_BITFIELD_RO(NSNID, 2, 2)
7586 // Indicates whether the trace unit supports Non-secure invasive debug:
7587 ADD_BITFIELD_RO(NSID, 0, 2)
7588 END_TYPE()
7589
7590 // TRCDEVARCH
7591 // Reset value: 0x47724a13
7592 BEGIN_TYPE(TRCDEVARCH_t, uint32_t)
7593 // reads as 0b01000111011
7594 ADD_BITFIELD_RO(ARCHITECT, 21, 11)
7595 // reads as 0b1
7596 ADD_BITFIELD_RO(PRESENT, 20, 1)
7597 // reads as 0b0000
7598 ADD_BITFIELD_RO(REVISION, 16, 4)
7599 // reads as 0b0100101000010011
7600 ADD_BITFIELD_RO(ARCHID, 0, 16)
7601 END_TYPE()
7602
7603 // TRCDEVID
7604 // Reset value: 0x00000000
7605 BEGIN_TYPE(TRCDEVID_t, uint32_t)
7606 ADD_BITFIELD_RW(TRCDEVID, 0, 32)
7607 END_TYPE()
7608
7609 // TRCDEVTYPE
7610 // Reset value: 0x00000013
7611 BEGIN_TYPE(TRCDEVTYPE_t, uint32_t)
7612 // reads as 0b0001
7613 ADD_BITFIELD_RO(SUB, 4, 4)
7614 // reads as 0b0011
7615 ADD_BITFIELD_RO(MAJOR, 0, 4)
7616 END_TYPE()
7617
7618 // TRCPIDR4
7619 // Reset value: 0x00000004
7620 BEGIN_TYPE(TRCPIDR4_t, uint32_t)
7621 // reads as `ImpDef
7622 ADD_BITFIELD_RO(SIZE, 4, 4)
7623 // reads as `ImpDef
7624 ADD_BITFIELD_RO(DES_2, 0, 4)
7625 END_TYPE()
7626
7627 // TRCPIDR5
7628 // Reset value: 0x00000000
7629 BEGIN_TYPE(TRCPIDR5_t, uint32_t)
7630 ADD_BITFIELD_RW(TRCPIDR5, 0, 32)
7631 END_TYPE()
7632
7633 // TRCPIDR6
7634 // Reset value: 0x00000000
7635 BEGIN_TYPE(TRCPIDR6_t, uint32_t)
7636 ADD_BITFIELD_RW(TRCPIDR6, 0, 32)
7637 END_TYPE()
7638
7639 // TRCPIDR7
7640 // Reset value: 0x00000000
7641 BEGIN_TYPE(TRCPIDR7_t, uint32_t)
7642 ADD_BITFIELD_RW(TRCPIDR7, 0, 32)
7643 END_TYPE()
7644
7645 // TRCPIDR0
7646 // Reset value: 0x00000021
7647 BEGIN_TYPE(TRCPIDR0_t, uint32_t)
7648 // reads as `ImpDef
7649 ADD_BITFIELD_RO(PART_0, 0, 8)
7650 END_TYPE()
7651
7652 // TRCPIDR1
7653 // Reset value: 0x000000bd
7654 BEGIN_TYPE(TRCPIDR1_t, uint32_t)
7655 // reads as `ImpDef
7656 ADD_BITFIELD_RO(DES_0, 4, 4)
7657 // reads as `ImpDef
7658 ADD_BITFIELD_RO(PART_0, 0, 4)
7659 END_TYPE()
7660
7661 // TRCPIDR2
7662 // Reset value: 0x0000002b
7663 BEGIN_TYPE(TRCPIDR2_t, uint32_t)
7664 // reads as `ImpDef
7665 ADD_BITFIELD_RO(REVISION, 4, 4)
7666 // reads as 0b1
7667 ADD_BITFIELD_RO(JEDEC, 3, 1)
7668 // reads as `ImpDef
7669 ADD_BITFIELD_RO(DES_0, 0, 3)
7670 END_TYPE()
7671
7672 // TRCPIDR3
7673 // Reset value: 0x00000000
7674 BEGIN_TYPE(TRCPIDR3_t, uint32_t)
7675 // reads as `ImpDef
7676 ADD_BITFIELD_RO(REVAND, 4, 4)
7677 // reads as `ImpDef
7678 ADD_BITFIELD_RO(CMOD, 0, 4)
7679 END_TYPE()
7680
7681 // TRCCIDR0
7682 // Reset value: 0x0000000d
7683 BEGIN_TYPE(TRCCIDR0_t, uint32_t)
7684 // reads as 0b00001101
7685 ADD_BITFIELD_RO(PRMBL_0, 0, 8)
7686 END_TYPE()
7687
7688 // TRCCIDR1
7689 // Reset value: 0x00000090
7690 BEGIN_TYPE(TRCCIDR1_t, uint32_t)
7691 // reads as 0b1001
7692 ADD_BITFIELD_RO(CLASS, 4, 4)
7693 // reads as 0b0000
7694 ADD_BITFIELD_RO(PRMBL_1, 0, 4)
7695 END_TYPE()
7696
7697 // TRCCIDR2
7698 // Reset value: 0x00000005
7699 BEGIN_TYPE(TRCCIDR2_t, uint32_t)
7700 // reads as 0b00000101
7701 ADD_BITFIELD_RO(PRMBL_2, 0, 8)
7702 END_TYPE()
7703
7704 // TRCCIDR3
7705 // Reset value: 0x000000b1
7706 BEGIN_TYPE(TRCCIDR3_t, uint32_t)
7707 // reads as 0b10110001
7708 ADD_BITFIELD_RO(PRMBL_3, 0, 8)
7709 END_TYPE()
7710
7711 // CTI Control Register
7712 // Reset value: 0x00000000
7713 BEGIN_TYPE(CTICONTROL_t, uint32_t)
7714 // Enables or disables the CTI
7715 ADD_BITFIELD_RW(GLBEN, 0, 1)
7716 END_TYPE()
7717
7718 // CTI Interrupt Acknowledge Register
7719 // Reset value: 0x00000000
7720 BEGIN_TYPE(CTIINTACK_t, uint32_t)
7721 // Acknowledges the corresponding ctitrigout output. There is one bit of the register for each ctitrigout output. When a 1 is written to a bit in this register, the corresponding ctitrigout is acknowledged, causing it to be cleared.
7722 ADD_BITFIELD_RW(INTACK, 0, 8)
7723 END_TYPE()
7724
7725 // CTI Application Trigger Set Register
7726 // Reset value: 0x00000000
7727 BEGIN_TYPE(CTIAPPSET_t, uint32_t)
7728 // Setting a bit HIGH generates a channel event for the selected channel. There is one bit of the register for each channel
7729 ADD_BITFIELD_RW(APPSET, 0, 4)
7730 END_TYPE()
7731
7732 // CTI Application Trigger Clear Register
7733 // Reset value: 0x00000000
7734 BEGIN_TYPE(CTIAPPCLEAR_t, uint32_t)
7735 // Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel.
7736 ADD_BITFIELD_RW(APPCLEAR, 0, 4)
7737 END_TYPE()
7738
7739 // CTI Application Pulse Register
7740 // Reset value: 0x00000000
7741 BEGIN_TYPE(CTIAPPPULSE_t, uint32_t)
7742 // Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel.
7743 ADD_BITFIELD_RW(APPULSE, 0, 4)
7744 END_TYPE()
7745
7746 // CTI Trigger to Channel Enable Registers
7747 // Reset value: 0x00000000
7748 BEGIN_TYPE(CTIINEN_t, uint32_t)
7749 // Enables a cross trigger event to the corresponding channel when a ctitrigin input is activated. There is one bit of the field for each of the four channels
7750 ADD_BITFIELD_RW(TRIGINEN, 0, 4)
7751 END_TYPE()
7752
7753 // CTI Trigger to Channel Enable Registers
7754 // Reset value: 0x00000000
7755 BEGIN_TYPE(CTIOUTEN_t, uint32_t)
7756 // Enables a cross trigger event to ctitrigout when the corresponding channel is activated. There is one bit of the field for each of the four channels.
7757 ADD_BITFIELD_RW(TRIGOUTEN, 0, 4)
7758 END_TYPE()
7759
7760 // CTI Trigger to Channel Enable Registers
7761 // Reset value: 0x00000000
7762 BEGIN_TYPE(CTITRIGINSTATUS_t, uint32_t)
7763 // Shows the status of the ctitrigin inputs. There is one bit of the field for each trigger input.Because the register provides a view of the raw ctitrigin inputs, the reset value is UNKNOWN.
7764 ADD_BITFIELD_RO(TRIGINSTATUS, 0, 8)
7765 END_TYPE()
7766
7767 // CTI Trigger In Status Register
7768 // Reset value: 0x00000000
7769 BEGIN_TYPE(CTITRIGOUTSTATUS_t, uint32_t)
7770 // Shows the status of the ctitrigout outputs. There is one bit of the field for each trigger output.
7771 ADD_BITFIELD_RO(TRIGOUTSTATUS, 0, 8)
7772 END_TYPE()
7773
7774 // CTI Channel In Status Register
7775 // Reset value: 0x00000000
7776 BEGIN_TYPE(CTICHINSTATUS_t, uint32_t)
7777 // Shows the status of the ctichout outputs. There is one bit of the field for each channel output
7778 ADD_BITFIELD_RO(CTICHOUTSTATUS, 0, 4)
7779 END_TYPE()
7780
7781 // Enable CTI Channel Gate register
7782 // Reset value: 0x0000000f
7783 BEGIN_TYPE(CTIGATE_t, uint32_t)
7784 // Enable ctichout3. Set to 0 to disable channel propagation.
7785 ADD_BITFIELD_RW(CTIGATEEN3, 3, 1)
7786 // Enable ctichout2. Set to 0 to disable channel propagation.
7787 ADD_BITFIELD_RW(CTIGATEEN2, 2, 1)
7788 // Enable ctichout1. Set to 0 to disable channel propagation.
7789 ADD_BITFIELD_RW(CTIGATEEN1, 1, 1)
7790 // Enable ctichout0. Set to 0 to disable channel propagation.
7791 ADD_BITFIELD_RW(CTIGATEEN0, 0, 1)
7792 END_TYPE()
7793
7794 // External Multiplexer Control register
7795 // Reset value: 0x00000000
7796 BEGIN_TYPE(ASICCTL_t, uint32_t)
7797 ADD_BITFIELD_RW(ASICCTL, 0, 32)
7798 END_TYPE()
7799
7800 // Integration Test Channel Output register
7801 // Reset value: 0x00000000
7802 BEGIN_TYPE(ITCHOUT_t, uint32_t)
7803 // Sets the value of the ctichout outputs
7804 ADD_BITFIELD_RW(CTCHOUT, 0, 4)
7805 END_TYPE()
7806
7807 // Integration Test Trigger Output register
7808 // Reset value: 0x00000000
7809 BEGIN_TYPE(ITTRIGOUT_t, uint32_t)
7810 // Sets the value of the ctitrigout outputs
7811 ADD_BITFIELD_RW(CTTRIGOUT, 0, 8)
7812 END_TYPE()
7813
7814 // Integration Test Channel Input register
7815 // Reset value: 0x00000000
7816 BEGIN_TYPE(ITCHIN_t, uint32_t)
7817 // Reads the value of the ctichin inputs.
7818 ADD_BITFIELD_RO(CTCHIN, 0, 4)
7819 END_TYPE()
7820
7821 // Integration Mode Control register
7822 // Reset value: 0x00000000
7823 BEGIN_TYPE(ITCTRL_t, uint32_t)
7824 // Integration Mode Enable
7825 ADD_BITFIELD_RW(IME, 0, 1)
7826 END_TYPE()
7827
7828 // Device Architecture register
7829 // Reset value: 0x47701a14
7830 BEGIN_TYPE(DEVARCH_t, uint32_t)
7831 // Indicates the component architect
7832 ADD_BITFIELD_RO(ARCHITECT, 21, 11)
7833 // Indicates whether the DEVARCH register is present
7834 ADD_BITFIELD_RO(PRESENT, 20, 1)
7835 // Indicates the architecture revision
7836 ADD_BITFIELD_RO(REVISION, 16, 4)
7837 // Indicates the component
7838 ADD_BITFIELD_RO(ARCHID, 0, 16)
7839 END_TYPE()
7840
7841 // Device Configuration register
7842 // Reset value: 0x00040800
7843 BEGIN_TYPE(DEVID_t, uint32_t)
7844 // Number of ECT channels available
7845 ADD_BITFIELD_RO(NUMCH, 16, 4)
7846 // Number of ECT triggers available.
7847 ADD_BITFIELD_RO(NUMTRIG, 8, 8)
7848 // Indicates the number of multiplexers available on Trigger Inputs and Trigger Outputs that are using asicctl. The default value of 0b00000 indicates that no multiplexing is present. This value of this bit depends on the Verilog define EXTMUXNUM that you must change accordingly.
7849 ADD_BITFIELD_RO(EXTMUXNUM, 0, 5)
7850 END_TYPE()
7851
7852 // Device Type Identifier register
7853 // Reset value: 0x00000014
7854 BEGIN_TYPE(DEVTYPE_t, uint32_t)
7855 // Sub-classification of the type of the debug component as specified in the ARM Architecture Specification within the major classification as specified in the MAJOR field.
7856 ADD_BITFIELD_RO(SUB, 4, 4)
7857 // Major classification of the type of the debug component as specified in the ARM Architecture Specification for this debug and trace component.
7858 ADD_BITFIELD_RO(MAJOR, 0, 4)
7859 END_TYPE()
7860
7861 // CoreSight Peripheral ID4
7862 // Reset value: 0x00000004
7863 BEGIN_TYPE(PIDR4_t, uint32_t)
7864 // Always 0b0000. Indicates that the device only occupies 4KB of memory
7865 ADD_BITFIELD_RO(SIZE, 4, 4)
7866 // Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.
7867 ADD_BITFIELD_RO(DES_2, 0, 4)
7868 END_TYPE()
7869
7870 // CoreSight Peripheral ID5
7871 // Reset value: 0x00000000
7872 BEGIN_TYPE(PIDR5_t, uint32_t)
7873 ADD_BITFIELD_RW(PIDR5, 0, 32)
7874 END_TYPE()
7875
7876 // CoreSight Peripheral ID6
7877 // Reset value: 0x00000000
7878 BEGIN_TYPE(PIDR6_t, uint32_t)
7879 ADD_BITFIELD_RW(PIDR6, 0, 32)
7880 END_TYPE()
7881
7882 // CoreSight Peripheral ID7
7883 // Reset value: 0x00000000
7884 BEGIN_TYPE(PIDR7_t, uint32_t)
7885 ADD_BITFIELD_RW(PIDR7, 0, 32)
7886 END_TYPE()
7887
7888 // CoreSight Peripheral ID0
7889 // Reset value: 0x00000021
7890 BEGIN_TYPE(PIDR0_t, uint32_t)
7891 // Bits[7:0] of the 12-bit part number of the component. The designer of the component assigns this part number.
7892 ADD_BITFIELD_RO(PART_0, 0, 8)
7893 END_TYPE()
7894
7895 // CoreSight Peripheral ID1
7896 // Reset value: 0x000000bd
7897 BEGIN_TYPE(PIDR1_t, uint32_t)
7898 // Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.
7899 ADD_BITFIELD_RO(DES_0, 4, 4)
7900 // Bits[11:8] of the 12-bit part number of the component. The designer of the component assigns this part number.
7901 ADD_BITFIELD_RO(PART_1, 0, 4)
7902 END_TYPE()
7903
7904 // CoreSight Peripheral ID2
7905 // Reset value: 0x0000000b
7906 BEGIN_TYPE(PIDR2_t, uint32_t)
7907 // This device is at r1p0
7908 ADD_BITFIELD_RO(REVISION, 4, 4)
7909 // Always 1. Indicates that the JEDEC-assigned designer ID is used.
7910 ADD_BITFIELD_RO(JEDEC, 3, 1)
7911 // Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.
7912 ADD_BITFIELD_RO(DES_1, 0, 3)
7913 END_TYPE()
7914
7915 // CoreSight Peripheral ID3
7916 // Reset value: 0x00000000
7917 BEGIN_TYPE(PIDR3_t, uint32_t)
7918 // Indicates minor errata fixes specific to the revision of the component being used, for example metal fixes after implementation. In most cases, this field is 0b0000. ARM recommends that the component designers ensure that a metal fix can change this field if required, for example, by driving it from registers that reset to 0b0000.
7919 ADD_BITFIELD_RO(REVAND, 4, 4)
7920 // Customer Modified. Indicates whether the customer has modified the behavior of the component. In most cases, this field is 0b0000. Customers change this value when they make authorized modifications to this component.
7921 ADD_BITFIELD_RO(CMOD, 0, 4)
7922 END_TYPE()
7923
7924 // CoreSight Component ID0
7925 // Reset value: 0x0000000d
7926 BEGIN_TYPE(CIDR0_t, uint32_t)
7927 // Preamble[0]. Contains bits[7:0] of the component identification code
7928 ADD_BITFIELD_RO(PRMBL_0, 0, 8)
7929 END_TYPE()
7930
7931 // CoreSight Component ID1
7932 // Reset value: 0x00000090
7933 BEGIN_TYPE(CIDR1_t, uint32_t)
7934 // Class of the component, for example, whether the component is a ROM table or a generic CoreSight component. Contains bits[15:12] of the component identification code.
7935 ADD_BITFIELD_RO(CLASS, 4, 4)
7936 // Preamble[1]. Contains bits[11:8] of the component identification code.
7937 ADD_BITFIELD_RO(PRMBL_1, 0, 4)
7938 END_TYPE()
7939
7940 // CoreSight Component ID2
7941 // Reset value: 0x00000005
7942 BEGIN_TYPE(CIDR2_t, uint32_t)
7943 // Preamble[2]. Contains bits[23:16] of the component identification code.
7944 ADD_BITFIELD_RO(PRMBL_2, 0, 8)
7945 END_TYPE()
7946
7947 // CoreSight Component ID3
7948 // Reset value: 0x000000b1
7949 BEGIN_TYPE(CIDR3_t, uint32_t)
7950 // Preamble[3]. Contains bits[31:24] of the component identification code.
7951 ADD_BITFIELD_RO(PRMBL_3, 0, 8)
7952 END_TYPE()
7953
7954 struct PPB_t {
7955 ITM_STIM_t ITM_STIM[32];
7956 uint32_t reserved0[864];
7957 ITM_TER0_t ITM_TER0;
7958 uint32_t reserved1[15];
7959 ITM_TPR_t ITM_TPR;
7960 uint32_t reserved2[15];
7961 ITM_TCR_t ITM_TCR;
7962 uint32_t reserved3[27];
7963 INT_ATREADY_t INT_ATREADY;
7964 uint32_t reserved4;
7965 INT_ATVALID_t INT_ATVALID;
7966 uint32_t reserved5;
7967 ITM_ITCTRL_t ITM_ITCTRL;
7968 uint32_t reserved6[46];
7969 ITM_DEVARCH_t ITM_DEVARCH;
7970 uint32_t reserved7[3];
7971 ITM_DEVTYPE_t ITM_DEVTYPE;
7972 ITM_PIDR4_t ITM_PIDR4;
7973 ITM_PIDR5_t ITM_PIDR5;
7974 ITM_PIDR6_t ITM_PIDR6;
7975 ITM_PIDR7_t ITM_PIDR7;
7976 ITM_PIDR0_t ITM_PIDR0;
7977 ITM_PIDR1_t ITM_PIDR1;
7978 ITM_PIDR2_t ITM_PIDR2;
7979 ITM_PIDR3_t ITM_PIDR3;
7980 ITM_CIDR0_t ITM_CIDR0;
7981 ITM_CIDR1_t ITM_CIDR1;
7982 ITM_CIDR2_t ITM_CIDR2;
7983 ITM_CIDR3_t ITM_CIDR3;
7984 DWT_CTRL_t DWT_CTRL;
7985 DWT_CYCCNT_t DWT_CYCCNT;
7986 uint32_t reserved8;
7987 DWT_EXCCNT_t DWT_EXCCNT;
7988 uint32_t reserved9;
7989 DWT_LSUCNT_t DWT_LSUCNT;
7990 DWT_FOLDCNT_t DWT_FOLDCNT;
7991 uint32_t reserved10;
7992 DWT_COMP0_t DWT_COMP0;
7993 uint32_t reserved11;
7994 DWT_FUNCTION0_t DWT_FUNCTION0;
7995 uint32_t reserved12;
7996 DWT_COMP1_t DWT_COMP1;
7997 uint32_t reserved13;
7998 DWT_FUNCTION1_t DWT_FUNCTION1;
7999 uint32_t reserved14;
8000 DWT_COMP2_t DWT_COMP2;
8001 uint32_t reserved15;
8002 DWT_FUNCTION2_t DWT_FUNCTION2;
8003 uint32_t reserved16;
8004 DWT_COMP3_t DWT_COMP3;
8005 uint32_t reserved17;
8006 DWT_FUNCTION3_t DWT_FUNCTION3;
8007 uint32_t reserved18[984];
8008 DWT_DEVARCH_t DWT_DEVARCH;
8009 uint32_t reserved19[3];
8010 DWT_DEVTYPE_t DWT_DEVTYPE;
8011 DWT_PIDR4_t DWT_PIDR4;
8012 DWT_PIDR5_t DWT_PIDR5;
8013 DWT_PIDR6_t DWT_PIDR6;
8014 DWT_PIDR7_t DWT_PIDR7;
8015 DWT_PIDR0_t DWT_PIDR0;
8016 DWT_PIDR1_t DWT_PIDR1;
8017 DWT_PIDR2_t DWT_PIDR2;
8018 DWT_PIDR3_t DWT_PIDR3;
8019 DWT_CIDR0_t DWT_CIDR0;
8020 DWT_CIDR1_t DWT_CIDR1;
8021 DWT_CIDR2_t DWT_CIDR2;
8022 DWT_CIDR3_t DWT_CIDR3;
8023 FP_CTRL_t FP_CTRL;
8024 FP_REMAP_t FP_REMAP;
8025 FP_COMP_t FP_COMP[8];
8026 uint32_t reserved20[997];
8027 FP_DEVARCH_t FP_DEVARCH;
8028 uint32_t reserved21[3];
8029 FP_DEVTYPE_t FP_DEVTYPE;
8030 FP_PIDR4_t FP_PIDR4;
8031 FP_PIDR5_t FP_PIDR5;
8032 FP_PIDR6_t FP_PIDR6;
8033 FP_PIDR7_t FP_PIDR7;
8034 FP_PIDR0_t FP_PIDR0;
8035 FP_PIDR1_t FP_PIDR1;
8036 FP_PIDR2_t FP_PIDR2;
8037 FP_PIDR3_t FP_PIDR3;
8038 FP_CIDR0_t FP_CIDR0;
8039 FP_CIDR1_t FP_CIDR1;
8040 FP_CIDR2_t FP_CIDR2;
8041 FP_CIDR3_t FP_CIDR3;
8042 uint32_t reserved22[11265];
8043 ICTR_t ICTR;
8044 ACTLR_t ACTLR;
8045 uint32_t reserved23;
8046 SYST_CSR_t SYST_CSR;
8047 SYST_RVR_t SYST_RVR;
8048 SYST_CVR_t SYST_CVR;
8049 SYST_CALIB_t SYST_CALIB;
8050 uint32_t reserved24[56];
8051 NVIC_ISER0_t NVIC_ISER0;
8052 NVIC_ISER1_t NVIC_ISER1;
8053 uint32_t reserved25[30];
8054 NVIC_ICER0_t NVIC_ICER0;
8055 NVIC_ICER1_t NVIC_ICER1;
8056 uint32_t reserved26[30];
8057 NVIC_ISPR0_t NVIC_ISPR0;
8058 NVIC_ISPR1_t NVIC_ISPR1;
8059 uint32_t reserved27[30];
8060 NVIC_ICPR0_t NVIC_ICPR0;
8061 NVIC_ICPR1_t NVIC_ICPR1;
8062 uint32_t reserved28[30];
8063 NVIC_IABR0_t NVIC_IABR0;
8064 NVIC_IABR1_t NVIC_IABR1;
8065 uint32_t reserved29[30];
8066 NVIC_ITNS0_t NVIC_ITNS0;
8067 NVIC_ITNS1_t NVIC_ITNS1;
8068 uint32_t reserved30[30];
8069 NVIC_IPR_t NVIC_IPR[16];
8070 uint32_t reserved31[560];
8071 CPUID_t CPUID;
8072 ICSR_t ICSR;
8073 VTOR_t VTOR;
8074 AIRCR_t AIRCR;
8075 SCR_t SCR;
8076 CCR_t CCR;
8077 SHPR1_t SHPR1;
8078 SHPR2_t SHPR2;
8079 SHPR3_t SHPR3;
8080 SHCSR_t SHCSR;
8081 CFSR_t CFSR;
8082 HFSR_t HFSR;
8083 DFSR_t DFSR;
8084 MMFAR_t MMFAR;
8085 BFAR_t BFAR;
8086 uint32_t reserved32;
8087 ID_PFR0_t ID_PFR0;
8088 ID_PFR1_t ID_PFR1;
8089 ID_DFR0_t ID_DFR0;
8090 ID_AFR0_t ID_AFR0;
8091 ID_MMFR0_t ID_MMFR0;
8092 ID_MMFR1_t ID_MMFR1;
8093 ID_MMFR2_t ID_MMFR2;
8094 ID_MMFR3_t ID_MMFR3;
8095 ID_ISAR0_t ID_ISAR0;
8096 ID_ISAR1_t ID_ISAR1;
8097 ID_ISAR2_t ID_ISAR2;
8098 ID_ISAR3_t ID_ISAR3;
8099 ID_ISAR4_t ID_ISAR4;
8100 ID_ISAR5_t ID_ISAR5;
8101 uint32_t reserved33;
8102 CTR_t CTR;
8103 uint32_t reserved34[2];
8104 CPACR_t CPACR;
8105 NSACR_t NSACR;
8106 MPU_TYPE_t MPU_TYPE;
8107 MPU_CTRL_t MPU_CTRL;
8108 MPU_RNR_t MPU_RNR;
8109 MPU_RBAR_t MPU_RBAR;
8110 MPU_RLAR_t MPU_RLAR;
8111 MPU_RBAR_A1_t MPU_RBAR_A1;
8112 MPU_RLAR_A1_t MPU_RLAR_A1;
8113 MPU_RBAR_A2_t MPU_RBAR_A2;
8114 MPU_RLAR_A2_t MPU_RLAR_A2;
8115 MPU_RBAR_A3_t MPU_RBAR_A3;
8116 MPU_RLAR_A3_t MPU_RLAR_A3;
8117 uint32_t reserved35;
8118 MPU_MAIR0_t MPU_MAIR0;
8119 MPU_MAIR1_t MPU_MAIR1;
8120 uint32_t reserved36[2];
8121 SAU_CTRL_t SAU_CTRL;
8122 SAU_TYPE_t SAU_TYPE;
8123 SAU_RNR_t SAU_RNR;
8124 SAU_RBAR_t SAU_RBAR;
8125 SAU_RLAR_t SAU_RLAR;
8126 SFSR_t SFSR;
8127 SFAR_t SFAR;
8128 uint32_t reserved37;
8129 DHCSR_t DHCSR;
8130 DCRSR_t DCRSR;
8131 DCRDR_t DCRDR;
8132 DEMCR_t DEMCR;
8133 uint32_t reserved38[2];
8134 DSCSR_t DSCSR;
8135 uint32_t reserved39[61];
8136 STIR_t STIR;
8137 uint32_t reserved40[12];
8138 FPCCR_t FPCCR;
8139 FPCAR_t FPCAR;
8140 FPDSCR_t FPDSCR;
8141 MVFR0_t MVFR0;
8142 MVFR1_t MVFR1;
8143 MVFR2_t MVFR2;
8144 uint32_t reserved41[28];
8145 DDEVARCH_t DDEVARCH;
8146 uint32_t reserved42[3];
8147 DDEVTYPE_t DDEVTYPE;
8148 DPIDR4_t DPIDR4;
8149 DPIDR5_t DPIDR5;
8150 DPIDR6_t DPIDR6;
8151 DPIDR7_t DPIDR7;
8152 DPIDR0_t DPIDR0;
8153 DPIDR1_t DPIDR1;
8154 DPIDR2_t DPIDR2;
8155 DPIDR3_t DPIDR3;
8156 DCIDR0_t DCIDR0;
8157 DCIDR1_t DCIDR1;
8158 DCIDR2_t DCIDR2;
8159 DCIDR3_t DCIDR3;
8160 uint32_t reserved43[51201];
8161 TRCPRGCTLR_t TRCPRGCTLR;
8162 uint32_t reserved44;
8163 TRCSTATR_t TRCSTATR;
8164 TRCCONFIGR_t TRCCONFIGR;
8165 uint32_t reserved45[3];
8166 TRCEVENTCTL0R_t TRCEVENTCTL0R;
8167 TRCEVENTCTL1R_t TRCEVENTCTL1R;
8168 uint32_t reserved46;
8169 TRCSTALLCTLR_t TRCSTALLCTLR;
8170 TRCTSCTLR_t TRCTSCTLR;
8171 TRCSYNCPR_t TRCSYNCPR;
8172 TRCCCCTLR_t TRCCCCTLR;
8173 uint32_t reserved47[17];
8174 TRCVICTLR_t TRCVICTLR;
8175 uint32_t reserved48[47];
8176 TRCCNTRLDVR0_t TRCCNTRLDVR0;
8177 uint32_t reserved49[15];
8178 TRCIDR8_t TRCIDR8;
8179 TRCIDR9_t TRCIDR9;
8180 TRCIDR10_t TRCIDR10;
8181 TRCIDR11_t TRCIDR11;
8182 TRCIDR12_t TRCIDR12;
8183 TRCIDR13_t TRCIDR13;
8184 uint32_t reserved50[10];
8185 TRCIMSPEC_t TRCIMSPEC;
8186 uint32_t reserved51[7];
8187 TRCIDR0_t TRCIDR0;
8188 TRCIDR1_t TRCIDR1;
8189 TRCIDR2_t TRCIDR2;
8190 TRCIDR3_t TRCIDR3;
8191 TRCIDR4_t TRCIDR4;
8192 TRCIDR5_t TRCIDR5;
8193 TRCIDR6_t TRCIDR6;
8194 TRCIDR7_t TRCIDR7;
8195 uint32_t reserved52[2];
8196 TRCRSCTLR2_t TRCRSCTLR2;
8197 TRCRSCTLR3_t TRCRSCTLR3;
8198 uint32_t reserved53[36];
8199 TRCSSCSR_t TRCSSCSR;
8200 uint32_t reserved54[7];
8201 TRCSSPCICR_t TRCSSPCICR;
8202 uint32_t reserved55[19];
8203 TRCPDCR_t TRCPDCR;
8204 TRCPDSR_t TRCPDSR;
8205 uint32_t reserved56[755];
8206 TRCITATBIDR_t TRCITATBIDR;
8207 uint32_t reserved57[3];
8208 TRCITIATBINR_t TRCITIATBINR;
8209 uint32_t reserved58;
8210 TRCITIATBOUTR_t TRCITIATBOUTR;
8211 uint32_t reserved59[40];
8212 TRCCLAIMSET_t TRCCLAIMSET;
8213 TRCCLAIMCLR_t TRCCLAIMCLR;
8214 uint32_t reserved60[4];
8215 TRCAUTHSTATUS_t TRCAUTHSTATUS;
8216 TRCDEVARCH_t TRCDEVARCH;
8217 uint32_t reserved61[2];
8218 TRCDEVID_t TRCDEVID;
8219 TRCDEVTYPE_t TRCDEVTYPE;
8220 TRCPIDR4_t TRCPIDR4;
8221 TRCPIDR5_t TRCPIDR5;
8222 TRCPIDR6_t TRCPIDR6;
8223 TRCPIDR7_t TRCPIDR7;
8224 TRCPIDR0_t TRCPIDR0;
8225 TRCPIDR1_t TRCPIDR1;
8226 TRCPIDR2_t TRCPIDR2;
8227 TRCPIDR3_t TRCPIDR3;
8228 TRCCIDR0_t TRCCIDR0;
8229 TRCCIDR1_t TRCCIDR1;
8230 TRCCIDR2_t TRCCIDR2;
8231 TRCCIDR3_t TRCCIDR3;
8232 CTICONTROL_t CTICONTROL;
8233 uint32_t reserved62[3];
8234 CTIINTACK_t CTIINTACK;
8235 CTIAPPSET_t CTIAPPSET;
8236 CTIAPPCLEAR_t CTIAPPCLEAR;
8237 CTIAPPPULSE_t CTIAPPPULSE;
8238 CTIINEN_t CTIINEN[8];
8239 uint32_t reserved63[24];
8240 CTIOUTEN_t CTIOUTEN[8];
8241 uint32_t reserved64[28];
8242 CTITRIGINSTATUS_t CTITRIGINSTATUS;
8243 CTITRIGOUTSTATUS_t CTITRIGOUTSTATUS;
8244 CTICHINSTATUS_t CTICHINSTATUS;
8245 uint32_t reserved65;
8246 CTIGATE_t CTIGATE;
8247 ASICCTL_t ASICCTL;
8248 uint32_t reserved66[871];
8249 ITCHOUT_t ITCHOUT;
8250 ITTRIGOUT_t ITTRIGOUT;
8251 uint32_t reserved67[2];
8252 ITCHIN_t ITCHIN;
8253 uint32_t reserved68[2];
8254 ITCTRL_t ITCTRL;
8255 uint32_t reserved69[46];
8256 DEVARCH_t DEVARCH;
8257 uint32_t reserved70[2];
8258 DEVID_t DEVID;
8259 DEVTYPE_t DEVTYPE;
8260 PIDR4_t PIDR4;
8261 PIDR5_t PIDR5;
8262 PIDR6_t PIDR6;
8263 PIDR7_t PIDR7;
8264 PIDR0_t PIDR0;
8265 PIDR1_t PIDR1;
8266 PIDR2_t PIDR2;
8267 PIDR3_t PIDR3;
8268 CIDR0_t CIDR0;
8269 CIDR1_t CIDR1;
8270 CIDR2_t CIDR2;
8271 CIDR3_t CIDR3;
8272 };
8273
8274 static PPB_t & PPB = (*(PPB_t *)0xe0000000);
8275
8276} // _PPB_
8277
8278namespace _PPB_NS_ {
8279
8280 static _PPB_::PPB_t & PPB_NS = (*(_PPB_::PPB_t *)0xe0020000);
8281
8282} // _PPB_NS_
8283
8284// QSPI Memory Interface. Provides a memory-mapped interface to up to two SPI/DSPI/QSPI flash or PSRAM devices. Also provides a serial interface for programming and configuration of the external device.
8285namespace _QMI_ {
8286
8287 // Control and status for direct serial mode Direct serial mode allows the processor to send and receive raw serial frames, for programming, configuration and control of the external memory devices. Only SPI mode 0 (CPOL=0 CPHA=0) is supported.
8288 // Reset value: 0x01800000
8289 BEGIN_TYPE(DIRECT_CSR_t, uint32_t)
8290 // Delay the read data sample timing, in units of one half of a system clock cycle. (Not necessarily half of an SCK cycle.)
8291 ADD_BITFIELD_RW(RXDELAY, 30, 2)
8292 // Clock divisor for direct serial mode. Divisors of 1..255 are encoded directly, and the maximum divisor of 256 is encoded by a value of CLKDIV=0. The clock divisor can be changed on-the-fly by software, without halting or otherwise coordinating with the serial interface. The serial interface will sample the latest clock divisor each time it begins the transmission of a new byte.
8293 ADD_BITFIELD_RW(CLKDIV, 22, 8)
8294 // Current level of DIRECT_RX FIFO
8295 ADD_BITFIELD_RO(RXLEVEL, 18, 3)
8296 // When 1, the DIRECT_RX FIFO is currently full. The serial interface will be stalled until data is popped; the interface will not begin a new serial frame when the DIRECT_TX FIFO is empty or the DIRECT_RX FIFO is full.
8297 ADD_BITFIELD_RO(RXFULL, 17, 1)
8298 // When 1, the DIRECT_RX FIFO is currently empty. If the processor attempts to read more data, the FIFO state is not affected, but the value returned to the processor is undefined.
8299 ADD_BITFIELD_RO(RXEMPTY, 16, 1)
8300 // Current level of DIRECT_TX FIFO
8301 ADD_BITFIELD_RO(TXLEVEL, 12, 3)
8302 // When 1, the DIRECT_TX FIFO is currently empty. Unless the processor pushes more data, transmission will stop and BUSY will go low once the current 8-bit serial frame completes.
8303 ADD_BITFIELD_RO(TXEMPTY, 11, 1)
8304 // When 1, the DIRECT_TX FIFO is currently full. If the processor tries to write more data, that data will be ignored.
8305 ADD_BITFIELD_RO(TXFULL, 10, 1)
8306 // When 1, automatically assert the CS1n chip select line whenever the BUSY flag is set.
8307 ADD_BITFIELD_RW(AUTO_CS1N, 7, 1)
8308 // When 1, automatically assert the CS0n chip select line whenever the BUSY flag is set.
8309 ADD_BITFIELD_RW(AUTO_CS0N, 6, 1)
8310 // When 1, assert (i.e. drive low) the CS1n chip select line. Note that this applies even when DIRECT_CSR_EN is 0.
8311 ADD_BITFIELD_RW(ASSERT_CS1N, 3, 1)
8312 // When 1, assert (i.e. drive low) the CS0n chip select line. Note that this applies even when DIRECT_CSR_EN is 0.
8313 ADD_BITFIELD_RW(ASSERT_CS0N, 2, 1)
8314 // Direct mode busy flag. If 1, data is currently being shifted in/out (or would be if the interface were not stalled on the RX FIFO), and the chip select must not yet be deasserted. The busy flag will also be set to 1 if a memory-mapped transfer is still in progress when direct mode is enabled. Direct mode blocks new memory-mapped transfers, but can't halt a transfer that is already in progress. If there is a chance that memory-mapped transfers may be in progress, the busy flag should be polled for 0 before asserting the chip select. (In practice you will usually discover this timing condition through other means, because any subsequent memory-mapped transfers when direct mode is enabled will return bus errors, which are difficult to ignore.)
8315 ADD_BITFIELD_RO(BUSY, 1, 1)
8316 // Enable direct mode. In direct mode, software controls the chip select lines, and can perform direct SPI transfers by pushing data to the DIRECT_TX FIFO, and popping the same amount of data from the DIRECT_RX FIFO. Memory-mapped accesses will generate bus errors when direct serial mode is enabled.
8317 ADD_BITFIELD_RW(EN, 0, 1)
8318 END_TYPE()
8319
8320 // Transmit FIFO for direct mode
8321 // Reset value: 0x00000000
8322 BEGIN_TYPE(DIRECT_TX_t, uint32_t)
8323 // Inhibit the RX FIFO push that would correspond to this TX FIFO entry. Useful to avoid garbage appearing in the RX FIFO when pushing the command at the beginning of a SPI transfer.
8324 ADD_BITFIELD_WO(NOPUSH, 20, 1)
8325 // Output enable (active-high). For single width (SPI), this field is ignored, and SD0 is always set to output, with SD1 always set to input. For dual and quad width (DSPI/QSPI), this sets whether the relevant SDx pads are set to output whilst transferring this FIFO record. In this case the command/address should have OE set, and the data transfer should have OE set or clear depending on the direction of the transfer.
8326 ADD_BITFIELD_WO(OE, 19, 1)
8327 // Data width. If 0, hardware will transmit the 8 LSBs of the DIRECT_TX DATA field, and return an 8-bit value in the 8 LSBs of DIRECT_RX. If 1, the full 16-bit width is used. 8-bit and 16-bit transfers can be mixed freely.
8328 ADD_BITFIELD_WO(DWIDTH, 18, 1)
8329 // Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely.
8330 ADD_BITFIELD_WO(IWIDTH, 16, 2)
8331 // Data pushed here will be clocked out falling edges of SCK (or before the very first rising edge of SCK, if this is the first pulse). For each byte clocked out, the interface will simultaneously sample one byte, on rising edges of SCK, and push this to the DIRECT_RX FIFO. For 16-bit data, the least-significant byte is transmitted first.
8332 ADD_BITFIELD_WO(DATA, 0, 16)
8333 END_TYPE()
8334
8335 // Single width
8336 static const uint32_t DIRECT_TX_IWIDTH__S = 0;
8337 // Dual width
8338 static const uint32_t DIRECT_TX_IWIDTH__D = 1;
8339 // Quad width
8340 static const uint32_t DIRECT_TX_IWIDTH__Q = 2;
8341
8342 // Receive FIFO for direct mode
8343 // Reset value: 0x00000000
8344 BEGIN_TYPE(DIRECT_RX_t, uint32_t)
8345 // With each byte clocked out on the serial interface, one byte will simultaneously be clocked in, and will appear in this FIFO. The serial interface will stall when this FIFO is full, to avoid dropping data. When 16-bit data is pushed into the TX FIFO, the corresponding RX FIFO push will also contain 16 bits of data. The least-significant byte is the first one received.
8346 ADD_BITFIELD_RO(DIRECT_RX, 0, 16)
8347 END_TYPE()
8348
8349 // Timing configuration register for memory address window 0.
8350 // Reset value: 0x40000004
8351 BEGIN_TYPE(M0_TIMING_t, uint32_t)
8352 // Chip select cooldown period. When a memory transfer finishes, the chip select remains asserted for 64 x COOLDOWN system clock cycles, plus half an SCK clock period (rounded up for odd SCK divisors). After this cooldown expires, the chip select is always deasserted to save power. If the next memory access arrives within the cooldown period, the QMI may be able to append more SCK cycles to the currently ongoing SPI transfer, rather than starting a new transfer. This reduces access latency and increases bus throughput. Specifically, the next access must be in the same direction (read/write), access the same memory window (chip select 0/1), and follow sequentially the address of the last transfer. If any of these are false, the new access will first deassert the chip select, then begin a new transfer. If COOLDOWN is 0, the address alignment configured by PAGEBREAK has been reached, or the total chip select assertion limit MAX_SELECT has been reached, the cooldown period is skipped, and the chip select will always be deasserted one half SCK period after the transfer finishes.
8353 ADD_BITFIELD_RW(COOLDOWN, 30, 2)
8354 // When page break is enabled, chip select will automatically deassert when crossing certain power-of-2-aligned address boundaries. The next access will always begin a new read/write SPI burst, even if the address of the next access follows in sequence with the last access before the page boundary. Some flash and PSRAM devices forbid crossing page boundaries with a single read/write transfer, or restrict the operating frequency for transfers that do cross page a boundary. This option allows the QMI to safely support those devices. This field has no effect when COOLDOWN is disabled.
8355 ADD_BITFIELD_RW(PAGEBREAK, 28, 2)
8356 // Add up to one additional system clock cycle of setup between chip select assertion and the first rising edge of SCK. The default setup time is one half SCK period, which is usually sufficient except for very high SCK frequencies with some flash devices.
8357 ADD_BITFIELD_RW(SELECT_SETUP, 25, 1)
8358 // Add up to three additional system clock cycles of active hold between the last falling edge of SCK and the deassertion of this window's chip select. The default hold time is one system clock cycle. Note that flash datasheets usually give chip select active hold time from the last *rising* edge of SCK, and so even zero hold from the last falling edge would be safe. Note that this is a minimum hold time guaranteed by the QMI: the actual chip select active hold may be slightly longer for read transfers with low clock divisors and/or high sample delays. Specifically, if the point two cycles after the last RX data sample is later than the last SCK falling edge, then the hold time is measured from *this* point. Note also that, in case the final SCK pulse is masked to save energy (true for non-DTR reads when COOLDOWN is disabled or PAGE_BREAK is reached), all of QMI's timing logic behaves as though the clock pulse were still present. The SELECT_HOLD time is applied from the point where the last SCK falling edge would be if the clock pulse were not masked.
8359 ADD_BITFIELD_RW(SELECT_HOLD, 23, 2)
8360 // Enforce a maximum assertion duration for this window's chip select, in units of 64 system clock cycles. If 0, the QMI is permitted to keep the chip select asserted indefinitely when servicing sequential memory accesses (see COOLDOWN). This feature is required to meet timing constraints of PSRAM devices, which specify a maximum chip select assertion so they can perform DRAM refresh cycles. See also MIN_DESELECT, which can enforce a minimum deselect time. If a memory access is in progress at the time MAX_SELECT is reached, the QMI will wait for the access to complete before deasserting the chip select. This additional time must be accounted for to calculate a safe MAX_SELECT value. In the worst case, this may be a fully-formed serial transfer, including command prefix and address, with a data payload as large as one cache line.
8361 ADD_BITFIELD_RW(MAX_SELECT, 17, 6)
8362 // After this window's chip select is deasserted, it remains deasserted for half an SCK cycle (rounded up to an integer number of system clock cycles), plus MIN_DESELECT additional system clock cycles, before the QMI reasserts either chip select pin. Nonzero values may be required for PSRAM devices which enforce a longer minimum CS deselect time, so that they can perform internal DRAM refresh cycles whilst deselected.
8363 ADD_BITFIELD_RW(MIN_DESELECT, 12, 5)
8364 // Delay the read data sample timing, in units of one half of a system clock cycle. (Not necessarily half of an SCK cycle.) An RXDELAY of 0 means the sample is captured at the SDI input registers simultaneously with the rising edge of SCK launched from the SCK output register. At higher SCK frequencies, RXDELAY may need to be increased to account for the round trip delay of the pads, and the clock-to-Q delay of the QSPI memory device.
8365 ADD_BITFIELD_RW(RXDELAY, 8, 3)
8366 // Clock divisor. Odd and even divisors are supported. Defines the SCK clock period in units of 1 system clock cycle. Divisors 1..255 are encoded directly, and a divisor of 256 is encoded with a value of CLKDIV=0. The clock divisor can be changed on-the-fly, even when the QMI is currently accessing memory in this address window. All other parameters must only be changed when the QMI is idle. If software is increasing CLKDIV in anticipation of an increase in the system clock frequency, a dummy access to either memory window (and appropriate processor barriers/fences) must be inserted after the Mx_TIMING write to ensure the SCK divisor change is in effect _before_ the system clock is changed.
8367 ADD_BITFIELD_RW(CLKDIV, 0, 8)
8368 END_TYPE()
8369
8370 // No page boundary is enforced
8371 static const uint32_t M0_TIMING_PAGEBREAK__NONE = 0;
8372 // Break bursts crossing a 256-byte page boundary
8373 static const uint32_t M0_TIMING_PAGEBREAK__256 = 1;
8374 // Break bursts crossing a 1024-byte quad-page boundary
8375 static const uint32_t M0_TIMING_PAGEBREAK__1024 = 2;
8376 // Break bursts crossing a 4096-byte sector boundary
8377 static const uint32_t M0_TIMING_PAGEBREAK__4096 = 3;
8378
8379 // Read transfer format configuration for memory address window 0. Configure the bus width of each transfer phase individually, and configure the length or presence of the command prefix, command suffix and dummy/turnaround transfer phases. Only 24-bit addresses are supported. The reset value of the M0_RFMT register is configured to support a basic 03h serial read transfer with no additional configuration.
8380 // Reset value: 0x00001000
8381 BEGIN_TYPE(M0_RFMT_t, uint32_t)
8382 // Enable double transfer rate (DTR) for read commands: address, suffix and read data phases are active on both edges of SCK. SDO data is launched centre-aligned on each SCK edge, and SDI data is captured on the SCK edge that follows its launch. DTR is implemented by halving the clock rate; SCK has a period of 2 x CLK_DIV throughout the transfer. The prefix and dummy phases are still single transfer rate. If the suffix is quad-width, it must be 0 or 8 bits in length, to ensure an even number of SCK edges.
8383 ADD_BITFIELD_RW(DTR, 28, 1)
8384 // Length of dummy phase between command suffix and data phase, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single)
8385 ADD_BITFIELD_RW(DUMMY_LEN, 16, 3)
8386 // Length of post-address command suffix, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single) Only values of 0 and 8 bits are supported.
8387 ADD_BITFIELD_RW(SUFFIX_LEN, 14, 2)
8388 // Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)
8389 ADD_BITFIELD_RW(PREFIX_LEN, 12, 1)
8390 // The width used for the data transfer
8391 ADD_BITFIELD_RW(DATA_WIDTH, 8, 2)
8392 // The width used for the dummy phase, if any. If width is single, SD0/MOSI is held asserted low during the dummy phase, and SD1...SD3 are tristated. If width is dual/quad, all IOs are tristated during the dummy phase.
8393 ADD_BITFIELD_RW(DUMMY_WIDTH, 6, 2)
8394 // The width used for the post-address command suffix, if any
8395 ADD_BITFIELD_RW(SUFFIX_WIDTH, 4, 2)
8396 // The transfer width used for the address. The address phase always transfers 24 bits in total.
8397 ADD_BITFIELD_RW(ADDR_WIDTH, 2, 2)
8398 // The transfer width used for the command prefix, if any
8399 ADD_BITFIELD_RW(PREFIX_WIDTH, 0, 2)
8400 END_TYPE()
8401
8402 // No dummy phase
8403 static const uint32_t M0_RFMT_DUMMY_LEN__NONE = 0;
8404 // 4 dummy bits
8405 static const uint32_t M0_RFMT_DUMMY_LEN__4 = 1;
8406 // 8 dummy bits
8407 static const uint32_t M0_RFMT_DUMMY_LEN__8 = 2;
8408 // 12 dummy bits
8409 static const uint32_t M0_RFMT_DUMMY_LEN__12 = 3;
8410 // 16 dummy bits
8411 static const uint32_t M0_RFMT_DUMMY_LEN__16 = 4;
8412 // 20 dummy bits
8413 static const uint32_t M0_RFMT_DUMMY_LEN__20 = 5;
8414 // 24 dummy bits
8415 static const uint32_t M0_RFMT_DUMMY_LEN__24 = 6;
8416 // 28 dummy bits
8417 static const uint32_t M0_RFMT_DUMMY_LEN__28 = 7;
8418 // No suffix
8419 static const uint32_t M0_RFMT_SUFFIX_LEN__NONE = 0;
8420 // 8-bit suffix
8421 static const uint32_t M0_RFMT_SUFFIX_LEN__8 = 2;
8422 // No prefix
8423 static const uint32_t M0_RFMT_PREFIX_LEN__NONE = 0;
8424 // 8-bit prefix
8425 static const uint32_t M0_RFMT_PREFIX_LEN__8 = 1;
8426 // Single width
8427 static const uint32_t M0_RFMT_DATA_WIDTH__S = 0;
8428 // Dual width
8429 static const uint32_t M0_RFMT_DATA_WIDTH__D = 1;
8430 // Quad width
8431 static const uint32_t M0_RFMT_DATA_WIDTH__Q = 2;
8432 // Single width
8433 static const uint32_t M0_RFMT_DUMMY_WIDTH__S = 0;
8434 // Dual width
8435 static const uint32_t M0_RFMT_DUMMY_WIDTH__D = 1;
8436 // Quad width
8437 static const uint32_t M0_RFMT_DUMMY_WIDTH__Q = 2;
8438 // Single width
8439 static const uint32_t M0_RFMT_SUFFIX_WIDTH__S = 0;
8440 // Dual width
8441 static const uint32_t M0_RFMT_SUFFIX_WIDTH__D = 1;
8442 // Quad width
8443 static const uint32_t M0_RFMT_SUFFIX_WIDTH__Q = 2;
8444 // Single width
8445 static const uint32_t M0_RFMT_ADDR_WIDTH__S = 0;
8446 // Dual width
8447 static const uint32_t M0_RFMT_ADDR_WIDTH__D = 1;
8448 // Quad width
8449 static const uint32_t M0_RFMT_ADDR_WIDTH__Q = 2;
8450 // Single width
8451 static const uint32_t M0_RFMT_PREFIX_WIDTH__S = 0;
8452 // Dual width
8453 static const uint32_t M0_RFMT_PREFIX_WIDTH__D = 1;
8454 // Quad width
8455 static const uint32_t M0_RFMT_PREFIX_WIDTH__Q = 2;
8456
8457 // Command constants used for reads from memory address window 0. The reset value of the M0_RCMD register is configured to support a basic 03h serial read transfer with no additional configuration.
8458 // Reset value: 0x0000a003
8459 BEGIN_TYPE(M0_RCMD_t, uint32_t)
8460 // The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero.
8461 ADD_BITFIELD_RW(SUFFIX, 8, 8)
8462 // The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero.
8463 ADD_BITFIELD_RW(PREFIX, 0, 8)
8464 END_TYPE()
8465
8466 // Write transfer format configuration for memory address window 0. Configure the bus width of each transfer phase individually, and configure the length or presence of the command prefix, command suffix and dummy/turnaround transfer phases. Only 24-bit addresses are supported. The reset value of the M0_WFMT register is configured to support a basic 02h serial write transfer. However, writes to this window must first be enabled via the XIP_CTRL_WRITABLE_M0 bit, as XIP memory is read-only by default.
8467 // Reset value: 0x00001000
8468 BEGIN_TYPE(M0_WFMT_t, uint32_t)
8469 // Enable double transfer rate (DTR) for write commands: address, suffix and write data phases are active on both edges of SCK. SDO data is launched centre-aligned on each SCK edge, and SDI data is captured on the SCK edge that follows its launch. DTR is implemented by halving the clock rate; SCK has a period of 2 x CLK_DIV throughout the transfer. The prefix and dummy phases are still single transfer rate. If the suffix is quad-width, it must be 0 or 8 bits in length, to ensure an even number of SCK edges.
8470 ADD_BITFIELD_RW(DTR, 28, 1)
8471 // Length of dummy phase between command suffix and data phase, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single)
8472 ADD_BITFIELD_RW(DUMMY_LEN, 16, 3)
8473 // Length of post-address command suffix, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single) Only values of 0 and 8 bits are supported.
8474 ADD_BITFIELD_RW(SUFFIX_LEN, 14, 2)
8475 // Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)
8476 ADD_BITFIELD_RW(PREFIX_LEN, 12, 1)
8477 // The width used for the data transfer
8478 ADD_BITFIELD_RW(DATA_WIDTH, 8, 2)
8479 // The width used for the dummy phase, if any. If width is single, SD0/MOSI is held asserted low during the dummy phase, and SD1...SD3 are tristated. If width is dual/quad, all IOs are tristated during the dummy phase.
8480 ADD_BITFIELD_RW(DUMMY_WIDTH, 6, 2)
8481 // The width used for the post-address command suffix, if any
8482 ADD_BITFIELD_RW(SUFFIX_WIDTH, 4, 2)
8483 // The transfer width used for the address. The address phase always transfers 24 bits in total.
8484 ADD_BITFIELD_RW(ADDR_WIDTH, 2, 2)
8485 // The transfer width used for the command prefix, if any
8486 ADD_BITFIELD_RW(PREFIX_WIDTH, 0, 2)
8487 END_TYPE()
8488
8489 // No dummy phase
8490 static const uint32_t M0_WFMT_DUMMY_LEN__NONE = 0;
8491 // 4 dummy bits
8492 static const uint32_t M0_WFMT_DUMMY_LEN__4 = 1;
8493 // 8 dummy bits
8494 static const uint32_t M0_WFMT_DUMMY_LEN__8 = 2;
8495 // 12 dummy bits
8496 static const uint32_t M0_WFMT_DUMMY_LEN__12 = 3;
8497 // 16 dummy bits
8498 static const uint32_t M0_WFMT_DUMMY_LEN__16 = 4;
8499 // 20 dummy bits
8500 static const uint32_t M0_WFMT_DUMMY_LEN__20 = 5;
8501 // 24 dummy bits
8502 static const uint32_t M0_WFMT_DUMMY_LEN__24 = 6;
8503 // 28 dummy bits
8504 static const uint32_t M0_WFMT_DUMMY_LEN__28 = 7;
8505 // No suffix
8506 static const uint32_t M0_WFMT_SUFFIX_LEN__NONE = 0;
8507 // 8-bit suffix
8508 static const uint32_t M0_WFMT_SUFFIX_LEN__8 = 2;
8509 // No prefix
8510 static const uint32_t M0_WFMT_PREFIX_LEN__NONE = 0;
8511 // 8-bit prefix
8512 static const uint32_t M0_WFMT_PREFIX_LEN__8 = 1;
8513 // Single width
8514 static const uint32_t M0_WFMT_DATA_WIDTH__S = 0;
8515 // Dual width
8516 static const uint32_t M0_WFMT_DATA_WIDTH__D = 1;
8517 // Quad width
8518 static const uint32_t M0_WFMT_DATA_WIDTH__Q = 2;
8519 // Single width
8520 static const uint32_t M0_WFMT_DUMMY_WIDTH__S = 0;
8521 // Dual width
8522 static const uint32_t M0_WFMT_DUMMY_WIDTH__D = 1;
8523 // Quad width
8524 static const uint32_t M0_WFMT_DUMMY_WIDTH__Q = 2;
8525 // Single width
8526 static const uint32_t M0_WFMT_SUFFIX_WIDTH__S = 0;
8527 // Dual width
8528 static const uint32_t M0_WFMT_SUFFIX_WIDTH__D = 1;
8529 // Quad width
8530 static const uint32_t M0_WFMT_SUFFIX_WIDTH__Q = 2;
8531 // Single width
8532 static const uint32_t M0_WFMT_ADDR_WIDTH__S = 0;
8533 // Dual width
8534 static const uint32_t M0_WFMT_ADDR_WIDTH__D = 1;
8535 // Quad width
8536 static const uint32_t M0_WFMT_ADDR_WIDTH__Q = 2;
8537 // Single width
8538 static const uint32_t M0_WFMT_PREFIX_WIDTH__S = 0;
8539 // Dual width
8540 static const uint32_t M0_WFMT_PREFIX_WIDTH__D = 1;
8541 // Quad width
8542 static const uint32_t M0_WFMT_PREFIX_WIDTH__Q = 2;
8543
8544 // Command constants used for writes to memory address window 0. The reset value of the M0_WCMD register is configured to support a basic 02h serial write transfer with no additional configuration.
8545 // Reset value: 0x0000a002
8546 BEGIN_TYPE(M0_WCMD_t, uint32_t)
8547 // The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero.
8548 ADD_BITFIELD_RW(SUFFIX, 8, 8)
8549 // The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero.
8550 ADD_BITFIELD_RW(PREFIX, 0, 8)
8551 END_TYPE()
8552
8553 // Timing configuration register for memory address window 1.
8554 // Reset value: 0x40000004
8555 BEGIN_TYPE(M1_TIMING_t, uint32_t)
8556 // Chip select cooldown period. When a memory transfer finishes, the chip select remains asserted for 64 x COOLDOWN system clock cycles, plus half an SCK clock period (rounded up for odd SCK divisors). After this cooldown expires, the chip select is always deasserted to save power. If the next memory access arrives within the cooldown period, the QMI may be able to append more SCK cycles to the currently ongoing SPI transfer, rather than starting a new transfer. This reduces access latency and increases bus throughput. Specifically, the next access must be in the same direction (read/write), access the same memory window (chip select 0/1), and follow sequentially the address of the last transfer. If any of these are false, the new access will first deassert the chip select, then begin a new transfer. If COOLDOWN is 0, the address alignment configured by PAGEBREAK has been reached, or the total chip select assertion limit MAX_SELECT has been reached, the cooldown period is skipped, and the chip select will always be deasserted one half SCK period after the transfer finishes.
8557 ADD_BITFIELD_RW(COOLDOWN, 30, 2)
8558 // When page break is enabled, chip select will automatically deassert when crossing certain power-of-2-aligned address boundaries. The next access will always begin a new read/write SPI burst, even if the address of the next access follows in sequence with the last access before the page boundary. Some flash and PSRAM devices forbid crossing page boundaries with a single read/write transfer, or restrict the operating frequency for transfers that do cross page a boundary. This option allows the QMI to safely support those devices. This field has no effect when COOLDOWN is disabled.
8559 ADD_BITFIELD_RW(PAGEBREAK, 28, 2)
8560 // Add up to one additional system clock cycle of setup between chip select assertion and the first rising edge of SCK. The default setup time is one half SCK period, which is usually sufficient except for very high SCK frequencies with some flash devices.
8561 ADD_BITFIELD_RW(SELECT_SETUP, 25, 1)
8562 // Add up to three additional system clock cycles of active hold between the last falling edge of SCK and the deassertion of this window's chip select. The default hold time is one system clock cycle. Note that flash datasheets usually give chip select active hold time from the last *rising* edge of SCK, and so even zero hold from the last falling edge would be safe. Note that this is a minimum hold time guaranteed by the QMI: the actual chip select active hold may be slightly longer for read transfers with low clock divisors and/or high sample delays. Specifically, if the point two cycles after the last RX data sample is later than the last SCK falling edge, then the hold time is measured from *this* point. Note also that, in case the final SCK pulse is masked to save energy (true for non-DTR reads when COOLDOWN is disabled or PAGE_BREAK is reached), all of QMI's timing logic behaves as though the clock pulse were still present. The SELECT_HOLD time is applied from the point where the last SCK falling edge would be if the clock pulse were not masked.
8563 ADD_BITFIELD_RW(SELECT_HOLD, 23, 2)
8564 // Enforce a maximum assertion duration for this window's chip select, in units of 64 system clock cycles. If 0, the QMI is permitted to keep the chip select asserted indefinitely when servicing sequential memory accesses (see COOLDOWN). This feature is required to meet timing constraints of PSRAM devices, which specify a maximum chip select assertion so they can perform DRAM refresh cycles. See also MIN_DESELECT, which can enforce a minimum deselect time. If a memory access is in progress at the time MAX_SELECT is reached, the QMI will wait for the access to complete before deasserting the chip select. This additional time must be accounted for to calculate a safe MAX_SELECT value. In the worst case, this may be a fully-formed serial transfer, including command prefix and address, with a data payload as large as one cache line.
8565 ADD_BITFIELD_RW(MAX_SELECT, 17, 6)
8566 // After this window's chip select is deasserted, it remains deasserted for half an SCK cycle (rounded up to an integer number of system clock cycles), plus MIN_DESELECT additional system clock cycles, before the QMI reasserts either chip select pin. Nonzero values may be required for PSRAM devices which enforce a longer minimum CS deselect time, so that they can perform internal DRAM refresh cycles whilst deselected.
8567 ADD_BITFIELD_RW(MIN_DESELECT, 12, 5)
8568 // Delay the read data sample timing, in units of one half of a system clock cycle. (Not necessarily half of an SCK cycle.) An RXDELAY of 0 means the sample is captured at the SDI input registers simultaneously with the rising edge of SCK launched from the SCK output register. At higher SCK frequencies, RXDELAY may need to be increased to account for the round trip delay of the pads, and the clock-to-Q delay of the QSPI memory device.
8569 ADD_BITFIELD_RW(RXDELAY, 8, 3)
8570 // Clock divisor. Odd and even divisors are supported. Defines the SCK clock period in units of 1 system clock cycle. Divisors 1..255 are encoded directly, and a divisor of 256 is encoded with a value of CLKDIV=0. The clock divisor can be changed on-the-fly, even when the QMI is currently accessing memory in this address window. All other parameters must only be changed when the QMI is idle. If software is increasing CLKDIV in anticipation of an increase in the system clock frequency, a dummy access to either memory window (and appropriate processor barriers/fences) must be inserted after the Mx_TIMING write to ensure the SCK divisor change is in effect _before_ the system clock is changed.
8571 ADD_BITFIELD_RW(CLKDIV, 0, 8)
8572 END_TYPE()
8573
8574 // No page boundary is enforced
8575 static const uint32_t M1_TIMING_PAGEBREAK__NONE = 0;
8576 // Break bursts crossing a 256-byte page boundary
8577 static const uint32_t M1_TIMING_PAGEBREAK__256 = 1;
8578 // Break bursts crossing a 1024-byte quad-page boundary
8579 static const uint32_t M1_TIMING_PAGEBREAK__1024 = 2;
8580 // Break bursts crossing a 4096-byte sector boundary
8581 static const uint32_t M1_TIMING_PAGEBREAK__4096 = 3;
8582
8583 // Read transfer format configuration for memory address window 1. Configure the bus width of each transfer phase individually, and configure the length or presence of the command prefix, command suffix and dummy/turnaround transfer phases. Only 24-bit addresses are supported. The reset value of the M1_RFMT register is configured to support a basic 03h serial read transfer with no additional configuration.
8584 // Reset value: 0x00001000
8585 BEGIN_TYPE(M1_RFMT_t, uint32_t)
8586 // Enable double transfer rate (DTR) for read commands: address, suffix and read data phases are active on both edges of SCK. SDO data is launched centre-aligned on each SCK edge, and SDI data is captured on the SCK edge that follows its launch. DTR is implemented by halving the clock rate; SCK has a period of 2 x CLK_DIV throughout the transfer. The prefix and dummy phases are still single transfer rate. If the suffix is quad-width, it must be 0 or 8 bits in length, to ensure an even number of SCK edges.
8587 ADD_BITFIELD_RW(DTR, 28, 1)
8588 // Length of dummy phase between command suffix and data phase, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single)
8589 ADD_BITFIELD_RW(DUMMY_LEN, 16, 3)
8590 // Length of post-address command suffix, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single) Only values of 0 and 8 bits are supported.
8591 ADD_BITFIELD_RW(SUFFIX_LEN, 14, 2)
8592 // Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)
8593 ADD_BITFIELD_RW(PREFIX_LEN, 12, 1)
8594 // The width used for the data transfer
8595 ADD_BITFIELD_RW(DATA_WIDTH, 8, 2)
8596 // The width used for the dummy phase, if any. If width is single, SD0/MOSI is held asserted low during the dummy phase, and SD1...SD3 are tristated. If width is dual/quad, all IOs are tristated during the dummy phase.
8597 ADD_BITFIELD_RW(DUMMY_WIDTH, 6, 2)
8598 // The width used for the post-address command suffix, if any
8599 ADD_BITFIELD_RW(SUFFIX_WIDTH, 4, 2)
8600 // The transfer width used for the address. The address phase always transfers 24 bits in total.
8601 ADD_BITFIELD_RW(ADDR_WIDTH, 2, 2)
8602 // The transfer width used for the command prefix, if any
8603 ADD_BITFIELD_RW(PREFIX_WIDTH, 0, 2)
8604 END_TYPE()
8605
8606 // No dummy phase
8607 static const uint32_t M1_RFMT_DUMMY_LEN__NONE = 0;
8608 // 4 dummy bits
8609 static const uint32_t M1_RFMT_DUMMY_LEN__4 = 1;
8610 // 8 dummy bits
8611 static const uint32_t M1_RFMT_DUMMY_LEN__8 = 2;
8612 // 12 dummy bits
8613 static const uint32_t M1_RFMT_DUMMY_LEN__12 = 3;
8614 // 16 dummy bits
8615 static const uint32_t M1_RFMT_DUMMY_LEN__16 = 4;
8616 // 20 dummy bits
8617 static const uint32_t M1_RFMT_DUMMY_LEN__20 = 5;
8618 // 24 dummy bits
8619 static const uint32_t M1_RFMT_DUMMY_LEN__24 = 6;
8620 // 28 dummy bits
8621 static const uint32_t M1_RFMT_DUMMY_LEN__28 = 7;
8622 // No suffix
8623 static const uint32_t M1_RFMT_SUFFIX_LEN__NONE = 0;
8624 // 8-bit suffix
8625 static const uint32_t M1_RFMT_SUFFIX_LEN__8 = 2;
8626 // No prefix
8627 static const uint32_t M1_RFMT_PREFIX_LEN__NONE = 0;
8628 // 8-bit prefix
8629 static const uint32_t M1_RFMT_PREFIX_LEN__8 = 1;
8630 // Single width
8631 static const uint32_t M1_RFMT_DATA_WIDTH__S = 0;
8632 // Dual width
8633 static const uint32_t M1_RFMT_DATA_WIDTH__D = 1;
8634 // Quad width
8635 static const uint32_t M1_RFMT_DATA_WIDTH__Q = 2;
8636 // Single width
8637 static const uint32_t M1_RFMT_DUMMY_WIDTH__S = 0;
8638 // Dual width
8639 static const uint32_t M1_RFMT_DUMMY_WIDTH__D = 1;
8640 // Quad width
8641 static const uint32_t M1_RFMT_DUMMY_WIDTH__Q = 2;
8642 // Single width
8643 static const uint32_t M1_RFMT_SUFFIX_WIDTH__S = 0;
8644 // Dual width
8645 static const uint32_t M1_RFMT_SUFFIX_WIDTH__D = 1;
8646 // Quad width
8647 static const uint32_t M1_RFMT_SUFFIX_WIDTH__Q = 2;
8648 // Single width
8649 static const uint32_t M1_RFMT_ADDR_WIDTH__S = 0;
8650 // Dual width
8651 static const uint32_t M1_RFMT_ADDR_WIDTH__D = 1;
8652 // Quad width
8653 static const uint32_t M1_RFMT_ADDR_WIDTH__Q = 2;
8654 // Single width
8655 static const uint32_t M1_RFMT_PREFIX_WIDTH__S = 0;
8656 // Dual width
8657 static const uint32_t M1_RFMT_PREFIX_WIDTH__D = 1;
8658 // Quad width
8659 static const uint32_t M1_RFMT_PREFIX_WIDTH__Q = 2;
8660
8661 // Command constants used for reads from memory address window 1. The reset value of the M1_RCMD register is configured to support a basic 03h serial read transfer with no additional configuration.
8662 // Reset value: 0x0000a003
8663 BEGIN_TYPE(M1_RCMD_t, uint32_t)
8664 // The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero.
8665 ADD_BITFIELD_RW(SUFFIX, 8, 8)
8666 // The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero.
8667 ADD_BITFIELD_RW(PREFIX, 0, 8)
8668 END_TYPE()
8669
8670 // Write transfer format configuration for memory address window 1. Configure the bus width of each transfer phase individually, and configure the length or presence of the command prefix, command suffix and dummy/turnaround transfer phases. Only 24-bit addresses are supported. The reset value of the M1_WFMT register is configured to support a basic 02h serial write transfer. However, writes to this window must first be enabled via the XIP_CTRL_WRITABLE_M1 bit, as XIP memory is read-only by default.
8671 // Reset value: 0x00001000
8672 BEGIN_TYPE(M1_WFMT_t, uint32_t)
8673 // Enable double transfer rate (DTR) for write commands: address, suffix and write data phases are active on both edges of SCK. SDO data is launched centre-aligned on each SCK edge, and SDI data is captured on the SCK edge that follows its launch. DTR is implemented by halving the clock rate; SCK has a period of 2 x CLK_DIV throughout the transfer. The prefix and dummy phases are still single transfer rate. If the suffix is quad-width, it must be 0 or 8 bits in length, to ensure an even number of SCK edges.
8674 ADD_BITFIELD_RW(DTR, 28, 1)
8675 // Length of dummy phase between command suffix and data phase, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single)
8676 ADD_BITFIELD_RW(DUMMY_LEN, 16, 3)
8677 // Length of post-address command suffix, in units of 4 bits. (i.e. 1 cycle for quad width, 2 for dual, 4 for single) Only values of 0 and 8 bits are supported.
8678 ADD_BITFIELD_RW(SUFFIX_LEN, 14, 2)
8679 // Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)
8680 ADD_BITFIELD_RW(PREFIX_LEN, 12, 1)
8681 // The width used for the data transfer
8682 ADD_BITFIELD_RW(DATA_WIDTH, 8, 2)
8683 // The width used for the dummy phase, if any. If width is single, SD0/MOSI is held asserted low during the dummy phase, and SD1...SD3 are tristated. If width is dual/quad, all IOs are tristated during the dummy phase.
8684 ADD_BITFIELD_RW(DUMMY_WIDTH, 6, 2)
8685 // The width used for the post-address command suffix, if any
8686 ADD_BITFIELD_RW(SUFFIX_WIDTH, 4, 2)
8687 // The transfer width used for the address. The address phase always transfers 24 bits in total.
8688 ADD_BITFIELD_RW(ADDR_WIDTH, 2, 2)
8689 // The transfer width used for the command prefix, if any
8690 ADD_BITFIELD_RW(PREFIX_WIDTH, 0, 2)
8691 END_TYPE()
8692
8693 // No dummy phase
8694 static const uint32_t M1_WFMT_DUMMY_LEN__NONE = 0;
8695 // 4 dummy bits
8696 static const uint32_t M1_WFMT_DUMMY_LEN__4 = 1;
8697 // 8 dummy bits
8698 static const uint32_t M1_WFMT_DUMMY_LEN__8 = 2;
8699 // 12 dummy bits
8700 static const uint32_t M1_WFMT_DUMMY_LEN__12 = 3;
8701 // 16 dummy bits
8702 static const uint32_t M1_WFMT_DUMMY_LEN__16 = 4;
8703 // 20 dummy bits
8704 static const uint32_t M1_WFMT_DUMMY_LEN__20 = 5;
8705 // 24 dummy bits
8706 static const uint32_t M1_WFMT_DUMMY_LEN__24 = 6;
8707 // 28 dummy bits
8708 static const uint32_t M1_WFMT_DUMMY_LEN__28 = 7;
8709 // No suffix
8710 static const uint32_t M1_WFMT_SUFFIX_LEN__NONE = 0;
8711 // 8-bit suffix
8712 static const uint32_t M1_WFMT_SUFFIX_LEN__8 = 2;
8713 // No prefix
8714 static const uint32_t M1_WFMT_PREFIX_LEN__NONE = 0;
8715 // 8-bit prefix
8716 static const uint32_t M1_WFMT_PREFIX_LEN__8 = 1;
8717 // Single width
8718 static const uint32_t M1_WFMT_DATA_WIDTH__S = 0;
8719 // Dual width
8720 static const uint32_t M1_WFMT_DATA_WIDTH__D = 1;
8721 // Quad width
8722 static const uint32_t M1_WFMT_DATA_WIDTH__Q = 2;
8723 // Single width
8724 static const uint32_t M1_WFMT_DUMMY_WIDTH__S = 0;
8725 // Dual width
8726 static const uint32_t M1_WFMT_DUMMY_WIDTH__D = 1;
8727 // Quad width
8728 static const uint32_t M1_WFMT_DUMMY_WIDTH__Q = 2;
8729 // Single width
8730 static const uint32_t M1_WFMT_SUFFIX_WIDTH__S = 0;
8731 // Dual width
8732 static const uint32_t M1_WFMT_SUFFIX_WIDTH__D = 1;
8733 // Quad width
8734 static const uint32_t M1_WFMT_SUFFIX_WIDTH__Q = 2;
8735 // Single width
8736 static const uint32_t M1_WFMT_ADDR_WIDTH__S = 0;
8737 // Dual width
8738 static const uint32_t M1_WFMT_ADDR_WIDTH__D = 1;
8739 // Quad width
8740 static const uint32_t M1_WFMT_ADDR_WIDTH__Q = 2;
8741 // Single width
8742 static const uint32_t M1_WFMT_PREFIX_WIDTH__S = 0;
8743 // Dual width
8744 static const uint32_t M1_WFMT_PREFIX_WIDTH__D = 1;
8745 // Quad width
8746 static const uint32_t M1_WFMT_PREFIX_WIDTH__Q = 2;
8747
8748 // Command constants used for writes to memory address window 1. The reset value of the M1_WCMD register is configured to support a basic 02h serial write transfer with no additional configuration.
8749 // Reset value: 0x0000a002
8750 BEGIN_TYPE(M1_WCMD_t, uint32_t)
8751 // The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero.
8752 ADD_BITFIELD_RW(SUFFIX, 8, 8)
8753 // The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero.
8754 ADD_BITFIELD_RW(PREFIX, 0, 8)
8755 END_TYPE()
8756
8757 // Configure address translation for XIP virtual addresses 0x000000 through 0x3fffff (a 4 MiB window starting at +0 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8758 // Reset value: 0x04000000
8759 BEGIN_TYPE(ATRANS0_t, uint32_t)
8760 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8761 ADD_BITFIELD_RW(SIZE, 16, 11)
8762 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8763 ADD_BITFIELD_RW(BASE, 0, 12)
8764 END_TYPE()
8765
8766 // Configure address translation for XIP virtual addresses 0x400000 through 0x7fffff (a 4 MiB window starting at +4 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8767 // Reset value: 0x04000400
8768 BEGIN_TYPE(ATRANS1_t, uint32_t)
8769 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8770 ADD_BITFIELD_RW(SIZE, 16, 11)
8771 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8772 ADD_BITFIELD_RW(BASE, 0, 12)
8773 END_TYPE()
8774
8775 // Configure address translation for XIP virtual addresses 0x800000 through 0xbfffff (a 4 MiB window starting at +8 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8776 // Reset value: 0x04000800
8777 BEGIN_TYPE(ATRANS2_t, uint32_t)
8778 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8779 ADD_BITFIELD_RW(SIZE, 16, 11)
8780 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8781 ADD_BITFIELD_RW(BASE, 0, 12)
8782 END_TYPE()
8783
8784 // Configure address translation for XIP virtual addresses 0xc00000 through 0xffffff (a 4 MiB window starting at +12 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8785 // Reset value: 0x04000c00
8786 BEGIN_TYPE(ATRANS3_t, uint32_t)
8787 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8788 ADD_BITFIELD_RW(SIZE, 16, 11)
8789 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8790 ADD_BITFIELD_RW(BASE, 0, 12)
8791 END_TYPE()
8792
8793 // Configure address translation for XIP virtual addresses 0x1000000 through 0x13fffff (a 4 MiB window starting at +16 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8794 // Reset value: 0x04000000
8795 BEGIN_TYPE(ATRANS4_t, uint32_t)
8796 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8797 ADD_BITFIELD_RW(SIZE, 16, 11)
8798 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8799 ADD_BITFIELD_RW(BASE, 0, 12)
8800 END_TYPE()
8801
8802 // Configure address translation for XIP virtual addresses 0x1400000 through 0x17fffff (a 4 MiB window starting at +20 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8803 // Reset value: 0x04000400
8804 BEGIN_TYPE(ATRANS5_t, uint32_t)
8805 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8806 ADD_BITFIELD_RW(SIZE, 16, 11)
8807 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8808 ADD_BITFIELD_RW(BASE, 0, 12)
8809 END_TYPE()
8810
8811 // Configure address translation for XIP virtual addresses 0x1800000 through 0x1bfffff (a 4 MiB window starting at +24 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8812 // Reset value: 0x04000800
8813 BEGIN_TYPE(ATRANS6_t, uint32_t)
8814 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8815 ADD_BITFIELD_RW(SIZE, 16, 11)
8816 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8817 ADD_BITFIELD_RW(BASE, 0, 12)
8818 END_TYPE()
8819
8820 // Configure address translation for XIP virtual addresses 0x1c00000 through 0x1ffffff (a 4 MiB window starting at +28 MiB). Address translation allows a program image to be executed in place at multiple physical flash addresses (for example, a double-buffered flash image for over-the-air updates), without the overhead of position-independent code. At reset, the address translation registers are initialised to an identity mapping, so that they can be ignored if address translation is not required. Note that the XIP cache is fully virtually addressed, so a cache flush is required after changing the address translation.
8821 // Reset value: 0x04000c00
8822 BEGIN_TYPE(ATRANS7_t, uint32_t)
8823 // Translation aperture size for this virtual address range, in units of 4 kiB (one flash sector). Bits 21:12 of the virtual address are compared to SIZE. Offsets greater than SIZE return a bus error, and do not cause a QSPI access.
8824 ADD_BITFIELD_RW(SIZE, 16, 11)
8825 // Physical address base for this virtual address range, in units of 4 kiB (one flash sector). Taking a 24-bit virtual address, firstly bits 23:22 (the two MSBs) are masked to zero, and then BASE is added to bits 23:12 (the upper 12 bits) to form the physical address. Translation wraps on a 16 MiB boundary.
8826 ADD_BITFIELD_RW(BASE, 0, 12)
8827 END_TYPE()
8828
8829 struct QMI_t {
8830 DIRECT_CSR_t DIRECT_CSR;
8831 DIRECT_TX_t DIRECT_TX;
8832 DIRECT_RX_t DIRECT_RX;
8833 M0_TIMING_t M0_TIMING;
8834 M0_RFMT_t M0_RFMT;
8835 M0_RCMD_t M0_RCMD;
8836 M0_WFMT_t M0_WFMT;
8837 M0_WCMD_t M0_WCMD;
8838 M1_TIMING_t M1_TIMING;
8839 M1_RFMT_t M1_RFMT;
8840 M1_RCMD_t M1_RCMD;
8841 M1_WFMT_t M1_WFMT;
8842 M1_WCMD_t M1_WCMD;
8843 ATRANS0_t ATRANS0;
8844 ATRANS1_t ATRANS1;
8845 ATRANS2_t ATRANS2;
8846 ATRANS3_t ATRANS3;
8847 ATRANS4_t ATRANS4;
8848 ATRANS5_t ATRANS5;
8849 ATRANS6_t ATRANS6;
8850 ATRANS7_t ATRANS7;
8851 };
8852
8853 static QMI_t & QMI = (*(QMI_t *)0x400d0000);
8854 static QMI_t & QMI_XOR = (*(QMI_t *)0x400d1000);
8855 static QMI_t & QMI_SET = (*(QMI_t *)0x400d2000);
8856 static QMI_t & QMI_CLR = (*(QMI_t *)0x400d3000);
8857
8858} // _QMI_
8859
8860// QSPI flash execute-in-place block
8861namespace _XIP_CTRL_ {
8862
8863 // Cache control register. Read-only from a Non-secure context.
8864 // Reset value: 0x00000083
8865 BEGIN_TYPE(CTRL_t, uint32_t)
8866 // If 1, enable writes to XIP memory window 1 (addresses 0x11000000 through 0x11ffffff, and their uncached mirrors). If 0, this region is read-only. XIP memory is *read-only by default*. This bit must be set to enable writes if a RAM device is attached on QSPI chip select 1. The default read-only behaviour avoids two issues with writing to a read-only QSPI device (e.g. flash). First, a write will initially appear to succeed due to caching, but the data will eventually be lost when the written line is evicted, causing unpredictable behaviour. Second, when a written line is evicted, it will cause a write command to be issued to the flash, which can break the flash out of its continuous read mode. After this point, flash reads will return garbage. This is a security concern, as it allows Non-secure software to break Secure flash reads if it has permission to write to any flash address. Note the read-only behaviour is implemented by downgrading writes to reads, so writes will still cause allocation of an address, but have no other effect.
8867 ADD_BITFIELD_RW(WRITABLE_M1, 11, 1)
8868 // If 1, enable writes to XIP memory window 0 (addresses 0x10000000 through 0x10ffffff, and their uncached mirrors). If 0, this region is read-only. XIP memory is *read-only by default*. This bit must be set to enable writes if a RAM device is attached on QSPI chip select 0. The default read-only behaviour avoids two issues with writing to a read-only QSPI device (e.g. flash). First, a write will initially appear to succeed due to caching, but the data will eventually be lost when the written line is evicted, causing unpredictable behaviour. Second, when a written line is evicted, it will cause a write command to be issued to the flash, which can break the flash out of its continuous read mode. After this point, flash reads will return garbage. This is a security concern, as it allows Non-secure software to break Secure flash reads if it has permission to write to any flash address. Note the read-only behaviour is implemented by downgrading writes to reads, so writes will still cause allocation of an address, but have no other effect.
8869 ADD_BITFIELD_RW(WRITABLE_M0, 10, 1)
8870 // When 1, route all cached+Secure accesses to way 0 of the cache, and route all cached+Non-secure accesses to way 1 of the cache. This partitions the cache into two half-sized direct-mapped regions, such that Non-secure code can not observe cache line state changes caused by Secure execution. A full cache flush is required when changing the value of SPLIT_WAYS. The flush should be performed whilst SPLIT_WAYS is 0, so that both cache ways are accessible for invalidation.
8871 ADD_BITFIELD_RW(SPLIT_WAYS, 9, 1)
8872 // When 0, Non-secure accesses to the cache maintenance address window (addr[27] == 1, addr[26] == 0) will generate a bus error. When 1, Non-secure accesses can perform cache maintenance operations by writing to the cache maintenance address window. Cache maintenance operations may be used to corrupt Secure data by invalidating cache lines inappropriately, or map Secure content into a Non-secure region by pinning cache lines. Therefore this bit should generally be set to 0, unless Secure code is not using the cache. Care should also be taken to clear the cache data memory and tag memory before granting maintenance operations to Non-secure code.
8873 ADD_BITFIELD_RW(MAINT_NONSEC, 8, 1)
8874 // When 1, Non-secure accesses to the uncached, untranslated window (addr[27:26] == 3) will generate a bus error.
8875 ADD_BITFIELD_RW(NO_UNTRANSLATED_NONSEC, 7, 1)
8876 // When 1, Secure accesses to the uncached, untranslated window (addr[27:26] == 3) will generate a bus error.
8877 ADD_BITFIELD_RW(NO_UNTRANSLATED_SEC, 6, 1)
8878 // When 1, Non-secure accesses to the uncached window (addr[27:26] == 1) will generate a bus error. This may reduce the number of SAU/MPU/PMP regions required to protect flash contents. Note this does not disable access to the uncached, untranslated window -- see NO_UNTRANSLATED_SEC.
8879 ADD_BITFIELD_RW(NO_UNCACHED_NONSEC, 5, 1)
8880 // When 1, Secure accesses to the uncached window (addr[27:26] == 1) will generate a bus error. This may reduce the number of SAU/MPU/PMP regions required to protect flash contents. Note this does not disable access to the uncached, untranslated window -- see NO_UNTRANSLATED_SEC.
8881 ADD_BITFIELD_RW(NO_UNCACHED_SEC, 4, 1)
8882 // When 1, the cache memories are powered down. They retain state, but can not be accessed. This reduces static power dissipation. Writing 1 to this bit forces CTRL_EN_SECURE and CTRL_EN_NONSECURE to 0, i.e. the cache cannot be enabled when powered down.
8883 ADD_BITFIELD_RW(POWER_DOWN, 3, 1)
8884 // When 1, enable the cache for Non-secure accesses. When enabled, Non-secure XIP accesses to the cached (addr[26] == 0) window will query the cache, and QSPI accesses are performed only if the requested data is not present. When disabled, Secure access ignore the cache contents, and always access the QSPI interface. Accesses to the uncached (addr[26] == 1) window will never query the cache, irrespective of this bit.
8885 ADD_BITFIELD_RW(EN_NONSECURE, 1, 1)
8886 // When 1, enable the cache for Secure accesses. When enabled, Secure XIP accesses to the cached (addr[26] == 0) window will query the cache, and QSPI accesses are performed only if the requested data is not present. When disabled, Secure access ignore the cache contents, and always access the QSPI interface. Accesses to the uncached (addr[26] == 1) window will never query the cache, irrespective of this bit. There is no cache-as-SRAM address window. Cache lines are allocated for SRAM-like use by individually pinning them, and keeping the cache enabled.
8887 ADD_BITFIELD_RW(EN_SECURE, 0, 1)
8888 END_TYPE()
8889
8890 // Reset value: 0x00000002
8891 BEGIN_TYPE(STAT_t, uint32_t)
8892 // When 1, indicates the XIP streaming FIFO is completely full. The streaming FIFO is 2 entries deep, so the full and empty flag allow its level to be ascertained.
8893 ADD_BITFIELD_RO(FIFO_FULL, 2, 1)
8894 // When 1, indicates the XIP streaming FIFO is completely empty.
8895 ADD_BITFIELD_RO(FIFO_EMPTY, 1, 1)
8896 END_TYPE()
8897
8898 // Cache Hit counter
8899 // Reset value: 0x00000000
8900 BEGIN_TYPE(CTR_HIT_t, uint32_t)
8901 // A 32 bit saturating counter that increments upon each cache hit, i.e. when an XIP access is serviced directly from cached data. Write any value to clear.
8902 ADD_BITFIELD_RW(CTR_HIT, 0, 32)
8903 END_TYPE()
8904
8905 // Cache Access counter
8906 // Reset value: 0x00000000
8907 BEGIN_TYPE(CTR_ACC_t, uint32_t)
8908 // A 32 bit saturating counter that increments upon each XIP access, whether the cache is hit or not. This includes noncacheable accesses. Write any value to clear.
8909 ADD_BITFIELD_RW(CTR_ACC, 0, 32)
8910 END_TYPE()
8911
8912 // FIFO stream address
8913 // Reset value: 0x00000000
8914 BEGIN_TYPE(STREAM_ADDR_t, uint32_t)
8915 // The address of the next word to be streamed from flash to the streaming FIFO. Increments automatically after each flash access. Write the initial access address here before starting a streaming read.
8916 ADD_BITFIELD_RW(STREAM_ADDR, 2, 30)
8917 END_TYPE()
8918
8919 // FIFO stream control
8920 // Reset value: 0x00000000
8921 BEGIN_TYPE(STREAM_CTR_t, uint32_t)
8922 // Write a nonzero value to start a streaming read. This will then progress in the background, using flash idle cycles to transfer a linear data block from flash to the streaming FIFO. Decrements automatically (1 at a time) as the stream progresses, and halts on reaching 0. Write 0 to halt an in-progress stream, and discard any in-flight read, so that a new stream can immediately be started (after draining the FIFO and reinitialising STREAM_ADDR)
8923 ADD_BITFIELD_RW(STREAM_CTR, 0, 22)
8924 END_TYPE()
8925
8926 // FIFO stream data
8927 // Reset value: 0x00000000
8928 BEGIN_TYPE(STREAM_FIFO_t, uint32_t)
8929 // Streamed data is buffered here, for retrieval by the system DMA. This FIFO can also be accessed via the XIP_AUX slave, to avoid exposing the DMA to bus stalls caused by other XIP traffic.
8930 ADD_BITFIELD_RO(STREAM_FIFO, 0, 32)
8931 END_TYPE()
8932
8933 struct XIP_CTRL_t {
8934 CTRL_t CTRL;
8935 uint32_t reserved0;
8936 STAT_t STAT;
8937 CTR_HIT_t CTR_HIT;
8938 CTR_ACC_t CTR_ACC;
8939 STREAM_ADDR_t STREAM_ADDR;
8940 STREAM_CTR_t STREAM_CTR;
8941 STREAM_FIFO_t STREAM_FIFO;
8942 };
8943
8944 static XIP_CTRL_t & XIP_CTRL = (*(XIP_CTRL_t *)0x400c8000);
8945 static XIP_CTRL_t & XIP_CTRL_XOR = (*(XIP_CTRL_t *)0x400c9000);
8946 static XIP_CTRL_t & XIP_CTRL_SET = (*(XIP_CTRL_t *)0x400ca000);
8947 static XIP_CTRL_t & XIP_CTRL_CLR = (*(XIP_CTRL_t *)0x400cb000);
8948
8949} // _XIP_CTRL_
8950
8951// Auxiliary DMA access to XIP FIFOs, via fast AHB bus access
8952namespace _XIP_AUX_ {
8953
8954 // Read the XIP stream FIFO (fast bus access to XIP_CTRL_STREAM_FIFO)
8955 // Reset value: 0x00000000
8956 BEGIN_TYPE(STREAM_t, uint32_t)
8957 ADD_BITFIELD_RO(STREAM, 0, 32)
8958 END_TYPE()
8959
8960 // Write to the QMI direct-mode TX FIFO (fast bus access to QMI_DIRECT_TX)
8961 // Reset value: 0x00000000
8962 BEGIN_TYPE(QMI_DIRECT_TX_t, uint32_t)
8963 // Inhibit the RX FIFO push that would correspond to this TX FIFO entry. Useful to avoid garbage appearing in the RX FIFO when pushing the command at the beginning of a SPI transfer.
8964 ADD_BITFIELD_WO(NOPUSH, 20, 1)
8965 // Output enable (active-high). For single width (SPI), this field is ignored, and SD0 is always set to output, with SD1 always set to input. For dual and quad width (DSPI/QSPI), this sets whether the relevant SDx pads are set to output whilst transferring this FIFO record. In this case the command/address should have OE set, and the data transfer should have OE set or clear depending on the direction of the transfer.
8966 ADD_BITFIELD_WO(OE, 19, 1)
8967 // Data width. If 0, hardware will transmit the 8 LSBs of the DIRECT_TX DATA field, and return an 8-bit value in the 8 LSBs of DIRECT_RX. If 1, the full 16-bit width is used. 8-bit and 16-bit transfers can be mixed freely.
8968 ADD_BITFIELD_WO(DWIDTH, 18, 1)
8969 // Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely.
8970 ADD_BITFIELD_WO(IWIDTH, 16, 2)
8971 // Data pushed here will be clocked out falling edges of SCK (or before the very first rising edge of SCK, if this is the first pulse). For each byte clocked out, the interface will simultaneously sample one byte, on rising edges of SCK, and push this to the DIRECT_RX FIFO. For 16-bit data, the least-significant byte is transmitted first.
8972 ADD_BITFIELD_WO(DATA, 0, 16)
8973 END_TYPE()
8974
8975 // Single width
8976 static const uint32_t QMI_DIRECT_TX_IWIDTH__S = 0;
8977 // Dual width
8978 static const uint32_t QMI_DIRECT_TX_IWIDTH__D = 1;
8979 // Quad width
8980 static const uint32_t QMI_DIRECT_TX_IWIDTH__Q = 2;
8981
8982 // Read from the QMI direct-mode RX FIFO (fast bus access to QMI_DIRECT_RX)
8983 // Reset value: 0x00000000
8984 BEGIN_TYPE(QMI_DIRECT_RX_t, uint32_t)
8985 // With each byte clocked out on the serial interface, one byte will simultaneously be clocked in, and will appear in this FIFO. The serial interface will stall when this FIFO is full, to avoid dropping data. When 16-bit data is pushed into the TX FIFO, the corresponding RX FIFO push will also contain 16 bits of data. The least-significant byte is the first one received.
8986 ADD_BITFIELD_RO(QMI_DIRECT_RX, 0, 16)
8987 END_TYPE()
8988
8989 struct XIP_AUX_t {
8990 STREAM_t STREAM;
8991 QMI_DIRECT_TX_t QMI_DIRECT_TX;
8992 QMI_DIRECT_RX_t QMI_DIRECT_RX;
8993 };
8994
8995 static XIP_AUX_t & XIP_AUX = (*(XIP_AUX_t *)0x50500000);
8996 static XIP_AUX_t & XIP_AUX_XOR = (*(XIP_AUX_t *)0x50501000);
8997 static XIP_AUX_t & XIP_AUX_SET = (*(XIP_AUX_t *)0x50502000);
8998 static XIP_AUX_t & XIP_AUX_CLR = (*(XIP_AUX_t *)0x50503000);
8999
9000} // _XIP_AUX_
9001
9002// Register block for various chip control signals
9003namespace _SYSCFG_ {
9004
9005 // Configuration for processors
9006 // Reset value: 0x00000000
9007 BEGIN_TYPE(PROC_CONFIG_t, uint32_t)
9008 // Indication that proc1 has halted
9009 ADD_BITFIELD_RO(PROC1_HALTED, 1, 1)
9010 // Indication that proc0 has halted
9011 ADD_BITFIELD_RO(PROC0_HALTED, 0, 1)
9012 END_TYPE()
9013
9014 // For each bit, if 1, bypass the input synchronizer between that GPIO and the GPIO input register in the SIO. The input synchronizers should generally be unbypassed, to avoid injecting metastabilities into processors. If you're feeling brave, you can bypass to save two cycles of input latency. This register applies to GPIO 0...31.
9015 // Reset value: 0x00000000
9016 BEGIN_TYPE(PROC_IN_SYNC_BYPASS_t, uint32_t)
9017 ADD_BITFIELD_RW(GPIO, 0, 32)
9018 END_TYPE()
9019
9020 // For each bit, if 1, bypass the input synchronizer between that GPIO and the GPIO input register in the SIO. The input synchronizers should generally be unbypassed, to avoid injecting metastabilities into processors. If you're feeling brave, you can bypass to save two cycles of input latency. This register applies to GPIO 32...47. USB GPIO 56..57 QSPI GPIO 58..63
9021 // Reset value: 0x00000000
9022 BEGIN_TYPE(PROC_IN_SYNC_BYPASS_HI_t, uint32_t)
9023 ADD_BITFIELD_RW(QSPI_SD, 28, 4)
9024 ADD_BITFIELD_RW(QSPI_CSN, 27, 1)
9025 ADD_BITFIELD_RW(QSPI_SCK, 26, 1)
9026 ADD_BITFIELD_RW(USB_DM, 25, 1)
9027 ADD_BITFIELD_RW(USB_DP, 24, 1)
9028 ADD_BITFIELD_RW(GPIO, 0, 16)
9029 END_TYPE()
9030
9031 // Directly control the chip SWD debug port
9032 // Reset value: 0x00000006
9033 BEGIN_TYPE(DBGFORCE_t, uint32_t)
9034 // Attach chip debug port to syscfg controls, and disconnect it from external SWD pads.
9035 ADD_BITFIELD_RW(ATTACH, 3, 1)
9036 // Directly drive SWCLK, if ATTACH is set
9037 ADD_BITFIELD_RW(SWCLK, 2, 1)
9038 // Directly drive SWDIO input, if ATTACH is set
9039 ADD_BITFIELD_RW(SWDI, 1, 1)
9040 // Observe the value of SWDIO output.
9041 ADD_BITFIELD_RO(SWDO, 0, 1)
9042 END_TYPE()
9043
9044 // Control PD pins to memories. Set high to put memories to a low power state. In this state the memories will retain contents but not be accessible Use with caution
9045 // Reset value: 0x00000000
9046 BEGIN_TYPE(MEMPOWERDOWN_t, uint32_t)
9047 ADD_BITFIELD_RW(BOOTRAM, 12, 1)
9048 ADD_BITFIELD_RW(ROM, 11, 1)
9049 ADD_BITFIELD_RW(USB, 10, 1)
9050 ADD_BITFIELD_RW(SRAM9, 9, 1)
9051 ADD_BITFIELD_RW(SRAM8, 8, 1)
9052 ADD_BITFIELD_RW(SRAM7, 7, 1)
9053 ADD_BITFIELD_RW(SRAM6, 6, 1)
9054 ADD_BITFIELD_RW(SRAM5, 5, 1)
9055 ADD_BITFIELD_RW(SRAM4, 4, 1)
9056 ADD_BITFIELD_RW(SRAM3, 3, 1)
9057 ADD_BITFIELD_RW(SRAM2, 2, 1)
9058 ADD_BITFIELD_RW(SRAM1, 1, 1)
9059 ADD_BITFIELD_RW(SRAM0, 0, 1)
9060 END_TYPE()
9061
9062 // Auxiliary system control register
9063 // Reset value: 0x00000000
9064 BEGIN_TYPE(AUXCTRL_t, uint32_t)
9065 // * Bits 7:2: Reserved * Bit 1: When clear, the LPOSC output is XORed into the TRNG ROSC output as an additional, uncorrelated entropy source. When set, this behaviour is disabled. * Bit 0: Force POWMAN clock to switch to LPOSC, by asserting its WDRESET input. This must be set before initiating a watchdog reset of the RSM from a stage that includes CLOCKS, if POWMAN is running from clk_ref at the point that the watchdog reset takes place. Otherwise, the short pulse generated on clk_ref by the reset of the CLOCKS block may affect POWMAN register state.
9066 ADD_BITFIELD_RW(AUXCTRL, 0, 8)
9067 END_TYPE()
9068
9069 struct SYSCFG_t {
9070 PROC_CONFIG_t PROC_CONFIG;
9071 PROC_IN_SYNC_BYPASS_t PROC_IN_SYNC_BYPASS;
9072 PROC_IN_SYNC_BYPASS_HI_t PROC_IN_SYNC_BYPASS_HI;
9073 DBGFORCE_t DBGFORCE;
9074 MEMPOWERDOWN_t MEMPOWERDOWN;
9075 AUXCTRL_t AUXCTRL;
9076 };
9077
9078 static SYSCFG_t & SYSCFG = (*(SYSCFG_t *)0x40008000);
9079 static SYSCFG_t & SYSCFG_XOR = (*(SYSCFG_t *)0x40009000);
9080 static SYSCFG_t & SYSCFG_SET = (*(SYSCFG_t *)0x4000a000);
9081 static SYSCFG_t & SYSCFG_CLR = (*(SYSCFG_t *)0x4000b000);
9082
9083} // _SYSCFG_
9084
9085// Controls the crystal oscillator
9086namespace _XOSC_ {
9087
9088 // Crystal Oscillator Control
9089 // Reset value: 0x00000000
9090 BEGIN_TYPE(CTRL_t, uint32_t)
9091 // On power-up this field is initialised to DISABLE and the chip runs from the ROSC. If the chip has subsequently been programmed to run from the XOSC then setting this field to DISABLE may lock-up the chip. If this is a concern then run the clk_ref from the ROSC and enable the clk_sys RESUS feature. The 12-bit code is intended to give some protection against accidental writes. An invalid setting will retain the previous value. The actual value being used can be read from STATUS_ENABLED
9092 ADD_BITFIELD_RW(ENABLE, 12, 12)
9093 // The 12-bit code is intended to give some protection against accidental writes. An invalid setting will retain the previous value. The actual value being used can be read from STATUS_FREQ_RANGE
9094 ADD_BITFIELD_RW(FREQ_RANGE, 0, 12)
9095 END_TYPE()
9096
9097 static const uint32_t CTRL_ENABLE__DISABLE = 3358;
9098 static const uint32_t CTRL_ENABLE__ENABLE = 4011;
9099 static const uint32_t CTRL_FREQ_RANGE__1_15MHZ = 2720;
9100 static const uint32_t CTRL_FREQ_RANGE__10_30MHZ = 2721;
9101 static const uint32_t CTRL_FREQ_RANGE__25_60MHZ = 2722;
9102 static const uint32_t CTRL_FREQ_RANGE__40_100MHZ = 2723;
9103
9104 // Crystal Oscillator Status
9105 // Reset value: 0x00000000
9106 BEGIN_TYPE(STATUS_t, uint32_t)
9107 // Oscillator is running and stable
9108 ADD_BITFIELD_RO(STABLE, 31, 1)
9109 // An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT
9110 ADD_BITFIELD_RW(BADWRITE, 24, 1)
9111 // Oscillator is enabled but not necessarily running and stable, resets to 0
9112 ADD_BITFIELD_RO(ENABLED, 12, 1)
9113 // The current frequency range setting
9114 ADD_BITFIELD_RO(FREQ_RANGE, 0, 2)
9115 END_TYPE()
9116
9117 static const uint32_t STATUS_FREQ_RANGE__1_15MHZ = 0;
9118 static const uint32_t STATUS_FREQ_RANGE__10_30MHZ = 1;
9119 static const uint32_t STATUS_FREQ_RANGE__25_60MHZ = 2;
9120 static const uint32_t STATUS_FREQ_RANGE__40_100MHZ = 3;
9121
9122 // Crystal Oscillator pause control
9123 BEGIN_TYPE(DORMANT_t, uint32_t)
9124 // This is used to save power by pausing the XOSC On power-up this field is initialised to WAKE An invalid write will also select WAKE Warning: stop the PLLs before selecting dormant mode Warning: setup the irq before selecting dormant mode
9125 ADD_BITFIELD_RW(DORMANT, 0, 32)
9126 END_TYPE()
9127
9128 static const uint32_t DORMANT_DORMANT__dormant = 1668246881;
9129 static const uint32_t DORMANT_DORMANT__WAKE = 2002873189;
9130
9131 // Controls the startup delay
9132 // Reset value: 0x00000000
9133 BEGIN_TYPE(STARTUP_t, uint32_t)
9134 // Multiplies the startup_delay by 4, just in case. The reset value is controlled by a mask-programmable tiecell and is provided in case we are booting from XOSC and the default startup delay is insufficient. The reset value is 0x0.
9135 ADD_BITFIELD_RW(X4, 20, 1)
9136 // in multiples of 256*xtal_period. The reset value of 0xc4 corresponds to approx 50 000 cycles.
9137 ADD_BITFIELD_RW(DELAY, 0, 14)
9138 END_TYPE()
9139
9140 // A down counter running at the xosc frequency which counts to zero and stops. Can be used for short software pauses when setting up time sensitive hardware. To start the counter, write a non-zero value. Reads will return 1 while the count is running and 0 when it has finished. Minimum count value is 4. Count values <4 will be treated as count value =4. Note that synchronisation to the register clock domain costs 2 register clock cycles and the counter cannot compensate for that.
9141 // Reset value: 0x00000000
9142 BEGIN_TYPE(COUNT_t, uint32_t)
9143 ADD_BITFIELD_RW(COUNT, 0, 16)
9144 END_TYPE()
9145
9146 struct XOSC_t {
9147 CTRL_t CTRL;
9148 STATUS_t STATUS;
9149 DORMANT_t DORMANT;
9150 STARTUP_t STARTUP;
9151 COUNT_t COUNT;
9152 };
9153
9154 static XOSC_t & XOSC = (*(XOSC_t *)0x40048000);
9155 static XOSC_t & XOSC_XOR = (*(XOSC_t *)0x40049000);
9156 static XOSC_t & XOSC_SET = (*(XOSC_t *)0x4004a000);
9157 static XOSC_t & XOSC_CLR = (*(XOSC_t *)0x4004b000);
9158
9159} // _XOSC_
9160
9161namespace _PLL_SYS_ {
9162
9163 // Control and Status GENERAL CONSTRAINTS: Reference clock frequency min=5MHz, max=800MHz Feedback divider min=16, max=320 VCO frequency min=750MHz, max=1600MHz
9164 // Reset value: 0x00000001
9165 BEGIN_TYPE(CS_t, uint32_t)
9166 // PLL is locked
9167 ADD_BITFIELD_RO(LOCK, 31, 1)
9168 // PLL is not locked Ideally this is cleared when PLL lock is seen and this should never normally be set
9169 ADD_BITFIELD_RW(LOCK_N, 30, 1)
9170 // Passes the reference clock to the output instead of the divided VCO. The VCO continues to run so the user can switch between the reference clock and the divided VCO but the output will glitch when doing so.
9171 ADD_BITFIELD_RW(BYPASS, 8, 1)
9172 // Divides the PLL input reference clock. Behaviour is undefined for div=0. PLL output will be unpredictable during refdiv changes, wait for lock=1 before using it.
9173 ADD_BITFIELD_RW(REFDIV, 0, 6)
9174 END_TYPE()
9175
9176 // Controls the PLL power modes.
9177 // Reset value: 0x0000002d
9178 BEGIN_TYPE(PWR_t, uint32_t)
9179 // PLL VCO powerdown To save power set high when PLL output not required or bypass=1.
9180 ADD_BITFIELD_RW(VCOPD, 5, 1)
9181 // PLL post divider powerdown To save power set high when PLL output not required or bypass=1.
9182 ADD_BITFIELD_RW(POSTDIVPD, 3, 1)
9183 // PLL DSM powerdown Nothing is achieved by setting this low.
9184 ADD_BITFIELD_RW(DSMPD, 2, 1)
9185 // PLL powerdown To save power set high when PLL output not required.
9186 ADD_BITFIELD_RW(PD, 0, 1)
9187 END_TYPE()
9188
9189 // Feedback divisor (note: this PLL does not support fractional division)
9190 // Reset value: 0x00000000
9191 BEGIN_TYPE(FBDIV_INT_t, uint32_t)
9192 // see ctrl reg description for constraints
9193 ADD_BITFIELD_RW(FBDIV_INT, 0, 12)
9194 END_TYPE()
9195
9196 // Controls the PLL post dividers for the primary output (note: this PLL does not have a secondary output) the primary output is driven from VCO divided by postdiv1*postdiv2
9197 // Reset value: 0x00077000
9198 BEGIN_TYPE(PRIM_t, uint32_t)
9199 // divide by 1-7
9200 ADD_BITFIELD_RW(POSTDIV1, 16, 3)
9201 // divide by 1-7
9202 ADD_BITFIELD_RW(POSTDIV2, 12, 3)
9203 END_TYPE()
9204
9205 // Raw Interrupts
9206 // Reset value: 0x00000000
9207 BEGIN_TYPE(INTR_t, uint32_t)
9208 ADD_BITFIELD_RW(LOCK_N_STICKY, 0, 1)
9209 END_TYPE()
9210
9211 // Interrupt Enable
9212 // Reset value: 0x00000000
9213 BEGIN_TYPE(INTE_t, uint32_t)
9214 ADD_BITFIELD_RW(LOCK_N_STICKY, 0, 1)
9215 END_TYPE()
9216
9217 // Interrupt Force
9218 // Reset value: 0x00000000
9219 BEGIN_TYPE(INTF_t, uint32_t)
9220 ADD_BITFIELD_RW(LOCK_N_STICKY, 0, 1)
9221 END_TYPE()
9222
9223 // Interrupt status after masking & forcing
9224 // Reset value: 0x00000000
9225 BEGIN_TYPE(INTS_t, uint32_t)
9226 ADD_BITFIELD_RO(LOCK_N_STICKY, 0, 1)
9227 END_TYPE()
9228
9229 struct PLL_SYS_t {
9230 CS_t CS;
9231 PWR_t PWR;
9232 FBDIV_INT_t FBDIV_INT;
9233 PRIM_t PRIM;
9234 INTR_t INTR;
9235 INTE_t INTE;
9236 INTF_t INTF;
9237 INTS_t INTS;
9238 };
9239
9240 static PLL_SYS_t & PLL_SYS = (*(PLL_SYS_t *)0x40050000);
9241 static PLL_SYS_t & PLL_SYS_XOR = (*(PLL_SYS_t *)0x40051000);
9242 static PLL_SYS_t & PLL_SYS_SET = (*(PLL_SYS_t *)0x40052000);
9243 static PLL_SYS_t & PLL_SYS_CLR = (*(PLL_SYS_t *)0x40053000);
9244
9245} // _PLL_SYS_
9246
9247namespace _PLL_USB_ {
9248
9249 static _PLL_SYS_::PLL_SYS_t & PLL_USB = (*(_PLL_SYS_::PLL_SYS_t *)0x40058000);
9250 static _PLL_SYS_::PLL_SYS_t & PLL_USB_XOR = (*(_PLL_SYS_::PLL_SYS_t *)0x40059000);
9251 static _PLL_SYS_::PLL_SYS_t & PLL_USB_SET = (*(_PLL_SYS_::PLL_SYS_t *)0x4005a000);
9252 static _PLL_SYS_::PLL_SYS_t & PLL_USB_CLR = (*(_PLL_SYS_::PLL_SYS_t *)0x4005b000);
9253
9254} // _PLL_USB_
9255
9256// Hardware access control registers
9257namespace _ACCESSCTRL_ {
9258
9259 // Once a LOCK bit is written to 1, ACCESSCTRL silently ignores writes from that master. LOCK is writable only by a Secure, Privileged processor or debugger. LOCK bits are only writable when their value is zero. Once set, they can never be cleared, except by a full reset of ACCESSCTRL Setting the LOCK bit does not affect whether an access raises a bus error. Unprivileged writes, or writes from the DMA, will continue to raise bus errors. All other accesses will continue not to.
9260 // Reset value: 0x00000004
9261 BEGIN_TYPE(LOCK_t, uint32_t)
9262 ADD_BITFIELD_RW(DEBUG, 3, 1)
9263 ADD_BITFIELD_RO(DMA, 2, 1)
9264 ADD_BITFIELD_RW(CORE1, 1, 1)
9265 ADD_BITFIELD_RW(CORE0, 0, 1)
9266 END_TYPE()
9267
9268 // Force core 1's bus accesses to always be Non-secure, no matter the core's internal state. Useful for schemes where one core is designated as the Non-secure core, since some peripherals may filter individual registers internally based on security state but not on master ID.
9269 // Reset value: 0x00000000
9270 BEGIN_TYPE(FORCE_CORE_NS_t, uint32_t)
9271 ADD_BITFIELD_RW(CORE1, 1, 1)
9272 END_TYPE()
9273
9274 // Write 1 to reset all ACCESSCTRL configuration, except for the LOCK and FORCE_CORE_NS registers. This bit is used in the RP2350 bootrom to quickly restore ACCESSCTRL to a known state during the boot path. Note that, like all registers in ACCESSCTRL, this register is not writable when the writer's corresponding LOCK bit is set, therefore a master which has been locked out of ACCESSCTRL can not use the CFGRESET register to disturb its contents.
9275 // Reset value: 0x00000000
9276 BEGIN_TYPE(CFGRESET_t, uint32_t)
9277 ADD_BITFIELD_WO(CFGRESET, 0, 1)
9278 END_TYPE()
9279
9280 // Control whether GPIO0...31 are accessible to Non-secure code. Writable only by a Secure, Privileged processor or debugger. 0 -> Secure access only 1 -> Secure + Non-secure access
9281 // Reset value: 0x00000000
9282 BEGIN_TYPE(GPIO_NSMASK0_t, uint32_t)
9283 ADD_BITFIELD_RW(GPIO_NSMASK0, 0, 32)
9284 END_TYPE()
9285
9286 // Control whether GPIO32..47 are accessible to Non-secure code, and whether QSPI and USB bitbang are accessible through the Non-secure SIO. Writable only by a Secure, Privileged processor or debugger.
9287 // Reset value: 0x00000000
9288 BEGIN_TYPE(GPIO_NSMASK1_t, uint32_t)
9289 ADD_BITFIELD_RW(QSPI_SD, 28, 4)
9290 ADD_BITFIELD_RW(QSPI_CSN, 27, 1)
9291 ADD_BITFIELD_RW(QSPI_SCK, 26, 1)
9292 ADD_BITFIELD_RW(USB_DM, 25, 1)
9293 ADD_BITFIELD_RW(USB_DP, 24, 1)
9294 ADD_BITFIELD_RW(GPIO, 0, 16)
9295 END_TYPE()
9296
9297 // Control whether debugger, DMA, core 0 and core 1 can access ROM, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9298 // Reset value: 0x000000ff
9299 BEGIN_TYPE(ROM_t, uint32_t)
9300 // If 1, ROM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9301 ADD_BITFIELD_RW(DBG, 7, 1)
9302 // If 1, ROM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9303 ADD_BITFIELD_RW(DMA, 6, 1)
9304 // If 1, ROM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9305 ADD_BITFIELD_RW(CORE1, 5, 1)
9306 // If 1, ROM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9307 ADD_BITFIELD_RW(CORE0, 4, 1)
9308 // If 1, ROM can be accessed from a Secure, Privileged context.
9309 ADD_BITFIELD_RW(SP, 3, 1)
9310 // If 1, and SP is also set, ROM can be accessed from a Secure, Unprivileged context.
9311 ADD_BITFIELD_RW(SU, 2, 1)
9312 // If 1, ROM can be accessed from a Non-secure, Privileged context.
9313 ADD_BITFIELD_RW(NSP, 1, 1)
9314 // If 1, and NSP is also set, ROM can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9315 ADD_BITFIELD_RW(NSU, 0, 1)
9316 END_TYPE()
9317
9318 // Control whether debugger, DMA, core 0 and core 1 can access XIP_MAIN, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9319 // Reset value: 0x000000ff
9320 BEGIN_TYPE(XIP_MAIN_t, uint32_t)
9321 // If 1, XIP_MAIN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9322 ADD_BITFIELD_RW(DBG, 7, 1)
9323 // If 1, XIP_MAIN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9324 ADD_BITFIELD_RW(DMA, 6, 1)
9325 // If 1, XIP_MAIN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9326 ADD_BITFIELD_RW(CORE1, 5, 1)
9327 // If 1, XIP_MAIN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9328 ADD_BITFIELD_RW(CORE0, 4, 1)
9329 // If 1, XIP_MAIN can be accessed from a Secure, Privileged context.
9330 ADD_BITFIELD_RW(SP, 3, 1)
9331 // If 1, and SP is also set, XIP_MAIN can be accessed from a Secure, Unprivileged context.
9332 ADD_BITFIELD_RW(SU, 2, 1)
9333 // If 1, XIP_MAIN can be accessed from a Non-secure, Privileged context.
9334 ADD_BITFIELD_RW(NSP, 1, 1)
9335 // If 1, and NSP is also set, XIP_MAIN can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9336 ADD_BITFIELD_RW(NSU, 0, 1)
9337 END_TYPE()
9338
9339 // Control whether debugger, DMA, core 0 and core 1 can access SRAM0, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9340 // Reset value: 0x000000ff
9341 BEGIN_TYPE(SRAM0_t, uint32_t)
9342 // If 1, SRAM0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9343 ADD_BITFIELD_RW(DBG, 7, 1)
9344 // If 1, SRAM0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9345 ADD_BITFIELD_RW(DMA, 6, 1)
9346 // If 1, SRAM0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9347 ADD_BITFIELD_RW(CORE1, 5, 1)
9348 // If 1, SRAM0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9349 ADD_BITFIELD_RW(CORE0, 4, 1)
9350 // If 1, SRAM0 can be accessed from a Secure, Privileged context.
9351 ADD_BITFIELD_RW(SP, 3, 1)
9352 // If 1, and SP is also set, SRAM0 can be accessed from a Secure, Unprivileged context.
9353 ADD_BITFIELD_RW(SU, 2, 1)
9354 // If 1, SRAM0 can be accessed from a Non-secure, Privileged context.
9355 ADD_BITFIELD_RW(NSP, 1, 1)
9356 // If 1, and NSP is also set, SRAM0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9357 ADD_BITFIELD_RW(NSU, 0, 1)
9358 END_TYPE()
9359
9360 // Control whether debugger, DMA, core 0 and core 1 can access SRAM1, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9361 // Reset value: 0x000000ff
9362 BEGIN_TYPE(SRAM1_t, uint32_t)
9363 // If 1, SRAM1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9364 ADD_BITFIELD_RW(DBG, 7, 1)
9365 // If 1, SRAM1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9366 ADD_BITFIELD_RW(DMA, 6, 1)
9367 // If 1, SRAM1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9368 ADD_BITFIELD_RW(CORE1, 5, 1)
9369 // If 1, SRAM1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9370 ADD_BITFIELD_RW(CORE0, 4, 1)
9371 // If 1, SRAM1 can be accessed from a Secure, Privileged context.
9372 ADD_BITFIELD_RW(SP, 3, 1)
9373 // If 1, and SP is also set, SRAM1 can be accessed from a Secure, Unprivileged context.
9374 ADD_BITFIELD_RW(SU, 2, 1)
9375 // If 1, SRAM1 can be accessed from a Non-secure, Privileged context.
9376 ADD_BITFIELD_RW(NSP, 1, 1)
9377 // If 1, and NSP is also set, SRAM1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9378 ADD_BITFIELD_RW(NSU, 0, 1)
9379 END_TYPE()
9380
9381 // Control whether debugger, DMA, core 0 and core 1 can access SRAM2, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9382 // Reset value: 0x000000ff
9383 BEGIN_TYPE(SRAM2_t, uint32_t)
9384 // If 1, SRAM2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9385 ADD_BITFIELD_RW(DBG, 7, 1)
9386 // If 1, SRAM2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9387 ADD_BITFIELD_RW(DMA, 6, 1)
9388 // If 1, SRAM2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9389 ADD_BITFIELD_RW(CORE1, 5, 1)
9390 // If 1, SRAM2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9391 ADD_BITFIELD_RW(CORE0, 4, 1)
9392 // If 1, SRAM2 can be accessed from a Secure, Privileged context.
9393 ADD_BITFIELD_RW(SP, 3, 1)
9394 // If 1, and SP is also set, SRAM2 can be accessed from a Secure, Unprivileged context.
9395 ADD_BITFIELD_RW(SU, 2, 1)
9396 // If 1, SRAM2 can be accessed from a Non-secure, Privileged context.
9397 ADD_BITFIELD_RW(NSP, 1, 1)
9398 // If 1, and NSP is also set, SRAM2 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9399 ADD_BITFIELD_RW(NSU, 0, 1)
9400 END_TYPE()
9401
9402 // Control whether debugger, DMA, core 0 and core 1 can access SRAM3, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9403 // Reset value: 0x000000ff
9404 BEGIN_TYPE(SRAM3_t, uint32_t)
9405 // If 1, SRAM3 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9406 ADD_BITFIELD_RW(DBG, 7, 1)
9407 // If 1, SRAM3 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9408 ADD_BITFIELD_RW(DMA, 6, 1)
9409 // If 1, SRAM3 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9410 ADD_BITFIELD_RW(CORE1, 5, 1)
9411 // If 1, SRAM3 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9412 ADD_BITFIELD_RW(CORE0, 4, 1)
9413 // If 1, SRAM3 can be accessed from a Secure, Privileged context.
9414 ADD_BITFIELD_RW(SP, 3, 1)
9415 // If 1, and SP is also set, SRAM3 can be accessed from a Secure, Unprivileged context.
9416 ADD_BITFIELD_RW(SU, 2, 1)
9417 // If 1, SRAM3 can be accessed from a Non-secure, Privileged context.
9418 ADD_BITFIELD_RW(NSP, 1, 1)
9419 // If 1, and NSP is also set, SRAM3 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9420 ADD_BITFIELD_RW(NSU, 0, 1)
9421 END_TYPE()
9422
9423 // Control whether debugger, DMA, core 0 and core 1 can access SRAM4, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9424 // Reset value: 0x000000ff
9425 BEGIN_TYPE(SRAM4_t, uint32_t)
9426 // If 1, SRAM4 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9427 ADD_BITFIELD_RW(DBG, 7, 1)
9428 // If 1, SRAM4 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9429 ADD_BITFIELD_RW(DMA, 6, 1)
9430 // If 1, SRAM4 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9431 ADD_BITFIELD_RW(CORE1, 5, 1)
9432 // If 1, SRAM4 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9433 ADD_BITFIELD_RW(CORE0, 4, 1)
9434 // If 1, SRAM4 can be accessed from a Secure, Privileged context.
9435 ADD_BITFIELD_RW(SP, 3, 1)
9436 // If 1, and SP is also set, SRAM4 can be accessed from a Secure, Unprivileged context.
9437 ADD_BITFIELD_RW(SU, 2, 1)
9438 // If 1, SRAM4 can be accessed from a Non-secure, Privileged context.
9439 ADD_BITFIELD_RW(NSP, 1, 1)
9440 // If 1, and NSP is also set, SRAM4 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9441 ADD_BITFIELD_RW(NSU, 0, 1)
9442 END_TYPE()
9443
9444 // Control whether debugger, DMA, core 0 and core 1 can access SRAM5, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9445 // Reset value: 0x000000ff
9446 BEGIN_TYPE(SRAM5_t, uint32_t)
9447 // If 1, SRAM5 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9448 ADD_BITFIELD_RW(DBG, 7, 1)
9449 // If 1, SRAM5 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9450 ADD_BITFIELD_RW(DMA, 6, 1)
9451 // If 1, SRAM5 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9452 ADD_BITFIELD_RW(CORE1, 5, 1)
9453 // If 1, SRAM5 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9454 ADD_BITFIELD_RW(CORE0, 4, 1)
9455 // If 1, SRAM5 can be accessed from a Secure, Privileged context.
9456 ADD_BITFIELD_RW(SP, 3, 1)
9457 // If 1, and SP is also set, SRAM5 can be accessed from a Secure, Unprivileged context.
9458 ADD_BITFIELD_RW(SU, 2, 1)
9459 // If 1, SRAM5 can be accessed from a Non-secure, Privileged context.
9460 ADD_BITFIELD_RW(NSP, 1, 1)
9461 // If 1, and NSP is also set, SRAM5 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9462 ADD_BITFIELD_RW(NSU, 0, 1)
9463 END_TYPE()
9464
9465 // Control whether debugger, DMA, core 0 and core 1 can access SRAM6, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9466 // Reset value: 0x000000ff
9467 BEGIN_TYPE(SRAM6_t, uint32_t)
9468 // If 1, SRAM6 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9469 ADD_BITFIELD_RW(DBG, 7, 1)
9470 // If 1, SRAM6 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9471 ADD_BITFIELD_RW(DMA, 6, 1)
9472 // If 1, SRAM6 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9473 ADD_BITFIELD_RW(CORE1, 5, 1)
9474 // If 1, SRAM6 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9475 ADD_BITFIELD_RW(CORE0, 4, 1)
9476 // If 1, SRAM6 can be accessed from a Secure, Privileged context.
9477 ADD_BITFIELD_RW(SP, 3, 1)
9478 // If 1, and SP is also set, SRAM6 can be accessed from a Secure, Unprivileged context.
9479 ADD_BITFIELD_RW(SU, 2, 1)
9480 // If 1, SRAM6 can be accessed from a Non-secure, Privileged context.
9481 ADD_BITFIELD_RW(NSP, 1, 1)
9482 // If 1, and NSP is also set, SRAM6 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9483 ADD_BITFIELD_RW(NSU, 0, 1)
9484 END_TYPE()
9485
9486 // Control whether debugger, DMA, core 0 and core 1 can access SRAM7, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9487 // Reset value: 0x000000ff
9488 BEGIN_TYPE(SRAM7_t, uint32_t)
9489 // If 1, SRAM7 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9490 ADD_BITFIELD_RW(DBG, 7, 1)
9491 // If 1, SRAM7 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9492 ADD_BITFIELD_RW(DMA, 6, 1)
9493 // If 1, SRAM7 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9494 ADD_BITFIELD_RW(CORE1, 5, 1)
9495 // If 1, SRAM7 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9496 ADD_BITFIELD_RW(CORE0, 4, 1)
9497 // If 1, SRAM7 can be accessed from a Secure, Privileged context.
9498 ADD_BITFIELD_RW(SP, 3, 1)
9499 // If 1, and SP is also set, SRAM7 can be accessed from a Secure, Unprivileged context.
9500 ADD_BITFIELD_RW(SU, 2, 1)
9501 // If 1, SRAM7 can be accessed from a Non-secure, Privileged context.
9502 ADD_BITFIELD_RW(NSP, 1, 1)
9503 // If 1, and NSP is also set, SRAM7 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9504 ADD_BITFIELD_RW(NSU, 0, 1)
9505 END_TYPE()
9506
9507 // Control whether debugger, DMA, core 0 and core 1 can access SRAM8, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9508 // Reset value: 0x000000ff
9509 BEGIN_TYPE(SRAM8_t, uint32_t)
9510 // If 1, SRAM8 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9511 ADD_BITFIELD_RW(DBG, 7, 1)
9512 // If 1, SRAM8 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9513 ADD_BITFIELD_RW(DMA, 6, 1)
9514 // If 1, SRAM8 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9515 ADD_BITFIELD_RW(CORE1, 5, 1)
9516 // If 1, SRAM8 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9517 ADD_BITFIELD_RW(CORE0, 4, 1)
9518 // If 1, SRAM8 can be accessed from a Secure, Privileged context.
9519 ADD_BITFIELD_RW(SP, 3, 1)
9520 // If 1, and SP is also set, SRAM8 can be accessed from a Secure, Unprivileged context.
9521 ADD_BITFIELD_RW(SU, 2, 1)
9522 // If 1, SRAM8 can be accessed from a Non-secure, Privileged context.
9523 ADD_BITFIELD_RW(NSP, 1, 1)
9524 // If 1, and NSP is also set, SRAM8 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9525 ADD_BITFIELD_RW(NSU, 0, 1)
9526 END_TYPE()
9527
9528 // Control whether debugger, DMA, core 0 and core 1 can access SRAM9, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9529 // Reset value: 0x000000ff
9530 BEGIN_TYPE(SRAM9_t, uint32_t)
9531 // If 1, SRAM9 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9532 ADD_BITFIELD_RW(DBG, 7, 1)
9533 // If 1, SRAM9 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9534 ADD_BITFIELD_RW(DMA, 6, 1)
9535 // If 1, SRAM9 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9536 ADD_BITFIELD_RW(CORE1, 5, 1)
9537 // If 1, SRAM9 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9538 ADD_BITFIELD_RW(CORE0, 4, 1)
9539 // If 1, SRAM9 can be accessed from a Secure, Privileged context.
9540 ADD_BITFIELD_RW(SP, 3, 1)
9541 // If 1, and SP is also set, SRAM9 can be accessed from a Secure, Unprivileged context.
9542 ADD_BITFIELD_RW(SU, 2, 1)
9543 // If 1, SRAM9 can be accessed from a Non-secure, Privileged context.
9544 ADD_BITFIELD_RW(NSP, 1, 1)
9545 // If 1, and NSP is also set, SRAM9 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9546 ADD_BITFIELD_RW(NSU, 0, 1)
9547 END_TYPE()
9548
9549 // Control whether debugger, DMA, core 0 and core 1 can access DMA, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9550 // Reset value: 0x000000fc
9551 BEGIN_TYPE(DMA_t, uint32_t)
9552 // If 1, DMA can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9553 ADD_BITFIELD_RW(DBG, 7, 1)
9554 // If 1, DMA can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9555 ADD_BITFIELD_RW(DMA, 6, 1)
9556 // If 1, DMA can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9557 ADD_BITFIELD_RW(CORE1, 5, 1)
9558 // If 1, DMA can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9559 ADD_BITFIELD_RW(CORE0, 4, 1)
9560 // If 1, DMA can be accessed from a Secure, Privileged context.
9561 ADD_BITFIELD_RW(SP, 3, 1)
9562 // If 1, and SP is also set, DMA can be accessed from a Secure, Unprivileged context.
9563 ADD_BITFIELD_RW(SU, 2, 1)
9564 // If 1, DMA can be accessed from a Non-secure, Privileged context.
9565 ADD_BITFIELD_RW(NSP, 1, 1)
9566 // If 1, and NSP is also set, DMA can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9567 ADD_BITFIELD_RW(NSU, 0, 1)
9568 END_TYPE()
9569
9570 // Control whether debugger, DMA, core 0 and core 1 can access USBCTRL, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9571 // Reset value: 0x000000fc
9572 BEGIN_TYPE(USBCTRL_t, uint32_t)
9573 // If 1, USBCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9574 ADD_BITFIELD_RW(DBG, 7, 1)
9575 // If 1, USBCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9576 ADD_BITFIELD_RW(DMA, 6, 1)
9577 // If 1, USBCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9578 ADD_BITFIELD_RW(CORE1, 5, 1)
9579 // If 1, USBCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9580 ADD_BITFIELD_RW(CORE0, 4, 1)
9581 // If 1, USBCTRL can be accessed from a Secure, Privileged context.
9582 ADD_BITFIELD_RW(SP, 3, 1)
9583 // If 1, and SP is also set, USBCTRL can be accessed from a Secure, Unprivileged context.
9584 ADD_BITFIELD_RW(SU, 2, 1)
9585 // If 1, USBCTRL can be accessed from a Non-secure, Privileged context.
9586 ADD_BITFIELD_RW(NSP, 1, 1)
9587 // If 1, and NSP is also set, USBCTRL can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9588 ADD_BITFIELD_RW(NSU, 0, 1)
9589 END_TYPE()
9590
9591 // Control whether debugger, DMA, core 0 and core 1 can access PIO0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9592 // Reset value: 0x000000fc
9593 BEGIN_TYPE(PIO0_t, uint32_t)
9594 // If 1, PIO0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9595 ADD_BITFIELD_RW(DBG, 7, 1)
9596 // If 1, PIO0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9597 ADD_BITFIELD_RW(DMA, 6, 1)
9598 // If 1, PIO0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9599 ADD_BITFIELD_RW(CORE1, 5, 1)
9600 // If 1, PIO0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9601 ADD_BITFIELD_RW(CORE0, 4, 1)
9602 // If 1, PIO0 can be accessed from a Secure, Privileged context.
9603 ADD_BITFIELD_RW(SP, 3, 1)
9604 // If 1, and SP is also set, PIO0 can be accessed from a Secure, Unprivileged context.
9605 ADD_BITFIELD_RW(SU, 2, 1)
9606 // If 1, PIO0 can be accessed from a Non-secure, Privileged context.
9607 ADD_BITFIELD_RW(NSP, 1, 1)
9608 // If 1, and NSP is also set, PIO0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9609 ADD_BITFIELD_RW(NSU, 0, 1)
9610 END_TYPE()
9611
9612 // Control whether debugger, DMA, core 0 and core 1 can access PIO1, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9613 // Reset value: 0x000000fc
9614 BEGIN_TYPE(PIO1_t, uint32_t)
9615 // If 1, PIO1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9616 ADD_BITFIELD_RW(DBG, 7, 1)
9617 // If 1, PIO1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9618 ADD_BITFIELD_RW(DMA, 6, 1)
9619 // If 1, PIO1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9620 ADD_BITFIELD_RW(CORE1, 5, 1)
9621 // If 1, PIO1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9622 ADD_BITFIELD_RW(CORE0, 4, 1)
9623 // If 1, PIO1 can be accessed from a Secure, Privileged context.
9624 ADD_BITFIELD_RW(SP, 3, 1)
9625 // If 1, and SP is also set, PIO1 can be accessed from a Secure, Unprivileged context.
9626 ADD_BITFIELD_RW(SU, 2, 1)
9627 // If 1, PIO1 can be accessed from a Non-secure, Privileged context.
9628 ADD_BITFIELD_RW(NSP, 1, 1)
9629 // If 1, and NSP is also set, PIO1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9630 ADD_BITFIELD_RW(NSU, 0, 1)
9631 END_TYPE()
9632
9633 // Control whether debugger, DMA, core 0 and core 1 can access PIO2, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9634 // Reset value: 0x000000fc
9635 BEGIN_TYPE(PIO2_t, uint32_t)
9636 // If 1, PIO2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9637 ADD_BITFIELD_RW(DBG, 7, 1)
9638 // If 1, PIO2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9639 ADD_BITFIELD_RW(DMA, 6, 1)
9640 // If 1, PIO2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9641 ADD_BITFIELD_RW(CORE1, 5, 1)
9642 // If 1, PIO2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9643 ADD_BITFIELD_RW(CORE0, 4, 1)
9644 // If 1, PIO2 can be accessed from a Secure, Privileged context.
9645 ADD_BITFIELD_RW(SP, 3, 1)
9646 // If 1, and SP is also set, PIO2 can be accessed from a Secure, Unprivileged context.
9647 ADD_BITFIELD_RW(SU, 2, 1)
9648 // If 1, PIO2 can be accessed from a Non-secure, Privileged context.
9649 ADD_BITFIELD_RW(NSP, 1, 1)
9650 // If 1, and NSP is also set, PIO2 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9651 ADD_BITFIELD_RW(NSU, 0, 1)
9652 END_TYPE()
9653
9654 // Control whether debugger, DMA, core 0 and core 1 can access CORESIGHT_TRACE, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9655 // Reset value: 0x000000b8
9656 BEGIN_TYPE(CORESIGHT_TRACE_t, uint32_t)
9657 // If 1, CORESIGHT_TRACE can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9658 ADD_BITFIELD_RW(DBG, 7, 1)
9659 // If 1, CORESIGHT_TRACE can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9660 ADD_BITFIELD_RW(DMA, 6, 1)
9661 // If 1, CORESIGHT_TRACE can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9662 ADD_BITFIELD_RW(CORE1, 5, 1)
9663 // If 1, CORESIGHT_TRACE can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9664 ADD_BITFIELD_RW(CORE0, 4, 1)
9665 // If 1, CORESIGHT_TRACE can be accessed from a Secure, Privileged context.
9666 ADD_BITFIELD_RW(SP, 3, 1)
9667 // If 1, and SP is also set, CORESIGHT_TRACE can be accessed from a Secure, Unprivileged context.
9668 ADD_BITFIELD_RW(SU, 2, 1)
9669 // If 1, CORESIGHT_TRACE can be accessed from a Non-secure, Privileged context.
9670 ADD_BITFIELD_RW(NSP, 1, 1)
9671 // If 1, and NSP is also set, CORESIGHT_TRACE can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9672 ADD_BITFIELD_RW(NSU, 0, 1)
9673 END_TYPE()
9674
9675 // Control whether debugger, DMA, core 0 and core 1 can access CORESIGHT_PERIPH, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9676 // Reset value: 0x000000b8
9677 BEGIN_TYPE(CORESIGHT_PERIPH_t, uint32_t)
9678 // If 1, CORESIGHT_PERIPH can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9679 ADD_BITFIELD_RW(DBG, 7, 1)
9680 // If 1, CORESIGHT_PERIPH can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9681 ADD_BITFIELD_RW(DMA, 6, 1)
9682 // If 1, CORESIGHT_PERIPH can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9683 ADD_BITFIELD_RW(CORE1, 5, 1)
9684 // If 1, CORESIGHT_PERIPH can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9685 ADD_BITFIELD_RW(CORE0, 4, 1)
9686 // If 1, CORESIGHT_PERIPH can be accessed from a Secure, Privileged context.
9687 ADD_BITFIELD_RW(SP, 3, 1)
9688 // If 1, and SP is also set, CORESIGHT_PERIPH can be accessed from a Secure, Unprivileged context.
9689 ADD_BITFIELD_RW(SU, 2, 1)
9690 // If 1, CORESIGHT_PERIPH can be accessed from a Non-secure, Privileged context.
9691 ADD_BITFIELD_RW(NSP, 1, 1)
9692 // If 1, and NSP is also set, CORESIGHT_PERIPH can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9693 ADD_BITFIELD_RW(NSU, 0, 1)
9694 END_TYPE()
9695
9696 // Control whether debugger, DMA, core 0 and core 1 can access SYSINFO, and at what security/privilege levels they can do so. Defaults to fully open access. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9697 // Reset value: 0x000000ff
9698 BEGIN_TYPE(SYSINFO_t, uint32_t)
9699 // If 1, SYSINFO can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9700 ADD_BITFIELD_RW(DBG, 7, 1)
9701 // If 1, SYSINFO can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9702 ADD_BITFIELD_RW(DMA, 6, 1)
9703 // If 1, SYSINFO can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9704 ADD_BITFIELD_RW(CORE1, 5, 1)
9705 // If 1, SYSINFO can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9706 ADD_BITFIELD_RW(CORE0, 4, 1)
9707 // If 1, SYSINFO can be accessed from a Secure, Privileged context.
9708 ADD_BITFIELD_RW(SP, 3, 1)
9709 // If 1, and SP is also set, SYSINFO can be accessed from a Secure, Unprivileged context.
9710 ADD_BITFIELD_RW(SU, 2, 1)
9711 // If 1, SYSINFO can be accessed from a Non-secure, Privileged context.
9712 ADD_BITFIELD_RW(NSP, 1, 1)
9713 // If 1, and NSP is also set, SYSINFO can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9714 ADD_BITFIELD_RW(NSU, 0, 1)
9715 END_TYPE()
9716
9717 // Control whether debugger, DMA, core 0 and core 1 can access RESETS, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9718 // Reset value: 0x000000fc
9719 BEGIN_TYPE(RESETS_t, uint32_t)
9720 // If 1, RESETS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9721 ADD_BITFIELD_RW(DBG, 7, 1)
9722 // If 1, RESETS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9723 ADD_BITFIELD_RW(DMA, 6, 1)
9724 // If 1, RESETS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9725 ADD_BITFIELD_RW(CORE1, 5, 1)
9726 // If 1, RESETS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9727 ADD_BITFIELD_RW(CORE0, 4, 1)
9728 // If 1, RESETS can be accessed from a Secure, Privileged context.
9729 ADD_BITFIELD_RW(SP, 3, 1)
9730 // If 1, and SP is also set, RESETS can be accessed from a Secure, Unprivileged context.
9731 ADD_BITFIELD_RW(SU, 2, 1)
9732 // If 1, RESETS can be accessed from a Non-secure, Privileged context.
9733 ADD_BITFIELD_RW(NSP, 1, 1)
9734 // If 1, and NSP is also set, RESETS can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9735 ADD_BITFIELD_RW(NSU, 0, 1)
9736 END_TYPE()
9737
9738 // Control whether debugger, DMA, core 0 and core 1 can access IO_BANK0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9739 // Reset value: 0x000000fc
9740 BEGIN_TYPE(IO_BANK0_t, uint32_t)
9741 // If 1, IO_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9742 ADD_BITFIELD_RW(DBG, 7, 1)
9743 // If 1, IO_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9744 ADD_BITFIELD_RW(DMA, 6, 1)
9745 // If 1, IO_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9746 ADD_BITFIELD_RW(CORE1, 5, 1)
9747 // If 1, IO_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9748 ADD_BITFIELD_RW(CORE0, 4, 1)
9749 // If 1, IO_BANK0 can be accessed from a Secure, Privileged context.
9750 ADD_BITFIELD_RW(SP, 3, 1)
9751 // If 1, and SP is also set, IO_BANK0 can be accessed from a Secure, Unprivileged context.
9752 ADD_BITFIELD_RW(SU, 2, 1)
9753 // If 1, IO_BANK0 can be accessed from a Non-secure, Privileged context.
9754 ADD_BITFIELD_RW(NSP, 1, 1)
9755 // If 1, and NSP is also set, IO_BANK0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9756 ADD_BITFIELD_RW(NSU, 0, 1)
9757 END_TYPE()
9758
9759 // Control whether debugger, DMA, core 0 and core 1 can access IO_BANK1, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9760 // Reset value: 0x000000fc
9761 BEGIN_TYPE(IO_BANK1_t, uint32_t)
9762 // If 1, IO_BANK1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9763 ADD_BITFIELD_RW(DBG, 7, 1)
9764 // If 1, IO_BANK1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9765 ADD_BITFIELD_RW(DMA, 6, 1)
9766 // If 1, IO_BANK1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9767 ADD_BITFIELD_RW(CORE1, 5, 1)
9768 // If 1, IO_BANK1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9769 ADD_BITFIELD_RW(CORE0, 4, 1)
9770 // If 1, IO_BANK1 can be accessed from a Secure, Privileged context.
9771 ADD_BITFIELD_RW(SP, 3, 1)
9772 // If 1, and SP is also set, IO_BANK1 can be accessed from a Secure, Unprivileged context.
9773 ADD_BITFIELD_RW(SU, 2, 1)
9774 // If 1, IO_BANK1 can be accessed from a Non-secure, Privileged context.
9775 ADD_BITFIELD_RW(NSP, 1, 1)
9776 // If 1, and NSP is also set, IO_BANK1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9777 ADD_BITFIELD_RW(NSU, 0, 1)
9778 END_TYPE()
9779
9780 // Control whether debugger, DMA, core 0 and core 1 can access PADS_BANK0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9781 // Reset value: 0x000000fc
9782 BEGIN_TYPE(PADS_BANK0_t, uint32_t)
9783 // If 1, PADS_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9784 ADD_BITFIELD_RW(DBG, 7, 1)
9785 // If 1, PADS_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9786 ADD_BITFIELD_RW(DMA, 6, 1)
9787 // If 1, PADS_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9788 ADD_BITFIELD_RW(CORE1, 5, 1)
9789 // If 1, PADS_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9790 ADD_BITFIELD_RW(CORE0, 4, 1)
9791 // If 1, PADS_BANK0 can be accessed from a Secure, Privileged context.
9792 ADD_BITFIELD_RW(SP, 3, 1)
9793 // If 1, and SP is also set, PADS_BANK0 can be accessed from a Secure, Unprivileged context.
9794 ADD_BITFIELD_RW(SU, 2, 1)
9795 // If 1, PADS_BANK0 can be accessed from a Non-secure, Privileged context.
9796 ADD_BITFIELD_RW(NSP, 1, 1)
9797 // If 1, and NSP is also set, PADS_BANK0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9798 ADD_BITFIELD_RW(NSU, 0, 1)
9799 END_TYPE()
9800
9801 // Control whether debugger, DMA, core 0 and core 1 can access PADS_QSPI, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9802 // Reset value: 0x000000fc
9803 BEGIN_TYPE(PADS_QSPI_t, uint32_t)
9804 // If 1, PADS_QSPI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9805 ADD_BITFIELD_RW(DBG, 7, 1)
9806 // If 1, PADS_QSPI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9807 ADD_BITFIELD_RW(DMA, 6, 1)
9808 // If 1, PADS_QSPI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9809 ADD_BITFIELD_RW(CORE1, 5, 1)
9810 // If 1, PADS_QSPI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9811 ADD_BITFIELD_RW(CORE0, 4, 1)
9812 // If 1, PADS_QSPI can be accessed from a Secure, Privileged context.
9813 ADD_BITFIELD_RW(SP, 3, 1)
9814 // If 1, and SP is also set, PADS_QSPI can be accessed from a Secure, Unprivileged context.
9815 ADD_BITFIELD_RW(SU, 2, 1)
9816 // If 1, PADS_QSPI can be accessed from a Non-secure, Privileged context.
9817 ADD_BITFIELD_RW(NSP, 1, 1)
9818 // If 1, and NSP is also set, PADS_QSPI can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9819 ADD_BITFIELD_RW(NSU, 0, 1)
9820 END_TYPE()
9821
9822 // Control whether debugger, DMA, core 0 and core 1 can access BUSCTRL, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9823 // Reset value: 0x000000fc
9824 BEGIN_TYPE(BUSCTRL_t, uint32_t)
9825 // If 1, BUSCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9826 ADD_BITFIELD_RW(DBG, 7, 1)
9827 // If 1, BUSCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9828 ADD_BITFIELD_RW(DMA, 6, 1)
9829 // If 1, BUSCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9830 ADD_BITFIELD_RW(CORE1, 5, 1)
9831 // If 1, BUSCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9832 ADD_BITFIELD_RW(CORE0, 4, 1)
9833 // If 1, BUSCTRL can be accessed from a Secure, Privileged context.
9834 ADD_BITFIELD_RW(SP, 3, 1)
9835 // If 1, and SP is also set, BUSCTRL can be accessed from a Secure, Unprivileged context.
9836 ADD_BITFIELD_RW(SU, 2, 1)
9837 // If 1, BUSCTRL can be accessed from a Non-secure, Privileged context.
9838 ADD_BITFIELD_RW(NSP, 1, 1)
9839 // If 1, and NSP is also set, BUSCTRL can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9840 ADD_BITFIELD_RW(NSU, 0, 1)
9841 END_TYPE()
9842
9843 // Control whether debugger, DMA, core 0 and core 1 can access ADC0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9844 // Reset value: 0x000000fc
9845 BEGIN_TYPE(ADC0_t, uint32_t)
9846 // If 1, ADC0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9847 ADD_BITFIELD_RW(DBG, 7, 1)
9848 // If 1, ADC0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9849 ADD_BITFIELD_RW(DMA, 6, 1)
9850 // If 1, ADC0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9851 ADD_BITFIELD_RW(CORE1, 5, 1)
9852 // If 1, ADC0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9853 ADD_BITFIELD_RW(CORE0, 4, 1)
9854 // If 1, ADC0 can be accessed from a Secure, Privileged context.
9855 ADD_BITFIELD_RW(SP, 3, 1)
9856 // If 1, and SP is also set, ADC0 can be accessed from a Secure, Unprivileged context.
9857 ADD_BITFIELD_RW(SU, 2, 1)
9858 // If 1, ADC0 can be accessed from a Non-secure, Privileged context.
9859 ADD_BITFIELD_RW(NSP, 1, 1)
9860 // If 1, and NSP is also set, ADC0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9861 ADD_BITFIELD_RW(NSU, 0, 1)
9862 END_TYPE()
9863
9864 // Control whether debugger, DMA, core 0 and core 1 can access HSTX, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9865 // Reset value: 0x000000fc
9866 BEGIN_TYPE(HSTX_t, uint32_t)
9867 // If 1, HSTX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9868 ADD_BITFIELD_RW(DBG, 7, 1)
9869 // If 1, HSTX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9870 ADD_BITFIELD_RW(DMA, 6, 1)
9871 // If 1, HSTX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9872 ADD_BITFIELD_RW(CORE1, 5, 1)
9873 // If 1, HSTX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9874 ADD_BITFIELD_RW(CORE0, 4, 1)
9875 // If 1, HSTX can be accessed from a Secure, Privileged context.
9876 ADD_BITFIELD_RW(SP, 3, 1)
9877 // If 1, and SP is also set, HSTX can be accessed from a Secure, Unprivileged context.
9878 ADD_BITFIELD_RW(SU, 2, 1)
9879 // If 1, HSTX can be accessed from a Non-secure, Privileged context.
9880 ADD_BITFIELD_RW(NSP, 1, 1)
9881 // If 1, and NSP is also set, HSTX can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9882 ADD_BITFIELD_RW(NSU, 0, 1)
9883 END_TYPE()
9884
9885 // Control whether debugger, DMA, core 0 and core 1 can access I2C0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9886 // Reset value: 0x000000fc
9887 BEGIN_TYPE(I2C0_t, uint32_t)
9888 // If 1, I2C0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9889 ADD_BITFIELD_RW(DBG, 7, 1)
9890 // If 1, I2C0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9891 ADD_BITFIELD_RW(DMA, 6, 1)
9892 // If 1, I2C0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9893 ADD_BITFIELD_RW(CORE1, 5, 1)
9894 // If 1, I2C0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9895 ADD_BITFIELD_RW(CORE0, 4, 1)
9896 // If 1, I2C0 can be accessed from a Secure, Privileged context.
9897 ADD_BITFIELD_RW(SP, 3, 1)
9898 // If 1, and SP is also set, I2C0 can be accessed from a Secure, Unprivileged context.
9899 ADD_BITFIELD_RW(SU, 2, 1)
9900 // If 1, I2C0 can be accessed from a Non-secure, Privileged context.
9901 ADD_BITFIELD_RW(NSP, 1, 1)
9902 // If 1, and NSP is also set, I2C0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9903 ADD_BITFIELD_RW(NSU, 0, 1)
9904 END_TYPE()
9905
9906 // Control whether debugger, DMA, core 0 and core 1 can access I2C1, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9907 // Reset value: 0x000000fc
9908 BEGIN_TYPE(I2C1_t, uint32_t)
9909 // If 1, I2C1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9910 ADD_BITFIELD_RW(DBG, 7, 1)
9911 // If 1, I2C1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9912 ADD_BITFIELD_RW(DMA, 6, 1)
9913 // If 1, I2C1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9914 ADD_BITFIELD_RW(CORE1, 5, 1)
9915 // If 1, I2C1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9916 ADD_BITFIELD_RW(CORE0, 4, 1)
9917 // If 1, I2C1 can be accessed from a Secure, Privileged context.
9918 ADD_BITFIELD_RW(SP, 3, 1)
9919 // If 1, and SP is also set, I2C1 can be accessed from a Secure, Unprivileged context.
9920 ADD_BITFIELD_RW(SU, 2, 1)
9921 // If 1, I2C1 can be accessed from a Non-secure, Privileged context.
9922 ADD_BITFIELD_RW(NSP, 1, 1)
9923 // If 1, and NSP is also set, I2C1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9924 ADD_BITFIELD_RW(NSU, 0, 1)
9925 END_TYPE()
9926
9927 // Control whether debugger, DMA, core 0 and core 1 can access PWM, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9928 // Reset value: 0x000000fc
9929 BEGIN_TYPE(PWM_t, uint32_t)
9930 // If 1, PWM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9931 ADD_BITFIELD_RW(DBG, 7, 1)
9932 // If 1, PWM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9933 ADD_BITFIELD_RW(DMA, 6, 1)
9934 // If 1, PWM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9935 ADD_BITFIELD_RW(CORE1, 5, 1)
9936 // If 1, PWM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9937 ADD_BITFIELD_RW(CORE0, 4, 1)
9938 // If 1, PWM can be accessed from a Secure, Privileged context.
9939 ADD_BITFIELD_RW(SP, 3, 1)
9940 // If 1, and SP is also set, PWM can be accessed from a Secure, Unprivileged context.
9941 ADD_BITFIELD_RW(SU, 2, 1)
9942 // If 1, PWM can be accessed from a Non-secure, Privileged context.
9943 ADD_BITFIELD_RW(NSP, 1, 1)
9944 // If 1, and NSP is also set, PWM can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9945 ADD_BITFIELD_RW(NSU, 0, 1)
9946 END_TYPE()
9947
9948 // Control whether debugger, DMA, core 0 and core 1 can access SPI0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9949 // Reset value: 0x000000fc
9950 BEGIN_TYPE(SPI0_t, uint32_t)
9951 // If 1, SPI0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9952 ADD_BITFIELD_RW(DBG, 7, 1)
9953 // If 1, SPI0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9954 ADD_BITFIELD_RW(DMA, 6, 1)
9955 // If 1, SPI0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9956 ADD_BITFIELD_RW(CORE1, 5, 1)
9957 // If 1, SPI0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9958 ADD_BITFIELD_RW(CORE0, 4, 1)
9959 // If 1, SPI0 can be accessed from a Secure, Privileged context.
9960 ADD_BITFIELD_RW(SP, 3, 1)
9961 // If 1, and SP is also set, SPI0 can be accessed from a Secure, Unprivileged context.
9962 ADD_BITFIELD_RW(SU, 2, 1)
9963 // If 1, SPI0 can be accessed from a Non-secure, Privileged context.
9964 ADD_BITFIELD_RW(NSP, 1, 1)
9965 // If 1, and NSP is also set, SPI0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9966 ADD_BITFIELD_RW(NSU, 0, 1)
9967 END_TYPE()
9968
9969 // Control whether debugger, DMA, core 0 and core 1 can access SPI1, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9970 // Reset value: 0x000000fc
9971 BEGIN_TYPE(SPI1_t, uint32_t)
9972 // If 1, SPI1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9973 ADD_BITFIELD_RW(DBG, 7, 1)
9974 // If 1, SPI1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9975 ADD_BITFIELD_RW(DMA, 6, 1)
9976 // If 1, SPI1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9977 ADD_BITFIELD_RW(CORE1, 5, 1)
9978 // If 1, SPI1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9979 ADD_BITFIELD_RW(CORE0, 4, 1)
9980 // If 1, SPI1 can be accessed from a Secure, Privileged context.
9981 ADD_BITFIELD_RW(SP, 3, 1)
9982 // If 1, and SP is also set, SPI1 can be accessed from a Secure, Unprivileged context.
9983 ADD_BITFIELD_RW(SU, 2, 1)
9984 // If 1, SPI1 can be accessed from a Non-secure, Privileged context.
9985 ADD_BITFIELD_RW(NSP, 1, 1)
9986 // If 1, and NSP is also set, SPI1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
9987 ADD_BITFIELD_RW(NSU, 0, 1)
9988 END_TYPE()
9989
9990 // Control whether debugger, DMA, core 0 and core 1 can access TIMER0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
9991 // Reset value: 0x000000fc
9992 BEGIN_TYPE(TIMER0_t, uint32_t)
9993 // If 1, TIMER0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9994 ADD_BITFIELD_RW(DBG, 7, 1)
9995 // If 1, TIMER0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9996 ADD_BITFIELD_RW(DMA, 6, 1)
9997 // If 1, TIMER0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
9998 ADD_BITFIELD_RW(CORE1, 5, 1)
9999 // If 1, TIMER0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10000 ADD_BITFIELD_RW(CORE0, 4, 1)
10001 // If 1, TIMER0 can be accessed from a Secure, Privileged context.
10002 ADD_BITFIELD_RW(SP, 3, 1)
10003 // If 1, and SP is also set, TIMER0 can be accessed from a Secure, Unprivileged context.
10004 ADD_BITFIELD_RW(SU, 2, 1)
10005 // If 1, TIMER0 can be accessed from a Non-secure, Privileged context.
10006 ADD_BITFIELD_RW(NSP, 1, 1)
10007 // If 1, and NSP is also set, TIMER0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10008 ADD_BITFIELD_RW(NSU, 0, 1)
10009 END_TYPE()
10010
10011 // Control whether debugger, DMA, core 0 and core 1 can access TIMER1, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10012 // Reset value: 0x000000fc
10013 BEGIN_TYPE(TIMER1_t, uint32_t)
10014 // If 1, TIMER1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10015 ADD_BITFIELD_RW(DBG, 7, 1)
10016 // If 1, TIMER1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10017 ADD_BITFIELD_RW(DMA, 6, 1)
10018 // If 1, TIMER1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10019 ADD_BITFIELD_RW(CORE1, 5, 1)
10020 // If 1, TIMER1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10021 ADD_BITFIELD_RW(CORE0, 4, 1)
10022 // If 1, TIMER1 can be accessed from a Secure, Privileged context.
10023 ADD_BITFIELD_RW(SP, 3, 1)
10024 // If 1, and SP is also set, TIMER1 can be accessed from a Secure, Unprivileged context.
10025 ADD_BITFIELD_RW(SU, 2, 1)
10026 // If 1, TIMER1 can be accessed from a Non-secure, Privileged context.
10027 ADD_BITFIELD_RW(NSP, 1, 1)
10028 // If 1, and NSP is also set, TIMER1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10029 ADD_BITFIELD_RW(NSU, 0, 1)
10030 END_TYPE()
10031
10032 // Control whether debugger, DMA, core 0 and core 1 can access UART0, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10033 // Reset value: 0x000000fc
10034 BEGIN_TYPE(UART0_t, uint32_t)
10035 // If 1, UART0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10036 ADD_BITFIELD_RW(DBG, 7, 1)
10037 // If 1, UART0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10038 ADD_BITFIELD_RW(DMA, 6, 1)
10039 // If 1, UART0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10040 ADD_BITFIELD_RW(CORE1, 5, 1)
10041 // If 1, UART0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10042 ADD_BITFIELD_RW(CORE0, 4, 1)
10043 // If 1, UART0 can be accessed from a Secure, Privileged context.
10044 ADD_BITFIELD_RW(SP, 3, 1)
10045 // If 1, and SP is also set, UART0 can be accessed from a Secure, Unprivileged context.
10046 ADD_BITFIELD_RW(SU, 2, 1)
10047 // If 1, UART0 can be accessed from a Non-secure, Privileged context.
10048 ADD_BITFIELD_RW(NSP, 1, 1)
10049 // If 1, and NSP is also set, UART0 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10050 ADD_BITFIELD_RW(NSU, 0, 1)
10051 END_TYPE()
10052
10053 // Control whether debugger, DMA, core 0 and core 1 can access UART1, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10054 // Reset value: 0x000000fc
10055 BEGIN_TYPE(UART1_t, uint32_t)
10056 // If 1, UART1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10057 ADD_BITFIELD_RW(DBG, 7, 1)
10058 // If 1, UART1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10059 ADD_BITFIELD_RW(DMA, 6, 1)
10060 // If 1, UART1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10061 ADD_BITFIELD_RW(CORE1, 5, 1)
10062 // If 1, UART1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10063 ADD_BITFIELD_RW(CORE0, 4, 1)
10064 // If 1, UART1 can be accessed from a Secure, Privileged context.
10065 ADD_BITFIELD_RW(SP, 3, 1)
10066 // If 1, and SP is also set, UART1 can be accessed from a Secure, Unprivileged context.
10067 ADD_BITFIELD_RW(SU, 2, 1)
10068 // If 1, UART1 can be accessed from a Non-secure, Privileged context.
10069 ADD_BITFIELD_RW(NSP, 1, 1)
10070 // If 1, and NSP is also set, UART1 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10071 ADD_BITFIELD_RW(NSU, 0, 1)
10072 END_TYPE()
10073
10074 // Control whether debugger, DMA, core 0 and core 1 can access OTP, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10075 // Reset value: 0x000000fc
10076 BEGIN_TYPE(OTP_t, uint32_t)
10077 // If 1, OTP can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10078 ADD_BITFIELD_RW(DBG, 7, 1)
10079 // If 1, OTP can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10080 ADD_BITFIELD_RW(DMA, 6, 1)
10081 // If 1, OTP can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10082 ADD_BITFIELD_RW(CORE1, 5, 1)
10083 // If 1, OTP can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10084 ADD_BITFIELD_RW(CORE0, 4, 1)
10085 // If 1, OTP can be accessed from a Secure, Privileged context.
10086 ADD_BITFIELD_RW(SP, 3, 1)
10087 // If 1, and SP is also set, OTP can be accessed from a Secure, Unprivileged context.
10088 ADD_BITFIELD_RW(SU, 2, 1)
10089 // If 1, OTP can be accessed from a Non-secure, Privileged context.
10090 ADD_BITFIELD_RW(NSP, 1, 1)
10091 // If 1, and NSP is also set, OTP can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10092 ADD_BITFIELD_RW(NSU, 0, 1)
10093 END_TYPE()
10094
10095 // Control whether debugger, DMA, core 0 and core 1 can access TBMAN, and at what security/privilege levels they can do so. Defaults to Secure access from any master. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10096 // Reset value: 0x000000fc
10097 BEGIN_TYPE(TBMAN_t, uint32_t)
10098 // If 1, TBMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10099 ADD_BITFIELD_RW(DBG, 7, 1)
10100 // If 1, TBMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10101 ADD_BITFIELD_RW(DMA, 6, 1)
10102 // If 1, TBMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10103 ADD_BITFIELD_RW(CORE1, 5, 1)
10104 // If 1, TBMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10105 ADD_BITFIELD_RW(CORE0, 4, 1)
10106 // If 1, TBMAN can be accessed from a Secure, Privileged context.
10107 ADD_BITFIELD_RW(SP, 3, 1)
10108 // If 1, and SP is also set, TBMAN can be accessed from a Secure, Unprivileged context.
10109 ADD_BITFIELD_RW(SU, 2, 1)
10110 // If 1, TBMAN can be accessed from a Non-secure, Privileged context.
10111 ADD_BITFIELD_RW(NSP, 1, 1)
10112 // If 1, and NSP is also set, TBMAN can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10113 ADD_BITFIELD_RW(NSU, 0, 1)
10114 END_TYPE()
10115
10116 // Control whether debugger, DMA, core 0 and core 1 can access POWMAN, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10117 // Reset value: 0x000000b8
10118 BEGIN_TYPE(POWMAN_t, uint32_t)
10119 // If 1, POWMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10120 ADD_BITFIELD_RW(DBG, 7, 1)
10121 // If 1, POWMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10122 ADD_BITFIELD_RW(DMA, 6, 1)
10123 // If 1, POWMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10124 ADD_BITFIELD_RW(CORE1, 5, 1)
10125 // If 1, POWMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10126 ADD_BITFIELD_RW(CORE0, 4, 1)
10127 // If 1, POWMAN can be accessed from a Secure, Privileged context.
10128 ADD_BITFIELD_RW(SP, 3, 1)
10129 // If 1, and SP is also set, POWMAN can be accessed from a Secure, Unprivileged context.
10130 ADD_BITFIELD_RW(SU, 2, 1)
10131 // If 1, POWMAN can be accessed from a Non-secure, Privileged context.
10132 ADD_BITFIELD_RW(NSP, 1, 1)
10133 // If 1, and NSP is also set, POWMAN can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10134 ADD_BITFIELD_RW(NSU, 0, 1)
10135 END_TYPE()
10136
10137 // Control whether debugger, DMA, core 0 and core 1 can access TRNG, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10138 // Reset value: 0x000000b8
10139 BEGIN_TYPE(TRNG_t, uint32_t)
10140 // If 1, TRNG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10141 ADD_BITFIELD_RW(DBG, 7, 1)
10142 // If 1, TRNG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10143 ADD_BITFIELD_RW(DMA, 6, 1)
10144 // If 1, TRNG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10145 ADD_BITFIELD_RW(CORE1, 5, 1)
10146 // If 1, TRNG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10147 ADD_BITFIELD_RW(CORE0, 4, 1)
10148 // If 1, TRNG can be accessed from a Secure, Privileged context.
10149 ADD_BITFIELD_RW(SP, 3, 1)
10150 // If 1, and SP is also set, TRNG can be accessed from a Secure, Unprivileged context.
10151 ADD_BITFIELD_RW(SU, 2, 1)
10152 // If 1, TRNG can be accessed from a Non-secure, Privileged context.
10153 ADD_BITFIELD_RW(NSP, 1, 1)
10154 // If 1, and NSP is also set, TRNG can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10155 ADD_BITFIELD_RW(NSU, 0, 1)
10156 END_TYPE()
10157
10158 // Control whether debugger, DMA, core 0 and core 1 can access SHA256, and at what security/privilege levels they can do so. Defaults to Secure, Privileged access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10159 // Reset value: 0x000000f8
10160 BEGIN_TYPE(SHA256_t, uint32_t)
10161 // If 1, SHA256 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10162 ADD_BITFIELD_RW(DBG, 7, 1)
10163 // If 1, SHA256 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10164 ADD_BITFIELD_RW(DMA, 6, 1)
10165 // If 1, SHA256 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10166 ADD_BITFIELD_RW(CORE1, 5, 1)
10167 // If 1, SHA256 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10168 ADD_BITFIELD_RW(CORE0, 4, 1)
10169 // If 1, SHA256 can be accessed from a Secure, Privileged context.
10170 ADD_BITFIELD_RW(SP, 3, 1)
10171 // If 1, and SP is also set, SHA256 can be accessed from a Secure, Unprivileged context.
10172 ADD_BITFIELD_RW(SU, 2, 1)
10173 // If 1, SHA256 can be accessed from a Non-secure, Privileged context.
10174 ADD_BITFIELD_RW(NSP, 1, 1)
10175 // If 1, and NSP is also set, SHA256 can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10176 ADD_BITFIELD_RW(NSU, 0, 1)
10177 END_TYPE()
10178
10179 // Control whether debugger, DMA, core 0 and core 1 can access SYSCFG, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10180 // Reset value: 0x000000b8
10181 BEGIN_TYPE(SYSCFG_t, uint32_t)
10182 // If 1, SYSCFG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10183 ADD_BITFIELD_RW(DBG, 7, 1)
10184 // If 1, SYSCFG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10185 ADD_BITFIELD_RW(DMA, 6, 1)
10186 // If 1, SYSCFG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10187 ADD_BITFIELD_RW(CORE1, 5, 1)
10188 // If 1, SYSCFG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10189 ADD_BITFIELD_RW(CORE0, 4, 1)
10190 // If 1, SYSCFG can be accessed from a Secure, Privileged context.
10191 ADD_BITFIELD_RW(SP, 3, 1)
10192 // If 1, and SP is also set, SYSCFG can be accessed from a Secure, Unprivileged context.
10193 ADD_BITFIELD_RW(SU, 2, 1)
10194 // If 1, SYSCFG can be accessed from a Non-secure, Privileged context.
10195 ADD_BITFIELD_RW(NSP, 1, 1)
10196 // If 1, and NSP is also set, SYSCFG can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10197 ADD_BITFIELD_RW(NSU, 0, 1)
10198 END_TYPE()
10199
10200 // Control whether debugger, DMA, core 0 and core 1 can access CLOCKS, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10201 // Reset value: 0x000000b8
10202 BEGIN_TYPE(CLOCKS_t, uint32_t)
10203 // If 1, CLOCKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10204 ADD_BITFIELD_RW(DBG, 7, 1)
10205 // If 1, CLOCKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10206 ADD_BITFIELD_RW(DMA, 6, 1)
10207 // If 1, CLOCKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10208 ADD_BITFIELD_RW(CORE1, 5, 1)
10209 // If 1, CLOCKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10210 ADD_BITFIELD_RW(CORE0, 4, 1)
10211 // If 1, CLOCKS can be accessed from a Secure, Privileged context.
10212 ADD_BITFIELD_RW(SP, 3, 1)
10213 // If 1, and SP is also set, CLOCKS can be accessed from a Secure, Unprivileged context.
10214 ADD_BITFIELD_RW(SU, 2, 1)
10215 // If 1, CLOCKS can be accessed from a Non-secure, Privileged context.
10216 ADD_BITFIELD_RW(NSP, 1, 1)
10217 // If 1, and NSP is also set, CLOCKS can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10218 ADD_BITFIELD_RW(NSU, 0, 1)
10219 END_TYPE()
10220
10221 // Control whether debugger, DMA, core 0 and core 1 can access XOSC, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10222 // Reset value: 0x000000b8
10223 BEGIN_TYPE(XOSC_t, uint32_t)
10224 // If 1, XOSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10225 ADD_BITFIELD_RW(DBG, 7, 1)
10226 // If 1, XOSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10227 ADD_BITFIELD_RW(DMA, 6, 1)
10228 // If 1, XOSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10229 ADD_BITFIELD_RW(CORE1, 5, 1)
10230 // If 1, XOSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10231 ADD_BITFIELD_RW(CORE0, 4, 1)
10232 // If 1, XOSC can be accessed from a Secure, Privileged context.
10233 ADD_BITFIELD_RW(SP, 3, 1)
10234 // If 1, and SP is also set, XOSC can be accessed from a Secure, Unprivileged context.
10235 ADD_BITFIELD_RW(SU, 2, 1)
10236 // If 1, XOSC can be accessed from a Non-secure, Privileged context.
10237 ADD_BITFIELD_RW(NSP, 1, 1)
10238 // If 1, and NSP is also set, XOSC can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10239 ADD_BITFIELD_RW(NSU, 0, 1)
10240 END_TYPE()
10241
10242 // Control whether debugger, DMA, core 0 and core 1 can access ROSC, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10243 // Reset value: 0x000000b8
10244 BEGIN_TYPE(ROSC_t, uint32_t)
10245 // If 1, ROSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10246 ADD_BITFIELD_RW(DBG, 7, 1)
10247 // If 1, ROSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10248 ADD_BITFIELD_RW(DMA, 6, 1)
10249 // If 1, ROSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10250 ADD_BITFIELD_RW(CORE1, 5, 1)
10251 // If 1, ROSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10252 ADD_BITFIELD_RW(CORE0, 4, 1)
10253 // If 1, ROSC can be accessed from a Secure, Privileged context.
10254 ADD_BITFIELD_RW(SP, 3, 1)
10255 // If 1, and SP is also set, ROSC can be accessed from a Secure, Unprivileged context.
10256 ADD_BITFIELD_RW(SU, 2, 1)
10257 // If 1, ROSC can be accessed from a Non-secure, Privileged context.
10258 ADD_BITFIELD_RW(NSP, 1, 1)
10259 // If 1, and NSP is also set, ROSC can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10260 ADD_BITFIELD_RW(NSU, 0, 1)
10261 END_TYPE()
10262
10263 // Control whether debugger, DMA, core 0 and core 1 can access PLL_SYS, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10264 // Reset value: 0x000000b8
10265 BEGIN_TYPE(PLL_SYS_t, uint32_t)
10266 // If 1, PLL_SYS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10267 ADD_BITFIELD_RW(DBG, 7, 1)
10268 // If 1, PLL_SYS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10269 ADD_BITFIELD_RW(DMA, 6, 1)
10270 // If 1, PLL_SYS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10271 ADD_BITFIELD_RW(CORE1, 5, 1)
10272 // If 1, PLL_SYS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10273 ADD_BITFIELD_RW(CORE0, 4, 1)
10274 // If 1, PLL_SYS can be accessed from a Secure, Privileged context.
10275 ADD_BITFIELD_RW(SP, 3, 1)
10276 // If 1, and SP is also set, PLL_SYS can be accessed from a Secure, Unprivileged context.
10277 ADD_BITFIELD_RW(SU, 2, 1)
10278 // If 1, PLL_SYS can be accessed from a Non-secure, Privileged context.
10279 ADD_BITFIELD_RW(NSP, 1, 1)
10280 // If 1, and NSP is also set, PLL_SYS can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10281 ADD_BITFIELD_RW(NSU, 0, 1)
10282 END_TYPE()
10283
10284 // Control whether debugger, DMA, core 0 and core 1 can access PLL_USB, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10285 // Reset value: 0x000000b8
10286 BEGIN_TYPE(PLL_USB_t, uint32_t)
10287 // If 1, PLL_USB can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10288 ADD_BITFIELD_RW(DBG, 7, 1)
10289 // If 1, PLL_USB can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10290 ADD_BITFIELD_RW(DMA, 6, 1)
10291 // If 1, PLL_USB can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10292 ADD_BITFIELD_RW(CORE1, 5, 1)
10293 // If 1, PLL_USB can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10294 ADD_BITFIELD_RW(CORE0, 4, 1)
10295 // If 1, PLL_USB can be accessed from a Secure, Privileged context.
10296 ADD_BITFIELD_RW(SP, 3, 1)
10297 // If 1, and SP is also set, PLL_USB can be accessed from a Secure, Unprivileged context.
10298 ADD_BITFIELD_RW(SU, 2, 1)
10299 // If 1, PLL_USB can be accessed from a Non-secure, Privileged context.
10300 ADD_BITFIELD_RW(NSP, 1, 1)
10301 // If 1, and NSP is also set, PLL_USB can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10302 ADD_BITFIELD_RW(NSU, 0, 1)
10303 END_TYPE()
10304
10305 // Control whether debugger, DMA, core 0 and core 1 can access TICKS, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10306 // Reset value: 0x000000b8
10307 BEGIN_TYPE(TICKS_t, uint32_t)
10308 // If 1, TICKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10309 ADD_BITFIELD_RW(DBG, 7, 1)
10310 // If 1, TICKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10311 ADD_BITFIELD_RW(DMA, 6, 1)
10312 // If 1, TICKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10313 ADD_BITFIELD_RW(CORE1, 5, 1)
10314 // If 1, TICKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10315 ADD_BITFIELD_RW(CORE0, 4, 1)
10316 // If 1, TICKS can be accessed from a Secure, Privileged context.
10317 ADD_BITFIELD_RW(SP, 3, 1)
10318 // If 1, and SP is also set, TICKS can be accessed from a Secure, Unprivileged context.
10319 ADD_BITFIELD_RW(SU, 2, 1)
10320 // If 1, TICKS can be accessed from a Non-secure, Privileged context.
10321 ADD_BITFIELD_RW(NSP, 1, 1)
10322 // If 1, and NSP is also set, TICKS can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10323 ADD_BITFIELD_RW(NSU, 0, 1)
10324 END_TYPE()
10325
10326 // Control whether debugger, DMA, core 0 and core 1 can access WATCHDOG, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10327 // Reset value: 0x000000b8
10328 BEGIN_TYPE(WATCHDOG_t, uint32_t)
10329 // If 1, WATCHDOG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10330 ADD_BITFIELD_RW(DBG, 7, 1)
10331 // If 1, WATCHDOG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10332 ADD_BITFIELD_RW(DMA, 6, 1)
10333 // If 1, WATCHDOG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10334 ADD_BITFIELD_RW(CORE1, 5, 1)
10335 // If 1, WATCHDOG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10336 ADD_BITFIELD_RW(CORE0, 4, 1)
10337 // If 1, WATCHDOG can be accessed from a Secure, Privileged context.
10338 ADD_BITFIELD_RW(SP, 3, 1)
10339 // If 1, and SP is also set, WATCHDOG can be accessed from a Secure, Unprivileged context.
10340 ADD_BITFIELD_RW(SU, 2, 1)
10341 // If 1, WATCHDOG can be accessed from a Non-secure, Privileged context.
10342 ADD_BITFIELD_RW(NSP, 1, 1)
10343 // If 1, and NSP is also set, WATCHDOG can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10344 ADD_BITFIELD_RW(NSU, 0, 1)
10345 END_TYPE()
10346
10347 // Control whether debugger, DMA, core 0 and core 1 can access RSM, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10348 // Reset value: 0x000000b8
10349 BEGIN_TYPE(RSM_t, uint32_t)
10350 // If 1, RSM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10351 ADD_BITFIELD_RW(DBG, 7, 1)
10352 // If 1, RSM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10353 ADD_BITFIELD_RW(DMA, 6, 1)
10354 // If 1, RSM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10355 ADD_BITFIELD_RW(CORE1, 5, 1)
10356 // If 1, RSM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10357 ADD_BITFIELD_RW(CORE0, 4, 1)
10358 // If 1, RSM can be accessed from a Secure, Privileged context.
10359 ADD_BITFIELD_RW(SP, 3, 1)
10360 // If 1, and SP is also set, RSM can be accessed from a Secure, Unprivileged context.
10361 ADD_BITFIELD_RW(SU, 2, 1)
10362 // If 1, RSM can be accessed from a Non-secure, Privileged context.
10363 ADD_BITFIELD_RW(NSP, 1, 1)
10364 // If 1, and NSP is also set, RSM can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10365 ADD_BITFIELD_RW(NSU, 0, 1)
10366 END_TYPE()
10367
10368 // Control whether debugger, DMA, core 0 and core 1 can access XIP_CTRL, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10369 // Reset value: 0x000000b8
10370 BEGIN_TYPE(XIP_CTRL_t, uint32_t)
10371 // If 1, XIP_CTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10372 ADD_BITFIELD_RW(DBG, 7, 1)
10373 // If 1, XIP_CTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10374 ADD_BITFIELD_RW(DMA, 6, 1)
10375 // If 1, XIP_CTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10376 ADD_BITFIELD_RW(CORE1, 5, 1)
10377 // If 1, XIP_CTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10378 ADD_BITFIELD_RW(CORE0, 4, 1)
10379 // If 1, XIP_CTRL can be accessed from a Secure, Privileged context.
10380 ADD_BITFIELD_RW(SP, 3, 1)
10381 // If 1, and SP is also set, XIP_CTRL can be accessed from a Secure, Unprivileged context.
10382 ADD_BITFIELD_RW(SU, 2, 1)
10383 // If 1, XIP_CTRL can be accessed from a Non-secure, Privileged context.
10384 ADD_BITFIELD_RW(NSP, 1, 1)
10385 // If 1, and NSP is also set, XIP_CTRL can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10386 ADD_BITFIELD_RW(NSU, 0, 1)
10387 END_TYPE()
10388
10389 // Control whether debugger, DMA, core 0 and core 1 can access XIP_QMI, and at what security/privilege levels they can do so. Defaults to Secure, Privileged processor or debug access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10390 // Reset value: 0x000000b8
10391 BEGIN_TYPE(XIP_QMI_t, uint32_t)
10392 // If 1, XIP_QMI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10393 ADD_BITFIELD_RW(DBG, 7, 1)
10394 // If 1, XIP_QMI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10395 ADD_BITFIELD_RW(DMA, 6, 1)
10396 // If 1, XIP_QMI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10397 ADD_BITFIELD_RW(CORE1, 5, 1)
10398 // If 1, XIP_QMI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10399 ADD_BITFIELD_RW(CORE0, 4, 1)
10400 // If 1, XIP_QMI can be accessed from a Secure, Privileged context.
10401 ADD_BITFIELD_RW(SP, 3, 1)
10402 // If 1, and SP is also set, XIP_QMI can be accessed from a Secure, Unprivileged context.
10403 ADD_BITFIELD_RW(SU, 2, 1)
10404 // If 1, XIP_QMI can be accessed from a Non-secure, Privileged context.
10405 ADD_BITFIELD_RW(NSP, 1, 1)
10406 // If 1, and NSP is also set, XIP_QMI can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10407 ADD_BITFIELD_RW(NSU, 0, 1)
10408 END_TYPE()
10409
10410 // Control whether debugger, DMA, core 0 and core 1 can access XIP_AUX, and at what security/privilege levels they can do so. Defaults to Secure, Privileged access only. This register is writable only from a Secure, Privileged processor or debugger, with the exception of the NSU bit, which becomes Non-secure-Privileged-writable when the NSP bit is set.
10411 // Reset value: 0x000000f8
10412 BEGIN_TYPE(XIP_AUX_t, uint32_t)
10413 // If 1, XIP_AUX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10414 ADD_BITFIELD_RW(DBG, 7, 1)
10415 // If 1, XIP_AUX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10416 ADD_BITFIELD_RW(DMA, 6, 1)
10417 // If 1, XIP_AUX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10418 ADD_BITFIELD_RW(CORE1, 5, 1)
10419 // If 1, XIP_AUX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register.
10420 ADD_BITFIELD_RW(CORE0, 4, 1)
10421 // If 1, XIP_AUX can be accessed from a Secure, Privileged context.
10422 ADD_BITFIELD_RW(SP, 3, 1)
10423 // If 1, and SP is also set, XIP_AUX can be accessed from a Secure, Unprivileged context.
10424 ADD_BITFIELD_RW(SU, 2, 1)
10425 // If 1, XIP_AUX can be accessed from a Non-secure, Privileged context.
10426 ADD_BITFIELD_RW(NSP, 1, 1)
10427 // If 1, and NSP is also set, XIP_AUX can be accessed from a Non-secure, Unprivileged context. This bit is writable from a Non-secure, Privileged context, if and only if the NSP bit is set.
10428 ADD_BITFIELD_RW(NSU, 0, 1)
10429 END_TYPE()
10430
10432 LOCK_t LOCK;
10433 FORCE_CORE_NS_t FORCE_CORE_NS;
10434 CFGRESET_t CFGRESET;
10435 GPIO_NSMASK0_t GPIO_NSMASK0;
10436 GPIO_NSMASK1_t GPIO_NSMASK1;
10437 ROM_t ROM;
10438 XIP_MAIN_t XIP_MAIN;
10439 SRAM0_t SRAM0;
10440 SRAM1_t SRAM1;
10441 SRAM2_t SRAM2;
10442 SRAM3_t SRAM3;
10443 SRAM4_t SRAM4;
10444 SRAM5_t SRAM5;
10445 SRAM6_t SRAM6;
10446 SRAM7_t SRAM7;
10447 SRAM8_t SRAM8;
10448 SRAM9_t SRAM9;
10449 DMA_t DMA;
10450 USBCTRL_t USBCTRL;
10451 PIO0_t PIO0;
10452 PIO1_t PIO1;
10453 PIO2_t PIO2;
10454 CORESIGHT_TRACE_t CORESIGHT_TRACE;
10455 CORESIGHT_PERIPH_t CORESIGHT_PERIPH;
10456 SYSINFO_t SYSINFO;
10457 RESETS_t RESETS;
10458 IO_BANK0_t IO_BANK0;
10459 IO_BANK1_t IO_BANK1;
10460 PADS_BANK0_t PADS_BANK0;
10461 PADS_QSPI_t PADS_QSPI;
10462 BUSCTRL_t BUSCTRL;
10463 ADC0_t ADC0;
10464 HSTX_t HSTX;
10465 I2C0_t I2C0;
10466 I2C1_t I2C1;
10467 PWM_t PWM;
10468 SPI0_t SPI0;
10469 SPI1_t SPI1;
10470 TIMER0_t TIMER0;
10471 TIMER1_t TIMER1;
10472 UART0_t UART0;
10473 UART1_t UART1;
10474 OTP_t OTP;
10475 TBMAN_t TBMAN;
10476 POWMAN_t POWMAN;
10477 TRNG_t TRNG;
10478 SHA256_t SHA256;
10479 SYSCFG_t SYSCFG;
10480 CLOCKS_t CLOCKS;
10481 XOSC_t XOSC;
10482 ROSC_t ROSC;
10483 PLL_SYS_t PLL_SYS;
10484 PLL_USB_t PLL_USB;
10485 TICKS_t TICKS;
10486 WATCHDOG_t WATCHDOG;
10487 RSM_t RSM;
10488 XIP_CTRL_t XIP_CTRL;
10489 XIP_QMI_t XIP_QMI;
10490 XIP_AUX_t XIP_AUX;
10491 };
10492
10493 static ACCESSCTRL_t & ACCESSCTRL = (*(ACCESSCTRL_t *)0x40060000);
10494 static ACCESSCTRL_t & ACCESSCTRL_XOR = (*(ACCESSCTRL_t *)0x40061000);
10495 static ACCESSCTRL_t & ACCESSCTRL_SET = (*(ACCESSCTRL_t *)0x40062000);
10496 static ACCESSCTRL_t & ACCESSCTRL_CLR = (*(ACCESSCTRL_t *)0x40063000);
10497
10498} // _ACCESSCTRL_
10499
10500namespace _UART0_ {
10501
10502 // Data Register, UARTDR
10503 // Reset value: 0x00000000
10504 BEGIN_TYPE(UARTDR_t, uint32_t)
10505 // Overrun error. This bit is set to 1 if data is received and the receive FIFO is already full. This is cleared to 0 once there is an empty space in the FIFO and a new character can be written to it.
10506 ADD_BITFIELD_RO(OE, 11, 1)
10507 // Break error. This bit is set to 1 if a break condition was detected, indicating that the received data input was held LOW for longer than a full-word transmission time (defined as start, data, parity and stop bits). In FIFO mode, this error is associated with the character at the top of the FIFO. When a break occurs, only one 0 character is loaded into the FIFO. The next character is only enabled after the receive data input goes to a 1 (marking state), and the next valid start bit is received.
10508 ADD_BITFIELD_RO(BE, 10, 1)
10509 // Parity error. When set to 1, it indicates that the parity of the received data character does not match the parity that the EPS and SPS bits in the Line Control Register, UARTLCR_H. In FIFO mode, this error is associated with the character at the top of the FIFO.
10510 ADD_BITFIELD_RO(PE, 9, 1)
10511 // Framing error. When set to 1, it indicates that the received character did not have a valid stop bit (a valid stop bit is 1). In FIFO mode, this error is associated with the character at the top of the FIFO.
10512 ADD_BITFIELD_RO(FE, 8, 1)
10513 // Receive (read) data character. Transmit (write) data character.
10514 ADD_BITFIELD_RW(DATA, 0, 8)
10515 END_TYPE()
10516
10517 // Receive Status Register/Error Clear Register, UARTRSR/UARTECR
10518 // Reset value: 0x00000000
10519 BEGIN_TYPE(UARTRSR_t, uint32_t)
10520 // Overrun error. This bit is set to 1 if data is received and the FIFO is already full. This bit is cleared to 0 by a write to UARTECR. The FIFO contents remain valid because no more data is written when the FIFO is full, only the contents of the shift register are overwritten. The CPU must now read the data, to empty the FIFO.
10521 ADD_BITFIELD_RW(OE, 3, 1)
10522 // Break error. This bit is set to 1 if a break condition was detected, indicating that the received data input was held LOW for longer than a full-word transmission time (defined as start, data, parity, and stop bits). This bit is cleared to 0 after a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO. When a break occurs, only one 0 character is loaded into the FIFO. The next character is only enabled after the receive data input goes to a 1 (marking state) and the next valid start bit is received.
10523 ADD_BITFIELD_RW(BE, 2, 1)
10524 // Parity error. When set to 1, it indicates that the parity of the received data character does not match the parity that the EPS and SPS bits in the Line Control Register, UARTLCR_H. This bit is cleared to 0 by a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO.
10525 ADD_BITFIELD_RW(PE, 1, 1)
10526 // Framing error. When set to 1, it indicates that the received character did not have a valid stop bit (a valid stop bit is 1). This bit is cleared to 0 by a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO.
10527 ADD_BITFIELD_RW(FE, 0, 1)
10528 END_TYPE()
10529
10530 // Flag Register, UARTFR
10531 // Reset value: 0x00000090
10532 BEGIN_TYPE(UARTFR_t, uint32_t)
10533 // Ring indicator. This bit is the complement of the UART ring indicator, nUARTRI, modem status input. That is, the bit is 1 when nUARTRI is LOW.
10534 ADD_BITFIELD_RO(RI, 8, 1)
10535 // Transmit FIFO empty. The meaning of this bit depends on the state of the FEN bit in the Line Control Register, UARTLCR_H. If the FIFO is disabled, this bit is set when the transmit holding register is empty. If the FIFO is enabled, the TXFE bit is set when the transmit FIFO is empty. This bit does not indicate if there is data in the transmit shift register.
10536 ADD_BITFIELD_RO(TXFE, 7, 1)
10537 // Receive FIFO full. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register. If the FIFO is disabled, this bit is set when the receive holding register is full. If the FIFO is enabled, the RXFF bit is set when the receive FIFO is full.
10538 ADD_BITFIELD_RO(RXFF, 6, 1)
10539 // Transmit FIFO full. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register. If the FIFO is disabled, this bit is set when the transmit holding register is full. If the FIFO is enabled, the TXFF bit is set when the transmit FIFO is full.
10540 ADD_BITFIELD_RO(TXFF, 5, 1)
10541 // Receive FIFO empty. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register. If the FIFO is disabled, this bit is set when the receive holding register is empty. If the FIFO is enabled, the RXFE bit is set when the receive FIFO is empty.
10542 ADD_BITFIELD_RO(RXFE, 4, 1)
10543 // UART busy. If this bit is set to 1, the UART is busy transmitting data. This bit remains set until the complete byte, including all the stop bits, has been sent from the shift register. This bit is set as soon as the transmit FIFO becomes non-empty, regardless of whether the UART is enabled or not.
10544 ADD_BITFIELD_RO(BUSY, 3, 1)
10545 // Data carrier detect. This bit is the complement of the UART data carrier detect, nUARTDCD, modem status input. That is, the bit is 1 when nUARTDCD is LOW.
10546 ADD_BITFIELD_RO(DCD, 2, 1)
10547 // Data set ready. This bit is the complement of the UART data set ready, nUARTDSR, modem status input. That is, the bit is 1 when nUARTDSR is LOW.
10548 ADD_BITFIELD_RO(DSR, 1, 1)
10549 // Clear to send. This bit is the complement of the UART clear to send, nUARTCTS, modem status input. That is, the bit is 1 when nUARTCTS is LOW.
10550 ADD_BITFIELD_RO(CTS, 0, 1)
10551 END_TYPE()
10552
10553 // IrDA Low-Power Counter Register, UARTILPR
10554 // Reset value: 0x00000000
10555 BEGIN_TYPE(UARTILPR_t, uint32_t)
10556 // 8-bit low-power divisor value. These bits are cleared to 0 at reset.
10557 ADD_BITFIELD_RW(ILPDVSR, 0, 8)
10558 END_TYPE()
10559
10560 // Integer Baud Rate Register, UARTIBRD
10561 // Reset value: 0x00000000
10562 BEGIN_TYPE(UARTIBRD_t, uint32_t)
10563 // The integer baud rate divisor. These bits are cleared to 0 on reset.
10564 ADD_BITFIELD_RW(BAUD_DIVINT, 0, 16)
10565 END_TYPE()
10566
10567 // Fractional Baud Rate Register, UARTFBRD
10568 // Reset value: 0x00000000
10569 BEGIN_TYPE(UARTFBRD_t, uint32_t)
10570 // The fractional baud rate divisor. These bits are cleared to 0 on reset.
10571 ADD_BITFIELD_RW(BAUD_DIVFRAC, 0, 6)
10572 END_TYPE()
10573
10574 // Line Control Register, UARTLCR_H
10575 // Reset value: 0x00000000
10576 BEGIN_TYPE(UARTLCR_H_t, uint32_t)
10577 // Stick parity select. 0 = stick parity is disabled 1 = either: * if the EPS bit is 0 then the parity bit is transmitted and checked as a 1 * if the EPS bit is 1 then the parity bit is transmitted and checked as a 0. This bit has no effect when the PEN bit disables parity checking and generation.
10578 ADD_BITFIELD_RW(SPS, 7, 1)
10579 // Word length. These bits indicate the number of data bits transmitted or received in a frame as follows: b11 = 8 bits b10 = 7 bits b01 = 6 bits b00 = 5 bits.
10580 ADD_BITFIELD_RW(WLEN, 5, 2)
10581 // Enable FIFOs: 0 = FIFOs are disabled (character mode) that is, the FIFOs become 1-byte-deep holding registers 1 = transmit and receive FIFO buffers are enabled (FIFO mode).
10582 ADD_BITFIELD_RW(FEN, 4, 1)
10583 // Two stop bits select. If this bit is set to 1, two stop bits are transmitted at the end of the frame. The receive logic does not check for two stop bits being received.
10584 ADD_BITFIELD_RW(STP2, 3, 1)
10585 // Even parity select. Controls the type of parity the UART uses during transmission and reception: 0 = odd parity. The UART generates or checks for an odd number of 1s in the data and parity bits. 1 = even parity. The UART generates or checks for an even number of 1s in the data and parity bits. This bit has no effect when the PEN bit disables parity checking and generation.
10586 ADD_BITFIELD_RW(EPS, 2, 1)
10587 // Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled.
10588 ADD_BITFIELD_RW(PEN, 1, 1)
10589 // Send break. If this bit is set to 1, a low-level is continually output on the UARTTXD output, after completing transmission of the current character. For the proper execution of the break command, the software must set this bit for at least two complete frames. For normal use, this bit must be cleared to 0.
10590 ADD_BITFIELD_RW(BRK, 0, 1)
10591 END_TYPE()
10592
10593 // Control Register, UARTCR
10594 // Reset value: 0x00000300
10595 BEGIN_TYPE(UARTCR_t, uint32_t)
10596 // CTS hardware flow control enable. If this bit is set to 1, CTS hardware flow control is enabled. Data is only transmitted when the nUARTCTS signal is asserted.
10597 ADD_BITFIELD_RW(CTSEN, 15, 1)
10598 // RTS hardware flow control enable. If this bit is set to 1, RTS hardware flow control is enabled. Data is only requested when there is space in the receive FIFO for it to be received.
10599 ADD_BITFIELD_RW(RTSEN, 14, 1)
10600 // This bit is the complement of the UART Out2 (nUARTOut2) modem status output. That is, when the bit is programmed to a 1, the output is 0. For DTE this can be used as Ring Indicator (RI).
10601 ADD_BITFIELD_RW(OUT2, 13, 1)
10602 // This bit is the complement of the UART Out1 (nUARTOut1) modem status output. That is, when the bit is programmed to a 1 the output is 0. For DTE this can be used as Data Carrier Detect (DCD).
10603 ADD_BITFIELD_RW(OUT1, 12, 1)
10604 // Request to send. This bit is the complement of the UART request to send, nUARTRTS, modem status output. That is, when the bit is programmed to a 1 then nUARTRTS is LOW.
10605 ADD_BITFIELD_RW(RTS, 11, 1)
10606 // Data transmit ready. This bit is the complement of the UART data transmit ready, nUARTDTR, modem status output. That is, when the bit is programmed to a 1 then nUARTDTR is LOW.
10607 ADD_BITFIELD_RW(DTR, 10, 1)
10608 // Receive enable. If this bit is set to 1, the receive section of the UART is enabled. Data reception occurs for either UART signals or SIR signals depending on the setting of the SIREN bit. When the UART is disabled in the middle of reception, it completes the current character before stopping.
10609 ADD_BITFIELD_RW(RXE, 9, 1)
10610 // Transmit enable. If this bit is set to 1, the transmit section of the UART is enabled. Data transmission occurs for either UART signals, or SIR signals depending on the setting of the SIREN bit. When the UART is disabled in the middle of transmission, it completes the current character before stopping.
10611 ADD_BITFIELD_RW(TXE, 8, 1)
10612 // Loopback enable. If this bit is set to 1 and the SIREN bit is set to 1 and the SIRTEST bit in the Test Control Register, UARTTCR is set to 1, then the nSIROUT path is inverted, and fed through to the SIRIN path. The SIRTEST bit in the test register must be set to 1 to override the normal half-duplex SIR operation. This must be the requirement for accessing the test registers during normal operation, and SIRTEST must be cleared to 0 when loopback testing is finished. This feature reduces the amount of external coupling required during system test. If this bit is set to 1, and the SIRTEST bit is set to 0, the UARTTXD path is fed through to the UARTRXD path. In either SIR mode or UART mode, when this bit is set, the modem outputs are also fed through to the modem inputs. This bit is cleared to 0 on reset, to disable loopback.
10613 ADD_BITFIELD_RW(LBE, 7, 1)
10614 // SIR low-power IrDA mode. This bit selects the IrDA encoding mode. If this bit is cleared to 0, low-level bits are transmitted as an active high pulse with a width of 3 / 16th of the bit period. If this bit is set to 1, low-level bits are transmitted with a pulse width that is 3 times the period of the IrLPBaud16 input signal, regardless of the selected bit rate. Setting this bit uses less power, but might reduce transmission distances.
10615 ADD_BITFIELD_RW(SIRLP, 2, 1)
10616 // SIR enable: 0 = IrDA SIR ENDEC is disabled. nSIROUT remains LOW (no light pulse generated), and signal transitions on SIRIN have no effect. 1 = IrDA SIR ENDEC is enabled. Data is transmitted and received on nSIROUT and SIRIN. UARTTXD remains HIGH, in the marking state. Signal transitions on UARTRXD or modem status inputs have no effect. This bit has no effect if the UARTEN bit disables the UART.
10617 ADD_BITFIELD_RW(SIREN, 1, 1)
10618 // UART enable: 0 = UART is disabled. If the UART is disabled in the middle of transmission or reception, it completes the current character before stopping. 1 = the UART is enabled. Data transmission and reception occurs for either UART signals or SIR signals depending on the setting of the SIREN bit.
10619 ADD_BITFIELD_RW(UARTEN, 0, 1)
10620 END_TYPE()
10621
10622 // Interrupt FIFO Level Select Register, UARTIFLS
10623 // Reset value: 0x00000012
10624 BEGIN_TYPE(UARTIFLS_t, uint32_t)
10625 // Receive interrupt FIFO level select. The trigger points for the receive interrupt are as follows: b000 = Receive FIFO becomes >= 1 / 8 full b001 = Receive FIFO becomes >= 1 / 4 full b010 = Receive FIFO becomes >= 1 / 2 full b011 = Receive FIFO becomes >= 3 / 4 full b100 = Receive FIFO becomes >= 7 / 8 full b101-b111 = reserved.
10626 ADD_BITFIELD_RW(RXIFLSEL, 3, 3)
10627 // Transmit interrupt FIFO level select. The trigger points for the transmit interrupt are as follows: b000 = Transmit FIFO becomes <= 1 / 8 full b001 = Transmit FIFO becomes <= 1 / 4 full b010 = Transmit FIFO becomes <= 1 / 2 full b011 = Transmit FIFO becomes <= 3 / 4 full b100 = Transmit FIFO becomes <= 7 / 8 full b101-b111 = reserved.
10628 ADD_BITFIELD_RW(TXIFLSEL, 0, 3)
10629 END_TYPE()
10630
10631 // Interrupt Mask Set/Clear Register, UARTIMSC
10632 // Reset value: 0x00000000
10633 BEGIN_TYPE(UARTIMSC_t, uint32_t)
10634 // Overrun error interrupt mask. A read returns the current mask for the UARTOEINTR interrupt. On a write of 1, the mask of the UARTOEINTR interrupt is set. A write of 0 clears the mask.
10635 ADD_BITFIELD_RW(OEIM, 10, 1)
10636 // Break error interrupt mask. A read returns the current mask for the UARTBEINTR interrupt. On a write of 1, the mask of the UARTBEINTR interrupt is set. A write of 0 clears the mask.
10637 ADD_BITFIELD_RW(BEIM, 9, 1)
10638 // Parity error interrupt mask. A read returns the current mask for the UARTPEINTR interrupt. On a write of 1, the mask of the UARTPEINTR interrupt is set. A write of 0 clears the mask.
10639 ADD_BITFIELD_RW(PEIM, 8, 1)
10640 // Framing error interrupt mask. A read returns the current mask for the UARTFEINTR interrupt. On a write of 1, the mask of the UARTFEINTR interrupt is set. A write of 0 clears the mask.
10641 ADD_BITFIELD_RW(FEIM, 7, 1)
10642 // Receive timeout interrupt mask. A read returns the current mask for the UARTRTINTR interrupt. On a write of 1, the mask of the UARTRTINTR interrupt is set. A write of 0 clears the mask.
10643 ADD_BITFIELD_RW(RTIM, 6, 1)
10644 // Transmit interrupt mask. A read returns the current mask for the UARTTXINTR interrupt. On a write of 1, the mask of the UARTTXINTR interrupt is set. A write of 0 clears the mask.
10645 ADD_BITFIELD_RW(TXIM, 5, 1)
10646 // Receive interrupt mask. A read returns the current mask for the UARTRXINTR interrupt. On a write of 1, the mask of the UARTRXINTR interrupt is set. A write of 0 clears the mask.
10647 ADD_BITFIELD_RW(RXIM, 4, 1)
10648 // nUARTDSR modem interrupt mask. A read returns the current mask for the UARTDSRINTR interrupt. On a write of 1, the mask of the UARTDSRINTR interrupt is set. A write of 0 clears the mask.
10649 ADD_BITFIELD_RW(DSRMIM, 3, 1)
10650 // nUARTDCD modem interrupt mask. A read returns the current mask for the UARTDCDINTR interrupt. On a write of 1, the mask of the UARTDCDINTR interrupt is set. A write of 0 clears the mask.
10651 ADD_BITFIELD_RW(DCDMIM, 2, 1)
10652 // nUARTCTS modem interrupt mask. A read returns the current mask for the UARTCTSINTR interrupt. On a write of 1, the mask of the UARTCTSINTR interrupt is set. A write of 0 clears the mask.
10653 ADD_BITFIELD_RW(CTSMIM, 1, 1)
10654 // nUARTRI modem interrupt mask. A read returns the current mask for the UARTRIINTR interrupt. On a write of 1, the mask of the UARTRIINTR interrupt is set. A write of 0 clears the mask.
10655 ADD_BITFIELD_RW(RIMIM, 0, 1)
10656 END_TYPE()
10657
10658 // Raw Interrupt Status Register, UARTRIS
10659 // Reset value: 0x00000000
10660 BEGIN_TYPE(UARTRIS_t, uint32_t)
10661 // Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt.
10662 ADD_BITFIELD_RO(OERIS, 10, 1)
10663 // Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt.
10664 ADD_BITFIELD_RO(BERIS, 9, 1)
10665 // Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt.
10666 ADD_BITFIELD_RO(PERIS, 8, 1)
10667 // Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt.
10668 ADD_BITFIELD_RO(FERIS, 7, 1)
10669 // Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a
10670 ADD_BITFIELD_RO(RTRIS, 6, 1)
10671 // Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt.
10672 ADD_BITFIELD_RO(TXRIS, 5, 1)
10673 // Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt.
10674 ADD_BITFIELD_RO(RXRIS, 4, 1)
10675 // nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt.
10676 ADD_BITFIELD_RO(DSRRMIS, 3, 1)
10677 // nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt.
10678 ADD_BITFIELD_RO(DCDRMIS, 2, 1)
10679 // nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt.
10680 ADD_BITFIELD_RO(CTSRMIS, 1, 1)
10681 // nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt.
10682 ADD_BITFIELD_RO(RIRMIS, 0, 1)
10683 END_TYPE()
10684
10685 // Masked Interrupt Status Register, UARTMIS
10686 // Reset value: 0x00000000
10687 BEGIN_TYPE(UARTMIS_t, uint32_t)
10688 // Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt.
10689 ADD_BITFIELD_RO(OEMIS, 10, 1)
10690 // Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt.
10691 ADD_BITFIELD_RO(BEMIS, 9, 1)
10692 // Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt.
10693 ADD_BITFIELD_RO(PEMIS, 8, 1)
10694 // Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt.
10695 ADD_BITFIELD_RO(FEMIS, 7, 1)
10696 // Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt.
10697 ADD_BITFIELD_RO(RTMIS, 6, 1)
10698 // Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt.
10699 ADD_BITFIELD_RO(TXMIS, 5, 1)
10700 // Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt.
10701 ADD_BITFIELD_RO(RXMIS, 4, 1)
10702 // nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt.
10703 ADD_BITFIELD_RO(DSRMMIS, 3, 1)
10704 // nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt.
10705 ADD_BITFIELD_RO(DCDMMIS, 2, 1)
10706 // nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt.
10707 ADD_BITFIELD_RO(CTSMMIS, 1, 1)
10708 // nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt.
10709 ADD_BITFIELD_RO(RIMMIS, 0, 1)
10710 END_TYPE()
10711
10712 // Interrupt Clear Register, UARTICR
10713 // Reset value: 0x00000000
10714 BEGIN_TYPE(UARTICR_t, uint32_t)
10715 // Overrun error interrupt clear. Clears the UARTOEINTR interrupt.
10716 ADD_BITFIELD_RW(OEIC, 10, 1)
10717 // Break error interrupt clear. Clears the UARTBEINTR interrupt.
10718 ADD_BITFIELD_RW(BEIC, 9, 1)
10719 // Parity error interrupt clear. Clears the UARTPEINTR interrupt.
10720 ADD_BITFIELD_RW(PEIC, 8, 1)
10721 // Framing error interrupt clear. Clears the UARTFEINTR interrupt.
10722 ADD_BITFIELD_RW(FEIC, 7, 1)
10723 // Receive timeout interrupt clear. Clears the UARTRTINTR interrupt.
10724 ADD_BITFIELD_RW(RTIC, 6, 1)
10725 // Transmit interrupt clear. Clears the UARTTXINTR interrupt.
10726 ADD_BITFIELD_RW(TXIC, 5, 1)
10727 // Receive interrupt clear. Clears the UARTRXINTR interrupt.
10728 ADD_BITFIELD_RW(RXIC, 4, 1)
10729 // nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt.
10730 ADD_BITFIELD_RW(DSRMIC, 3, 1)
10731 // nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt.
10732 ADD_BITFIELD_RW(DCDMIC, 2, 1)
10733 // nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt.
10734 ADD_BITFIELD_RW(CTSMIC, 1, 1)
10735 // nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt.
10736 ADD_BITFIELD_RW(RIMIC, 0, 1)
10737 END_TYPE()
10738
10739 // DMA Control Register, UARTDMACR
10740 // Reset value: 0x00000000
10741 BEGIN_TYPE(UARTDMACR_t, uint32_t)
10742 // DMA on error. If this bit is set to 1, the DMA receive request outputs, UARTRXDMASREQ or UARTRXDMABREQ, are disabled when the UART error interrupt is asserted.
10743 ADD_BITFIELD_RW(DMAONERR, 2, 1)
10744 // Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled.
10745 ADD_BITFIELD_RW(TXDMAE, 1, 1)
10746 // Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled.
10747 ADD_BITFIELD_RW(RXDMAE, 0, 1)
10748 END_TYPE()
10749
10750 // UARTPeriphID0 Register
10751 // Reset value: 0x00000011
10752 BEGIN_TYPE(UARTPERIPHID0_t, uint32_t)
10753 // These bits read back as 0x11
10754 ADD_BITFIELD_RO(PARTNUMBER0, 0, 8)
10755 END_TYPE()
10756
10757 // UARTPeriphID1 Register
10758 // Reset value: 0x00000010
10759 BEGIN_TYPE(UARTPERIPHID1_t, uint32_t)
10760 // These bits read back as 0x1
10761 ADD_BITFIELD_RO(DESIGNER0, 4, 4)
10762 // These bits read back as 0x0
10763 ADD_BITFIELD_RO(PARTNUMBER1, 0, 4)
10764 END_TYPE()
10765
10766 // UARTPeriphID2 Register
10767 // Reset value: 0x00000034
10768 BEGIN_TYPE(UARTPERIPHID2_t, uint32_t)
10769 // This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3
10770 ADD_BITFIELD_RO(REVISION, 4, 4)
10771 // These bits read back as 0x4
10772 ADD_BITFIELD_RO(DESIGNER1, 0, 4)
10773 END_TYPE()
10774
10775 // UARTPeriphID3 Register
10776 // Reset value: 0x00000000
10777 BEGIN_TYPE(UARTPERIPHID3_t, uint32_t)
10778 // These bits read back as 0x00
10779 ADD_BITFIELD_RO(CONFIGURATION, 0, 8)
10780 END_TYPE()
10781
10782 // UARTPCellID0 Register
10783 // Reset value: 0x0000000d
10784 BEGIN_TYPE(UARTPCELLID0_t, uint32_t)
10785 // These bits read back as 0x0D
10786 ADD_BITFIELD_RO(UARTPCELLID0, 0, 8)
10787 END_TYPE()
10788
10789 // UARTPCellID1 Register
10790 // Reset value: 0x000000f0
10791 BEGIN_TYPE(UARTPCELLID1_t, uint32_t)
10792 // These bits read back as 0xF0
10793 ADD_BITFIELD_RO(UARTPCELLID1, 0, 8)
10794 END_TYPE()
10795
10796 // UARTPCellID2 Register
10797 // Reset value: 0x00000005
10798 BEGIN_TYPE(UARTPCELLID2_t, uint32_t)
10799 // These bits read back as 0x05
10800 ADD_BITFIELD_RO(UARTPCELLID2, 0, 8)
10801 END_TYPE()
10802
10803 // UARTPCellID3 Register
10804 // Reset value: 0x000000b1
10805 BEGIN_TYPE(UARTPCELLID3_t, uint32_t)
10806 // These bits read back as 0xB1
10807 ADD_BITFIELD_RO(UARTPCELLID3, 0, 8)
10808 END_TYPE()
10809
10810 struct UART0_t {
10811 UARTDR_t UARTDR;
10812 UARTRSR_t UARTRSR;
10813 uint32_t reserved0[4];
10814 UARTFR_t UARTFR;
10815 uint32_t reserved1;
10816 UARTILPR_t UARTILPR;
10817 UARTIBRD_t UARTIBRD;
10818 UARTFBRD_t UARTFBRD;
10819 UARTLCR_H_t UARTLCR_H;
10820 UARTCR_t UARTCR;
10821 UARTIFLS_t UARTIFLS;
10822 UARTIMSC_t UARTIMSC;
10823 UARTRIS_t UARTRIS;
10824 UARTMIS_t UARTMIS;
10825 UARTICR_t UARTICR;
10826 UARTDMACR_t UARTDMACR;
10827 uint32_t reserved2[997];
10828 UARTPERIPHID0_t UARTPERIPHID0;
10829 UARTPERIPHID1_t UARTPERIPHID1;
10830 UARTPERIPHID2_t UARTPERIPHID2;
10831 UARTPERIPHID3_t UARTPERIPHID3;
10832 UARTPCELLID0_t UARTPCELLID0;
10833 UARTPCELLID1_t UARTPCELLID1;
10834 UARTPCELLID2_t UARTPCELLID2;
10835 UARTPCELLID3_t UARTPCELLID3;
10836 };
10837
10838 static UART0_t & UART0 = (*(UART0_t *)0x40070000);
10839 static UART0_t & UART0_XOR = (*(UART0_t *)0x40071000);
10840 static UART0_t & UART0_SET = (*(UART0_t *)0x40072000);
10841 static UART0_t & UART0_CLR = (*(UART0_t *)0x40073000);
10842
10843} // _UART0_
10844
10845namespace _UART1_ {
10846
10847 static _UART0_::UART0_t & UART1 = (*(_UART0_::UART0_t *)0x40078000);
10848 static _UART0_::UART0_t & UART1_XOR = (*(_UART0_::UART0_t *)0x40079000);
10849 static _UART0_::UART0_t & UART1_SET = (*(_UART0_::UART0_t *)0x4007a000);
10850 static _UART0_::UART0_t & UART1_CLR = (*(_UART0_::UART0_t *)0x4007b000);
10851
10852} // _UART1_
10853
10854namespace _ROSC_ {
10855
10856 // Ring Oscillator control
10857 // Reset value: 0x00000aa0
10858 BEGIN_TYPE(CTRL_t, uint32_t)
10859 // On power-up this field is initialised to ENABLE The system clock must be switched to another source before setting this field to DISABLE otherwise the chip will lock up The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator.
10860 ADD_BITFIELD_RW(ENABLE, 12, 12)
10861 // Controls the number of delay stages in the ROSC ring LOW uses stages 0 to 7 MEDIUM uses stages 2 to 7 HIGH uses stages 4 to 7 TOOHIGH uses stages 6 to 7 and should not be used because its frequency exceeds design specifications The clock output will not glitch when changing the range up one step at a time The clock output will glitch when changing the range down Note: the values here are gray coded which is why HIGH comes before TOOHIGH
10862 ADD_BITFIELD_RW(FREQ_RANGE, 0, 12)
10863 END_TYPE()
10864
10865 static const uint32_t CTRL_ENABLE__DISABLE = 3358;
10866 static const uint32_t CTRL_ENABLE__ENABLE = 4011;
10867 static const uint32_t CTRL_FREQ_RANGE__LOW = 4004;
10868 static const uint32_t CTRL_FREQ_RANGE__MEDIUM = 4005;
10869 static const uint32_t CTRL_FREQ_RANGE__HIGH = 4007;
10870 static const uint32_t CTRL_FREQ_RANGE__TOOHIGH = 4006;
10871
10872 // The FREQA & FREQB registers control the frequency by controlling the drive strength of each stage The drive strength has 4 levels determined by the number of bits set Increasing the number of bits set increases the drive strength and increases the oscillation frequency 0 bits set is the default drive strength 1 bit set doubles the drive strength 2 bits set triples drive strength 3 bits set quadruples drive strength For frequency randomisation set both DS0_RANDOM=1 & DS1_RANDOM=1
10873 // Reset value: 0x00000000
10874 BEGIN_TYPE(FREQA_t, uint32_t)
10875 // Set to 0x9696 to apply the settings Any other value in this field will set all drive strengths to 0
10876 ADD_BITFIELD_RW(PASSWD, 16, 16)
10877 // Stage 3 drive strength
10878 ADD_BITFIELD_RW(DS3, 12, 3)
10879 // Stage 2 drive strength
10880 ADD_BITFIELD_RW(DS2, 8, 3)
10881 // Randomises the stage 1 drive strength
10882 ADD_BITFIELD_RW(DS1_RANDOM, 7, 1)
10883 // Stage 1 drive strength
10884 ADD_BITFIELD_RW(DS1, 4, 3)
10885 // Randomises the stage 0 drive strength
10886 ADD_BITFIELD_RW(DS0_RANDOM, 3, 1)
10887 // Stage 0 drive strength
10888 ADD_BITFIELD_RW(DS0, 0, 3)
10889 END_TYPE()
10890
10891 static const uint32_t FREQA_PASSWD__PASS = 38550;
10892
10893 // For a detailed description see freqa register
10894 // Reset value: 0x00000000
10895 BEGIN_TYPE(FREQB_t, uint32_t)
10896 // Set to 0x9696 to apply the settings Any other value in this field will set all drive strengths to 0
10897 ADD_BITFIELD_RW(PASSWD, 16, 16)
10898 // Stage 7 drive strength
10899 ADD_BITFIELD_RW(DS7, 12, 3)
10900 // Stage 6 drive strength
10901 ADD_BITFIELD_RW(DS6, 8, 3)
10902 // Stage 5 drive strength
10903 ADD_BITFIELD_RW(DS5, 4, 3)
10904 // Stage 4 drive strength
10905 ADD_BITFIELD_RW(DS4, 0, 3)
10906 END_TYPE()
10907
10908 static const uint32_t FREQB_PASSWD__PASS = 38550;
10909
10910 // Loads a value to the LFSR randomiser
10911 // Reset value: 0x3f04b16d
10912 BEGIN_TYPE(RANDOM_t, uint32_t)
10913 ADD_BITFIELD_RW(SEED, 0, 32)
10914 END_TYPE()
10915
10916 // Ring Oscillator pause control
10917 BEGIN_TYPE(DORMANT_t, uint32_t)
10918 // This is used to save power by pausing the ROSC On power-up this field is initialised to WAKE An invalid write will also select WAKE Warning: setup the irq before selecting dormant mode
10919 ADD_BITFIELD_RW(DORMANT, 0, 32)
10920 END_TYPE()
10921
10922 static const uint32_t DORMANT_DORMANT__dormant = 1668246881;
10923 static const uint32_t DORMANT_DORMANT__WAKE = 2002873189;
10924
10925 // Controls the output divider
10926 BEGIN_TYPE(DIV_t, uint32_t)
10927 // set to 0xaa00 + div where div = 0 divides by 128 div = 1-127 divides by div any other value sets div=128 this register resets to div=32
10928 ADD_BITFIELD_RW(DIV, 0, 16)
10929 END_TYPE()
10930
10931 static const uint32_t DIV_DIV__PASS = 43520;
10932
10933 // Controls the phase shifted output
10934 // Reset value: 0x00000008
10935 BEGIN_TYPE(PHASE_t, uint32_t)
10936 // set to 0xaa any other value enables the output with shift=0
10937 ADD_BITFIELD_RW(PASSWD, 4, 8)
10938 // enable the phase-shifted output this can be changed on-the-fly
10939 ADD_BITFIELD_RW(ENABLE, 3, 1)
10940 // invert the phase-shifted output this is ignored when div=1
10941 ADD_BITFIELD_RW(FLIP, 2, 1)
10942 // phase shift the phase-shifted output by SHIFT input clocks this can be changed on-the-fly must be set to 0 before setting div=1
10943 ADD_BITFIELD_RW(SHIFT, 0, 2)
10944 END_TYPE()
10945
10946 // Ring Oscillator Status
10947 // Reset value: 0x00000000
10948 BEGIN_TYPE(STATUS_t, uint32_t)
10949 // Oscillator is running and stable
10950 ADD_BITFIELD_RO(STABLE, 31, 1)
10951 // An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT
10952 ADD_BITFIELD_RW(BADWRITE, 24, 1)
10953 // post-divider is running this resets to 0 but transitions to 1 during chip startup
10954 ADD_BITFIELD_RO(DIV_RUNNING, 16, 1)
10955 // Oscillator is enabled but not necessarily running and stable this resets to 0 but transitions to 1 during chip startup
10956 ADD_BITFIELD_RO(ENABLED, 12, 1)
10957 END_TYPE()
10958
10959 // This just reads the state of the oscillator output so randomness is compromised if the ring oscillator is stopped or run at a harmonic of the bus frequency
10960 // Reset value: 0x00000001
10961 BEGIN_TYPE(RANDOMBIT_t, uint32_t)
10962 ADD_BITFIELD_RO(RANDOMBIT, 0, 1)
10963 END_TYPE()
10964
10965 // A down counter running at the ROSC frequency which counts to zero and stops. To start the counter write a non-zero value. Can be used for short software pauses when setting up time sensitive hardware.
10966 // Reset value: 0x00000000
10967 BEGIN_TYPE(COUNT_t, uint32_t)
10968 ADD_BITFIELD_RW(COUNT, 0, 16)
10969 END_TYPE()
10970
10971 struct ROSC_t {
10972 CTRL_t CTRL;
10973 FREQA_t FREQA;
10974 FREQB_t FREQB;
10975 RANDOM_t RANDOM;
10976 DORMANT_t DORMANT;
10977 DIV_t DIV;
10978 PHASE_t PHASE;
10979 STATUS_t STATUS;
10980 RANDOMBIT_t RANDOMBIT;
10981 COUNT_t COUNT;
10982 };
10983
10984 static ROSC_t & ROSC = (*(ROSC_t *)0x400e8000);
10985 static ROSC_t & ROSC_XOR = (*(ROSC_t *)0x400e9000);
10986 static ROSC_t & ROSC_SET = (*(ROSC_t *)0x400ea000);
10987 static ROSC_t & ROSC_CLR = (*(ROSC_t *)0x400eb000);
10988
10989} // _ROSC_
10990
10991// Controls vreg, bor, lposc, chip resets & xosc startup, powman and provides scratch register for general use and for bootcode use
10992namespace _POWMAN_ {
10993
10994 // Indicates a bad password has been used
10995 // Reset value: 0x00000000
10996 BEGIN_TYPE(BADPASSWD_t, uint32_t)
10997 ADD_BITFIELD_RW(BADPASSWD, 0, 1)
10998 END_TYPE()
10999
11000 // Voltage Regulator Control
11001 // Reset value: 0x00008050
11002 BEGIN_TYPE(VREG_CTRL_t, uint32_t)
11003 // returns the regulator to its startup settings 0 - reset 1 - not reset (default)
11004 ADD_BITFIELD_RW(RST_N, 15, 1)
11005 // unlocks the VREG control interface after power up 0 - Locked (default) 1 - Unlocked It cannot be relocked when it is unlocked.
11006 ADD_BITFIELD_RW(UNLOCK, 13, 1)
11007 // isolates the VREG control interface 0 - not isolated (default) 1 - isolated
11008 ADD_BITFIELD_RW(ISOLATE, 12, 1)
11009 // 0=not disabled, 1=enabled
11010 ADD_BITFIELD_RW(DISABLE_VOLTAGE_LIMIT, 8, 1)
11011 // high temperature protection threshold regulator power transistors are disabled when junction temperature exceeds threshold 000 - 100C 001 - 105C 010 - 110C 011 - 115C 100 - 120C 101 - 125C 110 - 135C 111 - 150C
11012 ADD_BITFIELD_RW(HT_TH, 4, 3)
11013 END_TYPE()
11014
11015 // Voltage Regulator Status
11016 // Reset value: 0x00000000
11017 BEGIN_TYPE(VREG_STS_t, uint32_t)
11018 // output regulation status 0=not in regulation, 1=in regulation
11019 ADD_BITFIELD_RO(VOUT_OK, 4, 1)
11020 // startup status 0=startup complete, 1=starting up
11021 ADD_BITFIELD_RO(STARTUP, 0, 1)
11022 END_TYPE()
11023
11024 // Voltage Regulator Settings
11025 // Reset value: 0x000000b0
11026 BEGIN_TYPE(VREG_t, uint32_t)
11027 // regulator state is being updated writes to the vreg register will be ignored when this field is set
11028 ADD_BITFIELD_RO(UPDATE_IN_PROGRESS, 15, 1)
11029 // output voltage select the regulator output voltage is limited to 1.3V unless the voltage limit is disabled using the disable_voltage_limit field in the vreg_ctrl register 00000 - 0.55V 00001 - 0.60V 00010 - 0.65V 00011 - 0.70V 00100 - 0.75V 00101 - 0.80V 00110 - 0.85V 00111 - 0.90V 01000 - 0.95V 01001 - 1.00V 01010 - 1.05V 01011 - 1.10V (default) 01100 - 1.15V 01101 - 1.20V 01110 - 1.25V 01111 - 1.30V 10000 - 1.35V 10001 - 1.40V 10010 - 1.50V 10011 - 1.60V 10100 - 1.65V 10101 - 1.70V 10110 - 1.80V 10111 - 1.90V 11000 - 2.00V 11001 - 2.35V 11010 - 2.50V 11011 - 2.65V 11100 - 2.80V 11101 - 3.00V 11110 - 3.15V 11111 - 3.30V
11030 ADD_BITFIELD_RW(VSEL, 4, 5)
11031 // high impedance mode select 0=not in high impedance mode, 1=in high impedance mode
11032 ADD_BITFIELD_RW(HIZ, 1, 1)
11033 END_TYPE()
11034
11035 // Voltage Regulator Low Power Entry Settings
11036 // Reset value: 0x000000b4
11037 BEGIN_TYPE(VREG_LP_ENTRY_t, uint32_t)
11038 // output voltage select the regulator output voltage is limited to 1.3V unless the voltage limit is disabled using the disable_voltage_limit field in the vreg_ctrl register 00000 - 0.55V 00001 - 0.60V 00010 - 0.65V 00011 - 0.70V 00100 - 0.75V 00101 - 0.80V 00110 - 0.85V 00111 - 0.90V 01000 - 0.95V 01001 - 1.00V 01010 - 1.05V 01011 - 1.10V (default) 01100 - 1.15V 01101 - 1.20V 01110 - 1.25V 01111 - 1.30V 10000 - 1.35V 10001 - 1.40V 10010 - 1.50V 10011 - 1.60V 10100 - 1.65V 10101 - 1.70V 10110 - 1.80V 10111 - 1.90V 11000 - 2.00V 11001 - 2.35V 11010 - 2.50V 11011 - 2.65V 11100 - 2.80V 11101 - 3.00V 11110 - 3.15V 11111 - 3.30V
11039 ADD_BITFIELD_RW(VSEL, 4, 5)
11040 // selects either normal (switching) mode or low power (linear) mode low power mode can only be selected for output voltages up to 1.3V 0 = normal mode (switching) 1 = low power mode (linear)
11041 ADD_BITFIELD_RW(MODE, 2, 1)
11042 // high impedance mode select 0=not in high impedance mode, 1=in high impedance mode
11043 ADD_BITFIELD_RW(HIZ, 1, 1)
11044 END_TYPE()
11045
11046 // Voltage Regulator Low Power Exit Settings
11047 // Reset value: 0x000000b0
11048 BEGIN_TYPE(VREG_LP_EXIT_t, uint32_t)
11049 // output voltage select the regulator output voltage is limited to 1.3V unless the voltage limit is disabled using the disable_voltage_limit field in the vreg_ctrl register 00000 - 0.55V 00001 - 0.60V 00010 - 0.65V 00011 - 0.70V 00100 - 0.75V 00101 - 0.80V 00110 - 0.85V 00111 - 0.90V 01000 - 0.95V 01001 - 1.00V 01010 - 1.05V 01011 - 1.10V (default) 01100 - 1.15V 01101 - 1.20V 01110 - 1.25V 01111 - 1.30V 10000 - 1.35V 10001 - 1.40V 10010 - 1.50V 10011 - 1.60V 10100 - 1.65V 10101 - 1.70V 10110 - 1.80V 10111 - 1.90V 11000 - 2.00V 11001 - 2.35V 11010 - 2.50V 11011 - 2.65V 11100 - 2.80V 11101 - 3.00V 11110 - 3.15V 11111 - 3.30V
11050 ADD_BITFIELD_RW(VSEL, 4, 5)
11051 // selects either normal (switching) mode or low power (linear) mode low power mode can only be selected for output voltages up to 1.3V 0 = normal mode (switching) 1 = low power mode (linear)
11052 ADD_BITFIELD_RW(MODE, 2, 1)
11053 // high impedance mode select 0=not in high impedance mode, 1=in high impedance mode
11054 ADD_BITFIELD_RW(HIZ, 1, 1)
11055 END_TYPE()
11056
11057 // Brown-out Detection Control
11058 // Reset value: 0x00000000
11059 BEGIN_TYPE(BOD_CTRL_t, uint32_t)
11060 // isolates the brown-out detection control interface 0 - not isolated (default) 1 - isolated
11061 ADD_BITFIELD_RW(ISOLATE, 12, 1)
11062 END_TYPE()
11063
11064 // Brown-out Detection Settings
11065 // Reset value: 0x000000b1
11066 BEGIN_TYPE(BOD_t, uint32_t)
11067 // threshold select 00000 - 0.473V 00001 - 0.516V 00010 - 0.559V 00011 - 0.602V 00100 - 0.645VS 00101 - 0.688V 00110 - 0.731V 00111 - 0.774V 01000 - 0.817V 01001 - 0.860V (default) 01010 - 0.903V 01011 - 0.946V 01100 - 0.989V 01101 - 1.032V 01110 - 1.075V 01111 - 1.118V 10000 - 1.161 10001 - 1.204V
11068 ADD_BITFIELD_RW(VSEL, 4, 5)
11069 // enable brown-out detection 0=not enabled, 1=enabled
11070 ADD_BITFIELD_RW(EN, 0, 1)
11071 END_TYPE()
11072
11073 // Brown-out Detection Low Power Entry Settings
11074 // Reset value: 0x000000b0
11075 BEGIN_TYPE(BOD_LP_ENTRY_t, uint32_t)
11076 // threshold select 00000 - 0.473V 00001 - 0.516V 00010 - 0.559V 00011 - 0.602V 00100 - 0.645VS 00101 - 0.688V 00110 - 0.731V 00111 - 0.774V 01000 - 0.817V 01001 - 0.860V (default) 01010 - 0.903V 01011 - 0.946V 01100 - 0.989V 01101 - 1.032V 01110 - 1.075V 01111 - 1.118V 10000 - 1.161 10001 - 1.204V
11077 ADD_BITFIELD_RW(VSEL, 4, 5)
11078 // enable brown-out detection 0=not enabled, 1=enabled
11079 ADD_BITFIELD_RW(EN, 0, 1)
11080 END_TYPE()
11081
11082 // Brown-out Detection Low Power Exit Settings
11083 // Reset value: 0x000000b1
11084 BEGIN_TYPE(BOD_LP_EXIT_t, uint32_t)
11085 // threshold select 00000 - 0.473V 00001 - 0.516V 00010 - 0.559V 00011 - 0.602V 00100 - 0.645VS 00101 - 0.688V 00110 - 0.731V 00111 - 0.774V 01000 - 0.817V 01001 - 0.860V (default) 01010 - 0.903V 01011 - 0.946V 01100 - 0.989V 01101 - 1.032V 01110 - 1.075V 01111 - 1.118V 10000 - 1.161 10001 - 1.204V
11086 ADD_BITFIELD_RW(VSEL, 4, 5)
11087 // enable brown-out detection 0=not enabled, 1=enabled
11088 ADD_BITFIELD_RW(EN, 0, 1)
11089 END_TYPE()
11090
11091 // Low power oscillator control register.
11092 // Reset value: 0x00000203
11093 BEGIN_TYPE(LPOSC_t, uint32_t)
11094 // Frequency trim - the trim step is typically 1% of the reset frequency, but can be up to 3%
11095 ADD_BITFIELD_RW(TRIM, 4, 6)
11096 // This feature has been removed
11097 ADD_BITFIELD_RW(MODE, 0, 2)
11098 END_TYPE()
11099
11100 // Chip reset control and status
11101 // Reset value: 0x00000000
11102 BEGIN_TYPE(CHIP_RESET_t, uint32_t)
11103 // Last reset was a watchdog timeout which was configured to reset the power-on state machine This resets: double_tap flag no DP no RPAP no rescue_flag no timer no powman no swcore no psm yes and does not change the power state
11104 ADD_BITFIELD_RO(HAD_WATCHDOG_RESET_RSM, 28, 1)
11105 // Last reset was a system reset from the hazard debugger This resets: double_tap flag no DP no RPAP no rescue_flag no timer no powman no swcore no psm yes and does not change the power state
11106 ADD_BITFIELD_RO(HAD_HZD_SYS_RESET_REQ, 27, 1)
11107 // Last reset was due to a power supply glitch This resets: double_tap flag no DP no RPAP no rescue_flag no timer no powman no swcore no psm yes and does not change the power state
11108 ADD_BITFIELD_RO(HAD_GLITCH_DETECT, 26, 1)
11109 // Last reset was a switched core powerdown This resets: double_tap flag no DP no RPAP no rescue_flag no timer no powman no swcore yes psm yes then starts the power sequencer
11110 ADD_BITFIELD_RO(HAD_SWCORE_PD, 25, 1)
11111 // Last reset was a watchdog timeout which was configured to reset the switched-core This resets: double_tap flag no DP no RPAP no rescue_flag no timer no powman no swcore yes psm yes then starts the power sequencer
11112 ADD_BITFIELD_RO(HAD_WATCHDOG_RESET_SWCORE, 24, 1)
11113 // Last reset was a watchdog timeout which was configured to reset the power manager This resets: double_tap flag no DP no RPAP no rescue_flag no timer yes powman yes swcore yes psm yes then starts the power sequencer
11114 ADD_BITFIELD_RO(HAD_WATCHDOG_RESET_POWMAN, 23, 1)
11115 // Last reset was a watchdog timeout which was configured to reset the power manager asynchronously This resets: double_tap flag no DP no RPAP no rescue_flag no timer yes powman yes swcore yes psm yes then starts the power sequencer
11116 ADD_BITFIELD_RO(HAD_WATCHDOG_RESET_POWMAN_ASYNC, 22, 1)
11117 // Last reset was a rescue reset from the debugger This resets: double_tap flag no DP no RPAP no rescue_flag no, it sets this flag timer yes powman yes swcore yes psm yes then starts the power sequencer
11118 ADD_BITFIELD_RO(HAD_RESCUE, 21, 1)
11119 // Last reset was an reset request from the arm debugger This resets: double_tap flag no DP no RPAP no rescue_flag yes timer yes powman yes swcore yes psm yes then starts the power sequencer
11120 ADD_BITFIELD_RO(HAD_DP_RESET_REQ, 19, 1)
11121 // Last reset was from the RUN pin This resets: double_tap flag no DP yes RPAP yes rescue_flag yes timer yes powman yes swcore yes psm yes then starts the power sequencer
11122 ADD_BITFIELD_RO(HAD_RUN_LOW, 18, 1)
11123 // Last reset was from the brown-out detection block This resets: double_tap flag yes DP yes RPAP yes rescue_flag yes timer yes powman yes swcore yes psm yes then starts the power sequencer
11124 ADD_BITFIELD_RO(HAD_BOR, 17, 1)
11125 // Last reset was from the power-on reset This resets: double_tap flag yes DP yes RPAP yes rescue_flag yes timer yes powman yes swcore yes psm yes then starts the power sequencer
11126 ADD_BITFIELD_RO(HAD_POR, 16, 1)
11127 // This is set by a rescue reset from the RP-AP. Its purpose is to halt before the bootrom before booting from flash in order to recover from a boot lock-up. The debugger can then attach once the bootrom has been halted and flash some working code that does not lock up.
11128 ADD_BITFIELD_RW(RESCUE_FLAG, 4, 1)
11129 // This flag is set by double-tapping RUN. It tells bootcode to go into the bootloader.
11130 ADD_BITFIELD_RW(DOUBLE_TAP, 0, 1)
11131 END_TYPE()
11132
11133 // Allows a watchdog reset to reset the internal state of powman in addition to the power-on state machine (PSM). Note that powman ignores watchdog resets that do not select at least the CLOCKS stage or earlier stages in the PSM. If using these bits, it's recommended to set PSM_WDSEL to all-ones in addition to the desired bits in this register. Failing to select CLOCKS or earlier will result in the POWMAN_WDSEL register having no effect.
11134 // Reset value: 0x00000000
11135 BEGIN_TYPE(WDSEL_t, uint32_t)
11136 // If set to 1, a watchdog reset will run the full power-on state machine (PSM) sequence From a user perspective it is the same as setting RSM_WDSEL_PROC_COLD From a hardware debug perspective it has the same effect as a reset from a glitch detector
11137 ADD_BITFIELD_RW(RESET_RSM, 12, 1)
11138 // If set to 1, a watchdog reset will reset the switched core power domain and run the full power-on state machine (PSM) sequence From a user perspective it is the same as setting RSM_WDSEL_PROC_COLD From a hardware debug perspective it has the same effect as a power-on reset for the switched core power domain
11139 ADD_BITFIELD_RW(RESET_SWCORE, 8, 1)
11140 // If set to 1, a watchdog reset will restore powman defaults, reset the timer, reset the switched core power domain and run the full power-on state machine (PSM) sequence This relies on clk_ref running. Use reset_powman_async if that may not be true
11141 ADD_BITFIELD_RW(RESET_POWMAN, 4, 1)
11142 // If set to 1, a watchdog reset will restore powman defaults, reset the timer, reset the switched core domain and run the full power-on state machine (PSM) sequence This does not rely on clk_ref running
11143 ADD_BITFIELD_RW(RESET_POWMAN_ASYNC, 0, 1)
11144 END_TYPE()
11145
11146 // For configuration of the power sequencer Writes are ignored while POWMAN_STATE_CHANGING=1
11147 // Reset value: 0x001011f0
11148 BEGIN_TYPE(SEQ_CFG_t, uint32_t)
11149 // 0 indicates the POWMAN clock is running from the low power oscillator (32kHz) 1 indicates the POWMAN clock is running from the reference clock (2-50MHz)
11150 ADD_BITFIELD_RO(USING_FAST_POWCK, 20, 1)
11151 // Indicates the brown-out detector (BOD) mode 0 = BOD high power mode which is the default 1 = BOD low power mode
11152 ADD_BITFIELD_RO(USING_BOD_LP, 17, 1)
11153 // Indicates the voltage regulator (VREG) mode 0 = VREG high power mode which is the default 1 = VREG low power mode
11154 ADD_BITFIELD_RO(USING_VREG_LP, 16, 1)
11155 // selects the reference clock (clk_ref) as the source of the POWMAN clock when switched-core is powered. The POWMAN clock always switches to the slow clock (lposc) when switched-core is powered down because the fast clock stops running. 0 always run the POWMAN clock from the slow clock (lposc) 1 run the POWMAN clock from the fast clock when available This setting takes effect when a power up sequence is next run
11156 ADD_BITFIELD_RW(USE_FAST_POWCK, 12, 1)
11157 // Set to 0 to stop the low power osc when the switched-core is powered down, which is unwise if using it to clock the timer This setting takes effect when the swcore is next powered down
11158 ADD_BITFIELD_RW(RUN_LPOSC_IN_LP, 8, 1)
11159 // Set to 0 to prevent automatic switching to bod high power mode when switched-core is powered up This setting takes effect when the swcore is next powered up
11160 ADD_BITFIELD_RW(USE_BOD_HP, 7, 1)
11161 // Set to 0 to prevent automatic switching to bod low power mode when switched-core is powered down This setting takes effect when the swcore is next powered down
11162 ADD_BITFIELD_RW(USE_BOD_LP, 6, 1)
11163 // Set to 0 to prevent automatic switching to vreg high power mode when switched-core is powered up This setting takes effect when the swcore is next powered up
11164 ADD_BITFIELD_RW(USE_VREG_HP, 5, 1)
11165 // Set to 0 to prevent automatic switching to vreg low power mode when switched-core is powered down This setting takes effect when the swcore is next powered down
11166 ADD_BITFIELD_RW(USE_VREG_LP, 4, 1)
11167 // Specifies the power state of SRAM0 when powering up swcore from a low power state (P1.xxx) to a high power state (P0.0xx). 0=power-up 1=no change
11168 ADD_BITFIELD_RW(HW_PWRUP_SRAM0, 1, 1)
11169 // Specifies the power state of SRAM1 when powering up swcore from a low power state (P1.xxx) to a high power state (P0.0xx). 0=power-up 1=no change
11170 ADD_BITFIELD_RW(HW_PWRUP_SRAM1, 0, 1)
11171 END_TYPE()
11172
11173 // This register controls the power state of the 4 power domains. The current power state is indicated in POWMAN_STATE_CURRENT which is read-only. To change the state, write to POWMAN_STATE_REQ. The coding of POWMAN_STATE_CURRENT & POWMAN_STATE_REQ corresponds to the power states defined in the datasheet: bit 3 = SWCORE bit 2 = XIP cache bit 1 = SRAM0 bit 0 = SRAM1 0 = powered up 1 = powered down When POWMAN_STATE_REQ is written, the POWMAN_STATE_WAITING flag is set while the Power Manager determines what is required. If an invalid transition is requested the Power Manager will still register the request in POWMAN_STATE_REQ but will also set the POWMAN_BAD_REQ flag. It will then implement the power-up requests and ignore the power down requests. To do nothing would risk entering an unrecoverable lock-up state. Invalid requests are: any combination of power up and power down requests any request that results in swcore boing powered and xip unpowered If the request is to power down the switched-core domain then POWMAN_STATE_WAITING stays active until the processors halt. During this time the POWMAN_STATE_REQ field can be re-written to change or cancel the request. When the power state transition begins the POWMAN_STATE_WAITING_flag is cleared, the POWMAN_STATE_CHANGING flag is set and POWMAN register writes are ignored until the transition completes.
11174 // Reset value: 0x0000000f
11175 BEGIN_TYPE(STATE_t, uint32_t)
11176 ADD_BITFIELD_RO(CHANGING, 13, 1)
11177 ADD_BITFIELD_RO(WAITING, 12, 1)
11178 // Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)
11179 ADD_BITFIELD_RO(BAD_HW_REQ, 11, 1)
11180 // Bad software initiated state request. No action taken.
11181 ADD_BITFIELD_RO(BAD_SW_REQ, 10, 1)
11182 // Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down.
11183 ADD_BITFIELD_RW(PWRUP_WHILE_WAITING, 9, 1)
11184 ADD_BITFIELD_RW(REQ_IGNORED, 8, 1)
11185 ADD_BITFIELD_RW(REQ, 4, 4)
11186 ADD_BITFIELD_RO(CURRENT, 0, 4)
11187 END_TYPE()
11188
11189 // Reset value: 0x00000040
11190 BEGIN_TYPE(POW_FASTDIV_t, uint32_t)
11191 // divides the POWMAN clock to provide a tick for the delay module and state machines when clk_pow is running from the slow clock it is not divided when clk_pow is running from the fast clock it is divided by tick_div
11192 ADD_BITFIELD_RW(POW_FASTDIV, 0, 11)
11193 END_TYPE()
11194
11195 // power state machine delays
11196 // Reset value: 0x00002011
11197 BEGIN_TYPE(POW_DELAY_t, uint32_t)
11198 // timing between the sram0 and sram1 power state machine steps measured in units of the powman tick period (>=1us), 0 gives a delay of 1 unit
11199 ADD_BITFIELD_RW(SRAM_STEP, 8, 8)
11200 // timing between the xip power state machine steps measured in units of the lposc period, 0 gives a delay of 1 unit
11201 ADD_BITFIELD_RW(XIP_STEP, 4, 4)
11202 // timing between the swcore power state machine steps measured in units of the lposc period, 0 gives a delay of 1 unit
11203 ADD_BITFIELD_RW(SWCORE_STEP, 0, 4)
11204 END_TYPE()
11205
11206 // Configures a gpio as a power mode aware control output
11207 // Reset value: 0x0000003f
11208 BEGIN_TYPE(EXT_CTRL0_t, uint32_t)
11209 // output level when exiting the low power state
11210 ADD_BITFIELD_RW(LP_EXIT_STATE, 14, 1)
11211 // output level when entering the low power state
11212 ADD_BITFIELD_RW(LP_ENTRY_STATE, 13, 1)
11213 ADD_BITFIELD_RW(INIT_STATE, 12, 1)
11214 ADD_BITFIELD_RW(INIT, 8, 1)
11215 // selects from gpio 0->30 set to 31 to disable this feature
11216 ADD_BITFIELD_RW(GPIO_SELECT, 0, 6)
11217 END_TYPE()
11218
11219 // Configures a gpio as a power mode aware control output
11220 // Reset value: 0x0000003f
11221 BEGIN_TYPE(EXT_CTRL1_t, uint32_t)
11222 // output level when exiting the low power state
11223 ADD_BITFIELD_RW(LP_EXIT_STATE, 14, 1)
11224 // output level when entering the low power state
11225 ADD_BITFIELD_RW(LP_ENTRY_STATE, 13, 1)
11226 ADD_BITFIELD_RW(INIT_STATE, 12, 1)
11227 ADD_BITFIELD_RW(INIT, 8, 1)
11228 // selects from gpio 0->30 set to 31 to disable this feature
11229 ADD_BITFIELD_RW(GPIO_SELECT, 0, 6)
11230 END_TYPE()
11231
11232 // Select a GPIO to use as a time reference, the source can be used to drive the low power clock at 32kHz, or to provide a 1ms tick to the timer, or provide a 1Hz tick to the timer. The tick selection is controlled by the POWMAN_TIMER register.
11233 // Reset value: 0x00000000
11234 BEGIN_TYPE(EXT_TIME_REF_t, uint32_t)
11235 // Use the selected GPIO to drive the 32kHz low power clock, in place of LPOSC. This field must only be written when POWMAN_TIMER_RUN=0
11236 ADD_BITFIELD_RW(DRIVE_LPCK, 4, 1)
11237 // 0 -> gpio12 1 -> gpio20 2 -> gpio14 3 -> gpio22
11238 ADD_BITFIELD_RW(SOURCE_SEL, 0, 2)
11239 END_TYPE()
11240
11241 // Informs the AON Timer of the integer component of the clock frequency when running off the LPOSC.
11242 // Reset value: 0x00000020
11243 BEGIN_TYPE(LPOSC_FREQ_KHZ_INT_t, uint32_t)
11244 // Integer component of the LPOSC or GPIO clock source frequency in kHz. Default = 32 This field must only be written when POWMAN_TIMER_RUN=0 or POWMAN_TIMER_USING_XOSC=1
11245 ADD_BITFIELD_RW(LPOSC_FREQ_KHZ_INT, 0, 6)
11246 END_TYPE()
11247
11248 // Informs the AON Timer of the fractional component of the clock frequency when running off the LPOSC.
11249 // Reset value: 0x0000c49c
11250 BEGIN_TYPE(LPOSC_FREQ_KHZ_FRAC_t, uint32_t)
11251 // Fractional component of the LPOSC or GPIO clock source frequency in kHz. Default = 0.768 This field must only be written when POWMAN_TIMER_RUN=0 or POWMAN_TIMER_USING_XOSC=1
11252 ADD_BITFIELD_RW(LPOSC_FREQ_KHZ_FRAC, 0, 16)
11253 END_TYPE()
11254
11255 // Informs the AON Timer of the integer component of the clock frequency when running off the XOSC.
11256 // Reset value: 0x00002ee0
11257 BEGIN_TYPE(XOSC_FREQ_KHZ_INT_t, uint32_t)
11258 // Integer component of the XOSC frequency in kHz. Default = 12000 Must be >1 This field must only be written when POWMAN_TIMER_RUN=0 or POWMAN_TIMER_USING_XOSC=0
11259 ADD_BITFIELD_RW(XOSC_FREQ_KHZ_INT, 0, 16)
11260 END_TYPE()
11261
11262 // Informs the AON Timer of the fractional component of the clock frequency when running off the XOSC.
11263 // Reset value: 0x00000000
11264 BEGIN_TYPE(XOSC_FREQ_KHZ_FRAC_t, uint32_t)
11265 // Fractional component of the XOSC frequency in kHz. This field must only be written when POWMAN_TIMER_RUN=0 or POWMAN_TIMER_USING_XOSC=0
11266 ADD_BITFIELD_RW(XOSC_FREQ_KHZ_FRAC, 0, 16)
11267 END_TYPE()
11268
11269 // Reset value: 0x00000000
11270 BEGIN_TYPE(SET_TIME_63TO48_t, uint32_t)
11271 // For setting the time, do not use for reading the time, use POWMAN_READ_TIME_UPPER and POWMAN_READ_TIME_LOWER. This field must only be written when POWMAN_TIMER_RUN=0
11272 ADD_BITFIELD_RW(SET_TIME_63TO48, 0, 16)
11273 END_TYPE()
11274
11275 // Reset value: 0x00000000
11276 BEGIN_TYPE(SET_TIME_47TO32_t, uint32_t)
11277 // For setting the time, do not use for reading the time, use POWMAN_READ_TIME_UPPER and POWMAN_READ_TIME_LOWER. This field must only be written when POWMAN_TIMER_RUN=0
11278 ADD_BITFIELD_RW(SET_TIME_47TO32, 0, 16)
11279 END_TYPE()
11280
11281 // Reset value: 0x00000000
11282 BEGIN_TYPE(SET_TIME_31TO16_t, uint32_t)
11283 // For setting the time, do not use for reading the time, use POWMAN_READ_TIME_UPPER and POWMAN_READ_TIME_LOWER. This field must only be written when POWMAN_TIMER_RUN=0
11284 ADD_BITFIELD_RW(SET_TIME_31TO16, 0, 16)
11285 END_TYPE()
11286
11287 // Reset value: 0x00000000
11288 BEGIN_TYPE(SET_TIME_15TO0_t, uint32_t)
11289 // For setting the time, do not use for reading the time, use POWMAN_READ_TIME_UPPER and POWMAN_READ_TIME_LOWER. This field must only be written when POWMAN_TIMER_RUN=0
11290 ADD_BITFIELD_RW(SET_TIME_15TO0, 0, 16)
11291 END_TYPE()
11292
11293 // Reset value: 0x00000000
11294 BEGIN_TYPE(READ_TIME_UPPER_t, uint32_t)
11295 // For reading bits 63:32 of the timer. When reading all 64 bits it is possible for the LOWER count to rollover during the read. It is recommended to read UPPER, then LOWER, then re-read UPPER and, if it has changed, re-read LOWER.
11296 ADD_BITFIELD_RO(READ_TIME_UPPER, 0, 32)
11297 END_TYPE()
11298
11299 // Reset value: 0x00000000
11300 BEGIN_TYPE(READ_TIME_LOWER_t, uint32_t)
11301 // For reading bits 31:0 of the timer.
11302 ADD_BITFIELD_RO(READ_TIME_LOWER, 0, 32)
11303 END_TYPE()
11304
11305 // Reset value: 0x00000000
11306 BEGIN_TYPE(ALARM_TIME_63TO48_t, uint32_t)
11307 // This field must only be written when POWMAN_ALARM_ENAB=0
11308 ADD_BITFIELD_RW(ALARM_TIME_63TO48, 0, 16)
11309 END_TYPE()
11310
11311 // Reset value: 0x00000000
11312 BEGIN_TYPE(ALARM_TIME_47TO32_t, uint32_t)
11313 // This field must only be written when POWMAN_ALARM_ENAB=0
11314 ADD_BITFIELD_RW(ALARM_TIME_47TO32, 0, 16)
11315 END_TYPE()
11316
11317 // Reset value: 0x00000000
11318 BEGIN_TYPE(ALARM_TIME_31TO16_t, uint32_t)
11319 // This field must only be written when POWMAN_ALARM_ENAB=0
11320 ADD_BITFIELD_RW(ALARM_TIME_31TO16, 0, 16)
11321 END_TYPE()
11322
11323 // Reset value: 0x00000000
11324 BEGIN_TYPE(ALARM_TIME_15TO0_t, uint32_t)
11325 // This field must only be written when POWMAN_ALARM_ENAB=0
11326 ADD_BITFIELD_RW(ALARM_TIME_15TO0, 0, 16)
11327 END_TYPE()
11328
11329 // Reset value: 0x00000000
11330 BEGIN_TYPE(TIMER_t, uint32_t)
11331 // Timer is synchronised to a 1hz gpio source
11332 ADD_BITFIELD_RO(USING_GPIO_1HZ, 19, 1)
11333 // Timer is running from a 1khz gpio source
11334 ADD_BITFIELD_RO(USING_GPIO_1KHZ, 18, 1)
11335 // Timer is running from lposc
11336 ADD_BITFIELD_RO(USING_LPOSC, 17, 1)
11337 // Timer is running from xosc
11338 ADD_BITFIELD_RO(USING_XOSC, 16, 1)
11339 // Selects the gpio source as the reference for the sec counter. The msec counter will continue to use the lposc or xosc reference.
11340 ADD_BITFIELD_RW(USE_GPIO_1HZ, 13, 1)
11341 // switch to gpio as the source of the 1kHz timer tick
11342 ADD_BITFIELD_WO(USE_GPIO_1KHZ, 10, 1)
11343 // switch to xosc as the source of the 1kHz timer tick
11344 ADD_BITFIELD_WO(USE_XOSC, 9, 1)
11345 // Switch to lposc as the source of the 1kHz timer tick
11346 ADD_BITFIELD_WO(USE_LPOSC, 8, 1)
11347 // Alarm has fired. Write to 1 to clear the alarm.
11348 ADD_BITFIELD_RW(ALARM, 6, 1)
11349 // Alarm wakes the chip from low power mode
11350 ADD_BITFIELD_RW(PWRUP_ON_ALARM, 5, 1)
11351 // Enables the alarm. The alarm must be disabled while writing the alarm time.
11352 ADD_BITFIELD_RW(ALARM_ENAB, 4, 1)
11353 // Clears the timer, does not disable the timer and does not affect the alarm. This control can be written at any time.
11354 ADD_BITFIELD_WO(CLEAR, 2, 1)
11355 // Timer enable. Setting this bit causes the timer to begin counting up from its current value. Clearing this bit stops the timer from counting. Before enabling the timer, set the POWMAN_LPOSC_FREQ* and POWMAN_XOSC_FREQ* registers to configure the count rate, and initialise the current time by writing to SET_TIME_63TO48 through SET_TIME_15TO0. You must not write to the SET_TIME_x registers when the timer is running. Once configured, start the timer by setting POWMAN_TIMER_RUN=1. This will start the timer running from the LPOSC. When the XOSC is available switch the reference clock to XOSC then select it as the timer clock by setting POWMAN_TIMER_USE_XOSC=1
11356 ADD_BITFIELD_RW(RUN, 1, 1)
11357 // Control whether Non-secure software can write to the timer registers. All other registers are hardwired to be inaccessible to Non-secure.
11358 ADD_BITFIELD_RW(NONSEC_WRITE, 0, 1)
11359 END_TYPE()
11360
11361 // 4 GPIO powerup events can be configured to wake the chip up from a low power state. The pwrups are level/edge sensitive and can be set to trigger on a high/rising or low/falling event The number of gpios available depends on the package option. An invalid selection will be ignored source = 0 selects gpio0 . . source = 47 selects gpio47 source = 48 selects qspi_ss source = 49 selects qspi_sd0 source = 50 selects qspi_sd1 source = 51 selects qspi_sd2 source = 52 selects qspi_sd3 source = 53 selects qspi_sclk level = 0 triggers the pwrup when the source is low level = 1 triggers the pwrup when the source is high
11362 // Reset value: 0x0000003f
11363 BEGIN_TYPE(PWRUP0_t, uint32_t)
11364 // Value of selected gpio pin (only if enable == 1)
11365 ADD_BITFIELD_RO(RAW_STATUS, 10, 1)
11366 // Status of gpio wakeup. Write to 1 to clear a latched edge detect.
11367 ADD_BITFIELD_RW(STATUS, 9, 1)
11368 // Edge or level detect. Edge will detect a 0 to 1 transition (or 1 to 0 transition). Level will detect a 1 or 0. Both types of event get latched into the current_pwrup_req register.
11369 ADD_BITFIELD_RW(MODE, 8, 1)
11370 ADD_BITFIELD_RW(DIRECTION, 7, 1)
11371 // Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup event. If using edge detect a latched edge needs to be cleared by writing 1 to the status register also.
11372 ADD_BITFIELD_RW(ENABLE, 6, 1)
11373 ADD_BITFIELD_RW(SOURCE, 0, 6)
11374 END_TYPE()
11375
11376 static const uint32_t PWRUP0_MODE__level = 0;
11377 static const uint32_t PWRUP0_MODE__edge = 1;
11378 static const uint32_t PWRUP0_DIRECTION__low_falling = 0;
11379 static const uint32_t PWRUP0_DIRECTION__high_rising = 1;
11380
11381 // 4 GPIO powerup events can be configured to wake the chip up from a low power state. The pwrups are level/edge sensitive and can be set to trigger on a high/rising or low/falling event The number of gpios available depends on the package option. An invalid selection will be ignored source = 0 selects gpio0 . . source = 47 selects gpio47 source = 48 selects qspi_ss source = 49 selects qspi_sd0 source = 50 selects qspi_sd1 source = 51 selects qspi_sd2 source = 52 selects qspi_sd3 source = 53 selects qspi_sclk level = 0 triggers the pwrup when the source is low level = 1 triggers the pwrup when the source is high
11382 // Reset value: 0x0000003f
11383 BEGIN_TYPE(PWRUP1_t, uint32_t)
11384 // Value of selected gpio pin (only if enable == 1)
11385 ADD_BITFIELD_RO(RAW_STATUS, 10, 1)
11386 // Status of gpio wakeup. Write to 1 to clear a latched edge detect.
11387 ADD_BITFIELD_RW(STATUS, 9, 1)
11388 // Edge or level detect. Edge will detect a 0 to 1 transition (or 1 to 0 transition). Level will detect a 1 or 0. Both types of event get latched into the current_pwrup_req register.
11389 ADD_BITFIELD_RW(MODE, 8, 1)
11390 ADD_BITFIELD_RW(DIRECTION, 7, 1)
11391 // Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup event. If using edge detect a latched edge needs to be cleared by writing 1 to the status register also.
11392 ADD_BITFIELD_RW(ENABLE, 6, 1)
11393 ADD_BITFIELD_RW(SOURCE, 0, 6)
11394 END_TYPE()
11395
11396 static const uint32_t PWRUP1_MODE__level = 0;
11397 static const uint32_t PWRUP1_MODE__edge = 1;
11398 static const uint32_t PWRUP1_DIRECTION__low_falling = 0;
11399 static const uint32_t PWRUP1_DIRECTION__high_rising = 1;
11400
11401 // 4 GPIO powerup events can be configured to wake the chip up from a low power state. The pwrups are level/edge sensitive and can be set to trigger on a high/rising or low/falling event The number of gpios available depends on the package option. An invalid selection will be ignored source = 0 selects gpio0 . . source = 47 selects gpio47 source = 48 selects qspi_ss source = 49 selects qspi_sd0 source = 50 selects qspi_sd1 source = 51 selects qspi_sd2 source = 52 selects qspi_sd3 source = 53 selects qspi_sclk level = 0 triggers the pwrup when the source is low level = 1 triggers the pwrup when the source is high
11402 // Reset value: 0x0000003f
11403 BEGIN_TYPE(PWRUP2_t, uint32_t)
11404 // Value of selected gpio pin (only if enable == 1)
11405 ADD_BITFIELD_RO(RAW_STATUS, 10, 1)
11406 // Status of gpio wakeup. Write to 1 to clear a latched edge detect.
11407 ADD_BITFIELD_RW(STATUS, 9, 1)
11408 // Edge or level detect. Edge will detect a 0 to 1 transition (or 1 to 0 transition). Level will detect a 1 or 0. Both types of event get latched into the current_pwrup_req register.
11409 ADD_BITFIELD_RW(MODE, 8, 1)
11410 ADD_BITFIELD_RW(DIRECTION, 7, 1)
11411 // Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup event. If using edge detect a latched edge needs to be cleared by writing 1 to the status register also.
11412 ADD_BITFIELD_RW(ENABLE, 6, 1)
11413 ADD_BITFIELD_RW(SOURCE, 0, 6)
11414 END_TYPE()
11415
11416 static const uint32_t PWRUP2_MODE__level = 0;
11417 static const uint32_t PWRUP2_MODE__edge = 1;
11418 static const uint32_t PWRUP2_DIRECTION__low_falling = 0;
11419 static const uint32_t PWRUP2_DIRECTION__high_rising = 1;
11420
11421 // 4 GPIO powerup events can be configured to wake the chip up from a low power state. The pwrups are level/edge sensitive and can be set to trigger on a high/rising or low/falling event The number of gpios available depends on the package option. An invalid selection will be ignored source = 0 selects gpio0 . . source = 47 selects gpio47 source = 48 selects qspi_ss source = 49 selects qspi_sd0 source = 50 selects qspi_sd1 source = 51 selects qspi_sd2 source = 52 selects qspi_sd3 source = 53 selects qspi_sclk level = 0 triggers the pwrup when the source is low level = 1 triggers the pwrup when the source is high
11422 // Reset value: 0x0000003f
11423 BEGIN_TYPE(PWRUP3_t, uint32_t)
11424 // Value of selected gpio pin (only if enable == 1)
11425 ADD_BITFIELD_RO(RAW_STATUS, 10, 1)
11426 // Status of gpio wakeup. Write to 1 to clear a latched edge detect.
11427 ADD_BITFIELD_RW(STATUS, 9, 1)
11428 // Edge or level detect. Edge will detect a 0 to 1 transition (or 1 to 0 transition). Level will detect a 1 or 0. Both types of event get latched into the current_pwrup_req register.
11429 ADD_BITFIELD_RW(MODE, 8, 1)
11430 ADD_BITFIELD_RW(DIRECTION, 7, 1)
11431 // Set to 1 to enable the wakeup source. Set to 0 to disable the wakeup source and clear a pending wakeup event. If using edge detect a latched edge needs to be cleared by writing 1 to the status register also.
11432 ADD_BITFIELD_RW(ENABLE, 6, 1)
11433 ADD_BITFIELD_RW(SOURCE, 0, 6)
11434 END_TYPE()
11435
11436 static const uint32_t PWRUP3_MODE__level = 0;
11437 static const uint32_t PWRUP3_MODE__edge = 1;
11438 static const uint32_t PWRUP3_DIRECTION__low_falling = 0;
11439 static const uint32_t PWRUP3_DIRECTION__high_rising = 1;
11440
11441 // Indicates current powerup request state pwrup events can be cleared by removing the enable from the pwrup register. The alarm pwrup req can be cleared by clearing timer.alarm_enab 0 = chip reset, for the source of the last reset see POWMAN_CHIP_RESET 1 = pwrup0 2 = pwrup1 3 = pwrup2 4 = pwrup3 5 = coresight_pwrup 6 = alarm_pwrup
11442 // Reset value: 0x00000000
11443 BEGIN_TYPE(CURRENT_PWRUP_REQ_t, uint32_t)
11444 ADD_BITFIELD_RO(CURRENT_PWRUP_REQ, 0, 7)
11445 END_TYPE()
11446
11447 // Indicates which pwrup source triggered the last switched-core power up 0 = chip reset, for the source of the last reset see POWMAN_CHIP_RESET 1 = pwrup0 2 = pwrup1 3 = pwrup2 4 = pwrup3 5 = coresight_pwrup 6 = alarm_pwrup
11448 // Reset value: 0x00000000
11449 BEGIN_TYPE(LAST_SWCORE_PWRUP_t, uint32_t)
11450 ADD_BITFIELD_RO(LAST_SWCORE_PWRUP, 0, 7)
11451 END_TYPE()
11452
11453 // Reset value: 0x00000000
11454 BEGIN_TYPE(DBG_PWRCFG_t, uint32_t)
11455 // Ignore pwrup req from debugger. If pwrup req is asserted then this will prevent power down and set powerdown blocked. Set ignore to stop paying attention to pwrup_req
11456 ADD_BITFIELD_RW(IGNORE, 0, 1)
11457 END_TYPE()
11458
11459 // Tell the bootrom to ignore the BOOT0..3 registers following the next RSM reset (e.g. the next core power down/up). If an early boot stage has soft-locked some OTP pages in order to protect their contents from later stages, there is a risk that Secure code running at a later stage can unlock the pages by powering the core up and down. This register can be used to ensure that the bootloader runs as normal on the next power up, preventing Secure code at a later stage from accessing OTP in its unlocked state. Should be used in conjunction with the OTP BOOTDIS register.
11460 // Reset value: 0x00000000
11461 BEGIN_TYPE(BOOTDIS_t, uint32_t)
11462 // This flag always ORs writes into its current contents. It can be set but not cleared by software. The BOOTDIS_NEXT bit is OR'd into the BOOTDIS_NOW bit when the core is powered down. Simultaneously, the BOOTDIS_NEXT bit is cleared. Setting this bit means that the BOOT0..3 registers will be ignored following the next reset of the RSM by powman. This flag should be set by an early boot stage that has soft-locked OTP pages, to prevent later stages from unlocking it by power cycling.
11463 ADD_BITFIELD_RW(NEXT, 1, 1)
11464 // When powman resets the RSM, the current value of BOOTDIS_NEXT is OR'd into BOOTDIS_NOW, and BOOTDIS_NEXT is cleared. The bootrom checks this flag before reading the BOOT0..3 registers. If it is set, the bootrom clears it, and ignores the BOOT registers. This prevents Secure software from diverting the boot path before a bootloader has had the chance to soft lock OTP pages containing sensitive data.
11465 ADD_BITFIELD_RW(NOW, 0, 1)
11466 END_TYPE()
11467
11468 // Reset value: 0x00000000
11469 BEGIN_TYPE(DBGCONFIG_t, uint32_t)
11470 // Configure DP instance ID for SWD multidrop selection. Recommend that this is NOT changed until you require debug access in multi-chip environment
11471 ADD_BITFIELD_RW(DP_INSTID, 0, 4)
11472 END_TYPE()
11473
11474 // Scratch register. Information persists in low power mode
11475 // Reset value: 0x00000000
11476 typedef uint32_t SCRATCH_t;
11477
11478 // Scratch register. Information persists in low power mode
11479 // Reset value: 0x00000000
11480 typedef uint32_t BOOT_t;
11481
11482 // Raw Interrupts
11483 // Reset value: 0x00000000
11484 BEGIN_TYPE(INTR_t, uint32_t)
11485 // Source is state.pwrup_while_waiting
11486 ADD_BITFIELD_RO(PWRUP_WHILE_WAITING, 3, 1)
11487 // Source is state.req_ignored
11488 ADD_BITFIELD_RO(STATE_REQ_IGNORED, 2, 1)
11489 ADD_BITFIELD_RO(TIMER, 1, 1)
11490 ADD_BITFIELD_RW(VREG_OUTPUT_LOW, 0, 1)
11491 END_TYPE()
11492
11493 // Interrupt Enable
11494 // Reset value: 0x00000000
11495 BEGIN_TYPE(INTE_t, uint32_t)
11496 // Source is state.pwrup_while_waiting
11497 ADD_BITFIELD_RW(PWRUP_WHILE_WAITING, 3, 1)
11498 // Source is state.req_ignored
11499 ADD_BITFIELD_RW(STATE_REQ_IGNORED, 2, 1)
11500 ADD_BITFIELD_RW(TIMER, 1, 1)
11501 ADD_BITFIELD_RW(VREG_OUTPUT_LOW, 0, 1)
11502 END_TYPE()
11503
11504 // Interrupt Force
11505 // Reset value: 0x00000000
11506 BEGIN_TYPE(INTF_t, uint32_t)
11507 // Source is state.pwrup_while_waiting
11508 ADD_BITFIELD_RW(PWRUP_WHILE_WAITING, 3, 1)
11509 // Source is state.req_ignored
11510 ADD_BITFIELD_RW(STATE_REQ_IGNORED, 2, 1)
11511 ADD_BITFIELD_RW(TIMER, 1, 1)
11512 ADD_BITFIELD_RW(VREG_OUTPUT_LOW, 0, 1)
11513 END_TYPE()
11514
11515 // Interrupt status after masking & forcing
11516 // Reset value: 0x00000000
11517 BEGIN_TYPE(INTS_t, uint32_t)
11518 // Source is state.pwrup_while_waiting
11519 ADD_BITFIELD_RO(PWRUP_WHILE_WAITING, 3, 1)
11520 // Source is state.req_ignored
11521 ADD_BITFIELD_RO(STATE_REQ_IGNORED, 2, 1)
11522 ADD_BITFIELD_RO(TIMER, 1, 1)
11523 ADD_BITFIELD_RO(VREG_OUTPUT_LOW, 0, 1)
11524 END_TYPE()
11525
11526 struct POWMAN_t {
11527 BADPASSWD_t BADPASSWD;
11528 VREG_CTRL_t VREG_CTRL;
11529 VREG_STS_t VREG_STS;
11530 VREG_t VREG;
11531 VREG_LP_ENTRY_t VREG_LP_ENTRY;
11532 VREG_LP_EXIT_t VREG_LP_EXIT;
11533 BOD_CTRL_t BOD_CTRL;
11534 BOD_t BOD;
11535 BOD_LP_ENTRY_t BOD_LP_ENTRY;
11536 BOD_LP_EXIT_t BOD_LP_EXIT;
11537 LPOSC_t LPOSC;
11538 CHIP_RESET_t CHIP_RESET;
11539 WDSEL_t WDSEL;
11540 SEQ_CFG_t SEQ_CFG;
11541 STATE_t STATE;
11542 POW_FASTDIV_t POW_FASTDIV;
11543 POW_DELAY_t POW_DELAY;
11544 EXT_CTRL0_t EXT_CTRL0;
11545 EXT_CTRL1_t EXT_CTRL1;
11546 EXT_TIME_REF_t EXT_TIME_REF;
11547 LPOSC_FREQ_KHZ_INT_t LPOSC_FREQ_KHZ_INT;
11548 LPOSC_FREQ_KHZ_FRAC_t LPOSC_FREQ_KHZ_FRAC;
11549 XOSC_FREQ_KHZ_INT_t XOSC_FREQ_KHZ_INT;
11550 XOSC_FREQ_KHZ_FRAC_t XOSC_FREQ_KHZ_FRAC;
11551 SET_TIME_63TO48_t SET_TIME_63TO48;
11552 SET_TIME_47TO32_t SET_TIME_47TO32;
11553 SET_TIME_31TO16_t SET_TIME_31TO16;
11554 SET_TIME_15TO0_t SET_TIME_15TO0;
11555 READ_TIME_UPPER_t READ_TIME_UPPER;
11556 READ_TIME_LOWER_t READ_TIME_LOWER;
11557 ALARM_TIME_63TO48_t ALARM_TIME_63TO48;
11558 ALARM_TIME_47TO32_t ALARM_TIME_47TO32;
11559 ALARM_TIME_31TO16_t ALARM_TIME_31TO16;
11560 ALARM_TIME_15TO0_t ALARM_TIME_15TO0;
11561 TIMER_t TIMER;
11562 PWRUP0_t PWRUP0;
11563 PWRUP1_t PWRUP1;
11564 PWRUP2_t PWRUP2;
11565 PWRUP3_t PWRUP3;
11566 CURRENT_PWRUP_REQ_t CURRENT_PWRUP_REQ;
11567 LAST_SWCORE_PWRUP_t LAST_SWCORE_PWRUP;
11568 DBG_PWRCFG_t DBG_PWRCFG;
11569 BOOTDIS_t BOOTDIS;
11570 DBGCONFIG_t DBGCONFIG;
11571 SCRATCH_t SCRATCH[8];
11572 BOOT_t BOOT[4];
11573 INTR_t INTR;
11574 INTE_t INTE;
11575 INTF_t INTF;
11576 INTS_t INTS;
11577 };
11578
11579 static POWMAN_t & POWMAN = (*(POWMAN_t *)0x40100000);
11580 static POWMAN_t & POWMAN_XOR = (*(POWMAN_t *)0x40101000);
11581 static POWMAN_t & POWMAN_SET = (*(POWMAN_t *)0x40102000);
11582 static POWMAN_t & POWMAN_CLR = (*(POWMAN_t *)0x40103000);
11583
11584} // _POWMAN_
11585
11586namespace _WATCHDOG_ {
11587
11588 // Watchdog control The rst_wdsel register determines which subsystems are reset when the watchdog is triggered. The watchdog can be triggered in software.
11589 // Reset value: 0x07000000
11590 BEGIN_TYPE(CTRL_t, uint32_t)
11591 // Trigger a watchdog reset
11592 ADD_BITFIELD_WO(TRIGGER, 31, 1)
11593 // When not enabled the watchdog timer is paused
11594 ADD_BITFIELD_RW(ENABLE, 30, 1)
11595 // Pause the watchdog timer when processor 1 is in debug mode
11596 ADD_BITFIELD_RW(PAUSE_DBG1, 26, 1)
11597 // Pause the watchdog timer when processor 0 is in debug mode
11598 ADD_BITFIELD_RW(PAUSE_DBG0, 25, 1)
11599 // Pause the watchdog timer when JTAG is accessing the bus fabric
11600 ADD_BITFIELD_RW(PAUSE_JTAG, 24, 1)
11601 // Indicates the time in usec before a watchdog reset will be triggered
11602 ADD_BITFIELD_RO(TIME, 0, 24)
11603 END_TYPE()
11604
11605 // Load the watchdog timer. The maximum setting is 0xffffff which corresponds to approximately 16 seconds.
11606 // Reset value: 0x00000000
11607 BEGIN_TYPE(LOAD_t, uint32_t)
11608 ADD_BITFIELD_WO(LOAD, 0, 24)
11609 END_TYPE()
11610
11611 // Logs the reason for the last reset. Both bits are zero for the case of a hardware reset. Additionally, as of RP2350, a debugger warm reset of either core (SYSRESETREQ or hartreset) will also clear the watchdog reason register, so that software loaded under the debugger following a watchdog timeout will not continue to see the timeout condition.
11612 // Reset value: 0x00000000
11613 BEGIN_TYPE(REASON_t, uint32_t)
11614 ADD_BITFIELD_RO(FORCE, 1, 1)
11615 ADD_BITFIELD_RO(TIMER, 0, 1)
11616 END_TYPE()
11617
11618 // Scratch register. Information persists through soft reset of the chip.
11619 // Reset value: 0x00000000
11620 typedef uint32_t SCRATCH_t;
11621
11622 struct WATCHDOG_t {
11623 CTRL_t CTRL;
11624 LOAD_t LOAD;
11625 REASON_t REASON;
11626 SCRATCH_t SCRATCH[8];
11627 };
11628
11629 static WATCHDOG_t & WATCHDOG = (*(WATCHDOG_t *)0x400d8000);
11630 static WATCHDOG_t & WATCHDOG_XOR = (*(WATCHDOG_t *)0x400d9000);
11631 static WATCHDOG_t & WATCHDOG_SET = (*(WATCHDOG_t *)0x400da000);
11632 static WATCHDOG_t & WATCHDOG_CLR = (*(WATCHDOG_t *)0x400db000);
11633
11634} // _WATCHDOG_
11635
11636// DMA with separate read and write masters
11637namespace _DMA_ {
11638
11639 // DMA Channel 0 Read Address pointer
11640 // Reset value: 0x00000000
11641 typedef uint32_t CH_READ_ADDR_t;
11642
11643 // DMA Channel 0 Write Address pointer
11644 // Reset value: 0x00000000
11645 typedef uint32_t CH_WRITE_ADDR_t;
11646
11647 // DMA Channel 0 Transfer Count
11648 // Reset value: 0x00000000
11649 BEGIN_TYPE(CH_TRANS_COUNT_t, uint32_t)
11650 // When MODE is 0x0, the transfer count decrements with each transfer until 0, and then the channel triggers the next channel indicated by CTRL_CHAIN_TO. When MODE is 0x1, the transfer count decrements with each transfer until 0, and then the channel re-triggers itself, in addition to the trigger indicated by CTRL_CHAIN_TO. This is useful for e.g. an endless ring-buffer DMA with periodic interrupts. When MODE is 0xf, the transfer count does not decrement. The DMA channel performs an endless sequence of transfers, never triggering other channels or raising interrupts, until an ABORT is raised. All other values are reserved.
11651 ADD_BITFIELD_RW(MODE, 28, 4)
11652 // 28-bit transfer count (256 million transfers maximum). Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE). When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes. Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write. The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD.
11653 ADD_BITFIELD_RW(COUNT, 0, 28)
11654 END_TYPE()
11655
11656 static const uint32_t CH_TRANS_COUNT_MODE__NORMAL = 0;
11657 static const uint32_t CH_TRANS_COUNT_MODE__TRIGGER_SELF = 1;
11658 static const uint32_t CH_TRANS_COUNT_MODE__ENDLESS = 15;
11659
11660 // DMA Channel 0 Control and Status
11661 // Reset value: 0x00000000
11662 BEGIN_TYPE(CH_CTRL_TRIG_t, uint32_t)
11663 // Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag.
11664 ADD_BITFIELD_RO(AHB_ERROR, 31, 1)
11665 // If 1, the channel received a read bus error. Write one to clear. READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later)
11666 ADD_BITFIELD_RW(READ_ERROR, 30, 1)
11667 // If 1, the channel received a write bus error. Write one to clear. WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later)
11668 ADD_BITFIELD_RW(WRITE_ERROR, 29, 1)
11669 // This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused. To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT.
11670 ADD_BITFIELD_RO(BUSY, 26, 1)
11671 // If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected. This allows checksum to be enabled or disabled on a per-control- block basis.
11672 ADD_BITFIELD_RW(SNIFF_EN, 25, 1)
11673 // Apply byte-swap transformation to DMA data. For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order.
11674 ADD_BITFIELD_RW(BSWAP, 24, 1)
11675 // In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain. This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks.
11676 ADD_BITFIELD_RW(IRQ_QUIET, 23, 1)
11677 // Select a Transfer Request signal. The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system). 0x0 to 0x3a -> select DREQ n as TREQ
11678 ADD_BITFIELD_RW(TREQ_SEL, 17, 6)
11679 // When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. Note this field resets to 0, so channels 1 and above will chain to channel 0 by default. Set this field to avoid this behaviour.
11680 ADD_BITFIELD_RW(CHAIN_TO, 13, 4)
11681 // Select whether RING_SIZE applies to read or write addresses. If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped.
11682 ADD_BITFIELD_RW(RING_SEL, 12, 1)
11683 // Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers. Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL.
11684 ADD_BITFIELD_RW(RING_SIZE, 8, 4)
11685 // If 1, and INCR_WRITE is 1, the write address is decremented rather than incremented with each transfer. If 1, and INCR_WRITE is 0, this otherwise-unused combination causes the write address to be incremented by twice the transfer size, i.e. skipping over alternate addresses.
11686 ADD_BITFIELD_RW(INCR_WRITE_REV, 7, 1)
11687 // If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address. Generally this should be disabled for memory-to-peripheral transfers.
11688 ADD_BITFIELD_RW(INCR_WRITE, 6, 1)
11689 // If 1, and INCR_READ is 1, the read address is decremented rather than incremented with each transfer. If 1, and INCR_READ is 0, this otherwise-unused combination causes the read address to be incremented by twice the transfer size, i.e. skipping over alternate addresses.
11690 ADD_BITFIELD_RW(INCR_READ_REV, 5, 1)
11691 // If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address. Generally this should be disabled for peripheral-to-memory transfers.
11692 ADD_BITFIELD_RW(INCR_READ, 4, 1)
11693 // Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer.
11694 ADD_BITFIELD_RW(DATA_SIZE, 2, 2)
11695 // HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels. This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput.
11696 ADD_BITFIELD_RW(HIGH_PRIORITY, 1, 1)
11697 // DMA Channel Enable. When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high)
11698 ADD_BITFIELD_RW(EN, 0, 1)
11699 END_TYPE()
11700
11701 // Select PIO0's TX FIFO 0 as TREQ
11702 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_TX0 = 0;
11703 // Select PIO0's TX FIFO 1 as TREQ
11704 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_TX1 = 1;
11705 // Select PIO0's TX FIFO 2 as TREQ
11706 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_TX2 = 2;
11707 // Select PIO0's TX FIFO 3 as TREQ
11708 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_TX3 = 3;
11709 // Select PIO0's RX FIFO 0 as TREQ
11710 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_RX0 = 4;
11711 // Select PIO0's RX FIFO 1 as TREQ
11712 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_RX1 = 5;
11713 // Select PIO0's RX FIFO 2 as TREQ
11714 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_RX2 = 6;
11715 // Select PIO0's RX FIFO 3 as TREQ
11716 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO0_RX3 = 7;
11717 // Select PIO1's TX FIFO 0 as TREQ
11718 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_TX0 = 8;
11719 // Select PIO1's TX FIFO 1 as TREQ
11720 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_TX1 = 9;
11721 // Select PIO1's TX FIFO 2 as TREQ
11722 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_TX2 = 10;
11723 // Select PIO1's TX FIFO 3 as TREQ
11724 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_TX3 = 11;
11725 // Select PIO1's RX FIFO 0 as TREQ
11726 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_RX0 = 12;
11727 // Select PIO1's RX FIFO 1 as TREQ
11728 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_RX1 = 13;
11729 // Select PIO1's RX FIFO 2 as TREQ
11730 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_RX2 = 14;
11731 // Select PIO1's RX FIFO 3 as TREQ
11732 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO1_RX3 = 15;
11733 // Select PIO2's TX FIFO 0 as TREQ
11734 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_TX0 = 16;
11735 // Select PIO2's TX FIFO 1 as TREQ
11736 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_TX1 = 17;
11737 // Select PIO2's TX FIFO 2 as TREQ
11738 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_TX2 = 18;
11739 // Select PIO2's TX FIFO 3 as TREQ
11740 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_TX3 = 19;
11741 // Select PIO2's RX FIFO 0 as TREQ
11742 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_RX0 = 20;
11743 // Select PIO2's RX FIFO 1 as TREQ
11744 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_RX1 = 21;
11745 // Select PIO2's RX FIFO 2 as TREQ
11746 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_RX2 = 22;
11747 // Select PIO2's RX FIFO 3 as TREQ
11748 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PIO2_RX3 = 23;
11749 // Select SPI0's TX FIFO as TREQ
11750 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__SPI0_TX = 24;
11751 // Select SPI0's RX FIFO as TREQ
11752 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__SPI0_RX = 25;
11753 // Select SPI1's TX FIFO as TREQ
11754 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__SPI1_TX = 26;
11755 // Select SPI1's RX FIFO as TREQ
11756 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__SPI1_RX = 27;
11757 // Select UART0's TX FIFO as TREQ
11758 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__UART0_TX = 28;
11759 // Select UART0's RX FIFO as TREQ
11760 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__UART0_RX = 29;
11761 // Select UART1's TX FIFO as TREQ
11762 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__UART1_TX = 30;
11763 // Select UART1's RX FIFO as TREQ
11764 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__UART1_RX = 31;
11765 // Select PWM Counter 0's Wrap Value as TREQ
11766 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP0 = 32;
11767 // Select PWM Counter 1's Wrap Value as TREQ
11768 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP1 = 33;
11769 // Select PWM Counter 2's Wrap Value as TREQ
11770 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP2 = 34;
11771 // Select PWM Counter 3's Wrap Value as TREQ
11772 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP3 = 35;
11773 // Select PWM Counter 4's Wrap Value as TREQ
11774 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP4 = 36;
11775 // Select PWM Counter 5's Wrap Value as TREQ
11776 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP5 = 37;
11777 // Select PWM Counter 6's Wrap Value as TREQ
11778 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP6 = 38;
11779 // Select PWM Counter 7's Wrap Value as TREQ
11780 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP7 = 39;
11781 // Select PWM Counter 8's Wrap Value as TREQ
11782 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP8 = 40;
11783 // Select PWM Counter 9's Wrap Value as TREQ
11784 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP9 = 41;
11785 // Select PWM Counter 0's Wrap Value as TREQ
11786 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP10 = 42;
11787 // Select PWM Counter 1's Wrap Value as TREQ
11788 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PWM_WRAP11 = 43;
11789 // Select I2C0's TX FIFO as TREQ
11790 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__I2C0_TX = 44;
11791 // Select I2C0's RX FIFO as TREQ
11792 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__I2C0_RX = 45;
11793 // Select I2C1's TX FIFO as TREQ
11794 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__I2C1_TX = 46;
11795 // Select I2C1's RX FIFO as TREQ
11796 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__I2C1_RX = 47;
11797 // Select the ADC as TREQ
11798 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__ADC = 48;
11799 // Select the XIP Streaming FIFO as TREQ
11800 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__XIP_STREAM = 49;
11801 // Select XIP_QMITX as TREQ
11802 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__XIP_QMITX = 50;
11803 // Select XIP_QMIRX as TREQ
11804 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__XIP_QMIRX = 51;
11805 // Select HSTX as TREQ
11806 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__HSTX = 52;
11807 // Select CORESIGHT as TREQ
11808 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__CORESIGHT = 53;
11809 // Select SHA256 as TREQ
11810 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__SHA256 = 54;
11811 // Select Timer 0 as TREQ
11812 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__TIMER0 = 59;
11813 // Select Timer 1 as TREQ
11814 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__TIMER1 = 60;
11815 // Select Timer 2 as TREQ (Optional)
11816 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__TIMER2 = 61;
11817 // Select Timer 3 as TREQ (Optional)
11818 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__TIMER3 = 62;
11819 // Permanent request, for unpaced transfers.
11820 static const uint32_t CH_CTRL_TRIG_TREQ_SEL__PERMANENT = 63;
11821 static const uint32_t CH_CTRL_TRIG_RING_SIZE__RING_NONE = 0;
11822 static const uint32_t CH_CTRL_TRIG_DATA_SIZE__SIZE_BYTE = 0;
11823 static const uint32_t CH_CTRL_TRIG_DATA_SIZE__SIZE_HALFWORD = 1;
11824 static const uint32_t CH_CTRL_TRIG_DATA_SIZE__SIZE_WORD = 2;
11825
11826 // Alias for channel 0 CTRL register
11827 typedef uint32_t CH_AL1_CTRL_t;
11828
11829 // Alias for channel 0 READ_ADDR register
11830 typedef uint32_t CH_AL1_READ_ADDR_t;
11831
11832 // Alias for channel 0 WRITE_ADDR register
11833 typedef uint32_t CH_AL1_WRITE_ADDR_t;
11834
11835 // Alias for channel 0 TRANS_COUNT register This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
11836 typedef uint32_t CH_AL1_TRANS_COUNT_TRIG_t;
11837
11838 // Alias for channel 0 CTRL register
11839 typedef uint32_t CH_AL2_CTRL_t;
11840
11841 // Alias for channel 0 TRANS_COUNT register
11842 typedef uint32_t CH_AL2_TRANS_COUNT_t;
11843
11844 // Alias for channel 0 READ_ADDR register
11845 typedef uint32_t CH_AL2_READ_ADDR_t;
11846
11847 // Alias for channel 0 WRITE_ADDR register This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
11848 typedef uint32_t CH_AL2_WRITE_ADDR_TRIG_t;
11849
11850 // Alias for channel 0 CTRL register
11851 typedef uint32_t CH_AL3_CTRL_t;
11852
11853 // Alias for channel 0 WRITE_ADDR register
11854 typedef uint32_t CH_AL3_WRITE_ADDR_t;
11855
11856 // Alias for channel 0 TRANS_COUNT register
11857 typedef uint32_t CH_AL3_TRANS_COUNT_t;
11858
11859 // Alias for channel 0 READ_ADDR register This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
11860 typedef uint32_t CH_AL3_READ_ADDR_TRIG_t;
11861
11862 // Interrupt Status (raw)
11863 // Reset value: 0x00000000
11864 BEGIN_TYPE(INTR_t, uint32_t)
11865 // Raw interrupt status for DMA Channels 0..15. Bit n corresponds to channel n. Ignores any masking or forcing. Channel interrupts can be cleared by writing a bit mask to INTR or INTS0/1/2/3. Channel interrupts can be routed to either of four system-level IRQs based on INTE0, INTE1, INTE2 and INTE3. The multiple system-level interrupts might be used to allow NVIC IRQ preemption for more time-critical channels, to spread IRQ load across different cores, or to target IRQs to different security domains. It is also valid to ignore the multiple IRQs, and just use INTE0/INTS0/IRQ 0. If this register is accessed at a security/privilege level less than that of a given channel (as defined by that channel's SECCFG_CHx register), then that channel's interrupt status will read as 0, ignore writes.
11866 ADD_BITFIELD_RW(INTR, 0, 16)
11867 END_TYPE()
11868
11869 // Interrupt Enables for IRQ 0
11870 // Reset value: 0x00000000
11871 BEGIN_TYPE(INTE0_t, uint32_t)
11872 // Set bit n to pass interrupts from channel n to DMA IRQ 0. Note this bit has no effect if the channel security/privilege level, defined by SECCFG_CHx, is greater than the IRQ security/privilege defined by SECCFG_IRQ0.
11873 ADD_BITFIELD_RW(INTE0, 0, 16)
11874 END_TYPE()
11875
11876 // Force Interrupts
11877 // Reset value: 0x00000000
11878 BEGIN_TYPE(INTF0_t, uint32_t)
11879 // Write 1s to force the corresponding bits in INTS0. The interrupt remains asserted until INTF0 is cleared.
11880 ADD_BITFIELD_RW(INTF0, 0, 16)
11881 END_TYPE()
11882
11883 // Interrupt Status for IRQ 0
11884 // Reset value: 0x00000000
11885 BEGIN_TYPE(INTS0_t, uint32_t)
11886 // Indicates active channel interrupt requests which are currently causing IRQ 0 to be asserted. Channel interrupts can be cleared by writing a bit mask here. Channels with a security/privilege (SECCFG_CHx) greater SECCFG_IRQ0) read as 0 in this register, and ignore writes.
11887 ADD_BITFIELD_RW(INTS0, 0, 16)
11888 END_TYPE()
11889
11890 // Interrupt Status (raw)
11891 // Reset value: 0x00000000
11892 BEGIN_TYPE(INTR1_t, uint32_t)
11893 // Raw interrupt status for DMA Channels 0..15. Bit n corresponds to channel n. Ignores any masking or forcing. Channel interrupts can be cleared by writing a bit mask to INTR or INTS0/1/2/3. Channel interrupts can be routed to either of four system-level IRQs based on INTE0, INTE1, INTE2 and INTE3. The multiple system-level interrupts might be used to allow NVIC IRQ preemption for more time-critical channels, to spread IRQ load across different cores, or to target IRQs to different security domains. It is also valid to ignore the multiple IRQs, and just use INTE0/INTS0/IRQ 0. If this register is accessed at a security/privilege level less than that of a given channel (as defined by that channel's SECCFG_CHx register), then that channel's interrupt status will read as 0, ignore writes.
11894 ADD_BITFIELD_RW(INTR1, 0, 16)
11895 END_TYPE()
11896
11897 // Interrupt Enables for IRQ 1
11898 // Reset value: 0x00000000
11899 BEGIN_TYPE(INTE1_t, uint32_t)
11900 // Set bit n to pass interrupts from channel n to DMA IRQ 1. Note this bit has no effect if the channel security/privilege level, defined by SECCFG_CHx, is greater than the IRQ security/privilege defined by SECCFG_IRQ1.
11901 ADD_BITFIELD_RW(INTE1, 0, 16)
11902 END_TYPE()
11903
11904 // Force Interrupts
11905 // Reset value: 0x00000000
11906 BEGIN_TYPE(INTF1_t, uint32_t)
11907 // Write 1s to force the corresponding bits in INTS1. The interrupt remains asserted until INTF1 is cleared.
11908 ADD_BITFIELD_RW(INTF1, 0, 16)
11909 END_TYPE()
11910
11911 // Interrupt Status for IRQ 1
11912 // Reset value: 0x00000000
11913 BEGIN_TYPE(INTS1_t, uint32_t)
11914 // Indicates active channel interrupt requests which are currently causing IRQ 1 to be asserted. Channel interrupts can be cleared by writing a bit mask here. Channels with a security/privilege (SECCFG_CHx) greater SECCFG_IRQ1) read as 0 in this register, and ignore writes.
11915 ADD_BITFIELD_RW(INTS1, 0, 16)
11916 END_TYPE()
11917
11918 // Interrupt Status (raw)
11919 // Reset value: 0x00000000
11920 BEGIN_TYPE(INTR2_t, uint32_t)
11921 // Raw interrupt status for DMA Channels 0..15. Bit n corresponds to channel n. Ignores any masking or forcing. Channel interrupts can be cleared by writing a bit mask to INTR or INTS0/1/2/3. Channel interrupts can be routed to either of four system-level IRQs based on INTE0, INTE1, INTE2 and INTE3. The multiple system-level interrupts might be used to allow NVIC IRQ preemption for more time-critical channels, to spread IRQ load across different cores, or to target IRQs to different security domains. It is also valid to ignore the multiple IRQs, and just use INTE0/INTS0/IRQ 0. If this register is accessed at a security/privilege level less than that of a given channel (as defined by that channel's SECCFG_CHx register), then that channel's interrupt status will read as 0, ignore writes.
11922 ADD_BITFIELD_RW(INTR2, 0, 16)
11923 END_TYPE()
11924
11925 // Interrupt Enables for IRQ 2
11926 // Reset value: 0x00000000
11927 BEGIN_TYPE(INTE2_t, uint32_t)
11928 // Set bit n to pass interrupts from channel n to DMA IRQ 2. Note this bit has no effect if the channel security/privilege level, defined by SECCFG_CHx, is greater than the IRQ security/privilege defined by SECCFG_IRQ2.
11929 ADD_BITFIELD_RW(INTE2, 0, 16)
11930 END_TYPE()
11931
11932 // Force Interrupts
11933 // Reset value: 0x00000000
11934 BEGIN_TYPE(INTF2_t, uint32_t)
11935 // Write 1s to force the corresponding bits in INTS2. The interrupt remains asserted until INTF2 is cleared.
11936 ADD_BITFIELD_RW(INTF2, 0, 16)
11937 END_TYPE()
11938
11939 // Interrupt Status for IRQ 2
11940 // Reset value: 0x00000000
11941 BEGIN_TYPE(INTS2_t, uint32_t)
11942 // Indicates active channel interrupt requests which are currently causing IRQ 2 to be asserted. Channel interrupts can be cleared by writing a bit mask here. Channels with a security/privilege (SECCFG_CHx) greater SECCFG_IRQ2) read as 0 in this register, and ignore writes.
11943 ADD_BITFIELD_RW(INTS2, 0, 16)
11944 END_TYPE()
11945
11946 // Interrupt Status (raw)
11947 // Reset value: 0x00000000
11948 BEGIN_TYPE(INTR3_t, uint32_t)
11949 // Raw interrupt status for DMA Channels 0..15. Bit n corresponds to channel n. Ignores any masking or forcing. Channel interrupts can be cleared by writing a bit mask to INTR or INTS0/1/2/3. Channel interrupts can be routed to either of four system-level IRQs based on INTE0, INTE1, INTE2 and INTE3. The multiple system-level interrupts might be used to allow NVIC IRQ preemption for more time-critical channels, to spread IRQ load across different cores, or to target IRQs to different security domains. It is also valid to ignore the multiple IRQs, and just use INTE0/INTS0/IRQ 0. If this register is accessed at a security/privilege level less than that of a given channel (as defined by that channel's SECCFG_CHx register), then that channel's interrupt status will read as 0, ignore writes.
11950 ADD_BITFIELD_RW(INTR3, 0, 16)
11951 END_TYPE()
11952
11953 // Interrupt Enables for IRQ 3
11954 // Reset value: 0x00000000
11955 BEGIN_TYPE(INTE3_t, uint32_t)
11956 // Set bit n to pass interrupts from channel n to DMA IRQ 3. Note this bit has no effect if the channel security/privilege level, defined by SECCFG_CHx, is greater than the IRQ security/privilege defined by SECCFG_IRQ3.
11957 ADD_BITFIELD_RW(INTE3, 0, 16)
11958 END_TYPE()
11959
11960 // Force Interrupts
11961 // Reset value: 0x00000000
11962 BEGIN_TYPE(INTF3_t, uint32_t)
11963 // Write 1s to force the corresponding bits in INTS3. The interrupt remains asserted until INTF3 is cleared.
11964 ADD_BITFIELD_RW(INTF3, 0, 16)
11965 END_TYPE()
11966
11967 // Interrupt Status for IRQ 3
11968 // Reset value: 0x00000000
11969 BEGIN_TYPE(INTS3_t, uint32_t)
11970 // Indicates active channel interrupt requests which are currently causing IRQ 3 to be asserted. Channel interrupts can be cleared by writing a bit mask here. Channels with a security/privilege (SECCFG_CHx) greater SECCFG_IRQ3) read as 0 in this register, and ignore writes.
11971 ADD_BITFIELD_RW(INTS3, 0, 16)
11972 END_TYPE()
11973
11974 // Pacing (X/Y) fractional timer The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
11975 // Reset value: 0x00000000
11976 BEGIN_TYPE(TIMER_t, uint32_t)
11977 // Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer.
11978 ADD_BITFIELD_RW(X, 16, 16)
11979 // Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer.
11980 ADD_BITFIELD_RW(Y, 0, 16)
11981 END_TYPE()
11982
11983 // Trigger one or more channels simultaneously
11984 // Reset value: 0x00000000
11985 BEGIN_TYPE(MULTI_CHAN_TRIGGER_t, uint32_t)
11986 // Each bit in this register corresponds to a DMA channel. Writing a 1 to the relevant bit is the same as writing to that channel's trigger register; the channel will start if it is currently enabled and not already busy.
11987 ADD_BITFIELD_WO(MULTI_CHAN_TRIGGER, 0, 16)
11988 END_TYPE()
11989
11990 // Sniffer Control
11991 // Reset value: 0x00000000
11992 BEGIN_TYPE(SNIFF_CTRL_t, uint32_t)
11993 // If set, the result appears inverted (bitwise complement) when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus.
11994 ADD_BITFIELD_RW(OUT_INV, 11, 1)
11995 // If set, the result appears bit-reversed when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus.
11996 ADD_BITFIELD_RW(OUT_REV, 10, 1)
11997 // Locally perform a byte reverse on the sniffed data, before feeding into checksum. Note that the sniff hardware is downstream of the DMA channel byteswap performed in the read master: if channel CTRL_BSWAP and SNIFF_CTRL_BSWAP are both enabled, their effects cancel from the sniffer's point of view.
11998 ADD_BITFIELD_RW(BSWAP, 9, 1)
11999 ADD_BITFIELD_RW(CALC, 5, 4)
12000 // DMA channel for Sniffer to observe
12001 ADD_BITFIELD_RW(DMACH, 1, 4)
12002 // Enable sniffer
12003 ADD_BITFIELD_RW(EN, 0, 1)
12004 END_TYPE()
12005
12006 // Calculate a CRC-32 (IEEE802.3 polynomial)
12007 static const uint32_t SNIFF_CTRL_CALC__CRC32 = 0;
12008 // Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data
12009 static const uint32_t SNIFF_CTRL_CALC__CRC32R = 1;
12010 // Calculate a CRC-16-CCITT
12011 static const uint32_t SNIFF_CTRL_CALC__CRC16 = 2;
12012 // Calculate a CRC-16-CCITT with bit reversed data
12013 static const uint32_t SNIFF_CTRL_CALC__CRC16R = 3;
12014 // XOR reduction over all data. == 1 if the total 1 population count is odd.
12015 static const uint32_t SNIFF_CTRL_CALC__EVEN = 14;
12016 // Calculate a simple 32-bit checksum (addition with a 32 bit accumulator)
12017 static const uint32_t SNIFF_CTRL_CALC__SUM = 15;
12018
12019 // Data accumulator for sniff hardware
12020 // Reset value: 0x00000000
12021 BEGIN_TYPE(SNIFF_DATA_t, uint32_t)
12022 // Write an initial seed value here before starting a DMA transfer on the channel indicated by SNIFF_CTRL_DMACH. The hardware will update this register each time it observes a read from the indicated channel. Once the channel completes, the final result can be read from this register.
12023 ADD_BITFIELD_RW(SNIFF_DATA, 0, 32)
12024 END_TYPE()
12025
12026 // Debug RAF, WAF, TDF levels
12027 // Reset value: 0x00000000
12028 BEGIN_TYPE(FIFO_LEVELS_t, uint32_t)
12029 // Current Read-Address-FIFO fill level
12030 ADD_BITFIELD_RO(RAF_LVL, 16, 8)
12031 // Current Write-Address-FIFO fill level
12032 ADD_BITFIELD_RO(WAF_LVL, 8, 8)
12033 // Current Transfer-Data-FIFO fill level
12034 ADD_BITFIELD_RO(TDF_LVL, 0, 8)
12035 END_TYPE()
12036
12037 // Abort an in-progress transfer sequence on one or more channels
12038 // Reset value: 0x00000000
12039 BEGIN_TYPE(CHAN_ABORT_t, uint32_t)
12040 // Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs. After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel.
12041 ADD_BITFIELD_WO(CHAN_ABORT, 0, 16)
12042 END_TYPE()
12043
12044 // The number of channels this DMA instance is equipped with. This DMA supports up to 16 hardware channels, but can be configured with as few as one, to minimise silicon area.
12045 BEGIN_TYPE(N_CHANNELS_t, uint32_t)
12046 ADD_BITFIELD_RO(N_CHANNELS, 0, 5)
12047 END_TYPE()
12048
12049 // Security configuration for channel 0. Control whether this channel performs Secure/Non-secure and Privileged/Unprivileged bus accesses. If this channel generates bus accesses of some security level, an access of at least that level (in the order S+P > S+U > NS+P > NS+U) is required to program, trigger, abort, check the status of, interrupt on or acknowledge the interrupt of this channel. This register automatically locks down (becomes read-only) once software starts to configure the channel. This register is world-readable, but is writable only from a Secure, Privileged context.
12050 // Reset value: 0x00000003
12051 BEGIN_TYPE(SECCFG_CH_t, uint32_t)
12052 // LOCK is 0 at reset, and is set to 1 automatically upon a successful write to this channel's control registers. That is, a write to CTRL, READ_ADDR, WRITE_ADDR, TRANS_COUNT and their aliases. Once its LOCK bit is set, this register becomes read-only. A failed write, for example due to the write's privilege being lower than that specified in the channel's SECCFG register, will not set the LOCK bit.
12053 ADD_BITFIELD_RW(LOCK, 2, 1)
12054 // Secure channel. If 1, this channel performs Secure bus accesses. If 0, it performs Non-secure bus accesses. If 1, this channel is controllable only from a Secure context.
12055 ADD_BITFIELD_RW(S, 1, 1)
12056 // Privileged channel. If 1, this channel performs Privileged bus accesses. If 0, it performs Unprivileged bus accesses. If 1, this channel is controllable only from a Privileged context of the same Secure/Non-secure level, or any context of a higher Secure/Non-secure level.
12057 ADD_BITFIELD_RW(P, 0, 1)
12058 END_TYPE()
12059
12060 // Security configuration for IRQ 0. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags.
12061 // Reset value: 0x00000003
12062 BEGIN_TYPE(SECCFG_IRQ_t, uint32_t)
12063 // Secure IRQ. If 1, this IRQ's control registers can only be accessed from a Secure context. If 0, this IRQ's control registers can be accessed from a Non-secure context, but Secure channels (as per SECCFG_CHx) are masked from the IRQ status, and this IRQ's registers can not be used to acknowledge the channel interrupts of Secure channels.
12064 ADD_BITFIELD_RW(S, 1, 1)
12065 // Privileged IRQ. If 1, this IRQ's control registers can only be accessed from a Privileged context. If 0, this IRQ's control registers can be accessed from an Unprivileged context, but Privileged channels (as per SECCFG_CHx) are masked from the IRQ status, and this IRQ's registers can not be used to acknowledge the channel interrupts of Privileged channels.
12066 ADD_BITFIELD_RW(P, 0, 1)
12067 END_TYPE()
12068
12069 // Miscellaneous security configuration
12070 // Reset value: 0x000003ff
12071 BEGIN_TYPE(SECCFG_MISC_t, uint32_t)
12072 // If 1, the TIMER3 register is only accessible from a Secure context, and timer DREQ 3 is only visible to Secure channels.
12073 ADD_BITFIELD_RW(TIMER3_S, 9, 1)
12074 // If 1, the TIMER3 register is only accessible from a Privileged (or more Secure) context, and timer DREQ 3 is only visible to Privileged (or more Secure) channels.
12075 ADD_BITFIELD_RW(TIMER3_P, 8, 1)
12076 // If 1, the TIMER2 register is only accessible from a Secure context, and timer DREQ 2 is only visible to Secure channels.
12077 ADD_BITFIELD_RW(TIMER2_S, 7, 1)
12078 // If 1, the TIMER2 register is only accessible from a Privileged (or more Secure) context, and timer DREQ 2 is only visible to Privileged (or more Secure) channels.
12079 ADD_BITFIELD_RW(TIMER2_P, 6, 1)
12080 // If 1, the TIMER1 register is only accessible from a Secure context, and timer DREQ 1 is only visible to Secure channels.
12081 ADD_BITFIELD_RW(TIMER1_S, 5, 1)
12082 // If 1, the TIMER1 register is only accessible from a Privileged (or more Secure) context, and timer DREQ 1 is only visible to Privileged (or more Secure) channels.
12083 ADD_BITFIELD_RW(TIMER1_P, 4, 1)
12084 // If 1, the TIMER0 register is only accessible from a Secure context, and timer DREQ 0 is only visible to Secure channels.
12085 ADD_BITFIELD_RW(TIMER0_S, 3, 1)
12086 // If 1, the TIMER0 register is only accessible from a Privileged (or more Secure) context, and timer DREQ 0 is only visible to Privileged (or more Secure) channels.
12087 ADD_BITFIELD_RW(TIMER0_P, 2, 1)
12088 // If 1, the sniffer can see data transfers from Secure channels, and can itself only be accessed from a Secure context. If 0, the sniffer can be accessed from either a Secure or Non-secure context, but can not see data transfers of Secure channels.
12089 ADD_BITFIELD_RW(SNIFF_S, 1, 1)
12090 // If 1, the sniffer can see data transfers from Privileged channels, and can itself only be accessed from a privileged context, or from a Secure context when SNIFF_S is 0. If 0, the sniffer can be accessed from either a Privileged or Unprivileged context (with sufficient security level) but can not see transfers from Privileged channels.
12091 ADD_BITFIELD_RW(SNIFF_P, 0, 1)
12092 END_TYPE()
12093
12094 // Control register for DMA MPU. Accessible only from a Privileged context.
12095 // Reset value: 0x00000000
12096 BEGIN_TYPE(MPU_CTRL_t, uint32_t)
12097 // By default, when a region's S bit is clear, Non-secure-Privileged reads can see the region's base address and limit address. Set this bit to make the addresses appear as 0 to Non-secure reads, even when the region is Non-secure, to avoid leaking information about the processor SAU map.
12098 ADD_BITFIELD_RW(NS_HIDE_ADDR, 3, 1)
12099 // Determine whether an address not covered by an active MPU region is Secure (1) or Non-secure (0)
12100 ADD_BITFIELD_RW(S, 2, 1)
12101 // Determine whether an address not covered by an active MPU region is Privileged (1) or Unprivileged (0)
12102 ADD_BITFIELD_RW(P, 1, 1)
12103 END_TYPE()
12104
12105 // Base address register for MPU region 0. Writable only from a Secure, Privileged context.
12106 // Reset value: 0x00000000
12107 BEGIN_TYPE(MPU_BAR_t, uint32_t)
12108 // This MPU region matches addresses where addr[31:5] (the 27 most significant bits) are greater than or equal to BAR_ADDR, and less than or equal to LAR_ADDR. Readable from any Privileged context, if and only if this region's S bit is clear, and MPU_CTRL_NS_HIDE_ADDR is clear. Otherwise readable only from a Secure, Privileged context.
12109 ADD_BITFIELD_RW(ADDR, 5, 27)
12110 END_TYPE()
12111
12112 // Limit address register for MPU region 0. Writable only from a Secure, Privileged context, with the exception of the P bit.
12113 // Reset value: 0x00000000
12114 BEGIN_TYPE(MPU_LAR_t, uint32_t)
12115 // Limit address bits 31:5. Readable from any Privileged context, if and only if this region's S bit is clear, and MPU_CTRL_NS_HIDE_ADDR is clear. Otherwise readable only from a Secure, Privileged context.
12116 ADD_BITFIELD_RW(ADDR, 5, 27)
12117 // Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled.
12118 ADD_BITFIELD_RW(S, 2, 1)
12119 // Determines the Privileged/Unprivileged (=1/0) status of addresses matching this region, if this region is enabled. Writable from any Privileged context, if and only if the S bit is clear. Otherwise, writable only from a Secure, Privileged context.
12120 ADD_BITFIELD_RW(P, 1, 1)
12121 // Region enable. If 1, any address within range specified by the base address (BAR_ADDR) and limit address (LAR_ADDR) has the attributes specified by S and P.
12122 ADD_BITFIELD_RW(EN, 0, 1)
12123 END_TYPE()
12124
12125 // Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
12126 // Reset value: 0x00000000
12127 BEGIN_TYPE(CH_DBG_CTDREQ_t, uint32_t)
12128 ADD_BITFIELD_RW(DBG_CTDREQ, 0, 6)
12129 END_TYPE()
12130
12131 // Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
12132 // Reset value: 0x00000000
12133 BEGIN_TYPE(CH_DBG_TCR_t, uint32_t)
12134 ADD_BITFIELD_RO(DBG_TCR, 0, 32)
12135 END_TYPE()
12136
12137 struct DMA_t {
12138 CH_READ_ADDR_t CH0_READ_ADDR;
12139 CH_WRITE_ADDR_t CH0_WRITE_ADDR;
12140 CH_TRANS_COUNT_t CH0_TRANS_COUNT;
12141 CH_CTRL_TRIG_t CH0_CTRL_TRIG;
12142 CH_AL1_CTRL_t CH0_AL1_CTRL;
12143 CH_AL1_READ_ADDR_t CH0_AL1_READ_ADDR;
12144 CH_AL1_WRITE_ADDR_t CH0_AL1_WRITE_ADDR;
12145 CH_AL1_TRANS_COUNT_TRIG_t CH0_AL1_TRANS_COUNT_TRIG;
12146 CH_AL2_CTRL_t CH0_AL2_CTRL;
12147 CH_AL2_TRANS_COUNT_t CH0_AL2_TRANS_COUNT;
12148 CH_AL2_READ_ADDR_t CH0_AL2_READ_ADDR;
12149 CH_AL2_WRITE_ADDR_TRIG_t CH0_AL2_WRITE_ADDR_TRIG;
12150 CH_AL3_CTRL_t CH0_AL3_CTRL;
12151 CH_AL3_WRITE_ADDR_t CH0_AL3_WRITE_ADDR;
12152 CH_AL3_TRANS_COUNT_t CH0_AL3_TRANS_COUNT;
12153 CH_AL3_READ_ADDR_TRIG_t CH0_AL3_READ_ADDR_TRIG;
12154 CH_READ_ADDR_t CH1_READ_ADDR;
12155 CH_WRITE_ADDR_t CH1_WRITE_ADDR;
12156 CH_TRANS_COUNT_t CH1_TRANS_COUNT;
12157 CH_CTRL_TRIG_t CH1_CTRL_TRIG;
12158 CH_AL1_CTRL_t CH1_AL1_CTRL;
12159 CH_AL1_READ_ADDR_t CH1_AL1_READ_ADDR;
12160 CH_AL1_WRITE_ADDR_t CH1_AL1_WRITE_ADDR;
12161 CH_AL1_TRANS_COUNT_TRIG_t CH1_AL1_TRANS_COUNT_TRIG;
12162 CH_AL2_CTRL_t CH1_AL2_CTRL;
12163 CH_AL2_TRANS_COUNT_t CH1_AL2_TRANS_COUNT;
12164 CH_AL2_READ_ADDR_t CH1_AL2_READ_ADDR;
12165 CH_AL2_WRITE_ADDR_TRIG_t CH1_AL2_WRITE_ADDR_TRIG;
12166 CH_AL3_CTRL_t CH1_AL3_CTRL;
12167 CH_AL3_WRITE_ADDR_t CH1_AL3_WRITE_ADDR;
12168 CH_AL3_TRANS_COUNT_t CH1_AL3_TRANS_COUNT;
12169 CH_AL3_READ_ADDR_TRIG_t CH1_AL3_READ_ADDR_TRIG;
12170 CH_READ_ADDR_t CH2_READ_ADDR;
12171 CH_WRITE_ADDR_t CH2_WRITE_ADDR;
12172 CH_TRANS_COUNT_t CH2_TRANS_COUNT;
12173 CH_CTRL_TRIG_t CH2_CTRL_TRIG;
12174 CH_AL1_CTRL_t CH2_AL1_CTRL;
12175 CH_AL1_READ_ADDR_t CH2_AL1_READ_ADDR;
12176 CH_AL1_WRITE_ADDR_t CH2_AL1_WRITE_ADDR;
12177 CH_AL1_TRANS_COUNT_TRIG_t CH2_AL1_TRANS_COUNT_TRIG;
12178 CH_AL2_CTRL_t CH2_AL2_CTRL;
12179 CH_AL2_TRANS_COUNT_t CH2_AL2_TRANS_COUNT;
12180 CH_AL2_READ_ADDR_t CH2_AL2_READ_ADDR;
12181 CH_AL2_WRITE_ADDR_TRIG_t CH2_AL2_WRITE_ADDR_TRIG;
12182 CH_AL3_CTRL_t CH2_AL3_CTRL;
12183 CH_AL3_WRITE_ADDR_t CH2_AL3_WRITE_ADDR;
12184 CH_AL3_TRANS_COUNT_t CH2_AL3_TRANS_COUNT;
12185 CH_AL3_READ_ADDR_TRIG_t CH2_AL3_READ_ADDR_TRIG;
12186 CH_READ_ADDR_t CH3_READ_ADDR;
12187 CH_WRITE_ADDR_t CH3_WRITE_ADDR;
12188 CH_TRANS_COUNT_t CH3_TRANS_COUNT;
12189 CH_CTRL_TRIG_t CH3_CTRL_TRIG;
12190 CH_AL1_CTRL_t CH3_AL1_CTRL;
12191 CH_AL1_READ_ADDR_t CH3_AL1_READ_ADDR;
12192 CH_AL1_WRITE_ADDR_t CH3_AL1_WRITE_ADDR;
12193 CH_AL1_TRANS_COUNT_TRIG_t CH3_AL1_TRANS_COUNT_TRIG;
12194 CH_AL2_CTRL_t CH3_AL2_CTRL;
12195 CH_AL2_TRANS_COUNT_t CH3_AL2_TRANS_COUNT;
12196 CH_AL2_READ_ADDR_t CH3_AL2_READ_ADDR;
12197 CH_AL2_WRITE_ADDR_TRIG_t CH3_AL2_WRITE_ADDR_TRIG;
12198 CH_AL3_CTRL_t CH3_AL3_CTRL;
12199 CH_AL3_WRITE_ADDR_t CH3_AL3_WRITE_ADDR;
12200 CH_AL3_TRANS_COUNT_t CH3_AL3_TRANS_COUNT;
12201 CH_AL3_READ_ADDR_TRIG_t CH3_AL3_READ_ADDR_TRIG;
12202 CH_READ_ADDR_t CH4_READ_ADDR;
12203 CH_WRITE_ADDR_t CH4_WRITE_ADDR;
12204 CH_TRANS_COUNT_t CH4_TRANS_COUNT;
12205 CH_CTRL_TRIG_t CH4_CTRL_TRIG;
12206 CH_AL1_CTRL_t CH4_AL1_CTRL;
12207 CH_AL1_READ_ADDR_t CH4_AL1_READ_ADDR;
12208 CH_AL1_WRITE_ADDR_t CH4_AL1_WRITE_ADDR;
12209 CH_AL1_TRANS_COUNT_TRIG_t CH4_AL1_TRANS_COUNT_TRIG;
12210 CH_AL2_CTRL_t CH4_AL2_CTRL;
12211 CH_AL2_TRANS_COUNT_t CH4_AL2_TRANS_COUNT;
12212 CH_AL2_READ_ADDR_t CH4_AL2_READ_ADDR;
12213 CH_AL2_WRITE_ADDR_TRIG_t CH4_AL2_WRITE_ADDR_TRIG;
12214 CH_AL3_CTRL_t CH4_AL3_CTRL;
12215 CH_AL3_WRITE_ADDR_t CH4_AL3_WRITE_ADDR;
12216 CH_AL3_TRANS_COUNT_t CH4_AL3_TRANS_COUNT;
12217 CH_AL3_READ_ADDR_TRIG_t CH4_AL3_READ_ADDR_TRIG;
12218 CH_READ_ADDR_t CH5_READ_ADDR;
12219 CH_WRITE_ADDR_t CH5_WRITE_ADDR;
12220 CH_TRANS_COUNT_t CH5_TRANS_COUNT;
12221 CH_CTRL_TRIG_t CH5_CTRL_TRIG;
12222 CH_AL1_CTRL_t CH5_AL1_CTRL;
12223 CH_AL1_READ_ADDR_t CH5_AL1_READ_ADDR;
12224 CH_AL1_WRITE_ADDR_t CH5_AL1_WRITE_ADDR;
12225 CH_AL1_TRANS_COUNT_TRIG_t CH5_AL1_TRANS_COUNT_TRIG;
12226 CH_AL2_CTRL_t CH5_AL2_CTRL;
12227 CH_AL2_TRANS_COUNT_t CH5_AL2_TRANS_COUNT;
12228 CH_AL2_READ_ADDR_t CH5_AL2_READ_ADDR;
12229 CH_AL2_WRITE_ADDR_TRIG_t CH5_AL2_WRITE_ADDR_TRIG;
12230 CH_AL3_CTRL_t CH5_AL3_CTRL;
12231 CH_AL3_WRITE_ADDR_t CH5_AL3_WRITE_ADDR;
12232 CH_AL3_TRANS_COUNT_t CH5_AL3_TRANS_COUNT;
12233 CH_AL3_READ_ADDR_TRIG_t CH5_AL3_READ_ADDR_TRIG;
12234 CH_READ_ADDR_t CH6_READ_ADDR;
12235 CH_WRITE_ADDR_t CH6_WRITE_ADDR;
12236 CH_TRANS_COUNT_t CH6_TRANS_COUNT;
12237 CH_CTRL_TRIG_t CH6_CTRL_TRIG;
12238 CH_AL1_CTRL_t CH6_AL1_CTRL;
12239 CH_AL1_READ_ADDR_t CH6_AL1_READ_ADDR;
12240 CH_AL1_WRITE_ADDR_t CH6_AL1_WRITE_ADDR;
12241 CH_AL1_TRANS_COUNT_TRIG_t CH6_AL1_TRANS_COUNT_TRIG;
12242 CH_AL2_CTRL_t CH6_AL2_CTRL;
12243 CH_AL2_TRANS_COUNT_t CH6_AL2_TRANS_COUNT;
12244 CH_AL2_READ_ADDR_t CH6_AL2_READ_ADDR;
12245 CH_AL2_WRITE_ADDR_TRIG_t CH6_AL2_WRITE_ADDR_TRIG;
12246 CH_AL3_CTRL_t CH6_AL3_CTRL;
12247 CH_AL3_WRITE_ADDR_t CH6_AL3_WRITE_ADDR;
12248 CH_AL3_TRANS_COUNT_t CH6_AL3_TRANS_COUNT;
12249 CH_AL3_READ_ADDR_TRIG_t CH6_AL3_READ_ADDR_TRIG;
12250 CH_READ_ADDR_t CH7_READ_ADDR;
12251 CH_WRITE_ADDR_t CH7_WRITE_ADDR;
12252 CH_TRANS_COUNT_t CH7_TRANS_COUNT;
12253 CH_CTRL_TRIG_t CH7_CTRL_TRIG;
12254 CH_AL1_CTRL_t CH7_AL1_CTRL;
12255 CH_AL1_READ_ADDR_t CH7_AL1_READ_ADDR;
12256 CH_AL1_WRITE_ADDR_t CH7_AL1_WRITE_ADDR;
12257 CH_AL1_TRANS_COUNT_TRIG_t CH7_AL1_TRANS_COUNT_TRIG;
12258 CH_AL2_CTRL_t CH7_AL2_CTRL;
12259 CH_AL2_TRANS_COUNT_t CH7_AL2_TRANS_COUNT;
12260 CH_AL2_READ_ADDR_t CH7_AL2_READ_ADDR;
12261 CH_AL2_WRITE_ADDR_TRIG_t CH7_AL2_WRITE_ADDR_TRIG;
12262 CH_AL3_CTRL_t CH7_AL3_CTRL;
12263 CH_AL3_WRITE_ADDR_t CH7_AL3_WRITE_ADDR;
12264 CH_AL3_TRANS_COUNT_t CH7_AL3_TRANS_COUNT;
12265 CH_AL3_READ_ADDR_TRIG_t CH7_AL3_READ_ADDR_TRIG;
12266 CH_READ_ADDR_t CH8_READ_ADDR;
12267 CH_WRITE_ADDR_t CH8_WRITE_ADDR;
12268 CH_TRANS_COUNT_t CH8_TRANS_COUNT;
12269 CH_CTRL_TRIG_t CH8_CTRL_TRIG;
12270 CH_AL1_CTRL_t CH8_AL1_CTRL;
12271 CH_AL1_READ_ADDR_t CH8_AL1_READ_ADDR;
12272 CH_AL1_WRITE_ADDR_t CH8_AL1_WRITE_ADDR;
12273 CH_AL1_TRANS_COUNT_TRIG_t CH8_AL1_TRANS_COUNT_TRIG;
12274 CH_AL2_CTRL_t CH8_AL2_CTRL;
12275 CH_AL2_TRANS_COUNT_t CH8_AL2_TRANS_COUNT;
12276 CH_AL2_READ_ADDR_t CH8_AL2_READ_ADDR;
12277 CH_AL2_WRITE_ADDR_TRIG_t CH8_AL2_WRITE_ADDR_TRIG;
12278 CH_AL3_CTRL_t CH8_AL3_CTRL;
12279 CH_AL3_WRITE_ADDR_t CH8_AL3_WRITE_ADDR;
12280 CH_AL3_TRANS_COUNT_t CH8_AL3_TRANS_COUNT;
12281 CH_AL3_READ_ADDR_TRIG_t CH8_AL3_READ_ADDR_TRIG;
12282 CH_READ_ADDR_t CH9_READ_ADDR;
12283 CH_WRITE_ADDR_t CH9_WRITE_ADDR;
12284 CH_TRANS_COUNT_t CH9_TRANS_COUNT;
12285 CH_CTRL_TRIG_t CH9_CTRL_TRIG;
12286 CH_AL1_CTRL_t CH9_AL1_CTRL;
12287 CH_AL1_READ_ADDR_t CH9_AL1_READ_ADDR;
12288 CH_AL1_WRITE_ADDR_t CH9_AL1_WRITE_ADDR;
12289 CH_AL1_TRANS_COUNT_TRIG_t CH9_AL1_TRANS_COUNT_TRIG;
12290 CH_AL2_CTRL_t CH9_AL2_CTRL;
12291 CH_AL2_TRANS_COUNT_t CH9_AL2_TRANS_COUNT;
12292 CH_AL2_READ_ADDR_t CH9_AL2_READ_ADDR;
12293 CH_AL2_WRITE_ADDR_TRIG_t CH9_AL2_WRITE_ADDR_TRIG;
12294 CH_AL3_CTRL_t CH9_AL3_CTRL;
12295 CH_AL3_WRITE_ADDR_t CH9_AL3_WRITE_ADDR;
12296 CH_AL3_TRANS_COUNT_t CH9_AL3_TRANS_COUNT;
12297 CH_AL3_READ_ADDR_TRIG_t CH9_AL3_READ_ADDR_TRIG;
12298 CH_READ_ADDR_t CH10_READ_ADDR;
12299 CH_WRITE_ADDR_t CH10_WRITE_ADDR;
12300 CH_TRANS_COUNT_t CH10_TRANS_COUNT;
12301 CH_CTRL_TRIG_t CH10_CTRL_TRIG;
12302 CH_AL1_CTRL_t CH10_AL1_CTRL;
12303 CH_AL1_READ_ADDR_t CH10_AL1_READ_ADDR;
12304 CH_AL1_WRITE_ADDR_t CH10_AL1_WRITE_ADDR;
12305 CH_AL1_TRANS_COUNT_TRIG_t CH10_AL1_TRANS_COUNT_TRIG;
12306 CH_AL2_CTRL_t CH10_AL2_CTRL;
12307 CH_AL2_TRANS_COUNT_t CH10_AL2_TRANS_COUNT;
12308 CH_AL2_READ_ADDR_t CH10_AL2_READ_ADDR;
12309 CH_AL2_WRITE_ADDR_TRIG_t CH10_AL2_WRITE_ADDR_TRIG;
12310 CH_AL3_CTRL_t CH10_AL3_CTRL;
12311 CH_AL3_WRITE_ADDR_t CH10_AL3_WRITE_ADDR;
12312 CH_AL3_TRANS_COUNT_t CH10_AL3_TRANS_COUNT;
12313 CH_AL3_READ_ADDR_TRIG_t CH10_AL3_READ_ADDR_TRIG;
12314 CH_READ_ADDR_t CH11_READ_ADDR;
12315 CH_WRITE_ADDR_t CH11_WRITE_ADDR;
12316 CH_TRANS_COUNT_t CH11_TRANS_COUNT;
12317 CH_CTRL_TRIG_t CH11_CTRL_TRIG;
12318 CH_AL1_CTRL_t CH11_AL1_CTRL;
12319 CH_AL1_READ_ADDR_t CH11_AL1_READ_ADDR;
12320 CH_AL1_WRITE_ADDR_t CH11_AL1_WRITE_ADDR;
12321 CH_AL1_TRANS_COUNT_TRIG_t CH11_AL1_TRANS_COUNT_TRIG;
12322 CH_AL2_CTRL_t CH11_AL2_CTRL;
12323 CH_AL2_TRANS_COUNT_t CH11_AL2_TRANS_COUNT;
12324 CH_AL2_READ_ADDR_t CH11_AL2_READ_ADDR;
12325 CH_AL2_WRITE_ADDR_TRIG_t CH11_AL2_WRITE_ADDR_TRIG;
12326 CH_AL3_CTRL_t CH11_AL3_CTRL;
12327 CH_AL3_WRITE_ADDR_t CH11_AL3_WRITE_ADDR;
12328 CH_AL3_TRANS_COUNT_t CH11_AL3_TRANS_COUNT;
12329 CH_AL3_READ_ADDR_TRIG_t CH11_AL3_READ_ADDR_TRIG;
12330 CH_READ_ADDR_t CH12_READ_ADDR;
12331 CH_WRITE_ADDR_t CH12_WRITE_ADDR;
12332 CH_TRANS_COUNT_t CH12_TRANS_COUNT;
12333 CH_CTRL_TRIG_t CH12_CTRL_TRIG;
12334 CH_AL1_CTRL_t CH12_AL1_CTRL;
12335 CH_AL1_READ_ADDR_t CH12_AL1_READ_ADDR;
12336 CH_AL1_WRITE_ADDR_t CH12_AL1_WRITE_ADDR;
12337 CH_AL1_TRANS_COUNT_TRIG_t CH12_AL1_TRANS_COUNT_TRIG;
12338 CH_AL2_CTRL_t CH12_AL2_CTRL;
12339 CH_AL2_TRANS_COUNT_t CH12_AL2_TRANS_COUNT;
12340 CH_AL2_READ_ADDR_t CH12_AL2_READ_ADDR;
12341 CH_AL2_WRITE_ADDR_TRIG_t CH12_AL2_WRITE_ADDR_TRIG;
12342 CH_AL3_CTRL_t CH12_AL3_CTRL;
12343 CH_AL3_WRITE_ADDR_t CH12_AL3_WRITE_ADDR;
12344 CH_AL3_TRANS_COUNT_t CH12_AL3_TRANS_COUNT;
12345 CH_AL3_READ_ADDR_TRIG_t CH12_AL3_READ_ADDR_TRIG;
12346 CH_READ_ADDR_t CH13_READ_ADDR;
12347 CH_WRITE_ADDR_t CH13_WRITE_ADDR;
12348 CH_TRANS_COUNT_t CH13_TRANS_COUNT;
12349 CH_CTRL_TRIG_t CH13_CTRL_TRIG;
12350 CH_AL1_CTRL_t CH13_AL1_CTRL;
12351 CH_AL1_READ_ADDR_t CH13_AL1_READ_ADDR;
12352 CH_AL1_WRITE_ADDR_t CH13_AL1_WRITE_ADDR;
12353 CH_AL1_TRANS_COUNT_TRIG_t CH13_AL1_TRANS_COUNT_TRIG;
12354 CH_AL2_CTRL_t CH13_AL2_CTRL;
12355 CH_AL2_TRANS_COUNT_t CH13_AL2_TRANS_COUNT;
12356 CH_AL2_READ_ADDR_t CH13_AL2_READ_ADDR;
12357 CH_AL2_WRITE_ADDR_TRIG_t CH13_AL2_WRITE_ADDR_TRIG;
12358 CH_AL3_CTRL_t CH13_AL3_CTRL;
12359 CH_AL3_WRITE_ADDR_t CH13_AL3_WRITE_ADDR;
12360 CH_AL3_TRANS_COUNT_t CH13_AL3_TRANS_COUNT;
12361 CH_AL3_READ_ADDR_TRIG_t CH13_AL3_READ_ADDR_TRIG;
12362 CH_READ_ADDR_t CH14_READ_ADDR;
12363 CH_WRITE_ADDR_t CH14_WRITE_ADDR;
12364 CH_TRANS_COUNT_t CH14_TRANS_COUNT;
12365 CH_CTRL_TRIG_t CH14_CTRL_TRIG;
12366 CH_AL1_CTRL_t CH14_AL1_CTRL;
12367 CH_AL1_READ_ADDR_t CH14_AL1_READ_ADDR;
12368 CH_AL1_WRITE_ADDR_t CH14_AL1_WRITE_ADDR;
12369 CH_AL1_TRANS_COUNT_TRIG_t CH14_AL1_TRANS_COUNT_TRIG;
12370 CH_AL2_CTRL_t CH14_AL2_CTRL;
12371 CH_AL2_TRANS_COUNT_t CH14_AL2_TRANS_COUNT;
12372 CH_AL2_READ_ADDR_t CH14_AL2_READ_ADDR;
12373 CH_AL2_WRITE_ADDR_TRIG_t CH14_AL2_WRITE_ADDR_TRIG;
12374 CH_AL3_CTRL_t CH14_AL3_CTRL;
12375 CH_AL3_WRITE_ADDR_t CH14_AL3_WRITE_ADDR;
12376 CH_AL3_TRANS_COUNT_t CH14_AL3_TRANS_COUNT;
12377 CH_AL3_READ_ADDR_TRIG_t CH14_AL3_READ_ADDR_TRIG;
12378 CH_READ_ADDR_t CH15_READ_ADDR;
12379 CH_WRITE_ADDR_t CH15_WRITE_ADDR;
12380 CH_TRANS_COUNT_t CH15_TRANS_COUNT;
12381 CH_CTRL_TRIG_t CH15_CTRL_TRIG;
12382 CH_AL1_CTRL_t CH15_AL1_CTRL;
12383 CH_AL1_READ_ADDR_t CH15_AL1_READ_ADDR;
12384 CH_AL1_WRITE_ADDR_t CH15_AL1_WRITE_ADDR;
12385 CH_AL1_TRANS_COUNT_TRIG_t CH15_AL1_TRANS_COUNT_TRIG;
12386 CH_AL2_CTRL_t CH15_AL2_CTRL;
12387 CH_AL2_TRANS_COUNT_t CH15_AL2_TRANS_COUNT;
12388 CH_AL2_READ_ADDR_t CH15_AL2_READ_ADDR;
12389 CH_AL2_WRITE_ADDR_TRIG_t CH15_AL2_WRITE_ADDR_TRIG;
12390 CH_AL3_CTRL_t CH15_AL3_CTRL;
12391 CH_AL3_WRITE_ADDR_t CH15_AL3_WRITE_ADDR;
12392 CH_AL3_TRANS_COUNT_t CH15_AL3_TRANS_COUNT;
12393 CH_AL3_READ_ADDR_TRIG_t CH15_AL3_READ_ADDR_TRIG;
12394 INTR_t INTR;
12395 INTE0_t INTE0;
12396 INTF0_t INTF0;
12397 INTS0_t INTS0;
12398 INTR1_t INTR1;
12399 INTE1_t INTE1;
12400 INTF1_t INTF1;
12401 INTS1_t INTS1;
12402 INTR2_t INTR2;
12403 INTE2_t INTE2;
12404 INTF2_t INTF2;
12405 INTS2_t INTS2;
12406 INTR3_t INTR3;
12407 INTE3_t INTE3;
12408 INTF3_t INTF3;
12409 INTS3_t INTS3;
12410 TIMER_t TIMER[4];
12411 MULTI_CHAN_TRIGGER_t MULTI_CHAN_TRIGGER;
12412 SNIFF_CTRL_t SNIFF_CTRL;
12413 SNIFF_DATA_t SNIFF_DATA;
12414 uint32_t reserved0;
12415 FIFO_LEVELS_t FIFO_LEVELS;
12416 CHAN_ABORT_t CHAN_ABORT;
12417 N_CHANNELS_t N_CHANNELS;
12418 uint32_t reserved1[5];
12419 SECCFG_CH_t SECCFG_CH[16];
12420 SECCFG_IRQ_t SECCFG_IRQ[4];
12421 SECCFG_MISC_t SECCFG_MISC;
12422 uint32_t reserved2[11];
12423 MPU_CTRL_t MPU_CTRL;
12424 MPU_BAR_t MPU_BAR0;
12425 MPU_LAR_t MPU_LAR0;
12426 MPU_BAR_t MPU_BAR1;
12427 MPU_LAR_t MPU_LAR1;
12428 MPU_BAR_t MPU_BAR2;
12429 MPU_LAR_t MPU_LAR2;
12430 MPU_BAR_t MPU_BAR3;
12431 MPU_LAR_t MPU_LAR3;
12432 MPU_BAR_t MPU_BAR4;
12433 MPU_LAR_t MPU_LAR4;
12434 MPU_BAR_t MPU_BAR5;
12435 MPU_LAR_t MPU_LAR5;
12436 MPU_BAR_t MPU_BAR6;
12437 MPU_LAR_t MPU_LAR6;
12438 MPU_BAR_t MPU_BAR7;
12439 MPU_LAR_t MPU_LAR7;
12440 uint32_t reserved3[175];
12441 CH_DBG_CTDREQ_t CH0_DBG_CTDREQ;
12442 CH_DBG_TCR_t CH0_DBG_TCR;
12443 uint32_t reserved4[14];
12444 CH_DBG_CTDREQ_t CH1_DBG_CTDREQ;
12445 CH_DBG_TCR_t CH1_DBG_TCR;
12446 uint32_t reserved5[14];
12447 CH_DBG_CTDREQ_t CH2_DBG_CTDREQ;
12448 CH_DBG_TCR_t CH2_DBG_TCR;
12449 uint32_t reserved6[14];
12450 CH_DBG_CTDREQ_t CH3_DBG_CTDREQ;
12451 CH_DBG_TCR_t CH3_DBG_TCR;
12452 uint32_t reserved7[14];
12453 CH_DBG_CTDREQ_t CH4_DBG_CTDREQ;
12454 CH_DBG_TCR_t CH4_DBG_TCR;
12455 uint32_t reserved8[14];
12456 CH_DBG_CTDREQ_t CH5_DBG_CTDREQ;
12457 CH_DBG_TCR_t CH5_DBG_TCR;
12458 uint32_t reserved9[14];
12459 CH_DBG_CTDREQ_t CH6_DBG_CTDREQ;
12460 CH_DBG_TCR_t CH6_DBG_TCR;
12461 uint32_t reserved10[14];
12462 CH_DBG_CTDREQ_t CH7_DBG_CTDREQ;
12463 CH_DBG_TCR_t CH7_DBG_TCR;
12464 uint32_t reserved11[14];
12465 CH_DBG_CTDREQ_t CH8_DBG_CTDREQ;
12466 CH_DBG_TCR_t CH8_DBG_TCR;
12467 uint32_t reserved12[14];
12468 CH_DBG_CTDREQ_t CH9_DBG_CTDREQ;
12469 CH_DBG_TCR_t CH9_DBG_TCR;
12470 uint32_t reserved13[14];
12471 CH_DBG_CTDREQ_t CH10_DBG_CTDREQ;
12472 CH_DBG_TCR_t CH10_DBG_TCR;
12473 uint32_t reserved14[14];
12474 CH_DBG_CTDREQ_t CH11_DBG_CTDREQ;
12475 CH_DBG_TCR_t CH11_DBG_TCR;
12476 uint32_t reserved15[14];
12477 CH_DBG_CTDREQ_t CH12_DBG_CTDREQ;
12478 CH_DBG_TCR_t CH12_DBG_TCR;
12479 uint32_t reserved16[14];
12480 CH_DBG_CTDREQ_t CH13_DBG_CTDREQ;
12481 CH_DBG_TCR_t CH13_DBG_TCR;
12482 uint32_t reserved17[14];
12483 CH_DBG_CTDREQ_t CH14_DBG_CTDREQ;
12484 CH_DBG_TCR_t CH14_DBG_TCR;
12485 uint32_t reserved18[14];
12486 CH_DBG_CTDREQ_t CH15_DBG_CTDREQ;
12487 CH_DBG_TCR_t CH15_DBG_TCR;
12488 };
12489
12490 static DMA_t & DMA = (*(DMA_t *)0x50000000);
12491 static DMA_t & DMA_XOR = (*(DMA_t *)0x50001000);
12492 static DMA_t & DMA_SET = (*(DMA_t *)0x50002000);
12493 static DMA_t & DMA_CLR = (*(DMA_t *)0x50003000);
12494
12495} // _DMA_
12496
12497// Controls time and alarms time is a 64 bit value indicating the time since power-on timeh is the top 32 bits of time & timel is the bottom 32 bits to change time write to timelw before timehw to read time read from timelr before timehr An alarm is set by setting alarm_enable and writing to the corresponding alarm register When an alarm is pending, the corresponding alarm_running signal will be high An alarm can be cancelled before it has finished by clearing the alarm_enable When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared To clear the interrupt write a 1 to the corresponding alarm_irq The timer can be locked to prevent writing
12498namespace _TIMER0_ {
12499
12500 // Write to bits 63:32 of time always write timelw before timehw
12501 // Reset value: 0x00000000
12502 BEGIN_TYPE(TIMEHW_t, uint32_t)
12503 ADD_BITFIELD_WO(TIMEHW, 0, 32)
12504 END_TYPE()
12505
12506 // Write to bits 31:0 of time writes do not get copied to time until timehw is written
12507 // Reset value: 0x00000000
12508 BEGIN_TYPE(TIMELW_t, uint32_t)
12509 ADD_BITFIELD_WO(TIMELW, 0, 32)
12510 END_TYPE()
12511
12512 // Read from bits 63:32 of time always read timelr before timehr
12513 // Reset value: 0x00000000
12514 BEGIN_TYPE(TIMEHR_t, uint32_t)
12515 ADD_BITFIELD_RO(TIMEHR, 0, 32)
12516 END_TYPE()
12517
12518 // Read from bits 31:0 of time
12519 // Reset value: 0x00000000
12520 BEGIN_TYPE(TIMELR_t, uint32_t)
12521 ADD_BITFIELD_RO(TIMELR, 0, 32)
12522 END_TYPE()
12523
12524 // Arm alarm 0-3, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM[0-3] == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register.
12525 // Reset value: 0x00000000
12526 typedef uint32_t ALARM_t;
12527
12528 // Indicates the armed/disarmed status of each alarm. A write to the corresponding ALARMx register arms the alarm. Alarms automatically disarm upon firing, but writing ones here will disarm immediately without waiting to fire.
12529 // Reset value: 0x00000000
12530 BEGIN_TYPE(ARMED_t, uint32_t)
12531 ADD_BITFIELD_RW(ARMED, 0, 4)
12532 END_TYPE()
12533
12534 // Raw read from bits 63:32 of time (no side effects)
12535 // Reset value: 0x00000000
12536 BEGIN_TYPE(TIMERAWH_t, uint32_t)
12537 ADD_BITFIELD_RO(TIMERAWH, 0, 32)
12538 END_TYPE()
12539
12540 // Raw read from bits 31:0 of time (no side effects)
12541 // Reset value: 0x00000000
12542 BEGIN_TYPE(TIMERAWL_t, uint32_t)
12543 ADD_BITFIELD_RO(TIMERAWL, 0, 32)
12544 END_TYPE()
12545
12546 // Set bits high to enable pause when the corresponding debug ports are active
12547 // Reset value: 0x00000007
12548 BEGIN_TYPE(DBGPAUSE_t, uint32_t)
12549 // Pause when processor 1 is in debug mode
12550 ADD_BITFIELD_RW(DBG1, 2, 1)
12551 // Pause when processor 0 is in debug mode
12552 ADD_BITFIELD_RW(DBG0, 1, 1)
12553 END_TYPE()
12554
12555 // Set high to pause the timer
12556 // Reset value: 0x00000000
12557 BEGIN_TYPE(PAUSE_t, uint32_t)
12558 ADD_BITFIELD_RW(PAUSE, 0, 1)
12559 END_TYPE()
12560
12561 // Set locked bit to disable write access to timer Once set, cannot be cleared (without a reset)
12562 // Reset value: 0x00000000
12563 BEGIN_TYPE(LOCKED_t, uint32_t)
12564 ADD_BITFIELD_RW(LOCKED, 0, 1)
12565 END_TYPE()
12566
12567 // Selects the source for the timer. Defaults to the normal tick configured in the ticks block (typically configured to 1 microsecond). Writing to 1 will ignore the tick and count clk_sys cycles instead.
12568 // Reset value: 0x00000000
12569 BEGIN_TYPE(SOURCE_t, uint32_t)
12570 ADD_BITFIELD_RW(CLK_SYS, 0, 1)
12571 END_TYPE()
12572
12573 static const uint32_t SOURCE_CLK_SYS__TICK = 0;
12574 static const uint32_t SOURCE_CLK_SYS__CLK_SYS = 1;
12575
12576 // Raw Interrupts
12577 // Reset value: 0x00000000
12578 BEGIN_TYPE(INTR_t, uint32_t)
12579 ADD_BITFIELD_RW(ALARM_3, 3, 1)
12580 ADD_BITFIELD_RW(ALARM_2, 2, 1)
12581 ADD_BITFIELD_RW(ALARM_1, 1, 1)
12582 ADD_BITFIELD_RW(ALARM_0, 0, 1)
12583 END_TYPE()
12584
12585 // Interrupt Enable
12586 // Reset value: 0x00000000
12587 BEGIN_TYPE(INTE_t, uint32_t)
12588 ADD_BITFIELD_RW(ALARM_3, 3, 1)
12589 ADD_BITFIELD_RW(ALARM_2, 2, 1)
12590 ADD_BITFIELD_RW(ALARM_1, 1, 1)
12591 ADD_BITFIELD_RW(ALARM_0, 0, 1)
12592 END_TYPE()
12593
12594 // Interrupt Force
12595 // Reset value: 0x00000000
12596 BEGIN_TYPE(INTF_t, uint32_t)
12597 ADD_BITFIELD_RW(ALARM_3, 3, 1)
12598 ADD_BITFIELD_RW(ALARM_2, 2, 1)
12599 ADD_BITFIELD_RW(ALARM_1, 1, 1)
12600 ADD_BITFIELD_RW(ALARM_0, 0, 1)
12601 END_TYPE()
12602
12603 // Interrupt status after masking & forcing
12604 // Reset value: 0x00000000
12605 BEGIN_TYPE(INTS_t, uint32_t)
12606 ADD_BITFIELD_RO(ALARM_3, 3, 1)
12607 ADD_BITFIELD_RO(ALARM_2, 2, 1)
12608 ADD_BITFIELD_RO(ALARM_1, 1, 1)
12609 ADD_BITFIELD_RO(ALARM_0, 0, 1)
12610 END_TYPE()
12611
12612 struct TIMER0_t {
12613 TIMEHW_t TIMEHW;
12614 TIMELW_t TIMELW;
12615 TIMEHR_t TIMEHR;
12616 TIMELR_t TIMELR;
12617 ALARM_t ALARM[4];
12618 ARMED_t ARMED;
12619 TIMERAWH_t TIMERAWH;
12620 TIMERAWL_t TIMERAWL;
12621 DBGPAUSE_t DBGPAUSE;
12622 PAUSE_t PAUSE;
12623 LOCKED_t LOCKED;
12624 SOURCE_t SOURCE;
12625 INTR_t INTR;
12626 INTE_t INTE;
12627 INTF_t INTF;
12628 INTS_t INTS;
12629 };
12630
12631 static TIMER0_t & TIMER0 = (*(TIMER0_t *)0x400b0000);
12632 static TIMER0_t & TIMER0_XOR = (*(TIMER0_t *)0x400b1000);
12633 static TIMER0_t & TIMER0_SET = (*(TIMER0_t *)0x400b2000);
12634 static TIMER0_t & TIMER0_CLR = (*(TIMER0_t *)0x400b3000);
12635
12636} // _TIMER0_
12637
12638namespace _TIMER1_ {
12639
12640 static _TIMER0_::TIMER0_t & TIMER1 = (*(_TIMER0_::TIMER0_t *)0x400b8000);
12641 static _TIMER0_::TIMER0_t & TIMER1_XOR = (*(_TIMER0_::TIMER0_t *)0x400b9000);
12642 static _TIMER0_::TIMER0_t & TIMER1_SET = (*(_TIMER0_::TIMER0_t *)0x400ba000);
12643 static _TIMER0_::TIMER0_t & TIMER1_CLR = (*(_TIMER0_::TIMER0_t *)0x400bb000);
12644
12645} // _TIMER1_
12646
12647// Simple PWM
12648namespace _PWM_ {
12649
12650 // Control and status register
12651 // Reset value: 0x00000000
12652 BEGIN_TYPE(CH_CSR_t, uint32_t)
12653 // Advance the phase of the counter by 1 count, while it is running. Self-clearing. Write a 1, and poll until low. Counter must be running at less than full speed (div_int + div_frac / 16 > 1)
12654 ADD_BITFIELD_WO(PH_ADV, 7, 1)
12655 // Retard the phase of the counter by 1 count, while it is running. Self-clearing. Write a 1, and poll until low. Counter must be running.
12656 ADD_BITFIELD_WO(PH_RET, 6, 1)
12657 ADD_BITFIELD_RW(DIVMODE, 4, 2)
12658 // Invert output B
12659 ADD_BITFIELD_RW(B_INV, 3, 1)
12660 // Invert output A
12661 ADD_BITFIELD_RW(A_INV, 2, 1)
12662 // 1: Enable phase-correct modulation. 0: Trailing-edge
12663 ADD_BITFIELD_RW(PH_CORRECT, 1, 1)
12664 // Enable the PWM channel.
12665 ADD_BITFIELD_RW(EN, 0, 1)
12666 END_TYPE()
12667
12668 // Free-running counting at rate dictated by fractional divider
12669 static const uint32_t CH_CSR_DIVMODE__div = 0;
12670 // Fractional divider operation is gated by the PWM B pin.
12671 static const uint32_t CH_CSR_DIVMODE__level = 1;
12672 // Counter advances with each rising edge of the PWM B pin.
12673 static const uint32_t CH_CSR_DIVMODE__rise = 2;
12674 // Counter advances with each falling edge of the PWM B pin.
12675 static const uint32_t CH_CSR_DIVMODE__fall = 3;
12676
12677 // INT and FRAC form a fixed-point fractional number. Counting rate is system clock frequency divided by this number. Fractional division uses simple 1st-order sigma-delta.
12678 // Reset value: 0x00000010
12679 BEGIN_TYPE(CH_DIV_t, uint32_t)
12680 ADD_BITFIELD_RW(INT, 4, 8)
12681 ADD_BITFIELD_RW(FRAC, 0, 4)
12682 END_TYPE()
12683
12684 // Direct access to the PWM counter
12685 // Reset value: 0x00000000
12686 BEGIN_TYPE(CH_CTR_t, uint32_t)
12687 ADD_BITFIELD_RW(CTR, 0, 16)
12688 END_TYPE()
12689
12690 // Counter compare values
12691 // Reset value: 0x00000000
12692 BEGIN_TYPE(CH_CC_t, uint32_t)
12693 ADD_BITFIELD_RW(B, 16, 16)
12694 ADD_BITFIELD_RW(A, 0, 16)
12695 END_TYPE()
12696
12697 // Counter wrap value
12698 // Reset value: 0x0000ffff
12699 BEGIN_TYPE(CH_TOP_t, uint32_t)
12700 ADD_BITFIELD_RW(TOP, 0, 16)
12701 END_TYPE()
12702
12703 // This register aliases the CSR_EN bits for all channels. Writing to this register allows multiple channels to be enabled or disabled simultaneously, so they can run in perfect sync. For each channel, there is only one physical EN register bit, which can be accessed through here or CHx_CSR.
12704 // Reset value: 0x00000000
12705 BEGIN_TYPE(EN_t, uint32_t)
12706 ADD_BITFIELD_RW(CH11, 11, 1)
12707 ADD_BITFIELD_RW(CH10, 10, 1)
12708 ADD_BITFIELD_RW(CH9, 9, 1)
12709 ADD_BITFIELD_RW(CH8, 8, 1)
12710 ADD_BITFIELD_RW(CH7, 7, 1)
12711 ADD_BITFIELD_RW(CH6, 6, 1)
12712 ADD_BITFIELD_RW(CH5, 5, 1)
12713 ADD_BITFIELD_RW(CH4, 4, 1)
12714 ADD_BITFIELD_RW(CH3, 3, 1)
12715 ADD_BITFIELD_RW(CH2, 2, 1)
12716 ADD_BITFIELD_RW(CH1, 1, 1)
12717 ADD_BITFIELD_RW(CH0, 0, 1)
12718 END_TYPE()
12719
12720 // Raw Interrupts
12721 // Reset value: 0x00000000
12722 BEGIN_TYPE(INTR_t, uint32_t)
12723 ADD_BITFIELD_RW(CH11, 11, 1)
12724 ADD_BITFIELD_RW(CH10, 10, 1)
12725 ADD_BITFIELD_RW(CH9, 9, 1)
12726 ADD_BITFIELD_RW(CH8, 8, 1)
12727 ADD_BITFIELD_RW(CH7, 7, 1)
12728 ADD_BITFIELD_RW(CH6, 6, 1)
12729 ADD_BITFIELD_RW(CH5, 5, 1)
12730 ADD_BITFIELD_RW(CH4, 4, 1)
12731 ADD_BITFIELD_RW(CH3, 3, 1)
12732 ADD_BITFIELD_RW(CH2, 2, 1)
12733 ADD_BITFIELD_RW(CH1, 1, 1)
12734 ADD_BITFIELD_RW(CH0, 0, 1)
12735 END_TYPE()
12736
12737 // Interrupt Enable for irq0
12738 // Reset value: 0x00000000
12739 BEGIN_TYPE(IRQ0_INTE_t, uint32_t)
12740 ADD_BITFIELD_RW(CH11, 11, 1)
12741 ADD_BITFIELD_RW(CH10, 10, 1)
12742 ADD_BITFIELD_RW(CH9, 9, 1)
12743 ADD_BITFIELD_RW(CH8, 8, 1)
12744 ADD_BITFIELD_RW(CH7, 7, 1)
12745 ADD_BITFIELD_RW(CH6, 6, 1)
12746 ADD_BITFIELD_RW(CH5, 5, 1)
12747 ADD_BITFIELD_RW(CH4, 4, 1)
12748 ADD_BITFIELD_RW(CH3, 3, 1)
12749 ADD_BITFIELD_RW(CH2, 2, 1)
12750 ADD_BITFIELD_RW(CH1, 1, 1)
12751 ADD_BITFIELD_RW(CH0, 0, 1)
12752 END_TYPE()
12753
12754 // Interrupt Force for irq0
12755 // Reset value: 0x00000000
12756 BEGIN_TYPE(IRQ0_INTF_t, uint32_t)
12757 ADD_BITFIELD_RW(CH11, 11, 1)
12758 ADD_BITFIELD_RW(CH10, 10, 1)
12759 ADD_BITFIELD_RW(CH9, 9, 1)
12760 ADD_BITFIELD_RW(CH8, 8, 1)
12761 ADD_BITFIELD_RW(CH7, 7, 1)
12762 ADD_BITFIELD_RW(CH6, 6, 1)
12763 ADD_BITFIELD_RW(CH5, 5, 1)
12764 ADD_BITFIELD_RW(CH4, 4, 1)
12765 ADD_BITFIELD_RW(CH3, 3, 1)
12766 ADD_BITFIELD_RW(CH2, 2, 1)
12767 ADD_BITFIELD_RW(CH1, 1, 1)
12768 ADD_BITFIELD_RW(CH0, 0, 1)
12769 END_TYPE()
12770
12771 // Interrupt status after masking & forcing for irq0
12772 // Reset value: 0x00000000
12773 BEGIN_TYPE(IRQ0_INTS_t, uint32_t)
12774 ADD_BITFIELD_RO(CH11, 11, 1)
12775 ADD_BITFIELD_RO(CH10, 10, 1)
12776 ADD_BITFIELD_RO(CH9, 9, 1)
12777 ADD_BITFIELD_RO(CH8, 8, 1)
12778 ADD_BITFIELD_RO(CH7, 7, 1)
12779 ADD_BITFIELD_RO(CH6, 6, 1)
12780 ADD_BITFIELD_RO(CH5, 5, 1)
12781 ADD_BITFIELD_RO(CH4, 4, 1)
12782 ADD_BITFIELD_RO(CH3, 3, 1)
12783 ADD_BITFIELD_RO(CH2, 2, 1)
12784 ADD_BITFIELD_RO(CH1, 1, 1)
12785 ADD_BITFIELD_RO(CH0, 0, 1)
12786 END_TYPE()
12787
12788 // Interrupt Enable for irq1
12789 // Reset value: 0x00000000
12790 BEGIN_TYPE(IRQ1_INTE_t, uint32_t)
12791 ADD_BITFIELD_RW(CH11, 11, 1)
12792 ADD_BITFIELD_RW(CH10, 10, 1)
12793 ADD_BITFIELD_RW(CH9, 9, 1)
12794 ADD_BITFIELD_RW(CH8, 8, 1)
12795 ADD_BITFIELD_RW(CH7, 7, 1)
12796 ADD_BITFIELD_RW(CH6, 6, 1)
12797 ADD_BITFIELD_RW(CH5, 5, 1)
12798 ADD_BITFIELD_RW(CH4, 4, 1)
12799 ADD_BITFIELD_RW(CH3, 3, 1)
12800 ADD_BITFIELD_RW(CH2, 2, 1)
12801 ADD_BITFIELD_RW(CH1, 1, 1)
12802 ADD_BITFIELD_RW(CH0, 0, 1)
12803 END_TYPE()
12804
12805 // Interrupt Force for irq1
12806 // Reset value: 0x00000000
12807 BEGIN_TYPE(IRQ1_INTF_t, uint32_t)
12808 ADD_BITFIELD_RW(CH11, 11, 1)
12809 ADD_BITFIELD_RW(CH10, 10, 1)
12810 ADD_BITFIELD_RW(CH9, 9, 1)
12811 ADD_BITFIELD_RW(CH8, 8, 1)
12812 ADD_BITFIELD_RW(CH7, 7, 1)
12813 ADD_BITFIELD_RW(CH6, 6, 1)
12814 ADD_BITFIELD_RW(CH5, 5, 1)
12815 ADD_BITFIELD_RW(CH4, 4, 1)
12816 ADD_BITFIELD_RW(CH3, 3, 1)
12817 ADD_BITFIELD_RW(CH2, 2, 1)
12818 ADD_BITFIELD_RW(CH1, 1, 1)
12819 ADD_BITFIELD_RW(CH0, 0, 1)
12820 END_TYPE()
12821
12822 // Interrupt status after masking & forcing for irq1
12823 // Reset value: 0x00000000
12824 BEGIN_TYPE(IRQ1_INTS_t, uint32_t)
12825 ADD_BITFIELD_RO(CH11, 11, 1)
12826 ADD_BITFIELD_RO(CH10, 10, 1)
12827 ADD_BITFIELD_RO(CH9, 9, 1)
12828 ADD_BITFIELD_RO(CH8, 8, 1)
12829 ADD_BITFIELD_RO(CH7, 7, 1)
12830 ADD_BITFIELD_RO(CH6, 6, 1)
12831 ADD_BITFIELD_RO(CH5, 5, 1)
12832 ADD_BITFIELD_RO(CH4, 4, 1)
12833 ADD_BITFIELD_RO(CH3, 3, 1)
12834 ADD_BITFIELD_RO(CH2, 2, 1)
12835 ADD_BITFIELD_RO(CH1, 1, 1)
12836 ADD_BITFIELD_RO(CH0, 0, 1)
12837 END_TYPE()
12838
12839 struct PWM_t {
12840 CH_CSR_t CH0_CSR;
12841 CH_DIV_t CH0_DIV;
12842 CH_CTR_t CH0_CTR;
12843 CH_CC_t CH0_CC;
12844 CH_TOP_t CH0_TOP;
12845 CH_CSR_t CH1_CSR;
12846 CH_DIV_t CH1_DIV;
12847 CH_CTR_t CH1_CTR;
12848 CH_CC_t CH1_CC;
12849 CH_TOP_t CH1_TOP;
12850 CH_CSR_t CH2_CSR;
12851 CH_DIV_t CH2_DIV;
12852 CH_CTR_t CH2_CTR;
12853 CH_CC_t CH2_CC;
12854 CH_TOP_t CH2_TOP;
12855 CH_CSR_t CH3_CSR;
12856 CH_DIV_t CH3_DIV;
12857 CH_CTR_t CH3_CTR;
12858 CH_CC_t CH3_CC;
12859 CH_TOP_t CH3_TOP;
12860 CH_CSR_t CH4_CSR;
12861 CH_DIV_t CH4_DIV;
12862 CH_CTR_t CH4_CTR;
12863 CH_CC_t CH4_CC;
12864 CH_TOP_t CH4_TOP;
12865 CH_CSR_t CH5_CSR;
12866 CH_DIV_t CH5_DIV;
12867 CH_CTR_t CH5_CTR;
12868 CH_CC_t CH5_CC;
12869 CH_TOP_t CH5_TOP;
12870 CH_CSR_t CH6_CSR;
12871 CH_DIV_t CH6_DIV;
12872 CH_CTR_t CH6_CTR;
12873 CH_CC_t CH6_CC;
12874 CH_TOP_t CH6_TOP;
12875 CH_CSR_t CH7_CSR;
12876 CH_DIV_t CH7_DIV;
12877 CH_CTR_t CH7_CTR;
12878 CH_CC_t CH7_CC;
12879 CH_TOP_t CH7_TOP;
12880 CH_CSR_t CH8_CSR;
12881 CH_DIV_t CH8_DIV;
12882 CH_CTR_t CH8_CTR;
12883 CH_CC_t CH8_CC;
12884 CH_TOP_t CH8_TOP;
12885 CH_CSR_t CH9_CSR;
12886 CH_DIV_t CH9_DIV;
12887 CH_CTR_t CH9_CTR;
12888 CH_CC_t CH9_CC;
12889 CH_TOP_t CH9_TOP;
12890 CH_CSR_t CH10_CSR;
12891 CH_DIV_t CH10_DIV;
12892 CH_CTR_t CH10_CTR;
12893 CH_CC_t CH10_CC;
12894 CH_TOP_t CH10_TOP;
12895 CH_CSR_t CH11_CSR;
12896 CH_DIV_t CH11_DIV;
12897 CH_CTR_t CH11_CTR;
12898 CH_CC_t CH11_CC;
12899 CH_TOP_t CH11_TOP;
12900 EN_t EN;
12901 INTR_t INTR;
12902 IRQ0_INTE_t IRQ0_INTE;
12903 IRQ0_INTF_t IRQ0_INTF;
12904 IRQ0_INTS_t IRQ0_INTS;
12905 IRQ1_INTE_t IRQ1_INTE;
12906 IRQ1_INTF_t IRQ1_INTF;
12907 IRQ1_INTS_t IRQ1_INTS;
12908 };
12909
12910 static PWM_t & PWM = (*(PWM_t *)0x400a8000);
12911 static PWM_t & PWM_XOR = (*(PWM_t *)0x400a9000);
12912 static PWM_t & PWM_SET = (*(PWM_t *)0x400aa000);
12913 static PWM_t & PWM_CLR = (*(PWM_t *)0x400ab000);
12914
12915} // _PWM_
12916
12917// Control and data interface to SAR ADC
12918namespace _ADC_ {
12919
12920 // ADC Control and Status
12921 // Reset value: 0x00000000
12922 BEGIN_TYPE(CS_t, uint32_t)
12923 // Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable. Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion. The first channel to be sampled will be the one currently indicated by AINSEL. AINSEL will be updated after each conversion with the newly-selected channel.
12924 ADD_BITFIELD_RW(RROBIN, 16, 9)
12925 // Select analog mux input. Updated automatically in round-robin mode. This is corrected for the package option so only ADC channels which are bonded are available, and in the correct order
12926 ADD_BITFIELD_RW(AINSEL, 12, 4)
12927 // Some past ADC conversion encountered an error. Write 1 to clear.
12928 ADD_BITFIELD_RW(ERR_STICKY, 10, 1)
12929 // The most recent ADC conversion encountered an error; result is undefined or noisy.
12930 ADD_BITFIELD_RO(ERR, 9, 1)
12931 // 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress.
12932 ADD_BITFIELD_RO(READY, 8, 1)
12933 // Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes.
12934 ADD_BITFIELD_RW(START_MANY, 3, 1)
12935 // Start a single conversion. Self-clearing. Ignored if start_many is asserted.
12936 ADD_BITFIELD_WO(START_ONCE, 2, 1)
12937 // Power on temperature sensor. 1 - enabled. 0 - disabled.
12938 ADD_BITFIELD_RW(TS_EN, 1, 1)
12939 // Power on ADC and enable its clock. 1 - enabled. 0 - disabled.
12940 ADD_BITFIELD_RW(EN, 0, 1)
12941 END_TYPE()
12942
12943 // Result of most recent ADC conversion
12944 // Reset value: 0x00000000
12945 BEGIN_TYPE(RESULT_t, uint32_t)
12946 ADD_BITFIELD_RO(RESULT, 0, 12)
12947 END_TYPE()
12948
12949 // FIFO control and status
12950 // Reset value: 0x00000000
12951 BEGIN_TYPE(FCS_t, uint32_t)
12952 // DREQ/IRQ asserted when level >= threshold
12953 ADD_BITFIELD_RW(THRESH, 24, 4)
12954 // The number of conversion results currently waiting in the FIFO
12955 ADD_BITFIELD_RO(LEVEL, 16, 4)
12956 // 1 if the FIFO has been overflowed. Write 1 to clear.
12957 ADD_BITFIELD_RW(OVER, 11, 1)
12958 // 1 if the FIFO has been underflowed. Write 1 to clear.
12959 ADD_BITFIELD_RW(UNDER, 10, 1)
12960 ADD_BITFIELD_RO(FULL, 9, 1)
12961 ADD_BITFIELD_RO(EMPTY, 8, 1)
12962 // If 1: assert DMA requests when FIFO contains data
12963 ADD_BITFIELD_RW(DREQ_EN, 3, 1)
12964 // If 1: conversion error bit appears in the FIFO alongside the result
12965 ADD_BITFIELD_RW(ERR, 2, 1)
12966 // If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers.
12967 ADD_BITFIELD_RW(SHIFT, 1, 1)
12968 // If 1: write result to the FIFO after each conversion.
12969 ADD_BITFIELD_RW(EN, 0, 1)
12970 END_TYPE()
12971
12972 // Conversion result FIFO
12973 // Reset value: 0x00000000
12974 BEGIN_TYPE(FIFO_t, uint32_t)
12975 // 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted.
12976 ADD_BITFIELD_RO(ERR, 15, 1)
12977 ADD_BITFIELD_RO(VAL, 0, 12)
12978 END_TYPE()
12979
12980 // Clock divider. If non-zero, CS_START_MANY will start conversions at regular intervals rather than back-to-back. The divider is reset when either of these fields are written. Total period is 1 + INT + FRAC / 256
12981 // Reset value: 0x00000000
12982 BEGIN_TYPE(DIV_t, uint32_t)
12983 // Integer part of clock divisor.
12984 ADD_BITFIELD_RW(INT, 8, 16)
12985 // Fractional part of clock divisor. First-order delta-sigma.
12986 ADD_BITFIELD_RW(FRAC, 0, 8)
12987 END_TYPE()
12988
12989 // Raw Interrupts
12990 // Reset value: 0x00000000
12991 BEGIN_TYPE(INTR_t, uint32_t)
12992 // Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field.
12993 ADD_BITFIELD_RO(FIFO, 0, 1)
12994 END_TYPE()
12995
12996 // Interrupt Enable
12997 // Reset value: 0x00000000
12998 BEGIN_TYPE(INTE_t, uint32_t)
12999 // Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field.
13000 ADD_BITFIELD_RW(FIFO, 0, 1)
13001 END_TYPE()
13002
13003 // Interrupt Force
13004 // Reset value: 0x00000000
13005 BEGIN_TYPE(INTF_t, uint32_t)
13006 // Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field.
13007 ADD_BITFIELD_RW(FIFO, 0, 1)
13008 END_TYPE()
13009
13010 // Interrupt status after masking & forcing
13011 // Reset value: 0x00000000
13012 BEGIN_TYPE(INTS_t, uint32_t)
13013 // Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field.
13014 ADD_BITFIELD_RO(FIFO, 0, 1)
13015 END_TYPE()
13016
13017 struct ADC_t {
13018 CS_t CS;
13019 RESULT_t RESULT;
13020 FCS_t FCS;
13021 FIFO_t FIFO;
13022 DIV_t DIV;
13023 INTR_t INTR;
13024 INTE_t INTE;
13025 INTF_t INTF;
13026 INTS_t INTS;
13027 };
13028
13029 static ADC_t & ADC = (*(ADC_t *)0x400a0000);
13030 static ADC_t & ADC_XOR = (*(ADC_t *)0x400a1000);
13031 static ADC_t & ADC_SET = (*(ADC_t *)0x400a2000);
13032 static ADC_t & ADC_CLR = (*(ADC_t *)0x400a3000);
13033
13034} // _ADC_
13035
13036// DW_apb_i2c address block List of configuration constants for the Synopsys I2C hardware (you may see references to these in I2C register header; these are *fixed* values, set at hardware design time): IC_ULTRA_FAST_MODE ................ 0x0 IC_UFM_TBUF_CNT_DEFAULT ........... 0x8 IC_UFM_SCL_LOW_COUNT .............. 0x0008 IC_UFM_SCL_HIGH_COUNT ............. 0x0006 IC_TX_TL .......................... 0x0 IC_TX_CMD_BLOCK ................... 0x1 IC_HAS_DMA ........................ 0x1 IC_HAS_ASYNC_FIFO ................. 0x0 IC_SMBUS_ARP ...................... 0x0 IC_FIRST_DATA_BYTE_STATUS ......... 0x1 IC_INTR_IO ........................ 0x1 IC_MASTER_MODE .................... 0x1 IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1 IC_INTR_POL ....................... 0x1 IC_OPTIONAL_SAR ................... 0x0 IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055 IC_DEFAULT_SLAVE_ADDR ............. 0x055 IC_DEFAULT_HS_SPKLEN .............. 0x1 IC_FS_SCL_HIGH_COUNT .............. 0x0006 IC_HS_SCL_LOW_COUNT ............... 0x0008 IC_DEVICE_ID_VALUE ................ 0x0 IC_10BITADDR_MASTER ............... 0x0 IC_CLK_FREQ_OPTIMIZATION .......... 0x0 IC_DEFAULT_FS_SPKLEN .............. 0x7 IC_ADD_ENCODED_PARAMS ............. 0x0 IC_DEFAULT_SDA_HOLD ............... 0x000001 IC_DEFAULT_SDA_SETUP .............. 0x64 IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0 IC_CLOCK_PERIOD ................... 100 IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1 IC_RESTART_EN ..................... 0x1 IC_TX_CMD_BLOCK_DEFAULT ........... 0x0 IC_BUS_CLEAR_FEATURE .............. 0x0 IC_CAP_LOADING .................... 100 IC_FS_SCL_LOW_COUNT ............... 0x000d APB_DATA_WIDTH .................... 32 IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff IC_SLV_DATA_NACK_ONLY ............. 0x1 IC_10BITADDR_SLAVE ................ 0x0 IC_CLK_TYPE ....................... 0x0 IC_SMBUS_UDID_MSB ................. 0x0 IC_SMBUS_SUSPEND_ALERT ............ 0x0 IC_HS_SCL_HIGH_COUNT .............. 0x0006 IC_SLV_RESTART_DET_EN ............. 0x1 IC_SMBUS .......................... 0x0 IC_OPTIONAL_SAR_DEFAULT ........... 0x0 IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0 IC_USE_COUNTS ..................... 0x0 IC_RX_BUFFER_DEPTH ................ 16 IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff IC_RX_FULL_HLD_BUS_EN ............. 0x1 IC_SLAVE_DISABLE .................. 0x1 IC_RX_TL .......................... 0x0 IC_DEVICE_ID ...................... 0x0 IC_HC_COUNT_VALUES ................ 0x0 I2C_DYNAMIC_TAR_UPDATE ............ 0 IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff IC_HS_MASTER_CODE ................. 0x1 IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff IC_SS_SCL_HIGH_COUNT .............. 0x0028 IC_SS_SCL_LOW_COUNT ............... 0x002f IC_MAX_SPEED_MODE ................. 0x2 IC_STAT_FOR_CLK_STRETCH ........... 0x0 IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0 IC_DEFAULT_UFM_SPKLEN ............. 0x1 IC_TX_BUFFER_DEPTH ................ 16
13037namespace _I2C0_ {
13038
13039 // I2C Control Register. This register can be written only when the DW_apb_i2c is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. Read/Write Access: - bit 10 is read only. - bit 11 is read only - bit 16 is read only - bit 17 is read only - bits 18 and 19 are read only.
13040 // Reset value: 0x00000065
13041 BEGIN_TYPE(IC_CON_t, uint32_t)
13042 // Master issues the STOP_DET interrupt irrespective of whether master is active or not
13043 ADD_BITFIELD_RO(STOP_DET_IF_MASTER_ACTIVE, 10, 1)
13044 // This bit controls whether DW_apb_i2c should hold the bus when the Rx FIFO is physically full to its RX_BUFFER_DEPTH, as described in the IC_RX_FULL_HLD_BUS_EN parameter. Reset value: 0x0.
13045 ADD_BITFIELD_RW(RX_FIFO_FULL_HLD_CTRL, 9, 1)
13046 // This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register. Reset value: 0x0.
13047 ADD_BITFIELD_RW(TX_EMPTY_CTRL, 8, 1)
13048 // In slave mode: - 1'b1: issues the STOP_DET interrupt only when it is addressed. - 1'b0: issues the STOP_DET irrespective of whether it's addressed or not. Reset value: 0x0 NOTE: During a general call address, this slave does not issue the STOP_DET interrupt if STOP_DET_IF_ADDRESSED = 1'b1, even if the slave responds to the general call address by generating ACK. The STOP_DET interrupt is generated only when the transmitted address matches the slave address (SAR).
13049 ADD_BITFIELD_RW(STOP_DET_IFADDRESSED, 7, 1)
13050 // This bit controls whether I2C has its slave disabled, which means once the presetn signal is applied, then this bit is set and the slave is disabled. If this bit is set (slave is disabled), DW_apb_i2c functions only as a master and does not perform any action that requires a slave. NOTE: Software should ensure that if this bit is written with 0, then bit 0 should also be written with a 0.
13051 ADD_BITFIELD_RW(IC_SLAVE_DISABLE, 6, 1)
13052 // Determines whether RESTART conditions may be sent when acting as a master. Some older slaves do not support handling RESTART conditions; however, RESTART conditions are used in several DW_apb_i2c operations. When RESTART is disabled, the master is prohibited from performing the following functions: - Sending a START BYTE - Performing any high-speed mode operation - High-speed mode operation - Performing direction changes in combined format mode - Performing a read operation with a 10-bit address By replacing RESTART condition followed by a STOP and a subsequent START condition, split operations are broken down into multiple DW_apb_i2c transfers. If the above operations are performed, it will result in setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. Reset value: ENABLED
13053 ADD_BITFIELD_RW(IC_RESTART_EN, 5, 1)
13054 // Controls whether the DW_apb_i2c starts its transfers in 7- or 10-bit addressing mode when acting as a master. - 0: 7-bit addressing - 1: 10-bit addressing
13055 ADD_BITFIELD_RW(IC_10BITADDR_MASTER, 4, 1)
13056 // When acting as a slave, this bit controls whether the DW_apb_i2c responds to 7- or 10-bit addresses. - 0: 7-bit addressing. The DW_apb_i2c ignores transactions that involve 10-bit addressing; for 7-bit addressing, only the lower 7 bits of the IC_SAR register are compared. - 1: 10-bit addressing. The DW_apb_i2c responds to only 10-bit addressing transfers that match the full 10 bits of the IC_SAR register.
13057 ADD_BITFIELD_RW(IC_10BITADDR_SLAVE, 3, 1)
13058 // These bits control at which speed the DW_apb_i2c operates; its setting is relevant only if one is operating the DW_apb_i2c in master mode. Hardware protects against illegal values being programmed by software. These bits must be programmed appropriately for slave mode also, as it is used to capture correct value of spike filter as per the speed mode. This register should be programmed only with a value in the range of 1 to IC_MAX_SPEED_MODE; otherwise, hardware updates this register with the value of IC_MAX_SPEED_MODE. 1: standard mode (100 kbit/s) 2: fast mode (<=400 kbit/s) or fast mode plus (<=1000Kbit/s) 3: high speed mode (3.4 Mbit/s) Note: This field is not applicable when IC_ULTRA_FAST_MODE=1
13059 ADD_BITFIELD_RW(SPEED, 1, 2)
13060 // This bit controls whether the DW_apb_i2c master is enabled. NOTE: Software should ensure that if this bit is written with '1' then bit 6 should also be written with a '1'.
13061 ADD_BITFIELD_RW(MASTER_MODE, 0, 1)
13062 END_TYPE()
13063
13064 // Overflow when RX_FIFO is full
13065 static const uint32_t IC_CON_RX_FIFO_FULL_HLD_CTRL__DISABLED = 0;
13066 // Hold bus when RX_FIFO is full
13067 static const uint32_t IC_CON_RX_FIFO_FULL_HLD_CTRL__ENABLED = 1;
13068 // Default behaviour of TX_EMPTY interrupt
13069 static const uint32_t IC_CON_TX_EMPTY_CTRL__DISABLED = 0;
13070 // Controlled generation of TX_EMPTY interrupt
13071 static const uint32_t IC_CON_TX_EMPTY_CTRL__ENABLED = 1;
13072 // slave issues STOP_DET intr always
13073 static const uint32_t IC_CON_STOP_DET_IFADDRESSED__DISABLED = 0;
13074 // slave issues STOP_DET intr only if addressed
13075 static const uint32_t IC_CON_STOP_DET_IFADDRESSED__ENABLED = 1;
13076 // Slave mode is enabled
13077 static const uint32_t IC_CON_IC_SLAVE_DISABLE__SLAVE_ENABLED = 0;
13078 // Slave mode is disabled
13079 static const uint32_t IC_CON_IC_SLAVE_DISABLE__SLAVE_DISABLED = 1;
13080 // Master restart disabled
13081 static const uint32_t IC_CON_IC_RESTART_EN__DISABLED = 0;
13082 // Master restart enabled
13083 static const uint32_t IC_CON_IC_RESTART_EN__ENABLED = 1;
13084 // Master 7Bit addressing mode
13085 static const uint32_t IC_CON_IC_10BITADDR_MASTER__ADDR_7BITS = 0;
13086 // Master 10Bit addressing mode
13087 static const uint32_t IC_CON_IC_10BITADDR_MASTER__ADDR_10BITS = 1;
13088 // Slave 7Bit addressing
13089 static const uint32_t IC_CON_IC_10BITADDR_SLAVE__ADDR_7BITS = 0;
13090 // Slave 10Bit addressing
13091 static const uint32_t IC_CON_IC_10BITADDR_SLAVE__ADDR_10BITS = 1;
13092 // Standard Speed mode of operation
13093 static const uint32_t IC_CON_SPEED__STANDARD = 1;
13094 // Fast or Fast Plus mode of operation
13095 static const uint32_t IC_CON_SPEED__FAST = 2;
13096 // High Speed mode of operation
13097 static const uint32_t IC_CON_SPEED__HIGH = 3;
13098 // Master mode is disabled
13099 static const uint32_t IC_CON_MASTER_MODE__DISABLED = 0;
13100 // Master mode is enabled
13101 static const uint32_t IC_CON_MASTER_MODE__ENABLED = 1;
13102
13103 // I2C Target Address Register This register is 12 bits wide, and bits 31:12 are reserved. This register can be written to only when IC_ENABLE[0] is set to 0. Note: If the software or application is aware that the DW_apb_i2c is not using the TAR address for the pending commands in the Tx FIFO, then it is possible to update the TAR address even while the Tx FIFO has entries (IC_STATUS[2]= 0). - It is not necessary to perform any write to this register if DW_apb_i2c is enabled as an I2C slave only.
13104 // Reset value: 0x00000055
13105 BEGIN_TYPE(IC_TAR_t, uint32_t)
13106 // This bit indicates whether software performs a Device-ID or General Call or START BYTE command. - 0: ignore bit 10 GC_OR_START and use IC_TAR normally - 1: perform special I2C command as specified in Device_ID or GC_OR_START bit Reset value: 0x0
13107 ADD_BITFIELD_RW(SPECIAL, 11, 1)
13108 // If bit 11 (SPECIAL) is set to 1 and bit 13(Device-ID) is set to 0, then this bit indicates whether a General Call or START byte command is to be performed by the DW_apb_i2c. - 0: General Call Address - after issuing a General Call, only writes may be performed. Attempting to issue a read command results in setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. The DW_apb_i2c remains in General Call mode until the SPECIAL bit value (bit 11) is cleared. - 1: START BYTE Reset value: 0x0
13109 ADD_BITFIELD_RW(GC_OR_START, 10, 1)
13110 // This is the target address for any master transaction. When transmitting a General Call, these bits are ignored. To generate a START BYTE, the CPU needs to write only once into these bits. If the IC_TAR and IC_SAR are the same, loopback exists but the FIFOs are shared between master and slave, so full loopback is not feasible. Only one direction loopback mode is supported (simplex), not duplex. A master cannot transmit to itself; it can transmit to only a slave.
13111 ADD_BITFIELD_RW(IC_TAR, 0, 10)
13112 END_TYPE()
13113
13114 // Disables programming of GENERAL_CALL or START_BYTE transmission
13115 static const uint32_t IC_TAR_SPECIAL__DISABLED = 0;
13116 // Enables programming of GENERAL_CALL or START_BYTE transmission
13117 static const uint32_t IC_TAR_SPECIAL__ENABLED = 1;
13118 // GENERAL_CALL byte transmission
13119 static const uint32_t IC_TAR_GC_OR_START__GENERAL_CALL = 0;
13120 // START byte transmission
13121 static const uint32_t IC_TAR_GC_OR_START__START_BYTE = 1;
13122
13123 // I2C Slave Address Register
13124 // Reset value: 0x00000055
13125 BEGIN_TYPE(IC_SAR_t, uint32_t)
13126 // The IC_SAR holds the slave address when the I2C is operating as a slave. For 7-bit addressing, only IC_SAR[6:0] is used. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. Note: The default values cannot be any of the reserved address locations: that is, 0x00 to 0x07, or 0x78 to 0x7f. The correct operation of the device is not guaranteed if you program the IC_SAR or IC_TAR to a reserved value. Refer to <<table_I2C_firstbyte_bit_defs>> for a complete list of these reserved values.
13127 ADD_BITFIELD_RW(IC_SAR, 0, 10)
13128 END_TYPE()
13129
13130 // I2C Rx/Tx Data Buffer and Command Register; this is the register the CPU writes to when filling the TX FIFO and the CPU reads from when retrieving bytes from RX FIFO. The size of the register changes as follows: Write: - 11 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=1 - 9 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=0 Read: - 12 bits when IC_FIRST_DATA_BYTE_STATUS = 1 - 8 bits when IC_FIRST_DATA_BYTE_STATUS = 0 Note: In order for the DW_apb_i2c to continue acknowledging reads, a read command should be written for every byte that is to be received; otherwise the DW_apb_i2c will stop acknowledging.
13131 // Reset value: 0x00000000
13132 BEGIN_TYPE(IC_DATA_CMD_t, uint32_t)
13133 // Indicates the first data byte received after the address phase for receive transfer in Master receiver or Slave receiver mode. Reset value : 0x0 NOTE: In case of APB_DATA_WIDTH=8, 1. The user has to perform two APB Reads to IC_DATA_CMD in order to get status on 11 bit. 2. In order to read the 11 bit, the user has to perform the first data byte read [7:0] (offset 0x10) and then perform the second read [15:8] (offset 0x11) in order to know the status of 11 bit (whether the data received in previous read is a first data byte or not). 3. The 11th bit is an optional read field, user can ignore 2nd byte read [15:8] (offset 0x11) if not interested in FIRST_DATA_BYTE status.
13134 ADD_BITFIELD_RO(FIRST_DATA_BYTE, 11, 1)
13135 // This bit controls whether a RESTART is issued before the byte is sent or received. 1 - If IC_RESTART_EN is 1, a RESTART is issued before the data is sent/received (according to the value of CMD), regardless of whether or not the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead. 0 - If IC_RESTART_EN is 1, a RESTART is issued only if the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead. Reset value: 0x0
13136 ADD_BITFIELD_WO(RESTART, 10, 1)
13137 // This bit controls whether a STOP is issued after the byte is sent or received. - 1 - STOP is issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master immediately tries to start a new transfer by issuing a START and arbitrating for the bus. - 0 - STOP is not issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master continues the current transfer by sending/receiving data bytes according to the value of the CMD bit. If the Tx FIFO is empty, the master holds the SCL line low and stalls the bus until a new command is available in the Tx FIFO. Reset value: 0x0
13138 ADD_BITFIELD_WO(STOP, 9, 1)
13139 // This bit controls whether a read or a write is performed. This bit does not control the direction when the DW_apb_i2con acts as a slave. It controls only the direction when it acts as a master. When a command is entered in the TX FIFO, this bit distinguishes the write and read commands. In slave-receiver mode, this bit is a 'don't care' because writes to this register are not required. In slave-transmitter mode, a '0' indicates that the data in IC_DATA_CMD is to be transmitted. When programming this bit, you should remember the following: attempting to perform a read operation after a General Call command has been sent results in a TX_ABRT interrupt (bit 6 of the IC_RAW_INTR_STAT register), unless bit 11 (SPECIAL) in the IC_TAR register has been cleared. If a '1' is written to this bit after receiving a RD_REQ interrupt, then a TX_ABRT interrupt occurs. Reset value: 0x0
13140 ADD_BITFIELD_WO(CMD, 8, 1)
13141 // This register contains the data to be transmitted or received on the I2C bus. If you are writing to this register and want to perform a read, bits 7:0 (DAT) are ignored by the DW_apb_i2c. However, when you read this register, these bits return the value of data received on the DW_apb_i2c interface. Reset value: 0x0
13142 ADD_BITFIELD_RW(DAT, 0, 8)
13143 END_TYPE()
13144
13145 // Sequential data byte received
13146 static const uint32_t IC_DATA_CMD_FIRST_DATA_BYTE__INACTIVE = 0;
13147 // Non sequential data byte received
13148 static const uint32_t IC_DATA_CMD_FIRST_DATA_BYTE__ACTIVE = 1;
13149 // Don't Issue RESTART before this command
13150 static const uint32_t IC_DATA_CMD_RESTART__DISABLE = 0;
13151 // Issue RESTART before this command
13152 static const uint32_t IC_DATA_CMD_RESTART__ENABLE = 1;
13153 // Don't Issue STOP after this command
13154 static const uint32_t IC_DATA_CMD_STOP__DISABLE = 0;
13155 // Issue STOP after this command
13156 static const uint32_t IC_DATA_CMD_STOP__ENABLE = 1;
13157 // Master Write Command
13158 static const uint32_t IC_DATA_CMD_CMD__WRITE = 0;
13159 // Master Read Command
13160 static const uint32_t IC_DATA_CMD_CMD__READ = 1;
13161
13162 // Standard Speed I2C Clock SCL High Count Register
13163 // Reset value: 0x00000028
13164 BEGIN_TYPE(IC_SS_SCL_HCNT_t, uint32_t)
13165 // This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for standard speed. For more information, refer to 'IC_CLK Frequency Configuration'. This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH = 8, the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed. NOTE: This register must not be programmed to a value higher than 65525, because DW_apb_i2c uses a 16-bit counter to flag an I2C bus idle condition when this counter reaches a value of IC_SS_SCL_HCNT + 10.
13166 ADD_BITFIELD_RW(IC_SS_SCL_HCNT, 0, 16)
13167 END_TYPE()
13168
13169 // Standard Speed I2C Clock SCL Low Count Register
13170 // Reset value: 0x0000002f
13171 BEGIN_TYPE(IC_SS_SCL_LCNT_t, uint32_t)
13172 // This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock low period count for standard speed. For more information, refer to 'IC_CLK Frequency Configuration' This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. The minimum valid value is 8; hardware prevents values less than this being written, and if attempted, results in 8 being set. For designs with APB_DATA_WIDTH = 8, the order of programming is important to ensure the correct operation of DW_apb_i2c. The lower byte must be programmed first, and then the upper byte is programmed.
13173 ADD_BITFIELD_RW(IC_SS_SCL_LCNT, 0, 16)
13174 END_TYPE()
13175
13176 // Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register
13177 // Reset value: 0x00000006
13178 BEGIN_TYPE(IC_FS_SCL_HCNT_t, uint32_t)
13179 // This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast mode or fast mode plus. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'. This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed.
13180 ADD_BITFIELD_RW(IC_FS_SCL_HCNT, 0, 16)
13181 END_TYPE()
13182
13183 // Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register
13184 // Reset value: 0x0000000d
13185 BEGIN_TYPE(IC_FS_SCL_LCNT_t, uint32_t)
13186 // This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock low period count for fast speed. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'. This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. The minimum valid value is 8; hardware prevents values less than this being written, and if attempted results in 8 being set. For designs with APB_DATA_WIDTH = 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed. If the value is less than 8 then the count value gets changed to 8.
13187 ADD_BITFIELD_RW(IC_FS_SCL_LCNT, 0, 16)
13188 END_TYPE()
13189
13190 // I2C Interrupt Status Register Each bit in this register has a corresponding mask bit in the IC_INTR_MASK register. These bits are cleared by reading the matching interrupt clear register. The unmasked raw versions of these bits are available in the IC_RAW_INTR_STAT register.
13191 // Reset value: 0x00000000
13192 BEGIN_TYPE(IC_INTR_STAT_t, uint32_t)
13193 // See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit. Reset value: 0x0
13194 ADD_BITFIELD_RO(R_RESTART_DET, 12, 1)
13195 // See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit. Reset value: 0x0
13196 ADD_BITFIELD_RO(R_GEN_CALL, 11, 1)
13197 // See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit. Reset value: 0x0
13198 ADD_BITFIELD_RO(R_START_DET, 10, 1)
13199 // See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit. Reset value: 0x0
13200 ADD_BITFIELD_RO(R_STOP_DET, 9, 1)
13201 // See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit. Reset value: 0x0
13202 ADD_BITFIELD_RO(R_ACTIVITY, 8, 1)
13203 // See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit. Reset value: 0x0
13204 ADD_BITFIELD_RO(R_RX_DONE, 7, 1)
13205 // See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit. Reset value: 0x0
13206 ADD_BITFIELD_RO(R_TX_ABRT, 6, 1)
13207 // See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit. Reset value: 0x0
13208 ADD_BITFIELD_RO(R_RD_REQ, 5, 1)
13209 // See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit. Reset value: 0x0
13210 ADD_BITFIELD_RO(R_TX_EMPTY, 4, 1)
13211 // See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit. Reset value: 0x0
13212 ADD_BITFIELD_RO(R_TX_OVER, 3, 1)
13213 // See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit. Reset value: 0x0
13214 ADD_BITFIELD_RO(R_RX_FULL, 2, 1)
13215 // See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit. Reset value: 0x0
13216 ADD_BITFIELD_RO(R_RX_OVER, 1, 1)
13217 // See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit. Reset value: 0x0
13218 ADD_BITFIELD_RO(R_RX_UNDER, 0, 1)
13219 END_TYPE()
13220
13221 // R_RESTART_DET interrupt is inactive
13222 static const uint32_t IC_INTR_STAT_R_RESTART_DET__INACTIVE = 0;
13223 // R_RESTART_DET interrupt is active
13224 static const uint32_t IC_INTR_STAT_R_RESTART_DET__ACTIVE = 1;
13225 // R_GEN_CALL interrupt is inactive
13226 static const uint32_t IC_INTR_STAT_R_GEN_CALL__INACTIVE = 0;
13227 // R_GEN_CALL interrupt is active
13228 static const uint32_t IC_INTR_STAT_R_GEN_CALL__ACTIVE = 1;
13229 // R_START_DET interrupt is inactive
13230 static const uint32_t IC_INTR_STAT_R_START_DET__INACTIVE = 0;
13231 // R_START_DET interrupt is active
13232 static const uint32_t IC_INTR_STAT_R_START_DET__ACTIVE = 1;
13233 // R_STOP_DET interrupt is inactive
13234 static const uint32_t IC_INTR_STAT_R_STOP_DET__INACTIVE = 0;
13235 // R_STOP_DET interrupt is active
13236 static const uint32_t IC_INTR_STAT_R_STOP_DET__ACTIVE = 1;
13237 // R_ACTIVITY interrupt is inactive
13238 static const uint32_t IC_INTR_STAT_R_ACTIVITY__INACTIVE = 0;
13239 // R_ACTIVITY interrupt is active
13240 static const uint32_t IC_INTR_STAT_R_ACTIVITY__ACTIVE = 1;
13241 // R_RX_DONE interrupt is inactive
13242 static const uint32_t IC_INTR_STAT_R_RX_DONE__INACTIVE = 0;
13243 // R_RX_DONE interrupt is active
13244 static const uint32_t IC_INTR_STAT_R_RX_DONE__ACTIVE = 1;
13245 // R_TX_ABRT interrupt is inactive
13246 static const uint32_t IC_INTR_STAT_R_TX_ABRT__INACTIVE = 0;
13247 // R_TX_ABRT interrupt is active
13248 static const uint32_t IC_INTR_STAT_R_TX_ABRT__ACTIVE = 1;
13249 // R_RD_REQ interrupt is inactive
13250 static const uint32_t IC_INTR_STAT_R_RD_REQ__INACTIVE = 0;
13251 // R_RD_REQ interrupt is active
13252 static const uint32_t IC_INTR_STAT_R_RD_REQ__ACTIVE = 1;
13253 // R_TX_EMPTY interrupt is inactive
13254 static const uint32_t IC_INTR_STAT_R_TX_EMPTY__INACTIVE = 0;
13255 // R_TX_EMPTY interrupt is active
13256 static const uint32_t IC_INTR_STAT_R_TX_EMPTY__ACTIVE = 1;
13257 // R_TX_OVER interrupt is inactive
13258 static const uint32_t IC_INTR_STAT_R_TX_OVER__INACTIVE = 0;
13259 // R_TX_OVER interrupt is active
13260 static const uint32_t IC_INTR_STAT_R_TX_OVER__ACTIVE = 1;
13261 // R_RX_FULL interrupt is inactive
13262 static const uint32_t IC_INTR_STAT_R_RX_FULL__INACTIVE = 0;
13263 // R_RX_FULL interrupt is active
13264 static const uint32_t IC_INTR_STAT_R_RX_FULL__ACTIVE = 1;
13265 // R_RX_OVER interrupt is inactive
13266 static const uint32_t IC_INTR_STAT_R_RX_OVER__INACTIVE = 0;
13267 // R_RX_OVER interrupt is active
13268 static const uint32_t IC_INTR_STAT_R_RX_OVER__ACTIVE = 1;
13269 // RX_UNDER interrupt is inactive
13270 static const uint32_t IC_INTR_STAT_R_RX_UNDER__INACTIVE = 0;
13271 // RX_UNDER interrupt is active
13272 static const uint32_t IC_INTR_STAT_R_RX_UNDER__ACTIVE = 1;
13273
13274 // I2C Interrupt Mask Register. These bits mask their corresponding interrupt status bits. This register is active low; a value of 0 masks the interrupt, whereas a value of 1 unmasks the interrupt.
13275 // Reset value: 0x000008ff
13276 BEGIN_TYPE(IC_INTR_MASK_t, uint32_t)
13277 // This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register. Reset value: 0x0
13278 ADD_BITFIELD_RW(M_RESTART_DET, 12, 1)
13279 // This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register. Reset value: 0x1
13280 ADD_BITFIELD_RW(M_GEN_CALL, 11, 1)
13281 // This bit masks the R_START_DET interrupt in IC_INTR_STAT register. Reset value: 0x0
13282 ADD_BITFIELD_RW(M_START_DET, 10, 1)
13283 // This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register. Reset value: 0x0
13284 ADD_BITFIELD_RW(M_STOP_DET, 9, 1)
13285 // This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register. Reset value: 0x0
13286 ADD_BITFIELD_RW(M_ACTIVITY, 8, 1)
13287 // This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register. Reset value: 0x1
13288 ADD_BITFIELD_RW(M_RX_DONE, 7, 1)
13289 // This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register. Reset value: 0x1
13290 ADD_BITFIELD_RW(M_TX_ABRT, 6, 1)
13291 // This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. Reset value: 0x1
13292 ADD_BITFIELD_RW(M_RD_REQ, 5, 1)
13293 // This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register. Reset value: 0x1
13294 ADD_BITFIELD_RW(M_TX_EMPTY, 4, 1)
13295 // This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register. Reset value: 0x1
13296 ADD_BITFIELD_RW(M_TX_OVER, 3, 1)
13297 // This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register. Reset value: 0x1
13298 ADD_BITFIELD_RW(M_RX_FULL, 2, 1)
13299 // This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register. Reset value: 0x1
13300 ADD_BITFIELD_RW(M_RX_OVER, 1, 1)
13301 // This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register. Reset value: 0x1
13302 ADD_BITFIELD_RW(M_RX_UNDER, 0, 1)
13303 END_TYPE()
13304
13305 // RESTART_DET interrupt is masked
13306 static const uint32_t IC_INTR_MASK_M_RESTART_DET__ENABLED = 0;
13307 // RESTART_DET interrupt is unmasked
13308 static const uint32_t IC_INTR_MASK_M_RESTART_DET__DISABLED = 1;
13309 // GEN_CALL interrupt is masked
13310 static const uint32_t IC_INTR_MASK_M_GEN_CALL__ENABLED = 0;
13311 // GEN_CALL interrupt is unmasked
13312 static const uint32_t IC_INTR_MASK_M_GEN_CALL__DISABLED = 1;
13313 // START_DET interrupt is masked
13314 static const uint32_t IC_INTR_MASK_M_START_DET__ENABLED = 0;
13315 // START_DET interrupt is unmasked
13316 static const uint32_t IC_INTR_MASK_M_START_DET__DISABLED = 1;
13317 // STOP_DET interrupt is masked
13318 static const uint32_t IC_INTR_MASK_M_STOP_DET__ENABLED = 0;
13319 // STOP_DET interrupt is unmasked
13320 static const uint32_t IC_INTR_MASK_M_STOP_DET__DISABLED = 1;
13321 // ACTIVITY interrupt is masked
13322 static const uint32_t IC_INTR_MASK_M_ACTIVITY__ENABLED = 0;
13323 // ACTIVITY interrupt is unmasked
13324 static const uint32_t IC_INTR_MASK_M_ACTIVITY__DISABLED = 1;
13325 // RX_DONE interrupt is masked
13326 static const uint32_t IC_INTR_MASK_M_RX_DONE__ENABLED = 0;
13327 // RX_DONE interrupt is unmasked
13328 static const uint32_t IC_INTR_MASK_M_RX_DONE__DISABLED = 1;
13329 // TX_ABORT interrupt is masked
13330 static const uint32_t IC_INTR_MASK_M_TX_ABRT__ENABLED = 0;
13331 // TX_ABORT interrupt is unmasked
13332 static const uint32_t IC_INTR_MASK_M_TX_ABRT__DISABLED = 1;
13333 // RD_REQ interrupt is masked
13334 static const uint32_t IC_INTR_MASK_M_RD_REQ__ENABLED = 0;
13335 // RD_REQ interrupt is unmasked
13336 static const uint32_t IC_INTR_MASK_M_RD_REQ__DISABLED = 1;
13337 // TX_EMPTY interrupt is masked
13338 static const uint32_t IC_INTR_MASK_M_TX_EMPTY__ENABLED = 0;
13339 // TX_EMPTY interrupt is unmasked
13340 static const uint32_t IC_INTR_MASK_M_TX_EMPTY__DISABLED = 1;
13341 // TX_OVER interrupt is masked
13342 static const uint32_t IC_INTR_MASK_M_TX_OVER__ENABLED = 0;
13343 // TX_OVER interrupt is unmasked
13344 static const uint32_t IC_INTR_MASK_M_TX_OVER__DISABLED = 1;
13345 // RX_FULL interrupt is masked
13346 static const uint32_t IC_INTR_MASK_M_RX_FULL__ENABLED = 0;
13347 // RX_FULL interrupt is unmasked
13348 static const uint32_t IC_INTR_MASK_M_RX_FULL__DISABLED = 1;
13349 // RX_OVER interrupt is masked
13350 static const uint32_t IC_INTR_MASK_M_RX_OVER__ENABLED = 0;
13351 // RX_OVER interrupt is unmasked
13352 static const uint32_t IC_INTR_MASK_M_RX_OVER__DISABLED = 1;
13353 // RX_UNDER interrupt is masked
13354 static const uint32_t IC_INTR_MASK_M_RX_UNDER__ENABLED = 0;
13355 // RX_UNDER interrupt is unmasked
13356 static const uint32_t IC_INTR_MASK_M_RX_UNDER__DISABLED = 1;
13357
13358 // I2C Raw Interrupt Status Register Unlike the IC_INTR_STAT register, these bits are not masked so they always show the true status of the DW_apb_i2c.
13359 // Reset value: 0x00000000
13360 BEGIN_TYPE(IC_RAW_INTR_STAT_t, uint32_t)
13361 // Indicates whether a RESTART condition has occurred on the I2C interface when DW_apb_i2c is operating in Slave mode and the slave is being addressed. Enabled only when IC_SLV_RESTART_DET_EN=1. Note: However, in high-speed mode or during a START BYTE transfer, the RESTART comes before the address field as per the I2C protocol. In this case, the slave is not the addressed slave when the RESTART is issued, therefore DW_apb_i2c does not generate the RESTART_DET interrupt. Reset value: 0x0
13362 ADD_BITFIELD_RO(RESTART_DET, 12, 1)
13363 // Set only when a General Call address is received and it is acknowledged. It stays set until it is cleared either by disabling DW_apb_i2c or when the CPU reads bit 0 of the IC_CLR_GEN_CALL register. DW_apb_i2c stores the received data in the Rx buffer. Reset value: 0x0
13364 ADD_BITFIELD_RO(GEN_CALL, 11, 1)
13365 // Indicates whether a START or RESTART condition has occurred on the I2C interface regardless of whether DW_apb_i2c is operating in slave or master mode. Reset value: 0x0
13366 ADD_BITFIELD_RO(START_DET, 10, 1)
13367 // Indicates whether a STOP condition has occurred on the I2C interface regardless of whether DW_apb_i2c is operating in slave or master mode. In Slave Mode: - If IC_CON[7]=1'b1 (STOP_DET_IFADDRESSED), the STOP_DET interrupt will be issued only if slave is addressed. Note: During a general call address, this slave does not issue a STOP_DET interrupt if STOP_DET_IF_ADDRESSED=1'b1, even if the slave responds to the general call address by generating ACK. The STOP_DET interrupt is generated only when the transmitted address matches the slave address (SAR). - If IC_CON[7]=1'b0 (STOP_DET_IFADDRESSED), the STOP_DET interrupt is issued irrespective of whether it is being addressed. In Master Mode: - If IC_CON[10]=1'b1 (STOP_DET_IF_MASTER_ACTIVE),the STOP_DET interrupt will be issued only if Master is active. - If IC_CON[10]=1'b0 (STOP_DET_IFADDRESSED),the STOP_DET interrupt will be issued irrespective of whether master is active or not. Reset value: 0x0
13368 ADD_BITFIELD_RO(STOP_DET, 9, 1)
13369 // This bit captures DW_apb_i2c activity and stays set until it is cleared. There are four ways to clear it: - Disabling the DW_apb_i2c - Reading the IC_CLR_ACTIVITY register - Reading the IC_CLR_INTR register - System reset Once this bit is set, it stays set unless one of the four methods is used to clear it. Even if the DW_apb_i2c module is idle, this bit remains set until cleared, indicating that there was activity on the bus. Reset value: 0x0
13370 ADD_BITFIELD_RO(ACTIVITY, 8, 1)
13371 // When the DW_apb_i2c is acting as a slave-transmitter, this bit is set to 1 if the master does not acknowledge a transmitted byte. This occurs on the last byte of the transmission, indicating that the transmission is done. Reset value: 0x0
13372 ADD_BITFIELD_RO(RX_DONE, 7, 1)
13373 // This bit indicates if DW_apb_i2c, as an I2C transmitter, is unable to complete the intended actions on the contents of the transmit FIFO. This situation can occur both as an I2C master or an I2C slave, and is referred to as a 'transmit abort'. When this bit is set to 1, the IC_TX_ABRT_SOURCE register indicates the reason why the transmit abort takes places. Note: The DW_apb_i2c flushes/resets/empties the TX_FIFO and RX_FIFO whenever there is a transmit abort caused by any of the events tracked by the IC_TX_ABRT_SOURCE register. The FIFOs remains in this flushed state until the register IC_CLR_TX_ABRT is read. Once this read is performed, the Tx FIFO is then ready to accept more data bytes from the APB interface. Reset value: 0x0
13374 ADD_BITFIELD_RO(TX_ABRT, 6, 1)
13375 // This bit is set to 1 when DW_apb_i2c is acting as a slave and another I2C master is attempting to read data from DW_apb_i2c. The DW_apb_i2c holds the I2C bus in a wait state (SCL=0) until this interrupt is serviced, which means that the slave has been addressed by a remote master that is asking for data to be transferred. The processor must respond to this interrupt and then write the requested data to the IC_DATA_CMD register. This bit is set to 0 just after the processor reads the IC_CLR_RD_REQ register. Reset value: 0x0
13376 ADD_BITFIELD_RO(RD_REQ, 5, 1)
13377 // The behavior of the TX_EMPTY interrupt status differs based on the TX_EMPTY_CTRL selection in the IC_CON register. - When TX_EMPTY_CTRL = 0: This bit is set to 1 when the transmit buffer is at or below the threshold value set in the IC_TX_TL register. - When TX_EMPTY_CTRL = 1: This bit is set to 1 when the transmit buffer is at or below the threshold value set in the IC_TX_TL register and the transmission of the address/data from the internal shift register for the most recently popped command is completed. It is automatically cleared by hardware when the buffer level goes above the threshold. When IC_ENABLE[0] is set to 0, the TX FIFO is flushed and held in reset. There the TX FIFO looks like it has no data within it, so this bit is set to 1, provided there is activity in the master or slave state machines. When there is no longer any activity, then with ic_en=0, this bit is set to 0. Reset value: 0x0.
13378 ADD_BITFIELD_RO(TX_EMPTY, 4, 1)
13379 // Set during transmit if the transmit buffer is filled to IC_TX_BUFFER_DEPTH and the processor attempts to issue another I2C command by writing to the IC_DATA_CMD register. When the module is disabled, this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared. Reset value: 0x0
13380 ADD_BITFIELD_RO(TX_OVER, 3, 1)
13381 // Set when the receive buffer reaches or goes above the RX_TL threshold in the IC_RX_TL register. It is automatically cleared by hardware when buffer level goes below the threshold. If the module is disabled (IC_ENABLE[0]=0), the RX FIFO is flushed and held in reset; therefore the RX FIFO is not full. So this bit is cleared once the IC_ENABLE bit 0 is programmed with a 0, regardless of the activity that continues. Reset value: 0x0
13382 ADD_BITFIELD_RO(RX_FULL, 2, 1)
13383 // Set if the receive buffer is completely filled to IC_RX_BUFFER_DEPTH and an additional byte is received from an external I2C device. The DW_apb_i2c acknowledges this, but any data bytes received after the FIFO is full are lost. If the module is disabled (IC_ENABLE[0]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared. Note: If bit 9 of the IC_CON register (RX_FIFO_FULL_HLD_CTRL) is programmed to HIGH, then the RX_OVER interrupt never occurs, because the Rx FIFO never overflows. Reset value: 0x0
13384 ADD_BITFIELD_RO(RX_OVER, 1, 1)
13385 // Set if the processor attempts to read the receive buffer when it is empty by reading from the IC_DATA_CMD register. If the module is disabled (IC_ENABLE[0]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared. Reset value: 0x0
13386 ADD_BITFIELD_RO(RX_UNDER, 0, 1)
13387 END_TYPE()
13388
13389 // RESTART_DET interrupt is inactive
13390 static const uint32_t IC_RAW_INTR_STAT_RESTART_DET__INACTIVE = 0;
13391 // RESTART_DET interrupt is active
13392 static const uint32_t IC_RAW_INTR_STAT_RESTART_DET__ACTIVE = 1;
13393 // GEN_CALL interrupt is inactive
13394 static const uint32_t IC_RAW_INTR_STAT_GEN_CALL__INACTIVE = 0;
13395 // GEN_CALL interrupt is active
13396 static const uint32_t IC_RAW_INTR_STAT_GEN_CALL__ACTIVE = 1;
13397 // START_DET interrupt is inactive
13398 static const uint32_t IC_RAW_INTR_STAT_START_DET__INACTIVE = 0;
13399 // START_DET interrupt is active
13400 static const uint32_t IC_RAW_INTR_STAT_START_DET__ACTIVE = 1;
13401 // STOP_DET interrupt is inactive
13402 static const uint32_t IC_RAW_INTR_STAT_STOP_DET__INACTIVE = 0;
13403 // STOP_DET interrupt is active
13404 static const uint32_t IC_RAW_INTR_STAT_STOP_DET__ACTIVE = 1;
13405 // RAW_INTR_ACTIVITY interrupt is inactive
13406 static const uint32_t IC_RAW_INTR_STAT_ACTIVITY__INACTIVE = 0;
13407 // RAW_INTR_ACTIVITY interrupt is active
13408 static const uint32_t IC_RAW_INTR_STAT_ACTIVITY__ACTIVE = 1;
13409 // RX_DONE interrupt is inactive
13410 static const uint32_t IC_RAW_INTR_STAT_RX_DONE__INACTIVE = 0;
13411 // RX_DONE interrupt is active
13412 static const uint32_t IC_RAW_INTR_STAT_RX_DONE__ACTIVE = 1;
13413 // TX_ABRT interrupt is inactive
13414 static const uint32_t IC_RAW_INTR_STAT_TX_ABRT__INACTIVE = 0;
13415 // TX_ABRT interrupt is active
13416 static const uint32_t IC_RAW_INTR_STAT_TX_ABRT__ACTIVE = 1;
13417 // RD_REQ interrupt is inactive
13418 static const uint32_t IC_RAW_INTR_STAT_RD_REQ__INACTIVE = 0;
13419 // RD_REQ interrupt is active
13420 static const uint32_t IC_RAW_INTR_STAT_RD_REQ__ACTIVE = 1;
13421 // TX_EMPTY interrupt is inactive
13422 static const uint32_t IC_RAW_INTR_STAT_TX_EMPTY__INACTIVE = 0;
13423 // TX_EMPTY interrupt is active
13424 static const uint32_t IC_RAW_INTR_STAT_TX_EMPTY__ACTIVE = 1;
13425 // TX_OVER interrupt is inactive
13426 static const uint32_t IC_RAW_INTR_STAT_TX_OVER__INACTIVE = 0;
13427 // TX_OVER interrupt is active
13428 static const uint32_t IC_RAW_INTR_STAT_TX_OVER__ACTIVE = 1;
13429 // RX_FULL interrupt is inactive
13430 static const uint32_t IC_RAW_INTR_STAT_RX_FULL__INACTIVE = 0;
13431 // RX_FULL interrupt is active
13432 static const uint32_t IC_RAW_INTR_STAT_RX_FULL__ACTIVE = 1;
13433 // RX_OVER interrupt is inactive
13434 static const uint32_t IC_RAW_INTR_STAT_RX_OVER__INACTIVE = 0;
13435 // RX_OVER interrupt is active
13436 static const uint32_t IC_RAW_INTR_STAT_RX_OVER__ACTIVE = 1;
13437 // RX_UNDER interrupt is inactive
13438 static const uint32_t IC_RAW_INTR_STAT_RX_UNDER__INACTIVE = 0;
13439 // RX_UNDER interrupt is active
13440 static const uint32_t IC_RAW_INTR_STAT_RX_UNDER__ACTIVE = 1;
13441
13442 // I2C Receive FIFO Threshold Register
13443 // Reset value: 0x00000000
13444 BEGIN_TYPE(IC_RX_TL_t, uint32_t)
13445 // Receive FIFO Threshold Level. Controls the level of entries (or above) that triggers the RX_FULL interrupt (bit 2 in IC_RAW_INTR_STAT register). The valid range is 0-255, with the additional restriction that hardware does not allow this value to be set to a value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 1 entry, and a value of 255 sets the threshold for 256 entries.
13446 ADD_BITFIELD_RW(RX_TL, 0, 8)
13447 END_TYPE()
13448
13449 // I2C Transmit FIFO Threshold Register
13450 // Reset value: 0x00000000
13451 BEGIN_TYPE(IC_TX_TL_t, uint32_t)
13452 // Transmit FIFO Threshold Level. Controls the level of entries (or below) that trigger the TX_EMPTY interrupt (bit 4 in IC_RAW_INTR_STAT register). The valid range is 0-255, with the additional restriction that it may not be set to value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 0 entries, and a value of 255 sets the threshold for 255 entries.
13453 ADD_BITFIELD_RW(TX_TL, 0, 8)
13454 END_TYPE()
13455
13456 // Clear Combined and Individual Interrupt Register
13457 // Reset value: 0x00000000
13458 BEGIN_TYPE(IC_CLR_INTR_t, uint32_t)
13459 // Read this register to clear the combined interrupt, all individual interrupts, and the IC_TX_ABRT_SOURCE register. This bit does not clear hardware clearable interrupts but software clearable interrupts. Refer to Bit 9 of the IC_TX_ABRT_SOURCE register for an exception to clearing IC_TX_ABRT_SOURCE. Reset value: 0x0
13460 ADD_BITFIELD_RO(CLR_INTR, 0, 1)
13461 END_TYPE()
13462
13463 // Clear RX_UNDER Interrupt Register
13464 // Reset value: 0x00000000
13465 BEGIN_TYPE(IC_CLR_RX_UNDER_t, uint32_t)
13466 // Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13467 ADD_BITFIELD_RO(CLR_RX_UNDER, 0, 1)
13468 END_TYPE()
13469
13470 // Clear RX_OVER Interrupt Register
13471 // Reset value: 0x00000000
13472 BEGIN_TYPE(IC_CLR_RX_OVER_t, uint32_t)
13473 // Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13474 ADD_BITFIELD_RO(CLR_RX_OVER, 0, 1)
13475 END_TYPE()
13476
13477 // Clear TX_OVER Interrupt Register
13478 // Reset value: 0x00000000
13479 BEGIN_TYPE(IC_CLR_TX_OVER_t, uint32_t)
13480 // Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13481 ADD_BITFIELD_RO(CLR_TX_OVER, 0, 1)
13482 END_TYPE()
13483
13484 // Clear RD_REQ Interrupt Register
13485 // Reset value: 0x00000000
13486 BEGIN_TYPE(IC_CLR_RD_REQ_t, uint32_t)
13487 // Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13488 ADD_BITFIELD_RO(CLR_RD_REQ, 0, 1)
13489 END_TYPE()
13490
13491 // Clear TX_ABRT Interrupt Register
13492 // Reset value: 0x00000000
13493 BEGIN_TYPE(IC_CLR_TX_ABRT_t, uint32_t)
13494 // Read this register to clear the TX_ABRT interrupt (bit 6) of the IC_RAW_INTR_STAT register, and the IC_TX_ABRT_SOURCE register. This also releases the TX FIFO from the flushed/reset state, allowing more writes to the TX FIFO. Refer to Bit 9 of the IC_TX_ABRT_SOURCE register for an exception to clearing IC_TX_ABRT_SOURCE. Reset value: 0x0
13495 ADD_BITFIELD_RO(CLR_TX_ABRT, 0, 1)
13496 END_TYPE()
13497
13498 // Clear RX_DONE Interrupt Register
13499 // Reset value: 0x00000000
13500 BEGIN_TYPE(IC_CLR_RX_DONE_t, uint32_t)
13501 // Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13502 ADD_BITFIELD_RO(CLR_RX_DONE, 0, 1)
13503 END_TYPE()
13504
13505 // Clear ACTIVITY Interrupt Register
13506 // Reset value: 0x00000000
13507 BEGIN_TYPE(IC_CLR_ACTIVITY_t, uint32_t)
13508 // Reading this register clears the ACTIVITY interrupt if the I2C is not active anymore. If the I2C module is still active on the bus, the ACTIVITY interrupt bit continues to be set. It is automatically cleared by hardware if the module is disabled and if there is no further activity on the bus. The value read from this register to get status of the ACTIVITY interrupt (bit 8) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13509 ADD_BITFIELD_RO(CLR_ACTIVITY, 0, 1)
13510 END_TYPE()
13511
13512 // Clear STOP_DET Interrupt Register
13513 // Reset value: 0x00000000
13514 BEGIN_TYPE(IC_CLR_STOP_DET_t, uint32_t)
13515 // Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13516 ADD_BITFIELD_RO(CLR_STOP_DET, 0, 1)
13517 END_TYPE()
13518
13519 // Clear START_DET Interrupt Register
13520 // Reset value: 0x00000000
13521 BEGIN_TYPE(IC_CLR_START_DET_t, uint32_t)
13522 // Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register. Reset value: 0x0
13523 ADD_BITFIELD_RO(CLR_START_DET, 0, 1)
13524 END_TYPE()
13525
13526 // Clear GEN_CALL Interrupt Register
13527 // Reset value: 0x00000000
13528 BEGIN_TYPE(IC_CLR_GEN_CALL_t, uint32_t)
13529 // Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register. Reset value: 0x0
13530 ADD_BITFIELD_RO(CLR_GEN_CALL, 0, 1)
13531 END_TYPE()
13532
13533 // I2C Enable Register
13534 // Reset value: 0x00000000
13535 BEGIN_TYPE(IC_ENABLE_t, uint32_t)
13536 // In Master mode: - 1'b1: Blocks the transmission of data on I2C bus even if Tx FIFO has data to transmit. - 1'b0: The transmission of data starts on I2C bus automatically, as soon as the first data is available in the Tx FIFO. Note: To block the execution of Master commands, set the TX_CMD_BLOCK bit only when Tx FIFO is empty (IC_STATUS[2]==1) and Master is in Idle state (IC_STATUS[5] == 0). Any further commands put in the Tx FIFO are not executed until TX_CMD_BLOCK bit is unset. Reset value: IC_TX_CMD_BLOCK_DEFAULT
13537 ADD_BITFIELD_RW(TX_CMD_BLOCK, 2, 1)
13538 // When set, the controller initiates the transfer abort. - 0: ABORT not initiated or ABORT done - 1: ABORT operation in progress The software can abort the I2C transfer in master mode by setting this bit. The software can set this bit only when ENABLE is already set; otherwise, the controller ignores any write to ABORT bit. The software cannot clear the ABORT bit once set. In response to an ABORT, the controller issues a STOP and flushes the Tx FIFO after completing the current transfer, then sets the TX_ABORT interrupt after the abort operation. The ABORT bit is cleared automatically after the abort operation. For a detailed description on how to abort I2C transfers, refer to 'Aborting I2C Transfers'. Reset value: 0x0
13539 ADD_BITFIELD_RW(ABORT, 1, 1)
13540 // Controls whether the DW_apb_i2c is enabled. - 0: Disables DW_apb_i2c (TX and RX FIFOs are held in an erased state) - 1: Enables DW_apb_i2c Software can disable DW_apb_i2c while it is active. However, it is important that care be taken to ensure that DW_apb_i2c is disabled properly. A recommended procedure is described in 'Disabling DW_apb_i2c'. When DW_apb_i2c is disabled, the following occurs: - The TX FIFO and RX FIFO get flushed. - Status bits in the IC_INTR_STAT register are still active until DW_apb_i2c goes into IDLE state. If the module is transmitting, it stops as well as deletes the contents of the transmit buffer after the current transfer is complete. If the module is receiving, the DW_apb_i2c stops the current transfer at the end of the current byte and does not acknowledge the transfer. In systems with asynchronous pclk and ic_clk when IC_CLK_TYPE parameter set to asynchronous (1), there is a two ic_clk delay when enabling or disabling the DW_apb_i2c. For a detailed description on how to disable DW_apb_i2c, refer to 'Disabling DW_apb_i2c' Reset value: 0x0
13541 ADD_BITFIELD_RW(ENABLE, 0, 1)
13542 END_TYPE()
13543
13544 // Tx Command execution not blocked
13545 static const uint32_t IC_ENABLE_TX_CMD_BLOCK__NOT_BLOCKED = 0;
13546 // Tx Command execution blocked
13547 static const uint32_t IC_ENABLE_TX_CMD_BLOCK__BLOCKED = 1;
13548 // ABORT operation not in progress
13549 static const uint32_t IC_ENABLE_ABORT__DISABLE = 0;
13550 // ABORT operation in progress
13551 static const uint32_t IC_ENABLE_ABORT__ENABLED = 1;
13552 // I2C is disabled
13553 static const uint32_t IC_ENABLE_ENABLE__DISABLED = 0;
13554 // I2C is enabled
13555 static const uint32_t IC_ENABLE_ENABLE__ENABLED = 1;
13556
13557 // I2C Status Register This is a read-only register used to indicate the current transfer status and FIFO status. The status register may be read at any time. None of the bits in this register request an interrupt. When the I2C is disabled by writing 0 in bit 0 of the IC_ENABLE register: - Bits 1 and 2 are set to 1 - Bits 3 and 10 are set to 0 When the master or slave state machines goes to idle and ic_en=0: - Bits 5 and 6 are set to 0
13558 // Reset value: 0x00000006
13559 BEGIN_TYPE(IC_STATUS_t, uint32_t)
13560 // Slave FSM Activity Status. When the Slave Finite State Machine (FSM) is not in the IDLE state, this bit is set. - 0: Slave FSM is in IDLE state so the Slave part of DW_apb_i2c is not Active - 1: Slave FSM is not in IDLE state so the Slave part of DW_apb_i2c is Active Reset value: 0x0
13561 ADD_BITFIELD_RO(SLV_ACTIVITY, 6, 1)
13562 // Master FSM Activity Status. When the Master Finite State Machine (FSM) is not in the IDLE state, this bit is set. - 0: Master FSM is in IDLE state so the Master part of DW_apb_i2c is not Active - 1: Master FSM is not in IDLE state so the Master part of DW_apb_i2c is Active Note: IC_STATUS[0]-that is, ACTIVITY bit-is the OR of SLV_ACTIVITY and MST_ACTIVITY bits. Reset value: 0x0
13563 ADD_BITFIELD_RO(MST_ACTIVITY, 5, 1)
13564 // Receive FIFO Completely Full. When the receive FIFO is completely full, this bit is set. When the receive FIFO contains one or more empty location, this bit is cleared. - 0: Receive FIFO is not full - 1: Receive FIFO is full Reset value: 0x0
13565 ADD_BITFIELD_RO(RFF, 4, 1)
13566 // Receive FIFO Not Empty. This bit is set when the receive FIFO contains one or more entries; it is cleared when the receive FIFO is empty. - 0: Receive FIFO is empty - 1: Receive FIFO is not empty Reset value: 0x0
13567 ADD_BITFIELD_RO(RFNE, 3, 1)
13568 // Transmit FIFO Completely Empty. When the transmit FIFO is completely empty, this bit is set. When it contains one or more valid entries, this bit is cleared. This bit field does not request an interrupt. - 0: Transmit FIFO is not empty - 1: Transmit FIFO is empty Reset value: 0x1
13569 ADD_BITFIELD_RO(TFE, 2, 1)
13570 // Transmit FIFO Not Full. Set when the transmit FIFO contains one or more empty locations, and is cleared when the FIFO is full. - 0: Transmit FIFO is full - 1: Transmit FIFO is not full Reset value: 0x1
13571 ADD_BITFIELD_RO(TFNF, 1, 1)
13572 // I2C Activity Status. Reset value: 0x0
13573 ADD_BITFIELD_RO(ACTIVITY, 0, 1)
13574 END_TYPE()
13575
13576 // Slave is idle
13577 static const uint32_t IC_STATUS_SLV_ACTIVITY__IDLE = 0;
13578 // Slave not idle
13579 static const uint32_t IC_STATUS_SLV_ACTIVITY__ACTIVE = 1;
13580 // Master is idle
13581 static const uint32_t IC_STATUS_MST_ACTIVITY__IDLE = 0;
13582 // Master not idle
13583 static const uint32_t IC_STATUS_MST_ACTIVITY__ACTIVE = 1;
13584 // Rx FIFO not full
13585 static const uint32_t IC_STATUS_RFF__NOT_FULL = 0;
13586 // Rx FIFO is full
13587 static const uint32_t IC_STATUS_RFF__FULL = 1;
13588 // Rx FIFO is empty
13589 static const uint32_t IC_STATUS_RFNE__EMPTY = 0;
13590 // Rx FIFO not empty
13591 static const uint32_t IC_STATUS_RFNE__NOT_EMPTY = 1;
13592 // Tx FIFO not empty
13593 static const uint32_t IC_STATUS_TFE__NON_EMPTY = 0;
13594 // Tx FIFO is empty
13595 static const uint32_t IC_STATUS_TFE__EMPTY = 1;
13596 // Tx FIFO is full
13597 static const uint32_t IC_STATUS_TFNF__FULL = 0;
13598 // Tx FIFO not full
13599 static const uint32_t IC_STATUS_TFNF__NOT_FULL = 1;
13600 // I2C is idle
13601 static const uint32_t IC_STATUS_ACTIVITY__INACTIVE = 0;
13602 // I2C is active
13603 static const uint32_t IC_STATUS_ACTIVITY__ACTIVE = 1;
13604
13605 // I2C Transmit FIFO Level Register This register contains the number of valid data entries in the transmit FIFO buffer. It is cleared whenever: - The I2C is disabled - There is a transmit abort - that is, TX_ABRT bit is set in the IC_RAW_INTR_STAT register - The slave bulk transmit mode is aborted The register increments whenever data is placed into the transmit FIFO and decrements when data is taken from the transmit FIFO.
13606 // Reset value: 0x00000000
13607 BEGIN_TYPE(IC_TXFLR_t, uint32_t)
13608 // Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Reset value: 0x0
13609 ADD_BITFIELD_RO(TXFLR, 0, 5)
13610 END_TYPE()
13611
13612 // I2C Receive FIFO Level Register This register contains the number of valid data entries in the receive FIFO buffer. It is cleared whenever: - The I2C is disabled - Whenever there is a transmit abort caused by any of the events tracked in IC_TX_ABRT_SOURCE The register increments whenever data is placed into the receive FIFO and decrements when data is taken from the receive FIFO.
13613 // Reset value: 0x00000000
13614 BEGIN_TYPE(IC_RXFLR_t, uint32_t)
13615 // Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Reset value: 0x0
13616 ADD_BITFIELD_RO(RXFLR, 0, 5)
13617 END_TYPE()
13618
13619 // I2C SDA Hold Time Length Register The bits [15:0] of this register are used to control the hold time of SDA during transmit in both slave and master mode (after SCL goes from HIGH to LOW). The bits [23:16] of this register are used to extend the SDA transition (if any) whenever SCL is HIGH in the receiver in either master or slave mode. Writes to this register succeed only when IC_ENABLE[0]=0. The values in this register are in units of ic_clk period. The value programmed in IC_SDA_TX_HOLD must be greater than the minimum hold time in each mode (one cycle in master mode, seven cycles in slave mode) for the value to be implemented. The programmed SDA hold time during transmit (IC_SDA_TX_HOLD) cannot exceed at any time the duration of the low part of scl. Therefore the programmed value cannot be larger than N_SCL_LOW-2, where N_SCL_LOW is the duration of the low part of the scl period measured in ic_clk cycles.
13620 // Reset value: 0x00000001
13621 BEGIN_TYPE(IC_SDA_HOLD_t, uint32_t)
13622 // Sets the required SDA hold time in units of ic_clk period, when DW_apb_i2c acts as a receiver. Reset value: IC_DEFAULT_SDA_HOLD[23:16].
13623 ADD_BITFIELD_RW(IC_SDA_RX_HOLD, 16, 8)
13624 // Sets the required SDA hold time in units of ic_clk period, when DW_apb_i2c acts as a transmitter. Reset value: IC_DEFAULT_SDA_HOLD[15:0].
13625 ADD_BITFIELD_RW(IC_SDA_TX_HOLD, 0, 16)
13626 END_TYPE()
13627
13628 // I2C Transmit Abort Source Register This register has 32 bits that indicate the source of the TX_ABRT bit. Except for Bit 9, this register is cleared whenever the IC_CLR_TX_ABRT register or the IC_CLR_INTR register is read. To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; RESTART must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, Bit 9 clears for one cycle and is then re-asserted.
13629 // Reset value: 0x00000000
13630 BEGIN_TYPE(IC_TX_ABRT_SOURCE_t, uint32_t)
13631 // This field indicates the number of Tx FIFO Data Commands which are flushed due to TX_ABRT interrupt. It is cleared whenever I2C is disabled. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter
13632 ADD_BITFIELD_RO(TX_FLUSH_CNT, 23, 9)
13633 // This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE[1]) Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
13634 ADD_BITFIELD_RO(ABRT_USER_ABRT, 16, 1)
13635 // 1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of IC_DATA_CMD register. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
13636 ADD_BITFIELD_RO(ABRT_SLVRD_INTX, 15, 1)
13637 // This field indicates that a Slave has lost the bus while transmitting data to a remote master. IC_TX_ABRT_SOURCE[12] is set at the same time. Note: Even though the slave never 'owns' the bus, something could go wrong on the bus. This is a fail safe check. For instance, during a data transmission at the low-to-high transition of SCL, if what is on the data bus is not what is supposed to be transmitted, then DW_apb_i2c no longer own the bus. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
13638 ADD_BITFIELD_RO(ABRT_SLV_ARBLOST, 14, 1)
13639 // This field specifies that the Slave has received a read command and some data exists in the TX FIFO, so the slave issues a TX_ABRT interrupt to flush old data in TX FIFO. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
13640 ADD_BITFIELD_RO(ABRT_SLVFLUSH_TXFIFO, 13, 1)
13641 // This field specifies that the Master has lost arbitration, or if IC_TX_ABRT_SOURCE[14] is also set, then the slave transmitter has lost arbitration. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter
13642 ADD_BITFIELD_RO(ARB_LOST, 12, 1)
13643 // This field indicates that the User tries to initiate a Master operation with the Master mode disabled. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
13644 ADD_BITFIELD_RO(ABRT_MASTER_DIS, 11, 1)
13645 // This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the master sends a read command in 10-bit addressing mode. Reset value: 0x0 Role of DW_apb_i2c: Master-Receiver
13646 ADD_BITFIELD_RO(ABRT_10B_RD_NORSTRT, 10, 1)
13647 // To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; restart must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, bit 9 clears for one cycle and then gets reasserted. When this field is set to 1, the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to send a START Byte. Reset value: 0x0 Role of DW_apb_i2c: Master
13648 ADD_BITFIELD_RO(ABRT_SBYTE_NORSTRT, 9, 1)
13649 // This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to use the master to transfer data in High Speed mode. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
13650 ADD_BITFIELD_RO(ABRT_HS_NORSTRT, 8, 1)
13651 // This field indicates that the Master has sent a START Byte and the START Byte was acknowledged (wrong behavior). Reset value: 0x0 Role of DW_apb_i2c: Master
13652 ADD_BITFIELD_RO(ABRT_SBYTE_ACKDET, 7, 1)
13653 // This field indicates that the Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior). Reset value: 0x0 Role of DW_apb_i2c: Master
13654 ADD_BITFIELD_RO(ABRT_HS_ACKDET, 6, 1)
13655 // This field indicates that DW_apb_i2c in the master mode has sent a General Call but the user programmed the byte following the General Call to be a read from the bus (IC_DATA_CMD[9] is set to 1). Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
13656 ADD_BITFIELD_RO(ABRT_GCALL_READ, 5, 1)
13657 // This field indicates that DW_apb_i2c in master mode has sent a General Call and no slave on the bus acknowledged the General Call. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
13658 ADD_BITFIELD_RO(ABRT_GCALL_NOACK, 4, 1)
13659 // This field indicates the master-mode only bit. When the master receives an acknowledgement for the address, but when it sends data byte(s) following the address, it did not receive an acknowledge from the remote slave(s). Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
13660 ADD_BITFIELD_RO(ABRT_TXDATA_NOACK, 3, 1)
13661 // This field indicates that the Master is in 10-bit address mode and that the second address byte of the 10-bit address was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
13662 ADD_BITFIELD_RO(ABRT_10ADDR2_NOACK, 2, 1)
13663 // This field indicates that the Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
13664 ADD_BITFIELD_RO(ABRT_10ADDR1_NOACK, 1, 1)
13665 // This field indicates that the Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
13666 ADD_BITFIELD_RO(ABRT_7B_ADDR_NOACK, 0, 1)
13667 END_TYPE()
13668
13669 // Transfer abort detected by master- scenario not present
13670 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_USER_ABRT__ABRT_USER_ABRT_VOID = 0;
13671 // Transfer abort detected by master
13672 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_USER_ABRT__ABRT_USER_ABRT_GENERATED = 1;
13673 // Slave trying to transmit to remote master in read mode- scenario not present
13674 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX__ABRT_SLVRD_INTX_VOID = 0;
13675 // Slave trying to transmit to remote master in read mode
13676 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX__ABRT_SLVRD_INTX_GENERATED = 1;
13677 // Slave lost arbitration to remote master- scenario not present
13678 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST__ABRT_SLV_ARBLOST_VOID = 0;
13679 // Slave lost arbitration to remote master
13680 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST__ABRT_SLV_ARBLOST_GENERATED = 1;
13681 // Slave flushes existing data in TX-FIFO upon getting read command- scenario not present
13682 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO__ABRT_SLVFLUSH_TXFIFO_VOID = 0;
13683 // Slave flushes existing data in TX-FIFO upon getting read command
13684 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO__ABRT_SLVFLUSH_TXFIFO_GENERATED = 1;
13685 // Master or Slave-Transmitter lost arbitration- scenario not present
13686 static const uint32_t IC_TX_ABRT_SOURCE_ARB_LOST__ABRT_LOST_VOID = 0;
13687 // Master or Slave-Transmitter lost arbitration
13688 static const uint32_t IC_TX_ABRT_SOURCE_ARB_LOST__ABRT_LOST_GENERATED = 1;
13689 // User initiating master operation when MASTER disabled- scenario not present
13690 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS__ABRT_MASTER_DIS_VOID = 0;
13691 // User initiating master operation when MASTER disabled
13692 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS__ABRT_MASTER_DIS_GENERATED = 1;
13693 // Master not trying to read in 10Bit addressing mode when RESTART disabled
13694 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT__ABRT_10B_RD_VOID = 0;
13695 // Master trying to read in 10Bit addressing mode when RESTART disabled
13696 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT__ABRT_10B_RD_GENERATED = 1;
13697 // User trying to send START byte when RESTART disabled- scenario not present
13698 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT__ABRT_SBYTE_NORSTRT_VOID = 0;
13699 // User trying to send START byte when RESTART disabled
13700 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT__ABRT_SBYTE_NORSTRT_GENERATED = 1;
13701 // User trying to switch Master to HS mode when RESTART disabled- scenario not present
13702 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT__ABRT_HS_NORSTRT_VOID = 0;
13703 // User trying to switch Master to HS mode when RESTART disabled
13704 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT__ABRT_HS_NORSTRT_GENERATED = 1;
13705 // ACK detected for START byte- scenario not present
13706 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET__ABRT_SBYTE_ACKDET_VOID = 0;
13707 // ACK detected for START byte
13708 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET__ABRT_SBYTE_ACKDET_GENERATED = 1;
13709 // HS Master code ACKed in HS Mode- scenario not present
13710 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET__ABRT_HS_ACK_VOID = 0;
13711 // HS Master code ACKed in HS Mode
13712 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET__ABRT_HS_ACK_GENERATED = 1;
13713 // GCALL is followed by read from bus-scenario not present
13714 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_GCALL_READ__ABRT_GCALL_READ_VOID = 0;
13715 // GCALL is followed by read from bus
13716 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_GCALL_READ__ABRT_GCALL_READ_GENERATED = 1;
13717 // GCALL not ACKed by any slave-scenario not present
13718 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK__ABRT_GCALL_NOACK_VOID = 0;
13719 // GCALL not ACKed by any slave
13720 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK__ABRT_GCALL_NOACK_GENERATED = 1;
13721 // Transmitted data non-ACKed by addressed slave-scenario not present
13722 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK__ABRT_TXDATA_NOACK_VOID = 0;
13723 // Transmitted data not ACKed by addressed slave
13724 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK__ABRT_TXDATA_NOACK_GENERATED = 1;
13725 // This abort is not generated
13726 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK__INACTIVE = 0;
13727 // Byte 2 of 10Bit Address not ACKed by any slave
13728 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK__ACTIVE = 1;
13729 // This abort is not generated
13730 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK__INACTIVE = 0;
13731 // Byte 1 of 10Bit Address not ACKed by any slave
13732 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK__ACTIVE = 1;
13733 // This abort is not generated
13734 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK__INACTIVE = 0;
13735 // This abort is generated because of NOACK for 7-bit address
13736 static const uint32_t IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK__ACTIVE = 1;
13737
13738 // Generate Slave Data NACK Register The register is used to generate a NACK for the data part of a transfer when DW_apb_i2c is acting as a slave-receiver. This register only exists when the IC_SLV_DATA_NACK_ONLY parameter is set to 1. When this parameter disabled, this register does not exist and writing to the register's address has no effect. A write can occur on this register if both of the following conditions are met: - DW_apb_i2c is disabled (IC_ENABLE[0] = 0) - Slave part is inactive (IC_STATUS[6] = 0) Note: The IC_STATUS[6] is a register read-back location for the internal slv_activity signal; the user should poll this before writing the ic_slv_data_nack_only bit.
13739 // Reset value: 0x00000000
13740 BEGIN_TYPE(IC_SLV_DATA_NACK_ONLY_t, uint32_t)
13741 // Generate NACK. This NACK generation only occurs when DW_apb_i2c is a slave-receiver. If this register is set to a value of 1, it can only generate a NACK after a data byte is received; hence, the data transfer is aborted and the data received is not pushed to the receive buffer. When the register is set to a value of 0, it generates NACK/ACK, depending on normal criteria. - 1: generate NACK after data byte received - 0: generate NACK/ACK normally Reset value: 0x0
13742 ADD_BITFIELD_RW(NACK, 0, 1)
13743 END_TYPE()
13744
13745 // Slave receiver generates NACK normally
13746 static const uint32_t IC_SLV_DATA_NACK_ONLY_NACK__DISABLED = 0;
13747 // Slave receiver generates NACK upon data reception only
13748 static const uint32_t IC_SLV_DATA_NACK_ONLY_NACK__ENABLED = 1;
13749
13750 // DMA Control Register The register is used to enable the DMA Controller interface operation. There is a separate bit for transmit and receive. This can be programmed regardless of the state of IC_ENABLE.
13751 // Reset value: 0x00000000
13752 BEGIN_TYPE(IC_DMA_CR_t, uint32_t)
13753 // Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0
13754 ADD_BITFIELD_RW(TDMAE, 1, 1)
13755 // Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0
13756 ADD_BITFIELD_RW(RDMAE, 0, 1)
13757 END_TYPE()
13758
13759 // transmit FIFO DMA channel disabled
13760 static const uint32_t IC_DMA_CR_TDMAE__DISABLED = 0;
13761 // Transmit FIFO DMA channel enabled
13762 static const uint32_t IC_DMA_CR_TDMAE__ENABLED = 1;
13763 // Receive FIFO DMA channel disabled
13764 static const uint32_t IC_DMA_CR_RDMAE__DISABLED = 0;
13765 // Receive FIFO DMA channel enabled
13766 static const uint32_t IC_DMA_CR_RDMAE__ENABLED = 1;
13767
13768 // DMA Transmit Data Level Register
13769 // Reset value: 0x00000000
13770 BEGIN_TYPE(IC_DMA_TDLR_t, uint32_t)
13771 // Transmit Data Level. This bit field controls the level at which a DMA request is made by the transmit logic. It is equal to the watermark level; that is, the dma_tx_req signal is generated when the number of valid data entries in the transmit FIFO is equal to or below this field value, and TDMAE = 1. Reset value: 0x0
13772 ADD_BITFIELD_RW(DMATDL, 0, 4)
13773 END_TYPE()
13774
13775 // I2C Receive Data Level Register
13776 // Reset value: 0x00000000
13777 BEGIN_TYPE(IC_DMA_RDLR_t, uint32_t)
13778 // Receive Data Level. This bit field controls the level at which a DMA request is made by the receive logic. The watermark level = DMARDL+1; that is, dma_rx_req is generated when the number of valid data entries in the receive FIFO is equal to or more than this field value + 1, and RDMAE =1. For instance, when DMARDL is 0, then dma_rx_req is asserted when 1 or more data entries are present in the receive FIFO. Reset value: 0x0
13779 ADD_BITFIELD_RW(DMARDL, 0, 4)
13780 END_TYPE()
13781
13782 // I2C SDA Setup Register This register controls the amount of time delay (in terms of number of ic_clk clock periods) introduced in the rising edge of SCL - relative to SDA changing - when DW_apb_i2c services a read request in a slave-transmitter operation. The relevant I2C requirement is tSU:DAT (note 4) as detailed in the I2C Bus Specification. This register must be programmed with a value equal to or greater than 2. Writes to this register succeed only when IC_ENABLE[0] = 0. Note: The length of setup time is calculated using [(IC_SDA_SETUP - 1) * (ic_clk_period)], so if the user requires 10 ic_clk periods of setup time, they should program a value of 11. The IC_SDA_SETUP register is only used by the DW_apb_i2c when operating as a slave transmitter.
13783 // Reset value: 0x00000064
13784 BEGIN_TYPE(IC_SDA_SETUP_t, uint32_t)
13785 // SDA Setup. It is recommended that if the required delay is 1000ns, then for an ic_clk frequency of 10 MHz, IC_SDA_SETUP should be programmed to a value of 11. IC_SDA_SETUP must be programmed with a minimum value of 2.
13786 ADD_BITFIELD_RW(SDA_SETUP, 0, 8)
13787 END_TYPE()
13788
13789 // I2C ACK General Call Register The register controls whether DW_apb_i2c responds with a ACK or NACK when it receives an I2C General Call address. This register is applicable only when the DW_apb_i2c is in slave mode.
13790 // Reset value: 0x00000001
13791 BEGIN_TYPE(IC_ACK_GENERAL_CALL_t, uint32_t)
13792 // ACK General Call. When set to 1, DW_apb_i2c responds with a ACK (by asserting ic_data_oe) when it receives a General Call. Otherwise, DW_apb_i2c responds with a NACK (by negating ic_data_oe).
13793 ADD_BITFIELD_RW(ACK_GEN_CALL, 0, 1)
13794 END_TYPE()
13795
13796 // Generate NACK for a General Call
13797 static const uint32_t IC_ACK_GENERAL_CALL_ACK_GEN_CALL__DISABLED = 0;
13798 // Generate ACK for a General Call
13799 static const uint32_t IC_ACK_GENERAL_CALL_ACK_GEN_CALL__ENABLED = 1;
13800
13801 // I2C Enable Status Register The register is used to report the DW_apb_i2c hardware status when the IC_ENABLE[0] register is set from 1 to 0; that is, when DW_apb_i2c is disabled. If IC_ENABLE[0] has been set to 1, bits 2:1 are forced to 0, and bit 0 is forced to 1. If IC_ENABLE[0] has been set to 0, bits 2:1 is only be valid as soon as bit 0 is read as '0'. Note: When IC_ENABLE[0] has been set to 0, a delay occurs for bit 0 to be read as 0 because disabling the DW_apb_i2c depends on I2C bus activities.
13802 // Reset value: 0x00000000
13803 BEGIN_TYPE(IC_ENABLE_STATUS_t, uint32_t)
13804 // Slave Received Data Lost. This bit indicates if a Slave-Receiver operation has been aborted with at least one data byte received from an I2C transfer due to the setting bit 0 of IC_ENABLE from 1 to 0. When read as 1, DW_apb_i2c is deemed to have been actively engaged in an aborted I2C transfer (with matching address) and the data phase of the I2C transfer has been entered, even though a data byte has been responded with a NACK. Note: If the remote I2C master terminates the transfer with a STOP condition before the DW_apb_i2c has a chance to NACK a transfer, and IC_ENABLE[0] has been set to 0, then this bit is also set to 1. When read as 0, DW_apb_i2c is deemed to have been disabled without being actively involved in the data phase of a Slave-Receiver transfer. Note: The CPU can safely read this bit when IC_EN (bit 0) is read as 0. Reset value: 0x0
13805 ADD_BITFIELD_RO(SLV_RX_DATA_LOST, 2, 1)
13806 // Slave Disabled While Busy (Transmit, Receive). This bit indicates if a potential or active Slave operation has been aborted due to the setting bit 0 of the IC_ENABLE register from 1 to 0. This bit is set when the CPU writes a 0 to the IC_ENABLE register while: (a) DW_apb_i2c is receiving the address byte of the Slave-Transmitter operation from a remote master; OR, (b) address and data bytes of the Slave-Receiver operation from a remote master. When read as 1, DW_apb_i2c is deemed to have forced a NACK during any part of an I2C transfer, irrespective of whether the I2C address matches the slave address set in DW_apb_i2c (IC_SAR register) OR if the transfer is completed before IC_ENABLE is set to 0 but has not taken effect. Note: If the remote I2C master terminates the transfer with a STOP condition before the DW_apb_i2c has a chance to NACK a transfer, and IC_ENABLE[0] has been set to 0, then this bit will also be set to 1. When read as 0, DW_apb_i2c is deemed to have been disabled when there is master activity, or when the I2C bus is idle. Note: The CPU can safely read this bit when IC_EN (bit 0) is read as 0. Reset value: 0x0
13807 ADD_BITFIELD_RO(SLV_DISABLED_WHILE_BUSY, 1, 1)
13808 // ic_en Status. This bit always reflects the value driven on the output port ic_en. - When read as 1, DW_apb_i2c is deemed to be in an enabled state. - When read as 0, DW_apb_i2c is deemed completely inactive. Note: The CPU can safely read this bit anytime. When this bit is read as 0, the CPU can safely read SLV_RX_DATA_LOST (bit 2) and SLV_DISABLED_WHILE_BUSY (bit 1). Reset value: 0x0
13809 ADD_BITFIELD_RO(IC_EN, 0, 1)
13810 END_TYPE()
13811
13812 // Slave RX Data is not lost
13813 static const uint32_t IC_ENABLE_STATUS_SLV_RX_DATA_LOST__INACTIVE = 0;
13814 // Slave RX Data is lost
13815 static const uint32_t IC_ENABLE_STATUS_SLV_RX_DATA_LOST__ACTIVE = 1;
13816 // Slave is disabled when it is idle
13817 static const uint32_t IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY__INACTIVE = 0;
13818 // Slave is disabled when it is active
13819 static const uint32_t IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY__ACTIVE = 1;
13820 // I2C disabled
13821 static const uint32_t IC_ENABLE_STATUS_IC_EN__DISABLED = 0;
13822 // I2C enabled
13823 static const uint32_t IC_ENABLE_STATUS_IC_EN__ENABLED = 1;
13824
13825 // I2C SS, FS or FM+ spike suppression limit This register is used to store the duration, measured in ic_clk cycles, of the longest spike that is filtered out by the spike suppression logic when the component is operating in SS, FS or FM+ modes. The relevant I2C requirement is tSP (table 4) as detailed in the I2C Bus Specification. This register must be programmed with a minimum value of 1.
13826 // Reset value: 0x00000007
13827 BEGIN_TYPE(IC_FS_SPKLEN_t, uint32_t)
13828 // This register must be set before any I2C bus transaction can take place to ensure stable operation. This register sets the duration, measured in ic_clk cycles, of the longest spike in the SCL or SDA lines that will be filtered out by the spike suppression logic. This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. The minimum valid value is 1; hardware prevents values less than this being written, and if attempted results in 1 being set. or more information, refer to 'Spike Suppression'.
13829 ADD_BITFIELD_RW(IC_FS_SPKLEN, 0, 8)
13830 END_TYPE()
13831
13832 // Clear RESTART_DET Interrupt Register
13833 // Reset value: 0x00000000
13834 BEGIN_TYPE(IC_CLR_RESTART_DET_t, uint32_t)
13835 // Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register. Reset value: 0x0
13836 ADD_BITFIELD_RO(CLR_RESTART_DET, 0, 1)
13837 END_TYPE()
13838
13839 // Component Parameter Register 1 Note This register is not implemented and therefore reads as 0. If it was implemented it would be a constant read-only register that contains encoded information about the component's parameter settings. Fields shown below are the settings for those parameters
13840 // Reset value: 0x00000000
13841 BEGIN_TYPE(IC_COMP_PARAM_1_t, uint32_t)
13842 // TX Buffer Depth = 16
13843 ADD_BITFIELD_RO(TX_BUFFER_DEPTH, 16, 8)
13844 // RX Buffer Depth = 16
13845 ADD_BITFIELD_RO(RX_BUFFER_DEPTH, 8, 8)
13846 // Encoded parameters not visible
13847 ADD_BITFIELD_RO(ADD_ENCODED_PARAMS, 7, 1)
13848 // DMA handshaking signals are enabled
13849 ADD_BITFIELD_RO(HAS_DMA, 6, 1)
13850 // COMBINED Interrupt outputs
13851 ADD_BITFIELD_RO(INTR_IO, 5, 1)
13852 // Programmable count values for each mode.
13853 ADD_BITFIELD_RO(HC_COUNT_VALUES, 4, 1)
13854 // MAX SPEED MODE = FAST MODE
13855 ADD_BITFIELD_RO(MAX_SPEED_MODE, 2, 2)
13856 // APB data bus width is 32 bits
13857 ADD_BITFIELD_RO(APB_DATA_WIDTH, 0, 2)
13858 END_TYPE()
13859
13860 // I2C Component Version Register
13861 // Reset value: 0x3230312a
13862 BEGIN_TYPE(IC_COMP_VERSION_t, uint32_t)
13863 ADD_BITFIELD_RO(IC_COMP_VERSION, 0, 32)
13864 END_TYPE()
13865
13866 // I2C Component Type Register
13867 // Reset value: 0x44570140
13868 BEGIN_TYPE(IC_COMP_TYPE_t, uint32_t)
13869 // Designware Component Type number = 0x44_57_01_40. This assigned unique hex value is constant and is derived from the two ASCII letters 'DW' followed by a 16-bit unsigned number.
13870 ADD_BITFIELD_RO(IC_COMP_TYPE, 0, 32)
13871 END_TYPE()
13872
13873 struct I2C0_t {
13874 IC_CON_t IC_CON;
13875 IC_TAR_t IC_TAR;
13876 IC_SAR_t IC_SAR;
13877 uint32_t reserved0;
13878 IC_DATA_CMD_t IC_DATA_CMD;
13879 IC_SS_SCL_HCNT_t IC_SS_SCL_HCNT;
13880 IC_SS_SCL_LCNT_t IC_SS_SCL_LCNT;
13881 IC_FS_SCL_HCNT_t IC_FS_SCL_HCNT;
13882 IC_FS_SCL_LCNT_t IC_FS_SCL_LCNT;
13883 uint32_t reserved1[2];
13884 IC_INTR_STAT_t IC_INTR_STAT;
13885 IC_INTR_MASK_t IC_INTR_MASK;
13886 IC_RAW_INTR_STAT_t IC_RAW_INTR_STAT;
13887 IC_RX_TL_t IC_RX_TL;
13888 IC_TX_TL_t IC_TX_TL;
13889 IC_CLR_INTR_t IC_CLR_INTR;
13890 IC_CLR_RX_UNDER_t IC_CLR_RX_UNDER;
13891 IC_CLR_RX_OVER_t IC_CLR_RX_OVER;
13892 IC_CLR_TX_OVER_t IC_CLR_TX_OVER;
13893 IC_CLR_RD_REQ_t IC_CLR_RD_REQ;
13894 IC_CLR_TX_ABRT_t IC_CLR_TX_ABRT;
13895 IC_CLR_RX_DONE_t IC_CLR_RX_DONE;
13896 IC_CLR_ACTIVITY_t IC_CLR_ACTIVITY;
13897 IC_CLR_STOP_DET_t IC_CLR_STOP_DET;
13898 IC_CLR_START_DET_t IC_CLR_START_DET;
13899 IC_CLR_GEN_CALL_t IC_CLR_GEN_CALL;
13900 IC_ENABLE_t IC_ENABLE;
13901 IC_STATUS_t IC_STATUS;
13902 IC_TXFLR_t IC_TXFLR;
13903 IC_RXFLR_t IC_RXFLR;
13904 IC_SDA_HOLD_t IC_SDA_HOLD;
13905 IC_TX_ABRT_SOURCE_t IC_TX_ABRT_SOURCE;
13906 IC_SLV_DATA_NACK_ONLY_t IC_SLV_DATA_NACK_ONLY;
13907 IC_DMA_CR_t IC_DMA_CR;
13908 IC_DMA_TDLR_t IC_DMA_TDLR;
13909 IC_DMA_RDLR_t IC_DMA_RDLR;
13910 IC_SDA_SETUP_t IC_SDA_SETUP;
13911 IC_ACK_GENERAL_CALL_t IC_ACK_GENERAL_CALL;
13912 IC_ENABLE_STATUS_t IC_ENABLE_STATUS;
13913 IC_FS_SPKLEN_t IC_FS_SPKLEN;
13914 uint32_t reserved2;
13915 IC_CLR_RESTART_DET_t IC_CLR_RESTART_DET;
13916 uint32_t reserved3[18];
13917 IC_COMP_PARAM_1_t IC_COMP_PARAM_1;
13918 IC_COMP_VERSION_t IC_COMP_VERSION;
13919 IC_COMP_TYPE_t IC_COMP_TYPE;
13920 };
13921
13922 static I2C0_t & I2C0 = (*(I2C0_t *)0x40090000);
13923 static I2C0_t & I2C0_XOR = (*(I2C0_t *)0x40091000);
13924 static I2C0_t & I2C0_SET = (*(I2C0_t *)0x40092000);
13925 static I2C0_t & I2C0_CLR = (*(I2C0_t *)0x40093000);
13926
13927} // _I2C0_
13928
13929namespace _I2C1_ {
13930
13931 static _I2C0_::I2C0_t & I2C1 = (*(_I2C0_::I2C0_t *)0x40098000);
13932 static _I2C0_::I2C0_t & I2C1_XOR = (*(_I2C0_::I2C0_t *)0x40099000);
13933 static _I2C0_::I2C0_t & I2C1_SET = (*(_I2C0_::I2C0_t *)0x4009a000);
13934 static _I2C0_::I2C0_t & I2C1_CLR = (*(_I2C0_::I2C0_t *)0x4009b000);
13935
13936} // _I2C1_
13937
13938namespace _SPI0_ {
13939
13940 // Control register 0, SSPCR0 on page 3-4
13941 // Reset value: 0x00000000
13942 BEGIN_TYPE(SSPCR0_t, uint32_t)
13943 // Serial clock rate. The value SCR is used to generate the transmit and receive bit rate of the PrimeCell SSP. The bit rate is: F SSPCLK CPSDVSR x (1+SCR) where CPSDVSR is an even value from 2-254, programmed through the SSPCPSR register and SCR is a value from 0-255.
13944 ADD_BITFIELD_RW(SCR, 8, 8)
13945 // SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10.
13946 ADD_BITFIELD_RW(SPH, 7, 1)
13947 // SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10.
13948 ADD_BITFIELD_RW(SPO, 6, 1)
13949 // Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation.
13950 ADD_BITFIELD_RW(FRF, 4, 2)
13951 // Data Size Select: 0000 Reserved, undefined operation. 0001 Reserved, undefined operation. 0010 Reserved, undefined operation. 0011 4-bit data. 0100 5-bit data. 0101 6-bit data. 0110 7-bit data. 0111 8-bit data. 1000 9-bit data. 1001 10-bit data. 1010 11-bit data. 1011 12-bit data. 1100 13-bit data. 1101 14-bit data. 1110 15-bit data. 1111 16-bit data.
13952 ADD_BITFIELD_RW(DSS, 0, 4)
13953 END_TYPE()
13954
13955 // Control register 1, SSPCR1 on page 3-5
13956 // Reset value: 0x00000000
13957 BEGIN_TYPE(SSPCR1_t, uint32_t)
13958 // Slave-mode output disable. This bit is relevant only in the slave mode, MS=1. In multiple-slave systems, it is possible for an PrimeCell SSP master to broadcast a message to all slaves in the system while ensuring that only one slave drives data onto its serial output line. In such systems the RXD lines from multiple slaves could be tied together. To operate in such systems, the SOD bit can be set if the PrimeCell SSP slave is not supposed to drive the SSPTXD line: 0 SSP can drive the SSPTXD output in slave mode. 1 SSP must not drive the SSPTXD output in slave mode.
13959 ADD_BITFIELD_RW(SOD, 3, 1)
13960 // Master or slave mode select. This bit can be modified only when the PrimeCell SSP is disabled, SSE=0: 0 Device configured as master, default. 1 Device configured as slave.
13961 ADD_BITFIELD_RW(MS, 2, 1)
13962 // Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled.
13963 ADD_BITFIELD_RW(SSE, 1, 1)
13964 // Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally.
13965 ADD_BITFIELD_RW(LBM, 0, 1)
13966 END_TYPE()
13967
13968 // Data register, SSPDR on page 3-6
13969 BEGIN_TYPE(SSPDR_t, uint32_t)
13970 // Transmit/Receive FIFO: Read Receive FIFO. Write Transmit FIFO. You must right-justify data when the PrimeCell SSP is programmed for a data size that is less than 16 bits. Unused bits at the top are ignored by transmit logic. The receive logic automatically right-justifies.
13971 ADD_BITFIELD_RW(DATA, 0, 16)
13972 END_TYPE()
13973
13974 // Status register, SSPSR on page 3-7
13975 // Reset value: 0x00000003
13976 BEGIN_TYPE(SSPSR_t, uint32_t)
13977 // PrimeCell SSP busy flag, RO: 0 SSP is idle. 1 SSP is currently transmitting and/or receiving a frame or the transmit FIFO is not empty.
13978 ADD_BITFIELD_RO(BSY, 4, 1)
13979 // Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full.
13980 ADD_BITFIELD_RO(RFF, 3, 1)
13981 // Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty.
13982 ADD_BITFIELD_RO(RNE, 2, 1)
13983 // Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full.
13984 ADD_BITFIELD_RO(TNF, 1, 1)
13985 // Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty.
13986 ADD_BITFIELD_RO(TFE, 0, 1)
13987 END_TYPE()
13988
13989 // Clock prescale register, SSPCPSR on page 3-8
13990 // Reset value: 0x00000000
13991 BEGIN_TYPE(SSPCPSR_t, uint32_t)
13992 // Clock prescale divisor. Must be an even number from 2-254, depending on the frequency of SSPCLK. The least significant bit always returns zero on reads.
13993 ADD_BITFIELD_RW(CPSDVSR, 0, 8)
13994 END_TYPE()
13995
13996 // Interrupt mask set or clear register, SSPIMSC on page 3-9
13997 // Reset value: 0x00000000
13998 BEGIN_TYPE(SSPIMSC_t, uint32_t)
13999 // Transmit FIFO interrupt mask: 0 Transmit FIFO half empty or less condition interrupt is masked. 1 Transmit FIFO half empty or less condition interrupt is not masked.
14000 ADD_BITFIELD_RW(TXIM, 3, 1)
14001 // Receive FIFO interrupt mask: 0 Receive FIFO half full or less condition interrupt is masked. 1 Receive FIFO half full or less condition interrupt is not masked.
14002 ADD_BITFIELD_RW(RXIM, 2, 1)
14003 // Receive timeout interrupt mask: 0 Receive FIFO not empty and no read prior to timeout period interrupt is masked. 1 Receive FIFO not empty and no read prior to timeout period interrupt is not masked.
14004 ADD_BITFIELD_RW(RTIM, 1, 1)
14005 // Receive overrun interrupt mask: 0 Receive FIFO written to while full condition interrupt is masked. 1 Receive FIFO written to while full condition interrupt is not masked.
14006 ADD_BITFIELD_RW(RORIM, 0, 1)
14007 END_TYPE()
14008
14009 // Raw interrupt status register, SSPRIS on page 3-10
14010 // Reset value: 0x00000008
14011 BEGIN_TYPE(SSPRIS_t, uint32_t)
14012 // Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt
14013 ADD_BITFIELD_RO(TXRIS, 3, 1)
14014 // Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt
14015 ADD_BITFIELD_RO(RXRIS, 2, 1)
14016 // Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt
14017 ADD_BITFIELD_RO(RTRIS, 1, 1)
14018 // Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt
14019 ADD_BITFIELD_RO(RORRIS, 0, 1)
14020 END_TYPE()
14021
14022 // Masked interrupt status register, SSPMIS on page 3-11
14023 // Reset value: 0x00000000
14024 BEGIN_TYPE(SSPMIS_t, uint32_t)
14025 // Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt
14026 ADD_BITFIELD_RO(TXMIS, 3, 1)
14027 // Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt
14028 ADD_BITFIELD_RO(RXMIS, 2, 1)
14029 // Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt
14030 ADD_BITFIELD_RO(RTMIS, 1, 1)
14031 // Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt
14032 ADD_BITFIELD_RO(RORMIS, 0, 1)
14033 END_TYPE()
14034
14035 // Interrupt clear register, SSPICR on page 3-11
14036 // Reset value: 0x00000000
14037 BEGIN_TYPE(SSPICR_t, uint32_t)
14038 // Clears the SSPRTINTR interrupt
14039 ADD_BITFIELD_RW(RTIC, 1, 1)
14040 // Clears the SSPRORINTR interrupt
14041 ADD_BITFIELD_RW(RORIC, 0, 1)
14042 END_TYPE()
14043
14044 // DMA control register, SSPDMACR on page 3-12
14045 // Reset value: 0x00000000
14046 BEGIN_TYPE(SSPDMACR_t, uint32_t)
14047 // Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled.
14048 ADD_BITFIELD_RW(TXDMAE, 1, 1)
14049 // Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled.
14050 ADD_BITFIELD_RW(RXDMAE, 0, 1)
14051 END_TYPE()
14052
14053 // Peripheral identification registers, SSPPeriphID0-3 on page 3-13
14054 // Reset value: 0x00000022
14055 BEGIN_TYPE(SSPPERIPHID0_t, uint32_t)
14056 // These bits read back as 0x22
14057 ADD_BITFIELD_RO(PARTNUMBER0, 0, 8)
14058 END_TYPE()
14059
14060 // Peripheral identification registers, SSPPeriphID0-3 on page 3-13
14061 // Reset value: 0x00000010
14062 BEGIN_TYPE(SSPPERIPHID1_t, uint32_t)
14063 // These bits read back as 0x1
14064 ADD_BITFIELD_RO(DESIGNER0, 4, 4)
14065 // These bits read back as 0x0
14066 ADD_BITFIELD_RO(PARTNUMBER1, 0, 4)
14067 END_TYPE()
14068
14069 // Peripheral identification registers, SSPPeriphID0-3 on page 3-13
14070 // Reset value: 0x00000034
14071 BEGIN_TYPE(SSPPERIPHID2_t, uint32_t)
14072 // These bits return the peripheral revision
14073 ADD_BITFIELD_RO(REVISION, 4, 4)
14074 // These bits read back as 0x4
14075 ADD_BITFIELD_RO(DESIGNER1, 0, 4)
14076 END_TYPE()
14077
14078 // Peripheral identification registers, SSPPeriphID0-3 on page 3-13
14079 // Reset value: 0x00000000
14080 BEGIN_TYPE(SSPPERIPHID3_t, uint32_t)
14081 // These bits read back as 0x00
14082 ADD_BITFIELD_RO(CONFIGURATION, 0, 8)
14083 END_TYPE()
14084
14085 // PrimeCell identification registers, SSPPCellID0-3 on page 3-16
14086 // Reset value: 0x0000000d
14087 BEGIN_TYPE(SSPPCELLID0_t, uint32_t)
14088 // These bits read back as 0x0D
14089 ADD_BITFIELD_RO(SSPPCELLID0, 0, 8)
14090 END_TYPE()
14091
14092 // PrimeCell identification registers, SSPPCellID0-3 on page 3-16
14093 // Reset value: 0x000000f0
14094 BEGIN_TYPE(SSPPCELLID1_t, uint32_t)
14095 // These bits read back as 0xF0
14096 ADD_BITFIELD_RO(SSPPCELLID1, 0, 8)
14097 END_TYPE()
14098
14099 // PrimeCell identification registers, SSPPCellID0-3 on page 3-16
14100 // Reset value: 0x00000005
14101 BEGIN_TYPE(SSPPCELLID2_t, uint32_t)
14102 // These bits read back as 0x05
14103 ADD_BITFIELD_RO(SSPPCELLID2, 0, 8)
14104 END_TYPE()
14105
14106 // PrimeCell identification registers, SSPPCellID0-3 on page 3-16
14107 // Reset value: 0x000000b1
14108 BEGIN_TYPE(SSPPCELLID3_t, uint32_t)
14109 // These bits read back as 0xB1
14110 ADD_BITFIELD_RO(SSPPCELLID3, 0, 8)
14111 END_TYPE()
14112
14113 struct SPI0_t {
14114 SSPCR0_t SSPCR0;
14115 SSPCR1_t SSPCR1;
14116 SSPDR_t SSPDR;
14117 SSPSR_t SSPSR;
14118 SSPCPSR_t SSPCPSR;
14119 SSPIMSC_t SSPIMSC;
14120 SSPRIS_t SSPRIS;
14121 SSPMIS_t SSPMIS;
14122 SSPICR_t SSPICR;
14123 SSPDMACR_t SSPDMACR;
14124 uint32_t reserved0[1006];
14125 SSPPERIPHID0_t SSPPERIPHID0;
14126 SSPPERIPHID1_t SSPPERIPHID1;
14127 SSPPERIPHID2_t SSPPERIPHID2;
14128 SSPPERIPHID3_t SSPPERIPHID3;
14129 SSPPCELLID0_t SSPPCELLID0;
14130 SSPPCELLID1_t SSPPCELLID1;
14131 SSPPCELLID2_t SSPPCELLID2;
14132 SSPPCELLID3_t SSPPCELLID3;
14133 };
14134
14135 static SPI0_t & SPI0 = (*(SPI0_t *)0x40080000);
14136 static SPI0_t & SPI0_XOR = (*(SPI0_t *)0x40081000);
14137 static SPI0_t & SPI0_SET = (*(SPI0_t *)0x40082000);
14138 static SPI0_t & SPI0_CLR = (*(SPI0_t *)0x40083000);
14139
14140} // _SPI0_
14141
14142namespace _SPI1_ {
14143
14144 static _SPI0_::SPI0_t & SPI1 = (*(_SPI0_::SPI0_t *)0x40088000);
14145 static _SPI0_::SPI0_t & SPI1_XOR = (*(_SPI0_::SPI0_t *)0x40089000);
14146 static _SPI0_::SPI0_t & SPI1_SET = (*(_SPI0_::SPI0_t *)0x4008a000);
14147 static _SPI0_::SPI0_t & SPI1_CLR = (*(_SPI0_::SPI0_t *)0x4008b000);
14148
14149} // _SPI1_
14150
14151// Programmable IO block
14152namespace _PIO0_ {
14153
14154 // PIO control register
14155 // Reset value: 0x00000000
14156 BEGIN_TYPE(CTRL_t, uint32_t)
14157 // Write 1 to restart the clock dividers of state machines in neighbouring PIO blocks, as specified by NEXT_PIO_MASK and PREV_PIO_MASK in the same write. This is equivalent to writing 1 to the corresponding CLKDIV_RESTART bits in those PIOs' CTRL registers.
14158 ADD_BITFIELD_WO(NEXTPREV_CLKDIV_RESTART, 26, 1)
14159 // Write 1 to disable state machines in neighbouring PIO blocks, as specified by NEXT_PIO_MASK and PREV_PIO_MASK in the same write. This is equivalent to clearing the corresponding SM_ENABLE bits in those PIOs' CTRL registers.
14160 ADD_BITFIELD_WO(NEXTPREV_SM_DISABLE, 25, 1)
14161 // Write 1 to enable state machines in neighbouring PIO blocks, as specified by NEXT_PIO_MASK and PREV_PIO_MASK in the same write. This is equivalent to setting the corresponding SM_ENABLE bits in those PIOs' CTRL registers. If both OTHERS_SM_ENABLE and OTHERS_SM_DISABLE are set, the disable takes precedence.
14162 ADD_BITFIELD_WO(NEXTPREV_SM_ENABLE, 24, 1)
14163 // A mask of state machines in the neighbouring higher-numbered PIO block in the system (or PIO block 0 if this is the highest-numbered PIO block) to which to apply the operations specified by NEXTPREV_CLKDIV_RESTART, NEXTPREV_SM_ENABLE, and NEXTPREV_SM_DISABLE in the same write. This allows state machines in a neighbouring PIO block to be started/stopped/clock-synced exactly simultaneously with a write to this PIO block's CTRL register. Note that in a system with two PIOs, NEXT_PIO_MASK and PREV_PIO_MASK actually indicate the same PIO block. In this case the effects are applied cumulatively (as though the masks were OR'd together). Neighbouring PIO blocks are disconnected (status signals tied to 0 and control signals ignored) if one block is accessible to NonSecure code, and one is not.
14164 ADD_BITFIELD_WO(NEXT_PIO_MASK, 20, 4)
14165 // A mask of state machines in the neighbouring lower-numbered PIO block in the system (or the highest-numbered PIO block if this is PIO block 0) to which to apply the operations specified by OP_CLKDIV_RESTART, OP_ENABLE, OP_DISABLE in the same write. This allows state machines in a neighbouring PIO block to be started/stopped/clock-synced exactly simultaneously with a write to this PIO block's CTRL register. Neighbouring PIO blocks are disconnected (status signals tied to 0 and control signals ignored) if one block is accessible to NonSecure code, and one is not.
14166 ADD_BITFIELD_WO(PREV_PIO_MASK, 16, 4)
14167 // Restart a state machine's clock divider from an initial phase of 0. Clock dividers are free-running, so once started, their output (including fractional jitter) is completely determined by the integer/fractional divisor configured in SMx_CLKDIV. This means that, if multiple clock dividers with the same divisor are restarted simultaneously, by writing multiple 1 bits to this field, the execution clocks of those state machines will run in precise lockstep. Note that setting/clearing SM_ENABLE does not stop the clock divider from running, so once multiple state machines' clocks are synchronised, it is safe to disable/reenable a state machine, whilst keeping the clock dividers in sync. Note also that CLKDIV_RESTART can be written to whilst the state machine is running, and this is useful to resynchronise clock dividers after the divisors (SMx_CLKDIV) have been changed on-the-fly.
14168 ADD_BITFIELD_WO(CLKDIV_RESTART, 8, 4)
14169 // Write 1 to instantly clear internal SM state which may be otherwise difficult to access and will affect future execution. Specifically, the following are cleared: input and output shift counters; the contents of the input shift register; the delay counter; the waiting-on-IRQ state; any stalled instruction written to SMx_INSTR or run by OUT/MOV EXEC; any pin write left asserted due to OUT_STICKY. The contents of the output shift register and the X/Y scratch registers are not affected.
14170 ADD_BITFIELD_WO(SM_RESTART, 4, 4)
14171 // Enable/disable each of the four state machines by writing 1/0 to each of these four bits. When disabled, a state machine will cease executing instructions, except those written directly to SMx_INSTR by the system. Multiple bits can be set/cleared at once to run/halt multiple state machines simultaneously.
14172 ADD_BITFIELD_RW(SM_ENABLE, 0, 4)
14173 END_TYPE()
14174
14175 // FIFO status register
14176 // Reset value: 0x0f000f00
14177 BEGIN_TYPE(FSTAT_t, uint32_t)
14178 // State machine TX FIFO is empty
14179 ADD_BITFIELD_RO(TXEMPTY, 24, 4)
14180 // State machine TX FIFO is full
14181 ADD_BITFIELD_RO(TXFULL, 16, 4)
14182 // State machine RX FIFO is empty
14183 ADD_BITFIELD_RO(RXEMPTY, 8, 4)
14184 // State machine RX FIFO is full
14185 ADD_BITFIELD_RO(RXFULL, 0, 4)
14186 END_TYPE()
14187
14188 // FIFO debug register
14189 // Reset value: 0x00000000
14190 BEGIN_TYPE(FDEBUG_t, uint32_t)
14191 // State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear.
14192 ADD_BITFIELD_RW(TXSTALL, 24, 4)
14193 // TX FIFO overflow (i.e. write-on-full by the system) has occurred. Write 1 to clear. Note that write-on-full does not alter the state or contents of the FIFO in any way, but the data that the system attempted to write is dropped, so if this flag is set, your software has quite likely dropped some data on the floor.
14194 ADD_BITFIELD_RW(TXOVER, 16, 4)
14195 // RX FIFO underflow (i.e. read-on-empty by the system) has occurred. Write 1 to clear. Note that read-on-empty does not perturb the state of the FIFO in any way, but the data returned by reading from an empty FIFO is undefined, so this flag generally only becomes set due to some kind of software error.
14196 ADD_BITFIELD_RW(RXUNDER, 8, 4)
14197 // State machine has stalled on full RX FIFO during a blocking PUSH, or an IN with autopush enabled. This flag is also set when a nonblocking PUSH to a full FIFO took place, in which case the state machine has dropped data. Write 1 to clear.
14198 ADD_BITFIELD_RW(RXSTALL, 0, 4)
14199 END_TYPE()
14200
14201 // FIFO levels
14202 // Reset value: 0x00000000
14203 BEGIN_TYPE(FLEVEL_t, uint32_t)
14204 ADD_BITFIELD_RO(RX3, 28, 4)
14205 ADD_BITFIELD_RO(TX3, 24, 4)
14206 ADD_BITFIELD_RO(RX2, 20, 4)
14207 ADD_BITFIELD_RO(TX2, 16, 4)
14208 ADD_BITFIELD_RO(RX1, 12, 4)
14209 ADD_BITFIELD_RO(TX1, 8, 4)
14210 ADD_BITFIELD_RO(RX0, 4, 4)
14211 ADD_BITFIELD_RO(TX0, 0, 4)
14212 END_TYPE()
14213
14214 // Direct write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. Attempting to write to a full FIFO has no effect on the FIFO state or contents, and sets the sticky FDEBUG_TXOVER error flag for this FIFO.
14215 // Reset value: 0x00000000
14216 typedef uint32_t TXF_t;
14217
14218 // Direct read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. Attempting to read from an empty FIFO has no effect on the FIFO state, and sets the sticky FDEBUG_RXUNDER error flag for this FIFO. The data returned to the system on a read from an empty FIFO is undefined.
14219 typedef uint32_t RXF_t;
14220
14221 // State machine IRQ flags register. Write 1 to clear. There are eight state machine IRQ flags, which can be set, cleared, and waited on by the state machines. There's no fixed association between flags and state machines -- any state machine can use any flag. Any of the eight flags can be used for timing synchronisation between state machines, using IRQ and WAIT instructions. Any combination of the eight flags can also routed out to either of the two system-level interrupt requests, alongside FIFO status interrupts -- see e.g. IRQ0_INTE.
14222 // Reset value: 0x00000000
14223 BEGIN_TYPE(IRQ_t, uint32_t)
14224 ADD_BITFIELD_RW(IRQ, 0, 8)
14225 END_TYPE()
14226
14227 // Writing a 1 to each of these bits will forcibly assert the corresponding IRQ. Note this is different to the INTF register: writing here affects PIO internal state. INTF just asserts the processor-facing IRQ signal for testing ISRs, and is not visible to the state machines.
14228 // Reset value: 0x00000000
14229 BEGIN_TYPE(IRQ_FORCE_t, uint32_t)
14230 ADD_BITFIELD_WO(IRQ_FORCE, 0, 8)
14231 END_TYPE()
14232
14233 // There is a 2-flipflop synchronizer on each GPIO input, which protects PIO logic from metastabilities. This increases input delay, and for fast synchronous IO (e.g. SPI) these synchronizers may need to be bypassed. Each bit in this register corresponds to one GPIO. 0 -> input is synchronized (default) 1 -> synchronizer is bypassed If in doubt, leave this register as all zeroes.
14234 // Reset value: 0x00000000
14235 BEGIN_TYPE(INPUT_SYNC_BYPASS_t, uint32_t)
14236 ADD_BITFIELD_RW(INPUT_SYNC_BYPASS, 0, 32)
14237 END_TYPE()
14238
14239 // Read to sample the pad output values PIO is currently driving to the GPIOs. On RP2040 there are 30 GPIOs, so the two most significant bits are hardwired to 0.
14240 // Reset value: 0x00000000
14241 BEGIN_TYPE(DBG_PADOUT_t, uint32_t)
14242 ADD_BITFIELD_RO(DBG_PADOUT, 0, 32)
14243 END_TYPE()
14244
14245 // Read to sample the pad output enables (direction) PIO is currently driving to the GPIOs. On RP2040 there are 30 GPIOs, so the two most significant bits are hardwired to 0.
14246 // Reset value: 0x00000000
14247 BEGIN_TYPE(DBG_PADOE_t, uint32_t)
14248 ADD_BITFIELD_RO(DBG_PADOE, 0, 32)
14249 END_TYPE()
14250
14251 // The PIO hardware has some free parameters that may vary between chip products. These should be provided in the chip datasheet, but are also exposed here.
14252 // Reset value: 0x10000000
14253 BEGIN_TYPE(DBG_CFGINFO_t, uint32_t)
14254 // Version of the core PIO hardware.
14255 ADD_BITFIELD_RO(VERSION, 28, 4)
14256 // The size of the instruction memory, measured in units of one instruction
14257 ADD_BITFIELD_RO(IMEM_SIZE, 16, 6)
14258 // The number of state machines this PIO instance is equipped with.
14259 ADD_BITFIELD_RO(SM_COUNT, 8, 4)
14260 // The depth of the state machine TX/RX FIFOs, measured in words. Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double this depth.
14261 ADD_BITFIELD_RO(FIFO_DEPTH, 0, 6)
14262 END_TYPE()
14263
14264 // Version 0 (RP2040)
14265 static const uint32_t DBG_CFGINFO_VERSION__v0 = 0;
14266 // Version 1 (RP2350)
14267 static const uint32_t DBG_CFGINFO_VERSION__v1 = 1;
14268
14269 // Write-only access to instruction memory location 0
14270 // Reset value: 0x00000000
14271 BEGIN_TYPE(INSTR_MEM_t, uint32_t)
14272 ADD_BITFIELD_WO(INSTR, 0, 16)
14273 END_TYPE()
14274
14275 // Clock divisor register for state machine 0 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)
14276 // Reset value: 0x00010000
14277 BEGIN_TYPE(SM_CLKDIV_t, uint32_t)
14278 // Effective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0.
14279 ADD_BITFIELD_RW(INT, 16, 16)
14280 // Fractional part of clock divisor
14281 ADD_BITFIELD_RW(FRAC, 8, 8)
14282 END_TYPE()
14283
14284 // Execution/behavioural settings for state machine 0
14285 // Reset value: 0x0001f000
14286 BEGIN_TYPE(SM_EXECCTRL_t, uint32_t)
14287 // If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.
14288 ADD_BITFIELD_RO(EXEC_STALLED, 31, 1)
14289 // If 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible side-set width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.
14290 ADD_BITFIELD_RW(SIDE_EN, 30, 1)
14291 // If 1, side-set data is asserted to pin directions, instead of pin values
14292 ADD_BITFIELD_RW(SIDE_PINDIR, 29, 1)
14293 // The GPIO number to use as condition for JMP PIN. Unaffected by input mapping.
14294 ADD_BITFIELD_RW(JMP_PIN, 24, 5)
14295 // Which data bit to use for inline OUT enable
14296 ADD_BITFIELD_RW(OUT_EN_SEL, 19, 5)
14297 // If 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < ...)
14298 ADD_BITFIELD_RW(INLINE_OUT_EN, 18, 1)
14299 // Continuously assert the most recent OUT/SET to the pins
14300 ADD_BITFIELD_RW(OUT_STICKY, 17, 1)
14301 // After reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.
14302 ADD_BITFIELD_RW(WRAP_TOP, 12, 5)
14303 // After reaching wrap_top, execution is wrapped to this address.
14304 ADD_BITFIELD_RW(WRAP_BOTTOM, 7, 5)
14305 // Comparison used for the MOV x, STATUS instruction.
14306 ADD_BITFIELD_RW(STATUS_SEL, 5, 2)
14307 // Comparison level or IRQ index for the MOV x, STATUS instruction. If STATUS_SEL is TXLEVEL or RXLEVEL, then values of STATUS_N greater than the current FIFO depth are reserved, and have undefined behaviour.
14308 ADD_BITFIELD_RW(STATUS_N, 0, 5)
14309 END_TYPE()
14310
14311 // All-ones if TX FIFO level < N, otherwise all-zeroes
14312 static const uint32_t SM_EXECCTRL_STATUS_SEL__TXLEVEL = 0;
14313 // All-ones if RX FIFO level < N, otherwise all-zeroes
14314 static const uint32_t SM_EXECCTRL_STATUS_SEL__RXLEVEL = 1;
14315 // All-ones if the indexed IRQ flag is raised, otherwise all-zeroes
14316 static const uint32_t SM_EXECCTRL_STATUS_SEL__IRQ = 2;
14317 // Index 0-7 of an IRQ flag in this PIO block
14318 static const uint32_t SM_EXECCTRL_STATUS_N__IRQ = 0;
14319 // Index 0-7 of an IRQ flag in the next lower-numbered PIO block
14320 static const uint32_t SM_EXECCTRL_STATUS_N__IRQ_PREVPIO = 8;
14321 // Index 0-7 of an IRQ flag in the next higher-numbered PIO block
14322 static const uint32_t SM_EXECCTRL_STATUS_N__IRQ_NEXTPIO = 16;
14323
14324 // Control behaviour of the input/output shift registers for state machine 0
14325 // Reset value: 0x000c0000
14326 BEGIN_TYPE(SM_SHIFTCTRL_t, uint32_t)
14327 // When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep. TX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.
14328 ADD_BITFIELD_RW(FJOIN_RX, 31, 1)
14329 // When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep. RX FIFO is disabled as a result (always reads as both full and empty). FIFOs are flushed when this bit is changed.
14330 ADD_BITFIELD_RW(FJOIN_TX, 30, 1)
14331 // Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32.
14332 ADD_BITFIELD_RW(PULL_THRESH, 25, 5)
14333 // Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32.
14334 ADD_BITFIELD_RW(PUSH_THRESH, 20, 5)
14335 // 1 = shift out of output shift register to right. 0 = to left.
14336 ADD_BITFIELD_RW(OUT_SHIFTDIR, 19, 1)
14337 // 1 = shift input shift register to right (data enters from left). 0 = to left.
14338 ADD_BITFIELD_RW(IN_SHIFTDIR, 18, 1)
14339 // Pull automatically when the output shift register is emptied, i.e. on or following an OUT instruction which causes the output shift counter to reach or exceed PULL_THRESH.
14340 ADD_BITFIELD_RW(AUTOPULL, 17, 1)
14341 // Push automatically when the input shift register is filled, i.e. on an IN instruction which causes the input shift counter to reach or exceed PUSH_THRESH.
14342 ADD_BITFIELD_RW(AUTOPUSH, 16, 1)
14343 // If 1, disable this state machine's RX FIFO, make its storage available for random write access by the state machine (using the `put` instruction) and, unless FJOIN_RX_GET is also set, random read access by the processor (through the RXFx_PUTGETy registers). If FJOIN_RX_PUT and FJOIN_RX_GET are both set, then the RX FIFO's registers can be randomly read/written by the state machine, but are completely inaccessible to the processor. Setting this bit will clear the FJOIN_TX and FJOIN_RX bits.
14344 ADD_BITFIELD_RW(FJOIN_RX_PUT, 15, 1)
14345 // If 1, disable this state machine's RX FIFO, make its storage available for random read access by the state machine (using the `get` instruction) and, unless FJOIN_RX_PUT is also set, random write access by the processor (through the RXFx_PUTGETy registers). If FJOIN_RX_PUT and FJOIN_RX_GET are both set, then the RX FIFO's registers can be randomly read/written by the state machine, but are completely inaccessible to the processor. Setting this bit will clear the FJOIN_TX and FJOIN_RX bits.
14346 ADD_BITFIELD_RW(FJOIN_RX_GET, 14, 1)
14347 // Set the number of pins which are not masked to 0 when read by an IN PINS, WAIT PIN or MOV x, PINS instruction. For example, an IN_COUNT of 5 means that the 5 LSBs of the IN pin group are visible (bits 4:0), but the remaining 27 MSBs are masked to 0. A count of 32 is encoded with a field value of 0, so the default behaviour is to not perform any masking. Note this masking is applied in addition to the masking usually performed by the IN instruction. This is mainly useful for the MOV x, PINS instruction, which otherwise has no way of masking pins.
14348 ADD_BITFIELD_RW(IN_COUNT, 0, 5)
14349 END_TYPE()
14350
14351 // Current instruction address of state machine 0
14352 // Reset value: 0x00000000
14353 BEGIN_TYPE(SM_ADDR_t, uint32_t)
14354 ADD_BITFIELD_RO(ADDR, 0, 5)
14355 END_TYPE()
14356
14357 // Read to see the instruction currently addressed by state machine 0's program counter Write to execute an instruction immediately (including jumps) and then resume execution.
14358 BEGIN_TYPE(SM_INSTR_t, uint32_t)
14359 ADD_BITFIELD_RW(INSTR, 0, 16)
14360 END_TYPE()
14361
14362 // State machine pin control
14363 // Reset value: 0x14000000
14364 BEGIN_TYPE(SM_PINCTRL_t, uint32_t)
14365 // The number of MSBs of the Delay/Side-set instruction field which are used for side-set. Inclusive of the enable bit, if present. Minimum of 0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).
14366 ADD_BITFIELD_RW(SIDESET_COUNT, 29, 3)
14367 // The number of pins asserted by a SET. In the range 0 to 5 inclusive.
14368 ADD_BITFIELD_RW(SET_COUNT, 26, 3)
14369 // The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive.
14370 ADD_BITFIELD_RW(OUT_COUNT, 20, 6)
14371 // The pin which is mapped to the least-significant bit of a state machine's IN data bus. Higher-numbered pins are mapped to consecutively more-significant data bits, with a modulo of 32 applied to pin number.
14372 ADD_BITFIELD_RW(IN_BASE, 15, 5)
14373 // The lowest-numbered pin that will be affected by a side-set operation. The MSBs of an instruction's side-set/delay field (up to 5, determined by SIDESET_COUNT) are used for side-set data, with the remaining LSBs used for delay. The least-significant bit of the side-set portion is the bit written to this pin, with more-significant bits written to higher-numbered pins.
14374 ADD_BITFIELD_RW(SIDESET_BASE, 10, 5)
14375 // The lowest-numbered pin that will be affected by a SET PINS or SET PINDIRS instruction. The data written to this pin is the least-significant bit of the SET data.
14376 ADD_BITFIELD_RW(SET_BASE, 5, 5)
14377 // The lowest-numbered pin that will be affected by an OUT PINS, OUT PINDIRS or MOV PINS instruction. The data written to this pin will always be the least-significant bit of the OUT or MOV data.
14378 ADD_BITFIELD_RW(OUT_BASE, 0, 5)
14379 END_TYPE()
14380
14381 // Direct read/write access to entry 0 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set.
14382 // Reset value: 0x00000000
14383 typedef uint32_t RXF0_PUTGET_t;
14384
14385 // Direct read/write access to entry 0 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set.
14386 // Reset value: 0x00000000
14387 typedef uint32_t RXF1_PUTGET_t;
14388
14389 // Direct read/write access to entry 0 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set.
14390 // Reset value: 0x00000000
14391 typedef uint32_t RXF2_PUTGET_t;
14392
14393 // Direct read/write access to entry 0 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set.
14394 // Reset value: 0x00000000
14395 typedef uint32_t RXF3_PUTGET_t;
14396
14397 // Relocate GPIO 0 (from PIO's point of view) in the system GPIO numbering, to access more than 32 GPIOs from PIO. Only the values 0 and 16 are supported (only bit 4 is writable).
14398 // Reset value: 0x00000000
14399 BEGIN_TYPE(GPIOBASE_t, uint32_t)
14400 ADD_BITFIELD_RW(GPIOBASE, 4, 1)
14401 END_TYPE()
14402
14403 // Raw Interrupts
14404 // Reset value: 0x00000000
14405 BEGIN_TYPE(INTR_t, uint32_t)
14406 ADD_BITFIELD_RO(SM7, 15, 1)
14407 ADD_BITFIELD_RO(SM6, 14, 1)
14408 ADD_BITFIELD_RO(SM5, 13, 1)
14409 ADD_BITFIELD_RO(SM4, 12, 1)
14410 ADD_BITFIELD_RO(SM3, 11, 1)
14411 ADD_BITFIELD_RO(SM2, 10, 1)
14412 ADD_BITFIELD_RO(SM1, 9, 1)
14413 ADD_BITFIELD_RO(SM0, 8, 1)
14414 ADD_BITFIELD_RO(SM3_TXNFULL, 7, 1)
14415 ADD_BITFIELD_RO(SM2_TXNFULL, 6, 1)
14416 ADD_BITFIELD_RO(SM1_TXNFULL, 5, 1)
14417 ADD_BITFIELD_RO(SM0_TXNFULL, 4, 1)
14418 ADD_BITFIELD_RO(SM3_RXNEMPTY, 3, 1)
14419 ADD_BITFIELD_RO(SM2_RXNEMPTY, 2, 1)
14420 ADD_BITFIELD_RO(SM1_RXNEMPTY, 1, 1)
14421 ADD_BITFIELD_RO(SM0_RXNEMPTY, 0, 1)
14422 END_TYPE()
14423
14424 // Interrupt Enable for irq0
14425 // Reset value: 0x00000000
14426 BEGIN_TYPE(IRQ0_INTE_t, uint32_t)
14427 ADD_BITFIELD_RW(SM7, 15, 1)
14428 ADD_BITFIELD_RW(SM6, 14, 1)
14429 ADD_BITFIELD_RW(SM5, 13, 1)
14430 ADD_BITFIELD_RW(SM4, 12, 1)
14431 ADD_BITFIELD_RW(SM3, 11, 1)
14432 ADD_BITFIELD_RW(SM2, 10, 1)
14433 ADD_BITFIELD_RW(SM1, 9, 1)
14434 ADD_BITFIELD_RW(SM0, 8, 1)
14435 ADD_BITFIELD_RW(SM3_TXNFULL, 7, 1)
14436 ADD_BITFIELD_RW(SM2_TXNFULL, 6, 1)
14437 ADD_BITFIELD_RW(SM1_TXNFULL, 5, 1)
14438 ADD_BITFIELD_RW(SM0_TXNFULL, 4, 1)
14439 ADD_BITFIELD_RW(SM3_RXNEMPTY, 3, 1)
14440 ADD_BITFIELD_RW(SM2_RXNEMPTY, 2, 1)
14441 ADD_BITFIELD_RW(SM1_RXNEMPTY, 1, 1)
14442 ADD_BITFIELD_RW(SM0_RXNEMPTY, 0, 1)
14443 END_TYPE()
14444
14445 // Interrupt Force for irq0
14446 // Reset value: 0x00000000
14447 BEGIN_TYPE(IRQ0_INTF_t, uint32_t)
14448 ADD_BITFIELD_RW(SM7, 15, 1)
14449 ADD_BITFIELD_RW(SM6, 14, 1)
14450 ADD_BITFIELD_RW(SM5, 13, 1)
14451 ADD_BITFIELD_RW(SM4, 12, 1)
14452 ADD_BITFIELD_RW(SM3, 11, 1)
14453 ADD_BITFIELD_RW(SM2, 10, 1)
14454 ADD_BITFIELD_RW(SM1, 9, 1)
14455 ADD_BITFIELD_RW(SM0, 8, 1)
14456 ADD_BITFIELD_RW(SM3_TXNFULL, 7, 1)
14457 ADD_BITFIELD_RW(SM2_TXNFULL, 6, 1)
14458 ADD_BITFIELD_RW(SM1_TXNFULL, 5, 1)
14459 ADD_BITFIELD_RW(SM0_TXNFULL, 4, 1)
14460 ADD_BITFIELD_RW(SM3_RXNEMPTY, 3, 1)
14461 ADD_BITFIELD_RW(SM2_RXNEMPTY, 2, 1)
14462 ADD_BITFIELD_RW(SM1_RXNEMPTY, 1, 1)
14463 ADD_BITFIELD_RW(SM0_RXNEMPTY, 0, 1)
14464 END_TYPE()
14465
14466 // Interrupt status after masking & forcing for irq0
14467 // Reset value: 0x00000000
14468 BEGIN_TYPE(IRQ0_INTS_t, uint32_t)
14469 ADD_BITFIELD_RO(SM7, 15, 1)
14470 ADD_BITFIELD_RO(SM6, 14, 1)
14471 ADD_BITFIELD_RO(SM5, 13, 1)
14472 ADD_BITFIELD_RO(SM4, 12, 1)
14473 ADD_BITFIELD_RO(SM3, 11, 1)
14474 ADD_BITFIELD_RO(SM2, 10, 1)
14475 ADD_BITFIELD_RO(SM1, 9, 1)
14476 ADD_BITFIELD_RO(SM0, 8, 1)
14477 ADD_BITFIELD_RO(SM3_TXNFULL, 7, 1)
14478 ADD_BITFIELD_RO(SM2_TXNFULL, 6, 1)
14479 ADD_BITFIELD_RO(SM1_TXNFULL, 5, 1)
14480 ADD_BITFIELD_RO(SM0_TXNFULL, 4, 1)
14481 ADD_BITFIELD_RO(SM3_RXNEMPTY, 3, 1)
14482 ADD_BITFIELD_RO(SM2_RXNEMPTY, 2, 1)
14483 ADD_BITFIELD_RO(SM1_RXNEMPTY, 1, 1)
14484 ADD_BITFIELD_RO(SM0_RXNEMPTY, 0, 1)
14485 END_TYPE()
14486
14487 // Interrupt Enable for irq1
14488 // Reset value: 0x00000000
14489 BEGIN_TYPE(IRQ1_INTE_t, uint32_t)
14490 ADD_BITFIELD_RW(SM7, 15, 1)
14491 ADD_BITFIELD_RW(SM6, 14, 1)
14492 ADD_BITFIELD_RW(SM5, 13, 1)
14493 ADD_BITFIELD_RW(SM4, 12, 1)
14494 ADD_BITFIELD_RW(SM3, 11, 1)
14495 ADD_BITFIELD_RW(SM2, 10, 1)
14496 ADD_BITFIELD_RW(SM1, 9, 1)
14497 ADD_BITFIELD_RW(SM0, 8, 1)
14498 ADD_BITFIELD_RW(SM3_TXNFULL, 7, 1)
14499 ADD_BITFIELD_RW(SM2_TXNFULL, 6, 1)
14500 ADD_BITFIELD_RW(SM1_TXNFULL, 5, 1)
14501 ADD_BITFIELD_RW(SM0_TXNFULL, 4, 1)
14502 ADD_BITFIELD_RW(SM3_RXNEMPTY, 3, 1)
14503 ADD_BITFIELD_RW(SM2_RXNEMPTY, 2, 1)
14504 ADD_BITFIELD_RW(SM1_RXNEMPTY, 1, 1)
14505 ADD_BITFIELD_RW(SM0_RXNEMPTY, 0, 1)
14506 END_TYPE()
14507
14508 // Interrupt Force for irq1
14509 // Reset value: 0x00000000
14510 BEGIN_TYPE(IRQ1_INTF_t, uint32_t)
14511 ADD_BITFIELD_RW(SM7, 15, 1)
14512 ADD_BITFIELD_RW(SM6, 14, 1)
14513 ADD_BITFIELD_RW(SM5, 13, 1)
14514 ADD_BITFIELD_RW(SM4, 12, 1)
14515 ADD_BITFIELD_RW(SM3, 11, 1)
14516 ADD_BITFIELD_RW(SM2, 10, 1)
14517 ADD_BITFIELD_RW(SM1, 9, 1)
14518 ADD_BITFIELD_RW(SM0, 8, 1)
14519 ADD_BITFIELD_RW(SM3_TXNFULL, 7, 1)
14520 ADD_BITFIELD_RW(SM2_TXNFULL, 6, 1)
14521 ADD_BITFIELD_RW(SM1_TXNFULL, 5, 1)
14522 ADD_BITFIELD_RW(SM0_TXNFULL, 4, 1)
14523 ADD_BITFIELD_RW(SM3_RXNEMPTY, 3, 1)
14524 ADD_BITFIELD_RW(SM2_RXNEMPTY, 2, 1)
14525 ADD_BITFIELD_RW(SM1_RXNEMPTY, 1, 1)
14526 ADD_BITFIELD_RW(SM0_RXNEMPTY, 0, 1)
14527 END_TYPE()
14528
14529 // Interrupt status after masking & forcing for irq1
14530 // Reset value: 0x00000000
14531 BEGIN_TYPE(IRQ1_INTS_t, uint32_t)
14532 ADD_BITFIELD_RO(SM7, 15, 1)
14533 ADD_BITFIELD_RO(SM6, 14, 1)
14534 ADD_BITFIELD_RO(SM5, 13, 1)
14535 ADD_BITFIELD_RO(SM4, 12, 1)
14536 ADD_BITFIELD_RO(SM3, 11, 1)
14537 ADD_BITFIELD_RO(SM2, 10, 1)
14538 ADD_BITFIELD_RO(SM1, 9, 1)
14539 ADD_BITFIELD_RO(SM0, 8, 1)
14540 ADD_BITFIELD_RO(SM3_TXNFULL, 7, 1)
14541 ADD_BITFIELD_RO(SM2_TXNFULL, 6, 1)
14542 ADD_BITFIELD_RO(SM1_TXNFULL, 5, 1)
14543 ADD_BITFIELD_RO(SM0_TXNFULL, 4, 1)
14544 ADD_BITFIELD_RO(SM3_RXNEMPTY, 3, 1)
14545 ADD_BITFIELD_RO(SM2_RXNEMPTY, 2, 1)
14546 ADD_BITFIELD_RO(SM1_RXNEMPTY, 1, 1)
14547 ADD_BITFIELD_RO(SM0_RXNEMPTY, 0, 1)
14548 END_TYPE()
14549
14550 struct PIO0_t {
14551 CTRL_t CTRL;
14552 FSTAT_t FSTAT;
14553 FDEBUG_t FDEBUG;
14554 FLEVEL_t FLEVEL;
14555 TXF_t TXF[4];
14556 RXF_t RXF[4];
14557 IRQ_t IRQ;
14558 IRQ_FORCE_t IRQ_FORCE;
14559 INPUT_SYNC_BYPASS_t INPUT_SYNC_BYPASS;
14560 DBG_PADOUT_t DBG_PADOUT;
14561 DBG_PADOE_t DBG_PADOE;
14562 DBG_CFGINFO_t DBG_CFGINFO;
14563 INSTR_MEM_t INSTR_MEM[32];
14564 SM_CLKDIV_t SM0_CLKDIV;
14565 SM_EXECCTRL_t SM0_EXECCTRL;
14566 SM_SHIFTCTRL_t SM0_SHIFTCTRL;
14567 SM_ADDR_t SM0_ADDR;
14568 SM_INSTR_t SM0_INSTR;
14569 SM_PINCTRL_t SM0_PINCTRL;
14570 SM_CLKDIV_t SM1_CLKDIV;
14571 SM_EXECCTRL_t SM1_EXECCTRL;
14572 SM_SHIFTCTRL_t SM1_SHIFTCTRL;
14573 SM_ADDR_t SM1_ADDR;
14574 SM_INSTR_t SM1_INSTR;
14575 SM_PINCTRL_t SM1_PINCTRL;
14576 SM_CLKDIV_t SM2_CLKDIV;
14577 SM_EXECCTRL_t SM2_EXECCTRL;
14578 SM_SHIFTCTRL_t SM2_SHIFTCTRL;
14579 SM_ADDR_t SM2_ADDR;
14580 SM_INSTR_t SM2_INSTR;
14581 SM_PINCTRL_t SM2_PINCTRL;
14582 SM_CLKDIV_t SM3_CLKDIV;
14583 SM_EXECCTRL_t SM3_EXECCTRL;
14584 SM_SHIFTCTRL_t SM3_SHIFTCTRL;
14585 SM_ADDR_t SM3_ADDR;
14586 SM_INSTR_t SM3_INSTR;
14587 SM_PINCTRL_t SM3_PINCTRL;
14588 RXF0_PUTGET_t RXF0_PUTGET[4];
14589 RXF1_PUTGET_t RXF1_PUTGET[4];
14590 RXF2_PUTGET_t RXF2_PUTGET[4];
14591 RXF3_PUTGET_t RXF3_PUTGET[4];
14592 GPIOBASE_t GPIOBASE;
14593 INTR_t INTR;
14594 IRQ0_INTE_t IRQ0_INTE;
14595 IRQ0_INTF_t IRQ0_INTF;
14596 IRQ0_INTS_t IRQ0_INTS;
14597 IRQ1_INTE_t IRQ1_INTE;
14598 IRQ1_INTF_t IRQ1_INTF;
14599 IRQ1_INTS_t IRQ1_INTS;
14600 };
14601
14602 static PIO0_t & PIO0 = (*(PIO0_t *)0x50200000);
14603 static PIO0_t & PIO0_XOR = (*(PIO0_t *)0x50201000);
14604 static PIO0_t & PIO0_SET = (*(PIO0_t *)0x50202000);
14605 static PIO0_t & PIO0_CLR = (*(PIO0_t *)0x50203000);
14606
14607} // _PIO0_
14608
14609namespace _PIO1_ {
14610
14611 static _PIO0_::PIO0_t & PIO1 = (*(_PIO0_::PIO0_t *)0x50300000);
14612 static _PIO0_::PIO0_t & PIO1_XOR = (*(_PIO0_::PIO0_t *)0x50301000);
14613 static _PIO0_::PIO0_t & PIO1_SET = (*(_PIO0_::PIO0_t *)0x50302000);
14614 static _PIO0_::PIO0_t & PIO1_CLR = (*(_PIO0_::PIO0_t *)0x50303000);
14615
14616} // _PIO1_
14617
14618namespace _PIO2_ {
14619
14620 static _PIO0_::PIO0_t & PIO2 = (*(_PIO0_::PIO0_t *)0x50400000);
14621 static _PIO0_::PIO0_t & PIO2_XOR = (*(_PIO0_::PIO0_t *)0x50401000);
14622 static _PIO0_::PIO0_t & PIO2_SET = (*(_PIO0_::PIO0_t *)0x50402000);
14623 static _PIO0_::PIO0_t & PIO2_CLR = (*(_PIO0_::PIO0_t *)0x50403000);
14624
14625} // _PIO2_
14626
14627// Register block for busfabric control signals and performance counters
14628namespace _BUSCTRL_ {
14629
14630 // Set the priority of each master for bus arbitration.
14631 // Reset value: 0x00000000
14632 BEGIN_TYPE(BUS_PRIORITY_t, uint32_t)
14633 // 0 - low priority, 1 - high priority
14634 ADD_BITFIELD_RW(DMA_W, 12, 1)
14635 // 0 - low priority, 1 - high priority
14636 ADD_BITFIELD_RW(DMA_R, 8, 1)
14637 // 0 - low priority, 1 - high priority
14638 ADD_BITFIELD_RW(PROC1, 4, 1)
14639 // 0 - low priority, 1 - high priority
14640 ADD_BITFIELD_RW(PROC0, 0, 1)
14641 END_TYPE()
14642
14643 // Bus priority acknowledge
14644 // Reset value: 0x00000000
14645 BEGIN_TYPE(BUS_PRIORITY_ACK_t, uint32_t)
14646 // Goes to 1 once all arbiters have registered the new global priority levels. Arbiters update their local priority when servicing a new nonsequential access. In normal circumstances this will happen almost immediately.
14647 ADD_BITFIELD_RO(BUS_PRIORITY_ACK, 0, 1)
14648 END_TYPE()
14649
14650 // Enable the performance counters. If 0, the performance counters do not increment. This can be used to precisely start/stop event sampling around the profiled section of code. The performance counters are initially disabled, to save energy.
14651 // Reset value: 0x00000000
14652 BEGIN_TYPE(PERFCTR_EN_t, uint32_t)
14653 ADD_BITFIELD_RW(PERFCTR_EN, 0, 1)
14654 END_TYPE()
14655
14656 // Bus fabric performance counter 0
14657 // Reset value: 0x00000000
14658 BEGIN_TYPE(PERFCTR0_t, uint32_t)
14659 // Busfabric saturating performance counter 0 Count some event signal from the busfabric arbiters, if PERFCTR_EN is set. Write any value to clear. Select an event to count using PERFSEL0
14660 ADD_BITFIELD_RW(PERFCTR0, 0, 24)
14661 END_TYPE()
14662
14663 // Bus fabric performance event select for PERFCTR0
14664 // Reset value: 0x0000001f
14665 BEGIN_TYPE(PERFSEL0_t, uint32_t)
14666 // Select an event for PERFCTR0. For each downstream port of the main crossbar, four events are available: ACCESS, an access took place; ACCESS_CONTESTED, an access took place that previously stalled due to contention from other masters; STALL_DOWNSTREAM, count cycles where any master stalled due to a stall on the downstream bus; STALL_UPSTREAM, count cycles where any master stalled for any reason, including contention from other masters.
14667 ADD_BITFIELD_RW(PERFSEL0, 0, 7)
14668 END_TYPE()
14669
14670 static const uint32_t PERFSEL0_PERFSEL0__siob_proc1_stall_upstream = 0;
14671 static const uint32_t PERFSEL0_PERFSEL0__siob_proc1_stall_downstream = 1;
14672 static const uint32_t PERFSEL0_PERFSEL0__siob_proc1_access_contested = 2;
14673 static const uint32_t PERFSEL0_PERFSEL0__siob_proc1_access = 3;
14674 static const uint32_t PERFSEL0_PERFSEL0__siob_proc0_stall_upstream = 4;
14675 static const uint32_t PERFSEL0_PERFSEL0__siob_proc0_stall_downstream = 5;
14676 static const uint32_t PERFSEL0_PERFSEL0__siob_proc0_access_contested = 6;
14677 static const uint32_t PERFSEL0_PERFSEL0__siob_proc0_access = 7;
14678 static const uint32_t PERFSEL0_PERFSEL0__apb_stall_upstream = 8;
14679 static const uint32_t PERFSEL0_PERFSEL0__apb_stall_downstream = 9;
14680 static const uint32_t PERFSEL0_PERFSEL0__apb_access_contested = 10;
14681 static const uint32_t PERFSEL0_PERFSEL0__apb_access = 11;
14682 static const uint32_t PERFSEL0_PERFSEL0__fastperi_stall_upstream = 12;
14683 static const uint32_t PERFSEL0_PERFSEL0__fastperi_stall_downstream = 13;
14684 static const uint32_t PERFSEL0_PERFSEL0__fastperi_access_contested = 14;
14685 static const uint32_t PERFSEL0_PERFSEL0__fastperi_access = 15;
14686 static const uint32_t PERFSEL0_PERFSEL0__sram9_stall_upstream = 16;
14687 static const uint32_t PERFSEL0_PERFSEL0__sram9_stall_downstream = 17;
14688 static const uint32_t PERFSEL0_PERFSEL0__sram9_access_contested = 18;
14689 static const uint32_t PERFSEL0_PERFSEL0__sram9_access = 19;
14690 static const uint32_t PERFSEL0_PERFSEL0__sram8_stall_upstream = 20;
14691 static const uint32_t PERFSEL0_PERFSEL0__sram8_stall_downstream = 21;
14692 static const uint32_t PERFSEL0_PERFSEL0__sram8_access_contested = 22;
14693 static const uint32_t PERFSEL0_PERFSEL0__sram8_access = 23;
14694 static const uint32_t PERFSEL0_PERFSEL0__sram7_stall_upstream = 24;
14695 static const uint32_t PERFSEL0_PERFSEL0__sram7_stall_downstream = 25;
14696 static const uint32_t PERFSEL0_PERFSEL0__sram7_access_contested = 26;
14697 static const uint32_t PERFSEL0_PERFSEL0__sram7_access = 27;
14698 static const uint32_t PERFSEL0_PERFSEL0__sram6_stall_upstream = 28;
14699 static const uint32_t PERFSEL0_PERFSEL0__sram6_stall_downstream = 29;
14700 static const uint32_t PERFSEL0_PERFSEL0__sram6_access_contested = 30;
14701 static const uint32_t PERFSEL0_PERFSEL0__sram6_access = 31;
14702 static const uint32_t PERFSEL0_PERFSEL0__sram5_stall_upstream = 32;
14703 static const uint32_t PERFSEL0_PERFSEL0__sram5_stall_downstream = 33;
14704 static const uint32_t PERFSEL0_PERFSEL0__sram5_access_contested = 34;
14705 static const uint32_t PERFSEL0_PERFSEL0__sram5_access = 35;
14706 static const uint32_t PERFSEL0_PERFSEL0__sram4_stall_upstream = 36;
14707 static const uint32_t PERFSEL0_PERFSEL0__sram4_stall_downstream = 37;
14708 static const uint32_t PERFSEL0_PERFSEL0__sram4_access_contested = 38;
14709 static const uint32_t PERFSEL0_PERFSEL0__sram4_access = 39;
14710 static const uint32_t PERFSEL0_PERFSEL0__sram3_stall_upstream = 40;
14711 static const uint32_t PERFSEL0_PERFSEL0__sram3_stall_downstream = 41;
14712 static const uint32_t PERFSEL0_PERFSEL0__sram3_access_contested = 42;
14713 static const uint32_t PERFSEL0_PERFSEL0__sram3_access = 43;
14714 static const uint32_t PERFSEL0_PERFSEL0__sram2_stall_upstream = 44;
14715 static const uint32_t PERFSEL0_PERFSEL0__sram2_stall_downstream = 45;
14716 static const uint32_t PERFSEL0_PERFSEL0__sram2_access_contested = 46;
14717 static const uint32_t PERFSEL0_PERFSEL0__sram2_access = 47;
14718 static const uint32_t PERFSEL0_PERFSEL0__sram1_stall_upstream = 48;
14719 static const uint32_t PERFSEL0_PERFSEL0__sram1_stall_downstream = 49;
14720 static const uint32_t PERFSEL0_PERFSEL0__sram1_access_contested = 50;
14721 static const uint32_t PERFSEL0_PERFSEL0__sram1_access = 51;
14722 static const uint32_t PERFSEL0_PERFSEL0__sram0_stall_upstream = 52;
14723 static const uint32_t PERFSEL0_PERFSEL0__sram0_stall_downstream = 53;
14724 static const uint32_t PERFSEL0_PERFSEL0__sram0_access_contested = 54;
14725 static const uint32_t PERFSEL0_PERFSEL0__sram0_access = 55;
14726 static const uint32_t PERFSEL0_PERFSEL0__xip_main1_stall_upstream = 56;
14727 static const uint32_t PERFSEL0_PERFSEL0__xip_main1_stall_downstream = 57;
14728 static const uint32_t PERFSEL0_PERFSEL0__xip_main1_access_contested = 58;
14729 static const uint32_t PERFSEL0_PERFSEL0__xip_main1_access = 59;
14730 static const uint32_t PERFSEL0_PERFSEL0__xip_main0_stall_upstream = 60;
14731 static const uint32_t PERFSEL0_PERFSEL0__xip_main0_stall_downstream = 61;
14732 static const uint32_t PERFSEL0_PERFSEL0__xip_main0_access_contested = 62;
14733 static const uint32_t PERFSEL0_PERFSEL0__xip_main0_access = 63;
14734 static const uint32_t PERFSEL0_PERFSEL0__rom_stall_upstream = 64;
14735 static const uint32_t PERFSEL0_PERFSEL0__rom_stall_downstream = 65;
14736 static const uint32_t PERFSEL0_PERFSEL0__rom_access_contested = 66;
14737 static const uint32_t PERFSEL0_PERFSEL0__rom_access = 67;
14738
14739 // Bus fabric performance counter 1
14740 // Reset value: 0x00000000
14741 BEGIN_TYPE(PERFCTR1_t, uint32_t)
14742 // Busfabric saturating performance counter 1 Count some event signal from the busfabric arbiters, if PERFCTR_EN is set. Write any value to clear. Select an event to count using PERFSEL1
14743 ADD_BITFIELD_RW(PERFCTR1, 0, 24)
14744 END_TYPE()
14745
14746 // Bus fabric performance event select for PERFCTR1
14747 // Reset value: 0x0000001f
14748 BEGIN_TYPE(PERFSEL1_t, uint32_t)
14749 // Select an event for PERFCTR1. For each downstream port of the main crossbar, four events are available: ACCESS, an access took place; ACCESS_CONTESTED, an access took place that previously stalled due to contention from other masters; STALL_DOWNSTREAM, count cycles where any master stalled due to a stall on the downstream bus; STALL_UPSTREAM, count cycles where any master stalled for any reason, including contention from other masters.
14750 ADD_BITFIELD_RW(PERFSEL1, 0, 7)
14751 END_TYPE()
14752
14753 static const uint32_t PERFSEL1_PERFSEL1__siob_proc1_stall_upstream = 0;
14754 static const uint32_t PERFSEL1_PERFSEL1__siob_proc1_stall_downstream = 1;
14755 static const uint32_t PERFSEL1_PERFSEL1__siob_proc1_access_contested = 2;
14756 static const uint32_t PERFSEL1_PERFSEL1__siob_proc1_access = 3;
14757 static const uint32_t PERFSEL1_PERFSEL1__siob_proc0_stall_upstream = 4;
14758 static const uint32_t PERFSEL1_PERFSEL1__siob_proc0_stall_downstream = 5;
14759 static const uint32_t PERFSEL1_PERFSEL1__siob_proc0_access_contested = 6;
14760 static const uint32_t PERFSEL1_PERFSEL1__siob_proc0_access = 7;
14761 static const uint32_t PERFSEL1_PERFSEL1__apb_stall_upstream = 8;
14762 static const uint32_t PERFSEL1_PERFSEL1__apb_stall_downstream = 9;
14763 static const uint32_t PERFSEL1_PERFSEL1__apb_access_contested = 10;
14764 static const uint32_t PERFSEL1_PERFSEL1__apb_access = 11;
14765 static const uint32_t PERFSEL1_PERFSEL1__fastperi_stall_upstream = 12;
14766 static const uint32_t PERFSEL1_PERFSEL1__fastperi_stall_downstream = 13;
14767 static const uint32_t PERFSEL1_PERFSEL1__fastperi_access_contested = 14;
14768 static const uint32_t PERFSEL1_PERFSEL1__fastperi_access = 15;
14769 static const uint32_t PERFSEL1_PERFSEL1__sram9_stall_upstream = 16;
14770 static const uint32_t PERFSEL1_PERFSEL1__sram9_stall_downstream = 17;
14771 static const uint32_t PERFSEL1_PERFSEL1__sram9_access_contested = 18;
14772 static const uint32_t PERFSEL1_PERFSEL1__sram9_access = 19;
14773 static const uint32_t PERFSEL1_PERFSEL1__sram8_stall_upstream = 20;
14774 static const uint32_t PERFSEL1_PERFSEL1__sram8_stall_downstream = 21;
14775 static const uint32_t PERFSEL1_PERFSEL1__sram8_access_contested = 22;
14776 static const uint32_t PERFSEL1_PERFSEL1__sram8_access = 23;
14777 static const uint32_t PERFSEL1_PERFSEL1__sram7_stall_upstream = 24;
14778 static const uint32_t PERFSEL1_PERFSEL1__sram7_stall_downstream = 25;
14779 static const uint32_t PERFSEL1_PERFSEL1__sram7_access_contested = 26;
14780 static const uint32_t PERFSEL1_PERFSEL1__sram7_access = 27;
14781 static const uint32_t PERFSEL1_PERFSEL1__sram6_stall_upstream = 28;
14782 static const uint32_t PERFSEL1_PERFSEL1__sram6_stall_downstream = 29;
14783 static const uint32_t PERFSEL1_PERFSEL1__sram6_access_contested = 30;
14784 static const uint32_t PERFSEL1_PERFSEL1__sram6_access = 31;
14785 static const uint32_t PERFSEL1_PERFSEL1__sram5_stall_upstream = 32;
14786 static const uint32_t PERFSEL1_PERFSEL1__sram5_stall_downstream = 33;
14787 static const uint32_t PERFSEL1_PERFSEL1__sram5_access_contested = 34;
14788 static const uint32_t PERFSEL1_PERFSEL1__sram5_access = 35;
14789 static const uint32_t PERFSEL1_PERFSEL1__sram4_stall_upstream = 36;
14790 static const uint32_t PERFSEL1_PERFSEL1__sram4_stall_downstream = 37;
14791 static const uint32_t PERFSEL1_PERFSEL1__sram4_access_contested = 38;
14792 static const uint32_t PERFSEL1_PERFSEL1__sram4_access = 39;
14793 static const uint32_t PERFSEL1_PERFSEL1__sram3_stall_upstream = 40;
14794 static const uint32_t PERFSEL1_PERFSEL1__sram3_stall_downstream = 41;
14795 static const uint32_t PERFSEL1_PERFSEL1__sram3_access_contested = 42;
14796 static const uint32_t PERFSEL1_PERFSEL1__sram3_access = 43;
14797 static const uint32_t PERFSEL1_PERFSEL1__sram2_stall_upstream = 44;
14798 static const uint32_t PERFSEL1_PERFSEL1__sram2_stall_downstream = 45;
14799 static const uint32_t PERFSEL1_PERFSEL1__sram2_access_contested = 46;
14800 static const uint32_t PERFSEL1_PERFSEL1__sram2_access = 47;
14801 static const uint32_t PERFSEL1_PERFSEL1__sram1_stall_upstream = 48;
14802 static const uint32_t PERFSEL1_PERFSEL1__sram1_stall_downstream = 49;
14803 static const uint32_t PERFSEL1_PERFSEL1__sram1_access_contested = 50;
14804 static const uint32_t PERFSEL1_PERFSEL1__sram1_access = 51;
14805 static const uint32_t PERFSEL1_PERFSEL1__sram0_stall_upstream = 52;
14806 static const uint32_t PERFSEL1_PERFSEL1__sram0_stall_downstream = 53;
14807 static const uint32_t PERFSEL1_PERFSEL1__sram0_access_contested = 54;
14808 static const uint32_t PERFSEL1_PERFSEL1__sram0_access = 55;
14809 static const uint32_t PERFSEL1_PERFSEL1__xip_main1_stall_upstream = 56;
14810 static const uint32_t PERFSEL1_PERFSEL1__xip_main1_stall_downstream = 57;
14811 static const uint32_t PERFSEL1_PERFSEL1__xip_main1_access_contested = 58;
14812 static const uint32_t PERFSEL1_PERFSEL1__xip_main1_access = 59;
14813 static const uint32_t PERFSEL1_PERFSEL1__xip_main0_stall_upstream = 60;
14814 static const uint32_t PERFSEL1_PERFSEL1__xip_main0_stall_downstream = 61;
14815 static const uint32_t PERFSEL1_PERFSEL1__xip_main0_access_contested = 62;
14816 static const uint32_t PERFSEL1_PERFSEL1__xip_main0_access = 63;
14817 static const uint32_t PERFSEL1_PERFSEL1__rom_stall_upstream = 64;
14818 static const uint32_t PERFSEL1_PERFSEL1__rom_stall_downstream = 65;
14819 static const uint32_t PERFSEL1_PERFSEL1__rom_access_contested = 66;
14820 static const uint32_t PERFSEL1_PERFSEL1__rom_access = 67;
14821
14822 // Bus fabric performance counter 2
14823 // Reset value: 0x00000000
14824 BEGIN_TYPE(PERFCTR2_t, uint32_t)
14825 // Busfabric saturating performance counter 2 Count some event signal from the busfabric arbiters, if PERFCTR_EN is set. Write any value to clear. Select an event to count using PERFSEL2
14826 ADD_BITFIELD_RW(PERFCTR2, 0, 24)
14827 END_TYPE()
14828
14829 // Bus fabric performance event select for PERFCTR2
14830 // Reset value: 0x0000001f
14831 BEGIN_TYPE(PERFSEL2_t, uint32_t)
14832 // Select an event for PERFCTR2. For each downstream port of the main crossbar, four events are available: ACCESS, an access took place; ACCESS_CONTESTED, an access took place that previously stalled due to contention from other masters; STALL_DOWNSTREAM, count cycles where any master stalled due to a stall on the downstream bus; STALL_UPSTREAM, count cycles where any master stalled for any reason, including contention from other masters.
14833 ADD_BITFIELD_RW(PERFSEL2, 0, 7)
14834 END_TYPE()
14835
14836 static const uint32_t PERFSEL2_PERFSEL2__siob_proc1_stall_upstream = 0;
14837 static const uint32_t PERFSEL2_PERFSEL2__siob_proc1_stall_downstream = 1;
14838 static const uint32_t PERFSEL2_PERFSEL2__siob_proc1_access_contested = 2;
14839 static const uint32_t PERFSEL2_PERFSEL2__siob_proc1_access = 3;
14840 static const uint32_t PERFSEL2_PERFSEL2__siob_proc0_stall_upstream = 4;
14841 static const uint32_t PERFSEL2_PERFSEL2__siob_proc0_stall_downstream = 5;
14842 static const uint32_t PERFSEL2_PERFSEL2__siob_proc0_access_contested = 6;
14843 static const uint32_t PERFSEL2_PERFSEL2__siob_proc0_access = 7;
14844 static const uint32_t PERFSEL2_PERFSEL2__apb_stall_upstream = 8;
14845 static const uint32_t PERFSEL2_PERFSEL2__apb_stall_downstream = 9;
14846 static const uint32_t PERFSEL2_PERFSEL2__apb_access_contested = 10;
14847 static const uint32_t PERFSEL2_PERFSEL2__apb_access = 11;
14848 static const uint32_t PERFSEL2_PERFSEL2__fastperi_stall_upstream = 12;
14849 static const uint32_t PERFSEL2_PERFSEL2__fastperi_stall_downstream = 13;
14850 static const uint32_t PERFSEL2_PERFSEL2__fastperi_access_contested = 14;
14851 static const uint32_t PERFSEL2_PERFSEL2__fastperi_access = 15;
14852 static const uint32_t PERFSEL2_PERFSEL2__sram9_stall_upstream = 16;
14853 static const uint32_t PERFSEL2_PERFSEL2__sram9_stall_downstream = 17;
14854 static const uint32_t PERFSEL2_PERFSEL2__sram9_access_contested = 18;
14855 static const uint32_t PERFSEL2_PERFSEL2__sram9_access = 19;
14856 static const uint32_t PERFSEL2_PERFSEL2__sram8_stall_upstream = 20;
14857 static const uint32_t PERFSEL2_PERFSEL2__sram8_stall_downstream = 21;
14858 static const uint32_t PERFSEL2_PERFSEL2__sram8_access_contested = 22;
14859 static const uint32_t PERFSEL2_PERFSEL2__sram8_access = 23;
14860 static const uint32_t PERFSEL2_PERFSEL2__sram7_stall_upstream = 24;
14861 static const uint32_t PERFSEL2_PERFSEL2__sram7_stall_downstream = 25;
14862 static const uint32_t PERFSEL2_PERFSEL2__sram7_access_contested = 26;
14863 static const uint32_t PERFSEL2_PERFSEL2__sram7_access = 27;
14864 static const uint32_t PERFSEL2_PERFSEL2__sram6_stall_upstream = 28;
14865 static const uint32_t PERFSEL2_PERFSEL2__sram6_stall_downstream = 29;
14866 static const uint32_t PERFSEL2_PERFSEL2__sram6_access_contested = 30;
14867 static const uint32_t PERFSEL2_PERFSEL2__sram6_access = 31;
14868 static const uint32_t PERFSEL2_PERFSEL2__sram5_stall_upstream = 32;
14869 static const uint32_t PERFSEL2_PERFSEL2__sram5_stall_downstream = 33;
14870 static const uint32_t PERFSEL2_PERFSEL2__sram5_access_contested = 34;
14871 static const uint32_t PERFSEL2_PERFSEL2__sram5_access = 35;
14872 static const uint32_t PERFSEL2_PERFSEL2__sram4_stall_upstream = 36;
14873 static const uint32_t PERFSEL2_PERFSEL2__sram4_stall_downstream = 37;
14874 static const uint32_t PERFSEL2_PERFSEL2__sram4_access_contested = 38;
14875 static const uint32_t PERFSEL2_PERFSEL2__sram4_access = 39;
14876 static const uint32_t PERFSEL2_PERFSEL2__sram3_stall_upstream = 40;
14877 static const uint32_t PERFSEL2_PERFSEL2__sram3_stall_downstream = 41;
14878 static const uint32_t PERFSEL2_PERFSEL2__sram3_access_contested = 42;
14879 static const uint32_t PERFSEL2_PERFSEL2__sram3_access = 43;
14880 static const uint32_t PERFSEL2_PERFSEL2__sram2_stall_upstream = 44;
14881 static const uint32_t PERFSEL2_PERFSEL2__sram2_stall_downstream = 45;
14882 static const uint32_t PERFSEL2_PERFSEL2__sram2_access_contested = 46;
14883 static const uint32_t PERFSEL2_PERFSEL2__sram2_access = 47;
14884 static const uint32_t PERFSEL2_PERFSEL2__sram1_stall_upstream = 48;
14885 static const uint32_t PERFSEL2_PERFSEL2__sram1_stall_downstream = 49;
14886 static const uint32_t PERFSEL2_PERFSEL2__sram1_access_contested = 50;
14887 static const uint32_t PERFSEL2_PERFSEL2__sram1_access = 51;
14888 static const uint32_t PERFSEL2_PERFSEL2__sram0_stall_upstream = 52;
14889 static const uint32_t PERFSEL2_PERFSEL2__sram0_stall_downstream = 53;
14890 static const uint32_t PERFSEL2_PERFSEL2__sram0_access_contested = 54;
14891 static const uint32_t PERFSEL2_PERFSEL2__sram0_access = 55;
14892 static const uint32_t PERFSEL2_PERFSEL2__xip_main1_stall_upstream = 56;
14893 static const uint32_t PERFSEL2_PERFSEL2__xip_main1_stall_downstream = 57;
14894 static const uint32_t PERFSEL2_PERFSEL2__xip_main1_access_contested = 58;
14895 static const uint32_t PERFSEL2_PERFSEL2__xip_main1_access = 59;
14896 static const uint32_t PERFSEL2_PERFSEL2__xip_main0_stall_upstream = 60;
14897 static const uint32_t PERFSEL2_PERFSEL2__xip_main0_stall_downstream = 61;
14898 static const uint32_t PERFSEL2_PERFSEL2__xip_main0_access_contested = 62;
14899 static const uint32_t PERFSEL2_PERFSEL2__xip_main0_access = 63;
14900 static const uint32_t PERFSEL2_PERFSEL2__rom_stall_upstream = 64;
14901 static const uint32_t PERFSEL2_PERFSEL2__rom_stall_downstream = 65;
14902 static const uint32_t PERFSEL2_PERFSEL2__rom_access_contested = 66;
14903 static const uint32_t PERFSEL2_PERFSEL2__rom_access = 67;
14904
14905 // Bus fabric performance counter 3
14906 // Reset value: 0x00000000
14907 BEGIN_TYPE(PERFCTR3_t, uint32_t)
14908 // Busfabric saturating performance counter 3 Count some event signal from the busfabric arbiters, if PERFCTR_EN is set. Write any value to clear. Select an event to count using PERFSEL3
14909 ADD_BITFIELD_RW(PERFCTR3, 0, 24)
14910 END_TYPE()
14911
14912 // Bus fabric performance event select for PERFCTR3
14913 // Reset value: 0x0000001f
14914 BEGIN_TYPE(PERFSEL3_t, uint32_t)
14915 // Select an event for PERFCTR3. For each downstream port of the main crossbar, four events are available: ACCESS, an access took place; ACCESS_CONTESTED, an access took place that previously stalled due to contention from other masters; STALL_DOWNSTREAM, count cycles where any master stalled due to a stall on the downstream bus; STALL_UPSTREAM, count cycles where any master stalled for any reason, including contention from other masters.
14916 ADD_BITFIELD_RW(PERFSEL3, 0, 7)
14917 END_TYPE()
14918
14919 static const uint32_t PERFSEL3_PERFSEL3__siob_proc1_stall_upstream = 0;
14920 static const uint32_t PERFSEL3_PERFSEL3__siob_proc1_stall_downstream = 1;
14921 static const uint32_t PERFSEL3_PERFSEL3__siob_proc1_access_contested = 2;
14922 static const uint32_t PERFSEL3_PERFSEL3__siob_proc1_access = 3;
14923 static const uint32_t PERFSEL3_PERFSEL3__siob_proc0_stall_upstream = 4;
14924 static const uint32_t PERFSEL3_PERFSEL3__siob_proc0_stall_downstream = 5;
14925 static const uint32_t PERFSEL3_PERFSEL3__siob_proc0_access_contested = 6;
14926 static const uint32_t PERFSEL3_PERFSEL3__siob_proc0_access = 7;
14927 static const uint32_t PERFSEL3_PERFSEL3__apb_stall_upstream = 8;
14928 static const uint32_t PERFSEL3_PERFSEL3__apb_stall_downstream = 9;
14929 static const uint32_t PERFSEL3_PERFSEL3__apb_access_contested = 10;
14930 static const uint32_t PERFSEL3_PERFSEL3__apb_access = 11;
14931 static const uint32_t PERFSEL3_PERFSEL3__fastperi_stall_upstream = 12;
14932 static const uint32_t PERFSEL3_PERFSEL3__fastperi_stall_downstream = 13;
14933 static const uint32_t PERFSEL3_PERFSEL3__fastperi_access_contested = 14;
14934 static const uint32_t PERFSEL3_PERFSEL3__fastperi_access = 15;
14935 static const uint32_t PERFSEL3_PERFSEL3__sram9_stall_upstream = 16;
14936 static const uint32_t PERFSEL3_PERFSEL3__sram9_stall_downstream = 17;
14937 static const uint32_t PERFSEL3_PERFSEL3__sram9_access_contested = 18;
14938 static const uint32_t PERFSEL3_PERFSEL3__sram9_access = 19;
14939 static const uint32_t PERFSEL3_PERFSEL3__sram8_stall_upstream = 20;
14940 static const uint32_t PERFSEL3_PERFSEL3__sram8_stall_downstream = 21;
14941 static const uint32_t PERFSEL3_PERFSEL3__sram8_access_contested = 22;
14942 static const uint32_t PERFSEL3_PERFSEL3__sram8_access = 23;
14943 static const uint32_t PERFSEL3_PERFSEL3__sram7_stall_upstream = 24;
14944 static const uint32_t PERFSEL3_PERFSEL3__sram7_stall_downstream = 25;
14945 static const uint32_t PERFSEL3_PERFSEL3__sram7_access_contested = 26;
14946 static const uint32_t PERFSEL3_PERFSEL3__sram7_access = 27;
14947 static const uint32_t PERFSEL3_PERFSEL3__sram6_stall_upstream = 28;
14948 static const uint32_t PERFSEL3_PERFSEL3__sram6_stall_downstream = 29;
14949 static const uint32_t PERFSEL3_PERFSEL3__sram6_access_contested = 30;
14950 static const uint32_t PERFSEL3_PERFSEL3__sram6_access = 31;
14951 static const uint32_t PERFSEL3_PERFSEL3__sram5_stall_upstream = 32;
14952 static const uint32_t PERFSEL3_PERFSEL3__sram5_stall_downstream = 33;
14953 static const uint32_t PERFSEL3_PERFSEL3__sram5_access_contested = 34;
14954 static const uint32_t PERFSEL3_PERFSEL3__sram5_access = 35;
14955 static const uint32_t PERFSEL3_PERFSEL3__sram4_stall_upstream = 36;
14956 static const uint32_t PERFSEL3_PERFSEL3__sram4_stall_downstream = 37;
14957 static const uint32_t PERFSEL3_PERFSEL3__sram4_access_contested = 38;
14958 static const uint32_t PERFSEL3_PERFSEL3__sram4_access = 39;
14959 static const uint32_t PERFSEL3_PERFSEL3__sram3_stall_upstream = 40;
14960 static const uint32_t PERFSEL3_PERFSEL3__sram3_stall_downstream = 41;
14961 static const uint32_t PERFSEL3_PERFSEL3__sram3_access_contested = 42;
14962 static const uint32_t PERFSEL3_PERFSEL3__sram3_access = 43;
14963 static const uint32_t PERFSEL3_PERFSEL3__sram2_stall_upstream = 44;
14964 static const uint32_t PERFSEL3_PERFSEL3__sram2_stall_downstream = 45;
14965 static const uint32_t PERFSEL3_PERFSEL3__sram2_access_contested = 46;
14966 static const uint32_t PERFSEL3_PERFSEL3__sram2_access = 47;
14967 static const uint32_t PERFSEL3_PERFSEL3__sram1_stall_upstream = 48;
14968 static const uint32_t PERFSEL3_PERFSEL3__sram1_stall_downstream = 49;
14969 static const uint32_t PERFSEL3_PERFSEL3__sram1_access_contested = 50;
14970 static const uint32_t PERFSEL3_PERFSEL3__sram1_access = 51;
14971 static const uint32_t PERFSEL3_PERFSEL3__sram0_stall_upstream = 52;
14972 static const uint32_t PERFSEL3_PERFSEL3__sram0_stall_downstream = 53;
14973 static const uint32_t PERFSEL3_PERFSEL3__sram0_access_contested = 54;
14974 static const uint32_t PERFSEL3_PERFSEL3__sram0_access = 55;
14975 static const uint32_t PERFSEL3_PERFSEL3__xip_main1_stall_upstream = 56;
14976 static const uint32_t PERFSEL3_PERFSEL3__xip_main1_stall_downstream = 57;
14977 static const uint32_t PERFSEL3_PERFSEL3__xip_main1_access_contested = 58;
14978 static const uint32_t PERFSEL3_PERFSEL3__xip_main1_access = 59;
14979 static const uint32_t PERFSEL3_PERFSEL3__xip_main0_stall_upstream = 60;
14980 static const uint32_t PERFSEL3_PERFSEL3__xip_main0_stall_downstream = 61;
14981 static const uint32_t PERFSEL3_PERFSEL3__xip_main0_access_contested = 62;
14982 static const uint32_t PERFSEL3_PERFSEL3__xip_main0_access = 63;
14983 static const uint32_t PERFSEL3_PERFSEL3__rom_stall_upstream = 64;
14984 static const uint32_t PERFSEL3_PERFSEL3__rom_stall_downstream = 65;
14985 static const uint32_t PERFSEL3_PERFSEL3__rom_access_contested = 66;
14986 static const uint32_t PERFSEL3_PERFSEL3__rom_access = 67;
14987
14988 struct BUSCTRL_t {
14989 BUS_PRIORITY_t BUS_PRIORITY;
14990 BUS_PRIORITY_ACK_t BUS_PRIORITY_ACK;
14991 PERFCTR_EN_t PERFCTR_EN;
14992 PERFCTR0_t PERFCTR0;
14993 PERFSEL0_t PERFSEL0;
14994 PERFCTR1_t PERFCTR1;
14995 PERFSEL1_t PERFSEL1;
14996 PERFCTR2_t PERFCTR2;
14997 PERFSEL2_t PERFSEL2;
14998 PERFCTR3_t PERFCTR3;
14999 PERFSEL3_t PERFSEL3;
15000 };
15001
15002 static BUSCTRL_t & BUSCTRL = (*(BUSCTRL_t *)0x40068000);
15003 static BUSCTRL_t & BUSCTRL_XOR = (*(BUSCTRL_t *)0x40069000);
15004 static BUSCTRL_t & BUSCTRL_SET = (*(BUSCTRL_t *)0x4006a000);
15005 static BUSCTRL_t & BUSCTRL_CLR = (*(BUSCTRL_t *)0x4006b000);
15006
15007} // _BUSCTRL_
15008
15009// Single-cycle IO block Provides core-local and inter-core hardware for the two processors, with single-cycle access.
15010namespace _SIO_ {
15011
15012 // Processor core identifier
15013 BEGIN_TYPE(CPUID_t, uint32_t)
15014 // Value is 0 when read from processor core 0, and 1 when read from processor core 1.
15015 ADD_BITFIELD_RO(CPUID, 0, 32)
15016 END_TYPE()
15017
15018 // Input value for GPIO0...31. In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) appear as zero.
15019 // Reset value: 0x00000000
15020 BEGIN_TYPE(GPIO_IN_t, uint32_t)
15021 ADD_BITFIELD_RO(GPIO_IN, 0, 32)
15022 END_TYPE()
15023
15024 // Input value on GPIO32...47, QSPI IOs and USB pins In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) appear as zero.
15025 // Reset value: 0x00000000
15026 BEGIN_TYPE(GPIO_HI_IN_t, uint32_t)
15027 // Input value on QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins
15028 ADD_BITFIELD_RO(QSPI_SD, 28, 4)
15029 // Input value on QSPI CSn pin
15030 ADD_BITFIELD_RO(QSPI_CSN, 27, 1)
15031 // Input value on QSPI SCK pin
15032 ADD_BITFIELD_RO(QSPI_SCK, 26, 1)
15033 // Input value on USB D- pin
15034 ADD_BITFIELD_RO(USB_DM, 25, 1)
15035 // Input value on USB D+ pin
15036 ADD_BITFIELD_RO(USB_DP, 24, 1)
15037 // Input value on GPIO32...47
15038 ADD_BITFIELD_RO(GPIO, 0, 16)
15039 END_TYPE()
15040
15041 // GPIO0...31 output value
15042 // Reset value: 0x00000000
15043 BEGIN_TYPE(GPIO_OUT_t, uint32_t)
15044 // Set output level (1/0 -> high/low) for GPIO0...31. Reading back gives the last value written, NOT the input value from the pins. If core 0 and core 1 both write to GPIO_OUT simultaneously (or to a SET/CLR/XOR alias), the result is as though the write from core 0 took place first, and the write from core 1 was then applied to that intermediate result. In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) ignore writes, and their output status reads back as zero. This is also true for SET/CLR/XOR aliases of this register.
15045 ADD_BITFIELD_RW(GPIO_OUT, 0, 32)
15046 END_TYPE()
15047
15048 // Output value for GPIO32...47, QSPI IOs and USB pins. Write to set output level (1/0 -> high/low). Reading back gives the last value written, NOT the input value from the pins. If core 0 and core 1 both write to GPIO_HI_OUT simultaneously (or to a SET/CLR/XOR alias), the result is as though the write from core 0 took place first, and the write from core 1 was then applied to that intermediate result. In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) ignore writes, and their output status reads back as zero. This is also true for SET/CLR/XOR aliases of this register.
15049 // Reset value: 0x00000000
15050 BEGIN_TYPE(GPIO_HI_OUT_t, uint32_t)
15051 // Output value for QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins
15052 ADD_BITFIELD_RW(QSPI_SD, 28, 4)
15053 // Output value for QSPI CSn pin
15054 ADD_BITFIELD_RW(QSPI_CSN, 27, 1)
15055 // Output value for QSPI SCK pin
15056 ADD_BITFIELD_RW(QSPI_SCK, 26, 1)
15057 // Output value for USB D- pin
15058 ADD_BITFIELD_RW(USB_DM, 25, 1)
15059 // Output value for USB D+ pin
15060 ADD_BITFIELD_RW(USB_DP, 24, 1)
15061 // Output value for GPIO32...47
15062 ADD_BITFIELD_RW(GPIO, 0, 16)
15063 END_TYPE()
15064
15065 // GPIO0...31 output value set
15066 // Reset value: 0x00000000
15067 BEGIN_TYPE(GPIO_OUT_SET_t, uint32_t)
15068 // Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata`
15069 ADD_BITFIELD_WO(GPIO_OUT_SET, 0, 32)
15070 END_TYPE()
15071
15072 // Output value set for GPIO32..47, QSPI IOs and USB pins. Perform an atomic bit-set on GPIO_HI_OUT, i.e. `GPIO_HI_OUT |= wdata`
15073 // Reset value: 0x00000000
15074 BEGIN_TYPE(GPIO_HI_OUT_SET_t, uint32_t)
15075 ADD_BITFIELD_WO(QSPI_SD, 28, 4)
15076 ADD_BITFIELD_WO(QSPI_CSN, 27, 1)
15077 ADD_BITFIELD_WO(QSPI_SCK, 26, 1)
15078 ADD_BITFIELD_WO(USB_DM, 25, 1)
15079 ADD_BITFIELD_WO(USB_DP, 24, 1)
15080 ADD_BITFIELD_WO(GPIO, 0, 16)
15081 END_TYPE()
15082
15083 // GPIO0...31 output value clear
15084 // Reset value: 0x00000000
15085 BEGIN_TYPE(GPIO_OUT_CLR_t, uint32_t)
15086 // Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= ~wdata`
15087 ADD_BITFIELD_WO(GPIO_OUT_CLR, 0, 32)
15088 END_TYPE()
15089
15090 // Output value clear for GPIO32..47, QSPI IOs and USB pins. Perform an atomic bit-clear on GPIO_HI_OUT, i.e. `GPIO_HI_OUT &= ~wdata`
15091 // Reset value: 0x00000000
15092 BEGIN_TYPE(GPIO_HI_OUT_CLR_t, uint32_t)
15093 ADD_BITFIELD_WO(QSPI_SD, 28, 4)
15094 ADD_BITFIELD_WO(QSPI_CSN, 27, 1)
15095 ADD_BITFIELD_WO(QSPI_SCK, 26, 1)
15096 ADD_BITFIELD_WO(USB_DM, 25, 1)
15097 ADD_BITFIELD_WO(USB_DP, 24, 1)
15098 ADD_BITFIELD_WO(GPIO, 0, 16)
15099 END_TYPE()
15100
15101 // GPIO0...31 output value XOR
15102 // Reset value: 0x00000000
15103 BEGIN_TYPE(GPIO_OUT_XOR_t, uint32_t)
15104 // Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= wdata`
15105 ADD_BITFIELD_WO(GPIO_OUT_XOR, 0, 32)
15106 END_TYPE()
15107
15108 // Output value XOR for GPIO32..47, QSPI IOs and USB pins. Perform an atomic bitwise XOR on GPIO_HI_OUT, i.e. `GPIO_HI_OUT ^= wdata`
15109 // Reset value: 0x00000000
15110 BEGIN_TYPE(GPIO_HI_OUT_XOR_t, uint32_t)
15111 ADD_BITFIELD_WO(QSPI_SD, 28, 4)
15112 ADD_BITFIELD_WO(QSPI_CSN, 27, 1)
15113 ADD_BITFIELD_WO(QSPI_SCK, 26, 1)
15114 ADD_BITFIELD_WO(USB_DM, 25, 1)
15115 ADD_BITFIELD_WO(USB_DP, 24, 1)
15116 ADD_BITFIELD_WO(GPIO, 0, 16)
15117 END_TYPE()
15118
15119 // GPIO0...31 output enable
15120 // Reset value: 0x00000000
15121 BEGIN_TYPE(GPIO_OE_t, uint32_t)
15122 // Set output enable (1/0 -> output/input) for GPIO0...31. Reading back gives the last value written. If core 0 and core 1 both write to GPIO_OE simultaneously (or to a SET/CLR/XOR alias), the result is as though the write from core 0 took place first, and the write from core 1 was then applied to that intermediate result. In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) ignore writes, and their output status reads back as zero. This is also true for SET/CLR/XOR aliases of this register.
15123 ADD_BITFIELD_RW(GPIO_OE, 0, 32)
15124 END_TYPE()
15125
15126 // Output enable value for GPIO32...47, QSPI IOs and USB pins. Write output enable (1/0 -> output/input). Reading back gives the last value written. If core 0 and core 1 both write to GPIO_HI_OE simultaneously (or to a SET/CLR/XOR alias), the result is as though the write from core 0 took place first, and the write from core 1 was then applied to that intermediate result. In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) ignore writes, and their output status reads back as zero. This is also true for SET/CLR/XOR aliases of this register.
15127 // Reset value: 0x00000000
15128 BEGIN_TYPE(GPIO_HI_OE_t, uint32_t)
15129 // Output enable value for QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins
15130 ADD_BITFIELD_RW(QSPI_SD, 28, 4)
15131 // Output enable value for QSPI CSn pin
15132 ADD_BITFIELD_RW(QSPI_CSN, 27, 1)
15133 // Output enable value for QSPI SCK pin
15134 ADD_BITFIELD_RW(QSPI_SCK, 26, 1)
15135 // Output enable value for USB D- pin
15136 ADD_BITFIELD_RW(USB_DM, 25, 1)
15137 // Output enable value for USB D+ pin
15138 ADD_BITFIELD_RW(USB_DP, 24, 1)
15139 // Output enable value for GPIO32...47
15140 ADD_BITFIELD_RW(GPIO, 0, 16)
15141 END_TYPE()
15142
15143 // GPIO0...31 output enable set
15144 // Reset value: 0x00000000
15145 BEGIN_TYPE(GPIO_OE_SET_t, uint32_t)
15146 // Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata`
15147 ADD_BITFIELD_WO(GPIO_OE_SET, 0, 32)
15148 END_TYPE()
15149
15150 // Output enable set for GPIO32...47, QSPI IOs and USB pins. Perform an atomic bit-set on GPIO_HI_OE, i.e. `GPIO_HI_OE |= wdata`
15151 // Reset value: 0x00000000
15152 BEGIN_TYPE(GPIO_HI_OE_SET_t, uint32_t)
15153 ADD_BITFIELD_WO(QSPI_SD, 28, 4)
15154 ADD_BITFIELD_WO(QSPI_CSN, 27, 1)
15155 ADD_BITFIELD_WO(QSPI_SCK, 26, 1)
15156 ADD_BITFIELD_WO(USB_DM, 25, 1)
15157 ADD_BITFIELD_WO(USB_DP, 24, 1)
15158 ADD_BITFIELD_WO(GPIO, 0, 16)
15159 END_TYPE()
15160
15161 // GPIO0...31 output enable clear
15162 // Reset value: 0x00000000
15163 BEGIN_TYPE(GPIO_OE_CLR_t, uint32_t)
15164 // Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= ~wdata`
15165 ADD_BITFIELD_WO(GPIO_OE_CLR, 0, 32)
15166 END_TYPE()
15167
15168 // Output enable clear for GPIO32...47, QSPI IOs and USB pins. Perform an atomic bit-clear on GPIO_HI_OE, i.e. `GPIO_HI_OE &= ~wdata`
15169 // Reset value: 0x00000000
15170 BEGIN_TYPE(GPIO_HI_OE_CLR_t, uint32_t)
15171 ADD_BITFIELD_WO(QSPI_SD, 28, 4)
15172 ADD_BITFIELD_WO(QSPI_CSN, 27, 1)
15173 ADD_BITFIELD_WO(QSPI_SCK, 26, 1)
15174 ADD_BITFIELD_WO(USB_DM, 25, 1)
15175 ADD_BITFIELD_WO(USB_DP, 24, 1)
15176 ADD_BITFIELD_WO(GPIO, 0, 16)
15177 END_TYPE()
15178
15179 // GPIO0...31 output enable XOR
15180 // Reset value: 0x00000000
15181 BEGIN_TYPE(GPIO_OE_XOR_t, uint32_t)
15182 // Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= wdata`
15183 ADD_BITFIELD_WO(GPIO_OE_XOR, 0, 32)
15184 END_TYPE()
15185
15186 // Output enable XOR for GPIO32...47, QSPI IOs and USB pins. Perform an atomic bitwise XOR on GPIO_HI_OE, i.e. `GPIO_HI_OE ^= wdata`
15187 // Reset value: 0x00000000
15188 BEGIN_TYPE(GPIO_HI_OE_XOR_t, uint32_t)
15189 ADD_BITFIELD_WO(QSPI_SD, 28, 4)
15190 ADD_BITFIELD_WO(QSPI_CSN, 27, 1)
15191 ADD_BITFIELD_WO(QSPI_SCK, 26, 1)
15192 ADD_BITFIELD_WO(USB_DM, 25, 1)
15193 ADD_BITFIELD_WO(USB_DP, 24, 1)
15194 ADD_BITFIELD_WO(GPIO, 0, 16)
15195 END_TYPE()
15196
15197 // Status register for inter-core FIFOs (mailboxes). There is one FIFO in the core 0 -> core 1 direction, and one core 1 -> core 0. Both are 32 bits wide and 8 words deep. Core 0 can see the read side of the 1->0 FIFO (RX), and the write side of 0->1 FIFO (TX). Core 1 can see the read side of the 0->1 FIFO (RX), and the write side of 1->0 FIFO (TX). The SIO IRQ for each core is the logical OR of the VLD, WOF and ROE fields of its FIFO_ST register.
15198 // Reset value: 0x00000002
15199 BEGIN_TYPE(FIFO_ST_t, uint32_t)
15200 // Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO.
15201 ADD_BITFIELD_RW(ROE, 3, 1)
15202 // Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO.
15203 ADD_BITFIELD_RW(WOF, 2, 1)
15204 // Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data)
15205 ADD_BITFIELD_RO(RDY, 1, 1)
15206 // Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid)
15207 ADD_BITFIELD_RO(VLD, 0, 1)
15208 END_TYPE()
15209
15210 // Write access to this core's TX FIFO
15211 // Reset value: 0x00000000
15212 BEGIN_TYPE(FIFO_WR_t, uint32_t)
15213 ADD_BITFIELD_WO(FIFO_WR, 0, 32)
15214 END_TYPE()
15215
15216 // Read access to this core's RX FIFO
15217 BEGIN_TYPE(FIFO_RD_t, uint32_t)
15218 ADD_BITFIELD_RO(FIFO_RD, 0, 32)
15219 END_TYPE()
15220
15221 // Spinlock state A bitmap containing the state of all 32 spinlocks (1=locked). Mainly intended for debugging.
15222 // Reset value: 0x00000000
15223 BEGIN_TYPE(SPINLOCK_ST_t, uint32_t)
15224 ADD_BITFIELD_RO(SPINLOCK_ST, 0, 32)
15225 END_TYPE()
15226
15227 // Read/write access to accumulator 0
15228 // Reset value: 0x00000000
15229 BEGIN_TYPE(INTERP0_ACCUM0_t, uint32_t)
15230 ADD_BITFIELD_RW(INTERP0_ACCUM0, 0, 32)
15231 END_TYPE()
15232
15233 // Read/write access to accumulator 1
15234 // Reset value: 0x00000000
15235 BEGIN_TYPE(INTERP0_ACCUM1_t, uint32_t)
15236 ADD_BITFIELD_RW(INTERP0_ACCUM1, 0, 32)
15237 END_TYPE()
15238
15239 // Read/write access to BASE0 register.
15240 // Reset value: 0x00000000
15241 BEGIN_TYPE(INTERP0_BASE0_t, uint32_t)
15242 ADD_BITFIELD_RW(INTERP0_BASE0, 0, 32)
15243 END_TYPE()
15244
15245 // Read/write access to BASE1 register.
15246 // Reset value: 0x00000000
15247 BEGIN_TYPE(INTERP0_BASE1_t, uint32_t)
15248 ADD_BITFIELD_RW(INTERP0_BASE1, 0, 32)
15249 END_TYPE()
15250
15251 // Read/write access to BASE2 register.
15252 // Reset value: 0x00000000
15253 BEGIN_TYPE(INTERP0_BASE2_t, uint32_t)
15254 ADD_BITFIELD_RW(INTERP0_BASE2, 0, 32)
15255 END_TYPE()
15256
15257 // Read LANE0 result, and simultaneously write lane results to both accumulators (POP).
15258 // Reset value: 0x00000000
15259 BEGIN_TYPE(INTERP0_POP_LANE0_t, uint32_t)
15260 ADD_BITFIELD_RO(INTERP0_POP_LANE0, 0, 32)
15261 END_TYPE()
15262
15263 // Read LANE1 result, and simultaneously write lane results to both accumulators (POP).
15264 // Reset value: 0x00000000
15265 BEGIN_TYPE(INTERP0_POP_LANE1_t, uint32_t)
15266 ADD_BITFIELD_RO(INTERP0_POP_LANE1, 0, 32)
15267 END_TYPE()
15268
15269 // Read FULL result, and simultaneously write lane results to both accumulators (POP).
15270 // Reset value: 0x00000000
15271 BEGIN_TYPE(INTERP0_POP_FULL_t, uint32_t)
15272 ADD_BITFIELD_RO(INTERP0_POP_FULL, 0, 32)
15273 END_TYPE()
15274
15275 // Read LANE0 result, without altering any internal state (PEEK).
15276 // Reset value: 0x00000000
15277 BEGIN_TYPE(INTERP0_PEEK_LANE0_t, uint32_t)
15278 ADD_BITFIELD_RO(INTERP0_PEEK_LANE0, 0, 32)
15279 END_TYPE()
15280
15281 // Read LANE1 result, without altering any internal state (PEEK).
15282 // Reset value: 0x00000000
15283 BEGIN_TYPE(INTERP0_PEEK_LANE1_t, uint32_t)
15284 ADD_BITFIELD_RO(INTERP0_PEEK_LANE1, 0, 32)
15285 END_TYPE()
15286
15287 // Read FULL result, without altering any internal state (PEEK).
15288 // Reset value: 0x00000000
15289 BEGIN_TYPE(INTERP0_PEEK_FULL_t, uint32_t)
15290 ADD_BITFIELD_RO(INTERP0_PEEK_FULL, 0, 32)
15291 END_TYPE()
15292
15293 // Control register for lane 0
15294 // Reset value: 0x00000000
15295 BEGIN_TYPE(INTERP0_CTRL_LANE0_t, uint32_t)
15296 // Set if either OVERF0 or OVERF1 is set.
15297 ADD_BITFIELD_RO(OVERF, 25, 1)
15298 // Indicates if any masked-off MSBs in ACCUM1 are set.
15299 ADD_BITFIELD_RO(OVERF1, 24, 1)
15300 // Indicates if any masked-off MSBs in ACCUM0 are set.
15301 ADD_BITFIELD_RO(OVERF0, 23, 1)
15302 // Only present on INTERP0 on each core. If BLEND mode is enabled: - LANE1 result is a linear interpolation between BASE0 and BASE1, controlled by the 8 LSBs of lane 1 shift and mask value (a fractional number between 0 and 255/256ths) - LANE0 result does not have BASE0 added (yields only the 8 LSBs of lane 1 shift+mask value) - FULL result does not have lane 1 shift+mask value added (BASE2 + lane 0 shift+mask) LANE1 SIGNED flag controls whether the interpolation is signed or unsigned.
15303 ADD_BITFIELD_RW(BLEND, 21, 1)
15304 // ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM.
15305 ADD_BITFIELD_RW(FORCE_MSB, 19, 2)
15306 // If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result.
15307 ADD_BITFIELD_RW(ADD_RAW, 18, 1)
15308 // If 1, feed the opposite lane's result into this lane's accumulator on POP.
15309 ADD_BITFIELD_RW(CROSS_RESULT, 17, 1)
15310 // If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)
15311 ADD_BITFIELD_RW(CROSS_INPUT, 16, 1)
15312 // If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE0, and LANE0 PEEK/POP appear extended to 32 bits when read by processor.
15313 ADD_BITFIELD_RW(SIGNED, 15, 1)
15314 // The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out
15315 ADD_BITFIELD_RW(MASK_MSB, 10, 5)
15316 // The least-significant bit allowed to pass by the mask (inclusive)
15317 ADD_BITFIELD_RW(MASK_LSB, 5, 5)
15318 // Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised.
15319 ADD_BITFIELD_RW(SHIFT, 0, 5)
15320 END_TYPE()
15321
15322 // Control register for lane 1
15323 // Reset value: 0x00000000
15324 BEGIN_TYPE(INTERP0_CTRL_LANE1_t, uint32_t)
15325 // ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM.
15326 ADD_BITFIELD_RW(FORCE_MSB, 19, 2)
15327 // If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result.
15328 ADD_BITFIELD_RW(ADD_RAW, 18, 1)
15329 // If 1, feed the opposite lane's result into this lane's accumulator on POP.
15330 ADD_BITFIELD_RW(CROSS_RESULT, 17, 1)
15331 // If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)
15332 ADD_BITFIELD_RW(CROSS_INPUT, 16, 1)
15333 // If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor.
15334 ADD_BITFIELD_RW(SIGNED, 15, 1)
15335 // The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out
15336 ADD_BITFIELD_RW(MASK_MSB, 10, 5)
15337 // The least-significant bit allowed to pass by the mask (inclusive)
15338 ADD_BITFIELD_RW(MASK_LSB, 5, 5)
15339 // Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised.
15340 ADD_BITFIELD_RW(SHIFT, 0, 5)
15341 END_TYPE()
15342
15343 // Values written here are atomically added to ACCUM0 Reading yields lane 0's raw shift and mask value (BASE0 not added).
15344 // Reset value: 0x00000000
15345 BEGIN_TYPE(INTERP0_ACCUM0_ADD_t, uint32_t)
15346 ADD_BITFIELD_RW(INTERP0_ACCUM0_ADD, 0, 24)
15347 END_TYPE()
15348
15349 // Values written here are atomically added to ACCUM1 Reading yields lane 1's raw shift and mask value (BASE1 not added).
15350 // Reset value: 0x00000000
15351 BEGIN_TYPE(INTERP0_ACCUM1_ADD_t, uint32_t)
15352 ADD_BITFIELD_RW(INTERP0_ACCUM1_ADD, 0, 24)
15353 END_TYPE()
15354
15355 // On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously. Each half is sign-extended to 32 bits if that lane's SIGNED flag is set.
15356 // Reset value: 0x00000000
15357 BEGIN_TYPE(INTERP0_BASE_1AND0_t, uint32_t)
15358 ADD_BITFIELD_WO(INTERP0_BASE_1AND0, 0, 32)
15359 END_TYPE()
15360
15361 // Read/write access to accumulator 0
15362 // Reset value: 0x00000000
15363 BEGIN_TYPE(INTERP1_ACCUM0_t, uint32_t)
15364 ADD_BITFIELD_RW(INTERP1_ACCUM0, 0, 32)
15365 END_TYPE()
15366
15367 // Read/write access to accumulator 1
15368 // Reset value: 0x00000000
15369 BEGIN_TYPE(INTERP1_ACCUM1_t, uint32_t)
15370 ADD_BITFIELD_RW(INTERP1_ACCUM1, 0, 32)
15371 END_TYPE()
15372
15373 // Read/write access to BASE0 register.
15374 // Reset value: 0x00000000
15375 BEGIN_TYPE(INTERP1_BASE0_t, uint32_t)
15376 ADD_BITFIELD_RW(INTERP1_BASE0, 0, 32)
15377 END_TYPE()
15378
15379 // Read/write access to BASE1 register.
15380 // Reset value: 0x00000000
15381 BEGIN_TYPE(INTERP1_BASE1_t, uint32_t)
15382 ADD_BITFIELD_RW(INTERP1_BASE1, 0, 32)
15383 END_TYPE()
15384
15385 // Read/write access to BASE2 register.
15386 // Reset value: 0x00000000
15387 BEGIN_TYPE(INTERP1_BASE2_t, uint32_t)
15388 ADD_BITFIELD_RW(INTERP1_BASE2, 0, 32)
15389 END_TYPE()
15390
15391 // Read LANE0 result, and simultaneously write lane results to both accumulators (POP).
15392 // Reset value: 0x00000000
15393 BEGIN_TYPE(INTERP1_POP_LANE0_t, uint32_t)
15394 ADD_BITFIELD_RO(INTERP1_POP_LANE0, 0, 32)
15395 END_TYPE()
15396
15397 // Read LANE1 result, and simultaneously write lane results to both accumulators (POP).
15398 // Reset value: 0x00000000
15399 BEGIN_TYPE(INTERP1_POP_LANE1_t, uint32_t)
15400 ADD_BITFIELD_RO(INTERP1_POP_LANE1, 0, 32)
15401 END_TYPE()
15402
15403 // Read FULL result, and simultaneously write lane results to both accumulators (POP).
15404 // Reset value: 0x00000000
15405 BEGIN_TYPE(INTERP1_POP_FULL_t, uint32_t)
15406 ADD_BITFIELD_RO(INTERP1_POP_FULL, 0, 32)
15407 END_TYPE()
15408
15409 // Read LANE0 result, without altering any internal state (PEEK).
15410 // Reset value: 0x00000000
15411 BEGIN_TYPE(INTERP1_PEEK_LANE0_t, uint32_t)
15412 ADD_BITFIELD_RO(INTERP1_PEEK_LANE0, 0, 32)
15413 END_TYPE()
15414
15415 // Read LANE1 result, without altering any internal state (PEEK).
15416 // Reset value: 0x00000000
15417 BEGIN_TYPE(INTERP1_PEEK_LANE1_t, uint32_t)
15418 ADD_BITFIELD_RO(INTERP1_PEEK_LANE1, 0, 32)
15419 END_TYPE()
15420
15421 // Read FULL result, without altering any internal state (PEEK).
15422 // Reset value: 0x00000000
15423 BEGIN_TYPE(INTERP1_PEEK_FULL_t, uint32_t)
15424 ADD_BITFIELD_RO(INTERP1_PEEK_FULL, 0, 32)
15425 END_TYPE()
15426
15427 // Control register for lane 0
15428 // Reset value: 0x00000000
15429 BEGIN_TYPE(INTERP1_CTRL_LANE0_t, uint32_t)
15430 // Set if either OVERF0 or OVERF1 is set.
15431 ADD_BITFIELD_RO(OVERF, 25, 1)
15432 // Indicates if any masked-off MSBs in ACCUM1 are set.
15433 ADD_BITFIELD_RO(OVERF1, 24, 1)
15434 // Indicates if any masked-off MSBs in ACCUM0 are set.
15435 ADD_BITFIELD_RO(OVERF0, 23, 1)
15436 // Only present on INTERP1 on each core. If CLAMP mode is enabled: - LANE0 result is shifted and masked ACCUM0, clamped by a lower bound of BASE0 and an upper bound of BASE1. - Signedness of these comparisons is determined by LANE0_CTRL_SIGNED
15437 ADD_BITFIELD_RW(CLAMP, 22, 1)
15438 // ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM.
15439 ADD_BITFIELD_RW(FORCE_MSB, 19, 2)
15440 // If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result.
15441 ADD_BITFIELD_RW(ADD_RAW, 18, 1)
15442 // If 1, feed the opposite lane's result into this lane's accumulator on POP.
15443 ADD_BITFIELD_RW(CROSS_RESULT, 17, 1)
15444 // If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)
15445 ADD_BITFIELD_RW(CROSS_INPUT, 16, 1)
15446 // If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE0, and LANE0 PEEK/POP appear extended to 32 bits when read by processor.
15447 ADD_BITFIELD_RW(SIGNED, 15, 1)
15448 // The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out
15449 ADD_BITFIELD_RW(MASK_MSB, 10, 5)
15450 // The least-significant bit allowed to pass by the mask (inclusive)
15451 ADD_BITFIELD_RW(MASK_LSB, 5, 5)
15452 // Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised.
15453 ADD_BITFIELD_RW(SHIFT, 0, 5)
15454 END_TYPE()
15455
15456 // Control register for lane 1
15457 // Reset value: 0x00000000
15458 BEGIN_TYPE(INTERP1_CTRL_LANE1_t, uint32_t)
15459 // ORed into bits 29:28 of the lane result presented to the processor on the bus. No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence of pointers into flash or SRAM.
15460 ADD_BITFIELD_RW(FORCE_MSB, 19, 2)
15461 // If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result.
15462 ADD_BITFIELD_RW(ADD_RAW, 18, 1)
15463 // If 1, feed the opposite lane's result into this lane's accumulator on POP.
15464 ADD_BITFIELD_RW(CROSS_RESULT, 17, 1)
15465 // If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware. Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass)
15466 ADD_BITFIELD_RW(CROSS_INPUT, 16, 1)
15467 // If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor.
15468 ADD_BITFIELD_RW(SIGNED, 15, 1)
15469 // The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out
15470 ADD_BITFIELD_RW(MASK_MSB, 10, 5)
15471 // The least-significant bit allowed to pass by the mask (inclusive)
15472 ADD_BITFIELD_RW(MASK_LSB, 5, 5)
15473 // Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised.
15474 ADD_BITFIELD_RW(SHIFT, 0, 5)
15475 END_TYPE()
15476
15477 // Values written here are atomically added to ACCUM0 Reading yields lane 0's raw shift and mask value (BASE0 not added).
15478 // Reset value: 0x00000000
15479 BEGIN_TYPE(INTERP1_ACCUM0_ADD_t, uint32_t)
15480 ADD_BITFIELD_RW(INTERP1_ACCUM0_ADD, 0, 24)
15481 END_TYPE()
15482
15483 // Values written here are atomically added to ACCUM1 Reading yields lane 1's raw shift and mask value (BASE1 not added).
15484 // Reset value: 0x00000000
15485 BEGIN_TYPE(INTERP1_ACCUM1_ADD_t, uint32_t)
15486 ADD_BITFIELD_RW(INTERP1_ACCUM1_ADD, 0, 24)
15487 END_TYPE()
15488
15489 // On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously. Each half is sign-extended to 32 bits if that lane's SIGNED flag is set.
15490 // Reset value: 0x00000000
15491 BEGIN_TYPE(INTERP1_BASE_1AND0_t, uint32_t)
15492 ADD_BITFIELD_WO(INTERP1_BASE_1AND0, 0, 32)
15493 END_TYPE()
15494
15495 // Reading from a spinlock address will: - Return 0 if lock is already locked - Otherwise return nonzero, and simultaneously claim the lock Writing (any value) releases the lock. If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins. The value returned on success is 0x1 << lock number.
15496 // Reset value: 0x00000000
15497 typedef uint32_t SPINLOCK_t;
15498
15499 // Trigger a doorbell interrupt on the opposite core. Write 1 to a bit to set the corresponding bit in DOORBELL_IN on the opposite core. This raises the opposite core's doorbell interrupt. Read to get the status of the doorbells currently asserted on the opposite core. This is equivalent to that core reading its own DOORBELL_IN status.
15500 // Reset value: 0x00000000
15501 BEGIN_TYPE(DOORBELL_OUT_SET_t, uint32_t)
15502 ADD_BITFIELD_RW(DOORBELL_OUT_SET, 0, 8)
15503 END_TYPE()
15504
15505 // Clear doorbells which have been posted to the opposite core. This register is intended for debugging and initialisation purposes. Writing 1 to a bit in DOORBELL_OUT_CLR clears the corresponding bit in DOORBELL_IN on the opposite core. Clearing all bits will cause that core's doorbell interrupt to deassert. Since the usual order of events is for software to send events using DOORBELL_OUT_SET, and acknowledge incoming events by writing to DOORBELL_IN_CLR, this register should be used with caution to avoid race conditions. Reading returns the status of the doorbells currently asserted on the other core, i.e. is equivalent to that core reading its own DOORBELL_IN status.
15506 // Reset value: 0x00000000
15507 BEGIN_TYPE(DOORBELL_OUT_CLR_t, uint32_t)
15508 ADD_BITFIELD_RW(DOORBELL_OUT_CLR, 0, 8)
15509 END_TYPE()
15510
15511 // Write 1s to trigger doorbell interrupts on this core. Read to get status of doorbells currently asserted on this core.
15512 // Reset value: 0x00000000
15513 BEGIN_TYPE(DOORBELL_IN_SET_t, uint32_t)
15514 ADD_BITFIELD_RW(DOORBELL_IN_SET, 0, 8)
15515 END_TYPE()
15516
15517 // Check and acknowledge doorbells posted to this core. This core's doorbell interrupt is asserted when any bit in this register is 1. Write 1 to each bit to clear that bit. The doorbell interrupt deasserts once all bits are cleared. Read to get status of doorbells currently asserted on this core.
15518 // Reset value: 0x00000000
15519 BEGIN_TYPE(DOORBELL_IN_CLR_t, uint32_t)
15520 ADD_BITFIELD_RW(DOORBELL_IN_CLR, 0, 8)
15521 END_TYPE()
15522
15523 // Detach certain core-local peripherals from Secure SIO, and attach them to Non-secure SIO, so that Non-secure software can use them. Attempting to access one of these peripherals from the Secure SIO when it is attached to the Non-secure SIO, or vice versa, will generate a bus error. This register is per-core, and is only present on the Secure SIO. Most SIO hardware is duplicated across the Secure and Non-secure SIO, so is not listed in this register.
15524 // Reset value: 0x00000000
15525 BEGIN_TYPE(PERI_NONSEC_t, uint32_t)
15526 // IF 1, detach TMDS encoder (of this core) from the Secure SIO, and attach to the Non-secure SIO.
15527 ADD_BITFIELD_RW(TMDS, 5, 1)
15528 // If 1, detach interpolator 1 (of this core) from the Secure SIO, and attach to the Non-secure SIO.
15529 ADD_BITFIELD_RW(INTERP1, 1, 1)
15530 // If 1, detach interpolator 0 (of this core) from the Secure SIO, and attach to the Non-secure SIO.
15531 ADD_BITFIELD_RW(INTERP0, 0, 1)
15532 END_TYPE()
15533
15534 // Control the assertion of the standard software interrupt (MIP.MSIP) on the RISC-V cores. Unlike the RISC-V timer, this interrupt is not routed to a normal system-level interrupt line, so can not be used by the Arm cores. It is safe for both cores to write to this register on the same cycle. The set/clear effect is accumulated across both cores, and then applied. If a flag is both set and cleared on the same cycle, only the set takes effect.
15535 // Reset value: 0x00000000
15536 BEGIN_TYPE(RISCV_SOFTIRQ_t, uint32_t)
15537 // Write 1 to atomically clear the core 1 software interrupt flag. Read to get the status of this flag.
15538 ADD_BITFIELD_RW(CORE1_CLR, 9, 1)
15539 // Write 1 to atomically clear the core 0 software interrupt flag. Read to get the status of this flag.
15540 ADD_BITFIELD_RW(CORE0_CLR, 8, 1)
15541 // Write 1 to atomically set the core 1 software interrupt flag. Read to get the status of this flag.
15542 ADD_BITFIELD_RW(CORE1_SET, 1, 1)
15543 // Write 1 to atomically set the core 0 software interrupt flag. Read to get the status of this flag.
15544 ADD_BITFIELD_RW(CORE0_SET, 0, 1)
15545 END_TYPE()
15546
15547 // Control register for the RISC-V 64-bit Machine-mode timer. This timer is only present in the Secure SIO, so is only accessible to an Arm core in Secure mode or a RISC-V core in Machine mode. Note whilst this timer follows the RISC-V privileged specification, it is equally usable by the Arm cores. The interrupts are routed to normal system-level interrupt lines as well as to the MIP.MTIP inputs on the RISC-V cores.
15548 // Reset value: 0x0000000d
15549 BEGIN_TYPE(MTIME_CTRL_t, uint32_t)
15550 // If 1, the timer pauses when core 1 is in the debug halt state.
15551 ADD_BITFIELD_RW(DBGPAUSE_CORE1, 3, 1)
15552 // If 1, the timer pauses when core 0 is in the debug halt state.
15553 ADD_BITFIELD_RW(DBGPAUSE_CORE0, 2, 1)
15554 // If 1, increment the timer every cycle (i.e. run directly from the system clock), rather than incrementing on the system-level timer tick input.
15555 ADD_BITFIELD_RW(FULLSPEED, 1, 1)
15556 // Timer enable bit. When 0, the timer will not increment automatically.
15557 ADD_BITFIELD_RW(EN, 0, 1)
15558 END_TYPE()
15559
15560 // Read/write access to the high half of RISC-V Machine-mode timer. This register is shared between both cores. If both cores write on the same cycle, core 1 takes precedence.
15561 // Reset value: 0x00000000
15562 BEGIN_TYPE(MTIME_t, uint32_t)
15563 ADD_BITFIELD_RW(MTIME, 0, 32)
15564 END_TYPE()
15565
15566 // Read/write access to the high half of RISC-V Machine-mode timer. This register is shared between both cores. If both cores write on the same cycle, core 1 takes precedence.
15567 // Reset value: 0x00000000
15568 BEGIN_TYPE(MTIMEH_t, uint32_t)
15569 ADD_BITFIELD_RW(MTIMEH, 0, 32)
15570 END_TYPE()
15571
15572 // Low half of RISC-V Machine-mode timer comparator. This register is core-local, i.e., each core gets a copy of this register, with the comparison result routed to its own interrupt line. The timer interrupt is asserted whenever MTIME is greater than or equal to MTIMECMP. This comparison is unsigned, and performed on the full 64-bit values.
15573 // Reset value: 0xffffffff
15574 BEGIN_TYPE(MTIMECMP_t, uint32_t)
15575 ADD_BITFIELD_RW(MTIMECMP, 0, 32)
15576 END_TYPE()
15577
15578 // High half of RISC-V Machine-mode timer comparator. This register is core-local. The timer interrupt is asserted whenever MTIME is greater than or equal to MTIMECMP. This comparison is unsigned, and performed on the full 64-bit values.
15579 // Reset value: 0xffffffff
15580 BEGIN_TYPE(MTIMECMPH_t, uint32_t)
15581 ADD_BITFIELD_RW(MTIMECMPH, 0, 32)
15582 END_TYPE()
15583
15584 // Control register for TMDS encoder.
15585 // Reset value: 0x00000000
15586 BEGIN_TYPE(TMDS_CTRL_t, uint32_t)
15587 // Clear the running DC balance state of the TMDS encoders. This bit should be written once at the beginning of each scanline.
15588 ADD_BITFIELD_WO(CLEAR_BALANCE, 28, 1)
15589 // When encoding two pixels's worth of symbols in one cycle (a read of a PEEK/POP_DOUBLE register), the second encoder sees a shifted version of the colour data register. This control disables that shift, so that both encoder layers see the same pixel data. This is used for pixel doubling.
15590 ADD_BITFIELD_RW(PIX2_NOSHIFT, 27, 1)
15591 // Shift applied to the colour data register with each read of a POP alias register. Reading from the POP_SINGLE register, or reading from the POP_DOUBLE register with PIX2_NOSHIFT set (for pixel doubling), shifts by the indicated amount. Reading from a POP_DOUBLE register when PIX2_NOSHIFT is clear will shift by double the indicated amount. (Shift by 32 means no shift.)
15592 ADD_BITFIELD_RW(PIX_SHIFT, 24, 3)
15593 // Enable lane interleaving for reads of PEEK_SINGLE/POP_SINGLE. When interleaving is disabled, each of the 3 symbols appears as a contiguous 10-bit field, with lane 0 being the least-significant and starting at bit 0 of the register. When interleaving is enabled, the symbols are packed into 5 chunks of 3 lanes times 2 bits (30 bits total). Each chunk contains two bits of a TMDS symbol per lane, with lane 0 being the least significant.
15594 ADD_BITFIELD_RW(INTERLEAVE, 23, 1)
15595 // Number of valid colour MSBs for lane 2 (1-8 bits, encoded as 0 through 7). Remaining LSBs are masked to 0 after the rotate.
15596 ADD_BITFIELD_RW(L2_NBITS, 18, 3)
15597 // Number of valid colour MSBs for lane 1 (1-8 bits, encoded as 0 through 7). Remaining LSBs are masked to 0 after the rotate.
15598 ADD_BITFIELD_RW(L1_NBITS, 15, 3)
15599 // Number of valid colour MSBs for lane 0 (1-8 bits, encoded as 0 through 7). Remaining LSBs are masked to 0 after the rotate.
15600 ADD_BITFIELD_RW(L0_NBITS, 12, 3)
15601 // Right-rotate the 16 LSBs of the colour accumulator by 0-15 bits, in order to get the MSB of the lane 2 (red) colour data aligned with the MSB of the 8-bit encoder input. For example, for RGB565 (red most significant), red is bits 15:11, so should be right-rotated by 8 bits to align with bits 7:3 of the encoder input.
15602 ADD_BITFIELD_RW(L2_ROT, 8, 4)
15603 // Right-rotate the 16 LSBs of the colour accumulator by 0-15 bits, in order to get the MSB of the lane 1 (green) colour data aligned with the MSB of the 8-bit encoder input. For example, for RGB565, green is bits 10:5, so should be right-rotated by 3 bits to align with bits 7:2 of the encoder input.
15604 ADD_BITFIELD_RW(L1_ROT, 4, 4)
15605 // Right-rotate the 16 LSBs of the colour accumulator by 0-15 bits, in order to get the MSB of the lane 0 (blue) colour data aligned with the MSB of the 8-bit encoder input. For example, for RGB565 (red most significant), blue is bits 4:0, so should be right-rotated by 13 to align with bits 7:3 of the encoder input.
15606 ADD_BITFIELD_RW(L0_ROT, 0, 4)
15607 END_TYPE()
15608
15609 // Do not shift the colour data register.
15610 static const uint32_t TMDS_CTRL_PIX_SHIFT__0 = 0;
15611 // Shift the colour data register by 1 bit
15612 static const uint32_t TMDS_CTRL_PIX_SHIFT__1 = 1;
15613 // Shift the colour data register by 2 bits
15614 static const uint32_t TMDS_CTRL_PIX_SHIFT__2 = 2;
15615 // Shift the colour data register by 4 bits
15616 static const uint32_t TMDS_CTRL_PIX_SHIFT__4 = 3;
15617 // Shift the colour data register by 8 bits
15618 static const uint32_t TMDS_CTRL_PIX_SHIFT__8 = 4;
15619 // Shift the colour data register by 16 bits
15620 static const uint32_t TMDS_CTRL_PIX_SHIFT__16 = 5;
15621
15622 // Write-only access to the TMDS colour data register.
15623 // Reset value: 0x00000000
15624 BEGIN_TYPE(TMDS_WDATA_t, uint32_t)
15625 ADD_BITFIELD_WO(TMDS_WDATA, 0, 32)
15626 END_TYPE()
15627
15628 // Get the encoding of one pixel's worth of colour data, packed into a 32-bit value (3x10-bit symbols). The PEEK alias does not shift the colour register when read, but still advances the running DC balance state of each encoder. This is useful for pixel doubling.
15629 // Reset value: 0x00000000
15630 BEGIN_TYPE(TMDS_PEEK_SINGLE_t, uint32_t)
15631 ADD_BITFIELD_RO(TMDS_PEEK_SINGLE, 0, 32)
15632 END_TYPE()
15633
15634 // Get the encoding of one pixel's worth of colour data, packed into a 32-bit value. The packing is 5 chunks of 3 lanes times 2 bits (30 bits total). Each chunk contains two bits of a TMDS symbol per lane. This format is intended for shifting out with the HSTX peripheral on RP2350. The POP alias shifts the colour register when read, as well as advancing the running DC balance state of each encoder.
15635 // Reset value: 0x00000000
15636 BEGIN_TYPE(TMDS_POP_SINGLE_t, uint32_t)
15637 ADD_BITFIELD_RO(TMDS_POP_SINGLE, 0, 32)
15638 END_TYPE()
15639
15640 // Get lane 0 of the encoding of two pixels' worth of colour data. Two 10-bit TMDS symbols are packed at the bottom of a 32-bit word. The PEEK alias does not shift the colour register when read, but still advances the lane 0 DC balance state. This is useful if all 3 lanes' worth of encode are to be read at once, rather than processing the entire scanline for one lane before moving to the next lane.
15641 // Reset value: 0x00000000
15642 BEGIN_TYPE(TMDS_PEEK_DOUBLE_L0_t, uint32_t)
15643 ADD_BITFIELD_RO(TMDS_PEEK_DOUBLE_L0, 0, 32)
15644 END_TYPE()
15645
15646 // Get lane 0 of the encoding of two pixels' worth of colour data. Two 10-bit TMDS symbols are packed at the bottom of a 32-bit word. The POP alias shifts the colour register when read, according to the values of PIX_SHIFT and PIX2_NOSHIFT.
15647 // Reset value: 0x00000000
15648 BEGIN_TYPE(TMDS_POP_DOUBLE_L0_t, uint32_t)
15649 ADD_BITFIELD_RO(TMDS_POP_DOUBLE_L0, 0, 32)
15650 END_TYPE()
15651
15652 // Get lane 1 of the encoding of two pixels' worth of colour data. Two 10-bit TMDS symbols are packed at the bottom of a 32-bit word. The PEEK alias does not shift the colour register when read, but still advances the lane 1 DC balance state. This is useful if all 3 lanes' worth of encode are to be read at once, rather than processing the entire scanline for one lane before moving to the next lane.
15653 // Reset value: 0x00000000
15654 BEGIN_TYPE(TMDS_PEEK_DOUBLE_L1_t, uint32_t)
15655 ADD_BITFIELD_RO(TMDS_PEEK_DOUBLE_L1, 0, 32)
15656 END_TYPE()
15657
15658 // Get lane 1 of the encoding of two pixels' worth of colour data. Two 10-bit TMDS symbols are packed at the bottom of a 32-bit word. The POP alias shifts the colour register when read, according to the values of PIX_SHIFT and PIX2_NOSHIFT.
15659 // Reset value: 0x00000000
15660 BEGIN_TYPE(TMDS_POP_DOUBLE_L1_t, uint32_t)
15661 ADD_BITFIELD_RO(TMDS_POP_DOUBLE_L1, 0, 32)
15662 END_TYPE()
15663
15664 // Get lane 2 of the encoding of two pixels' worth of colour data. Two 10-bit TMDS symbols are packed at the bottom of a 32-bit word. The PEEK alias does not shift the colour register when read, but still advances the lane 2 DC balance state. This is useful if all 3 lanes' worth of encode are to be read at once, rather than processing the entire scanline for one lane before moving to the next lane.
15665 // Reset value: 0x00000000
15666 BEGIN_TYPE(TMDS_PEEK_DOUBLE_L2_t, uint32_t)
15667 ADD_BITFIELD_RO(TMDS_PEEK_DOUBLE_L2, 0, 32)
15668 END_TYPE()
15669
15670 // Get lane 2 of the encoding of two pixels' worth of colour data. Two 10-bit TMDS symbols are packed at the bottom of a 32-bit word. The POP alias shifts the colour register when read, according to the values of PIX_SHIFT and PIX2_NOSHIFT.
15671 // Reset value: 0x00000000
15672 BEGIN_TYPE(TMDS_POP_DOUBLE_L2_t, uint32_t)
15673 ADD_BITFIELD_RO(TMDS_POP_DOUBLE_L2, 0, 32)
15674 END_TYPE()
15675
15676 struct SIO_t {
15677 CPUID_t CPUID;
15678 GPIO_IN_t GPIO_IN;
15679 GPIO_HI_IN_t GPIO_HI_IN;
15680 uint32_t reserved0;
15681 GPIO_OUT_t GPIO_OUT;
15682 GPIO_HI_OUT_t GPIO_HI_OUT;
15683 GPIO_OUT_SET_t GPIO_OUT_SET;
15684 GPIO_HI_OUT_SET_t GPIO_HI_OUT_SET;
15685 GPIO_OUT_CLR_t GPIO_OUT_CLR;
15686 GPIO_HI_OUT_CLR_t GPIO_HI_OUT_CLR;
15687 GPIO_OUT_XOR_t GPIO_OUT_XOR;
15688 GPIO_HI_OUT_XOR_t GPIO_HI_OUT_XOR;
15689 GPIO_OE_t GPIO_OE;
15690 GPIO_HI_OE_t GPIO_HI_OE;
15691 GPIO_OE_SET_t GPIO_OE_SET;
15692 GPIO_HI_OE_SET_t GPIO_HI_OE_SET;
15693 GPIO_OE_CLR_t GPIO_OE_CLR;
15694 GPIO_HI_OE_CLR_t GPIO_HI_OE_CLR;
15695 GPIO_OE_XOR_t GPIO_OE_XOR;
15696 GPIO_HI_OE_XOR_t GPIO_HI_OE_XOR;
15697 FIFO_ST_t FIFO_ST;
15698 FIFO_WR_t FIFO_WR;
15699 FIFO_RD_t FIFO_RD;
15700 SPINLOCK_ST_t SPINLOCK_ST;
15701 uint32_t reserved1[8];
15702 INTERP0_ACCUM0_t INTERP0_ACCUM0;
15703 INTERP0_ACCUM1_t INTERP0_ACCUM1;
15704 INTERP0_BASE0_t INTERP0_BASE0;
15705 INTERP0_BASE1_t INTERP0_BASE1;
15706 INTERP0_BASE2_t INTERP0_BASE2;
15707 INTERP0_POP_LANE0_t INTERP0_POP_LANE0;
15708 INTERP0_POP_LANE1_t INTERP0_POP_LANE1;
15709 INTERP0_POP_FULL_t INTERP0_POP_FULL;
15710 INTERP0_PEEK_LANE0_t INTERP0_PEEK_LANE0;
15711 INTERP0_PEEK_LANE1_t INTERP0_PEEK_LANE1;
15712 INTERP0_PEEK_FULL_t INTERP0_PEEK_FULL;
15713 INTERP0_CTRL_LANE0_t INTERP0_CTRL_LANE0;
15714 INTERP0_CTRL_LANE1_t INTERP0_CTRL_LANE1;
15715 INTERP0_ACCUM0_ADD_t INTERP0_ACCUM0_ADD;
15716 INTERP0_ACCUM1_ADD_t INTERP0_ACCUM1_ADD;
15717 INTERP0_BASE_1AND0_t INTERP0_BASE_1AND0;
15718 INTERP1_ACCUM0_t INTERP1_ACCUM0;
15719 INTERP1_ACCUM1_t INTERP1_ACCUM1;
15720 INTERP1_BASE0_t INTERP1_BASE0;
15721 INTERP1_BASE1_t INTERP1_BASE1;
15722 INTERP1_BASE2_t INTERP1_BASE2;
15723 INTERP1_POP_LANE0_t INTERP1_POP_LANE0;
15724 INTERP1_POP_LANE1_t INTERP1_POP_LANE1;
15725 INTERP1_POP_FULL_t INTERP1_POP_FULL;
15726 INTERP1_PEEK_LANE0_t INTERP1_PEEK_LANE0;
15727 INTERP1_PEEK_LANE1_t INTERP1_PEEK_LANE1;
15728 INTERP1_PEEK_FULL_t INTERP1_PEEK_FULL;
15729 INTERP1_CTRL_LANE0_t INTERP1_CTRL_LANE0;
15730 INTERP1_CTRL_LANE1_t INTERP1_CTRL_LANE1;
15731 INTERP1_ACCUM0_ADD_t INTERP1_ACCUM0_ADD;
15732 INTERP1_ACCUM1_ADD_t INTERP1_ACCUM1_ADD;
15733 INTERP1_BASE_1AND0_t INTERP1_BASE_1AND0;
15734 SPINLOCK_t SPINLOCK[32];
15735 DOORBELL_OUT_SET_t DOORBELL_OUT_SET;
15736 DOORBELL_OUT_CLR_t DOORBELL_OUT_CLR;
15737 DOORBELL_IN_SET_t DOORBELL_IN_SET;
15738 DOORBELL_IN_CLR_t DOORBELL_IN_CLR;
15739 PERI_NONSEC_t PERI_NONSEC;
15740 uint32_t reserved2[3];
15741 RISCV_SOFTIRQ_t RISCV_SOFTIRQ;
15742 MTIME_CTRL_t MTIME_CTRL;
15743 uint32_t reserved3[2];
15744 MTIME_t MTIME;
15745 MTIMEH_t MTIMEH;
15746 MTIMECMP_t MTIMECMP;
15747 MTIMECMPH_t MTIMECMPH;
15748 TMDS_CTRL_t TMDS_CTRL;
15749 TMDS_WDATA_t TMDS_WDATA;
15750 TMDS_PEEK_SINGLE_t TMDS_PEEK_SINGLE;
15751 TMDS_POP_SINGLE_t TMDS_POP_SINGLE;
15752 TMDS_PEEK_DOUBLE_L0_t TMDS_PEEK_DOUBLE_L0;
15753 TMDS_POP_DOUBLE_L0_t TMDS_POP_DOUBLE_L0;
15754 TMDS_PEEK_DOUBLE_L1_t TMDS_PEEK_DOUBLE_L1;
15755 TMDS_POP_DOUBLE_L1_t TMDS_POP_DOUBLE_L1;
15756 TMDS_PEEK_DOUBLE_L2_t TMDS_PEEK_DOUBLE_L2;
15757 TMDS_POP_DOUBLE_L2_t TMDS_POP_DOUBLE_L2;
15758 };
15759
15760 static SIO_t & SIO = (*(SIO_t *)0xd0000000);
15761
15762} // _SIO_
15763
15764namespace _SIO_NS_ {
15765
15766 static _SIO_::SIO_t & SIO_NS = (*(_SIO_::SIO_t *)0xd0020000);
15767
15768} // _SIO_NS_
15769
15770// Additional registers mapped adjacent to the bootram, for use by the bootrom.
15771namespace _BOOTRAM_ {
15772
15773 // This registers always ORs writes into its current contents. Once a bit is set, it can only be cleared by a reset.
15774 // Reset value: 0x00000000
15775 BEGIN_TYPE(WRITE_ONCE0_t, uint32_t)
15776 ADD_BITFIELD_RW(WRITE_ONCE0, 0, 32)
15777 END_TYPE()
15778
15779 // This registers always ORs writes into its current contents. Once a bit is set, it can only be cleared by a reset.
15780 // Reset value: 0x00000000
15781 BEGIN_TYPE(WRITE_ONCE1_t, uint32_t)
15782 ADD_BITFIELD_RW(WRITE_ONCE1, 0, 32)
15783 END_TYPE()
15784
15785 // Bootlock status register. 1=unclaimed, 0=claimed. These locks function identically to the SIO spinlocks, but are reserved for bootrom use.
15786 // Reset value: 0x000000ff
15787 BEGIN_TYPE(BOOTLOCK_STAT_t, uint32_t)
15788 ADD_BITFIELD_RW(BOOTLOCK_STAT, 0, 8)
15789 END_TYPE()
15790
15791 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15792 // Reset value: 0x00000000
15793 BEGIN_TYPE(BOOTLOCK0_t, uint32_t)
15794 ADD_BITFIELD_RW(BOOTLOCK0, 0, 32)
15795 END_TYPE()
15796
15797 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15798 // Reset value: 0x00000000
15799 BEGIN_TYPE(BOOTLOCK1_t, uint32_t)
15800 ADD_BITFIELD_RW(BOOTLOCK1, 0, 32)
15801 END_TYPE()
15802
15803 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15804 // Reset value: 0x00000000
15805 BEGIN_TYPE(BOOTLOCK2_t, uint32_t)
15806 ADD_BITFIELD_RW(BOOTLOCK2, 0, 32)
15807 END_TYPE()
15808
15809 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15810 // Reset value: 0x00000000
15811 BEGIN_TYPE(BOOTLOCK3_t, uint32_t)
15812 ADD_BITFIELD_RW(BOOTLOCK3, 0, 32)
15813 END_TYPE()
15814
15815 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15816 // Reset value: 0x00000000
15817 BEGIN_TYPE(BOOTLOCK4_t, uint32_t)
15818 ADD_BITFIELD_RW(BOOTLOCK4, 0, 32)
15819 END_TYPE()
15820
15821 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15822 // Reset value: 0x00000000
15823 BEGIN_TYPE(BOOTLOCK5_t, uint32_t)
15824 ADD_BITFIELD_RW(BOOTLOCK5, 0, 32)
15825 END_TYPE()
15826
15827 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15828 // Reset value: 0x00000000
15829 BEGIN_TYPE(BOOTLOCK6_t, uint32_t)
15830 ADD_BITFIELD_RW(BOOTLOCK6, 0, 32)
15831 END_TYPE()
15832
15833 // Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero.
15834 // Reset value: 0x00000000
15835 BEGIN_TYPE(BOOTLOCK7_t, uint32_t)
15836 ADD_BITFIELD_RW(BOOTLOCK7, 0, 32)
15837 END_TYPE()
15838
15839 struct BOOTRAM_t {
15840 uint32_t reserved0[512];
15841 WRITE_ONCE0_t WRITE_ONCE0;
15842 WRITE_ONCE1_t WRITE_ONCE1;
15843 BOOTLOCK_STAT_t BOOTLOCK_STAT;
15844 BOOTLOCK0_t BOOTLOCK0;
15845 BOOTLOCK1_t BOOTLOCK1;
15846 BOOTLOCK2_t BOOTLOCK2;
15847 BOOTLOCK3_t BOOTLOCK3;
15848 BOOTLOCK4_t BOOTLOCK4;
15849 BOOTLOCK5_t BOOTLOCK5;
15850 BOOTLOCK6_t BOOTLOCK6;
15851 BOOTLOCK7_t BOOTLOCK7;
15852 };
15853
15854 static BOOTRAM_t & BOOTRAM = (*(BOOTRAM_t *)0x400e0000);
15855 static BOOTRAM_t & BOOTRAM_XOR = (*(BOOTRAM_t *)0x400e1000);
15856 static BOOTRAM_t & BOOTRAM_SET = (*(BOOTRAM_t *)0x400e2000);
15857 static BOOTRAM_t & BOOTRAM_CLR = (*(BOOTRAM_t *)0x400e3000);
15858
15859} // _BOOTRAM_
15860
15861// Coresight block - RP specific registers
15862namespace _CORESIGHT_TRACE_ {
15863
15864 // Control and status register
15865 // Reset value: 0x00000001
15866 BEGIN_TYPE(CTRL_STATUS_t, uint32_t)
15867 // This status flag is set high when trace data has been dropped due to the FIFO being full at the point trace data was sampled. Write 1 to acknowledge and clear the bit.
15868 ADD_BITFIELD_RW(TRACE_CAPTURE_FIFO_OVERFLOW, 1, 1)
15869 // Set to 1 to continuously hold the trace FIFO in a flushed state and prevent overflow. Before clearing this flag, configure and start a DMA channel with the correct DREQ for the TRACE_CAPTURE_FIFO register. Clear this flag to begin sampling trace data, and set once again once the trace capture buffer is full. You must configure the TPIU in order to generate trace packets to be captured, as well as components like the ETM further upstream to generate the event stream propagated to the TPIU.
15870 ADD_BITFIELD_RW(TRACE_CAPTURE_FIFO_FLUSH, 0, 1)
15871 END_TYPE()
15872
15873 // FIFO for trace data captured from the TPIU
15874 // Reset value: 0x00000000
15875 BEGIN_TYPE(TRACE_CAPTURE_FIFO_t, uint32_t)
15876 // Read from an 8 x 32-bit FIFO containing trace data captured from the TPIU. Hardware pushes to the FIFO on rising edges of clk_sys, when either of the following is true: * TPIU TRACECTL output is low (normal trace data) * TPIU TRACETCL output is high, and TPIU TRACEDATA0 and TRACEDATA1 are both low (trigger packet) These conditions are in accordance with Arm Coresight Architecture Spec v3.0 section D3.3.3: Decoding requirements for Trace Capture Devices The data captured into the FIFO is the full 32-bit TRACEDATA bus output by the TPIU. Note that the TPIU is a DDR output at half of clk_sys, therefore this interface can capture the full 32-bit TPIU DDR output bandwidth as it samples once per active edge of the TPIU output clock.
15877 ADD_BITFIELD_RO(RDATA, 0, 32)
15878 END_TYPE()
15879
15881 CTRL_STATUS_t CTRL_STATUS;
15882 TRACE_CAPTURE_FIFO_t TRACE_CAPTURE_FIFO;
15883 };
15884
15885 static CORESIGHT_TRACE_t & CORESIGHT_TRACE = (*(CORESIGHT_TRACE_t *)0x50700000);
15886 static CORESIGHT_TRACE_t & CORESIGHT_TRACE_XOR = (*(CORESIGHT_TRACE_t *)0x50701000);
15887 static CORESIGHT_TRACE_t & CORESIGHT_TRACE_SET = (*(CORESIGHT_TRACE_t *)0x50702000);
15888 static CORESIGHT_TRACE_t & CORESIGHT_TRACE_CLR = (*(CORESIGHT_TRACE_t *)0x50703000);
15889
15890} // _CORESIGHT_TRACE_
15891
15892// USB FS/LS controller device registers
15893namespace _USB_ {
15894
15895 // Device address and endpoint control
15896 // Reset value: 0x00000000
15897 BEGIN_TYPE(ADDR_ENDP_t, uint32_t)
15898 // Device endpoint to send data to. Only valid for HOST mode.
15899 ADD_BITFIELD_RW(ENDPOINT, 16, 4)
15900 // In device mode, the address that the device should respond to. Set in response to a SET_ADDR setup packet from the host. In host mode set to the address of the device to communicate with.
15901 ADD_BITFIELD_RW(ADDRESS, 0, 7)
15902 END_TYPE()
15903
15904 // Interrupt endpoint 1. Only valid for HOST mode.
15905 // Reset value: 0x00000000
15906 BEGIN_TYPE(ADDR_ENDP__t, uint32_t)
15907 // Interrupt EP requires preamble (is a low speed device on a full speed hub)
15908 ADD_BITFIELD_RW(INTEP_PREAMBLE, 26, 1)
15909 // Direction of the interrupt endpoint. In=0, Out=1
15910 ADD_BITFIELD_RW(INTEP_DIR, 25, 1)
15911 // Endpoint number of the interrupt endpoint
15912 ADD_BITFIELD_RW(ENDPOINT, 16, 4)
15913 // Device address
15914 ADD_BITFIELD_RW(ADDRESS, 0, 7)
15915 END_TYPE()
15916
15917 // Main control register
15918 // Reset value: 0x00000004
15919 BEGIN_TYPE(MAIN_CTRL_t, uint32_t)
15920 // Reduced timings for simulation
15921 ADD_BITFIELD_RW(SIM_TIMING, 31, 1)
15922 // Isolates USB phy after controller power-up Remove isolation once software has configured the controller Not isolated = 0, Isolated = 1
15923 ADD_BITFIELD_RW(PHY_ISO, 2, 1)
15924 // Device mode = 0, Host mode = 1
15925 ADD_BITFIELD_RW(HOST_NDEVICE, 1, 1)
15926 // Enable controller
15927 ADD_BITFIELD_RW(CONTROLLER_EN, 0, 1)
15928 END_TYPE()
15929
15930 // Set the SOF (Start of Frame) frame number in the host controller. The SOF packet is sent every 1ms and the host will increment the frame number by 1 each time.
15931 // Reset value: 0x00000000
15932 BEGIN_TYPE(SOF_WR_t, uint32_t)
15933 ADD_BITFIELD_WO(COUNT, 0, 11)
15934 END_TYPE()
15935
15936 // Read the last SOF (Start of Frame) frame number seen. In device mode the last SOF received from the host. In host mode the last SOF sent by the host.
15937 // Reset value: 0x00000000
15938 BEGIN_TYPE(SOF_RD_t, uint32_t)
15939 ADD_BITFIELD_RO(COUNT, 0, 11)
15940 END_TYPE()
15941
15942 // SIE control register
15943 // Reset value: 0x00008000
15944 BEGIN_TYPE(SIE_CTRL_t, uint32_t)
15945 // Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL
15946 ADD_BITFIELD_RW(EP0_INT_STALL, 31, 1)
15947 // Device: EP0 single buffered = 0, double buffered = 1
15948 ADD_BITFIELD_RW(EP0_DOUBLE_BUF, 30, 1)
15949 // Device: Set bit in BUFF_STATUS for every buffer completed on EP0
15950 ADD_BITFIELD_RW(EP0_INT_1BUF, 29, 1)
15951 // Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0
15952 ADD_BITFIELD_RW(EP0_INT_2BUF, 28, 1)
15953 // Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK
15954 ADD_BITFIELD_RW(EP0_INT_NAK, 27, 1)
15955 // Direct bus drive enable
15956 ADD_BITFIELD_RW(DIRECT_EN, 26, 1)
15957 // Direct control of DP
15958 ADD_BITFIELD_RW(DIRECT_DP, 25, 1)
15959 // Direct control of DM
15960 ADD_BITFIELD_RW(DIRECT_DM, 24, 1)
15961 // Device: Stop EP0 on a short packet.
15962 ADD_BITFIELD_RW(EP0_STOP_ON_SHORT_PACKET, 19, 1)
15963 // Power down bus transceiver
15964 ADD_BITFIELD_RW(TRANSCEIVER_PD, 18, 1)
15965 // Device: Pull-up strength (0=1K2, 1=2k3)
15966 ADD_BITFIELD_RW(RPU_OPT, 17, 1)
15967 // Device: Enable pull up resistor
15968 ADD_BITFIELD_RW(PULLUP_EN, 16, 1)
15969 // Host: Enable pull down resistors
15970 ADD_BITFIELD_RW(PULLDOWN_EN, 15, 1)
15971 // Host: Reset bus
15972 ADD_BITFIELD_WO(RESET_BUS, 13, 1)
15973 // Device: Remote wakeup. Device can initiate its own resume after suspend.
15974 ADD_BITFIELD_WO(RESUME, 12, 1)
15975 // Host: Enable VBUS
15976 ADD_BITFIELD_RW(VBUS_EN, 11, 1)
15977 // Host: Enable keep alive packet (for low speed bus)
15978 ADD_BITFIELD_RW(KEEP_ALIVE_EN, 10, 1)
15979 // Host: Enable SOF generation (for full speed bus)
15980 ADD_BITFIELD_RW(SOF_EN, 9, 1)
15981 // Host: Delay packet(s) until after SOF
15982 ADD_BITFIELD_RW(SOF_SYNC, 8, 1)
15983 // Host: Preable enable for LS device on FS hub
15984 ADD_BITFIELD_RW(PREAMBLE_EN, 6, 1)
15985 // Host: Stop transaction
15986 ADD_BITFIELD_WO(STOP_TRANS, 4, 1)
15987 // Host: Receive transaction (IN to host)
15988 ADD_BITFIELD_RW(RECEIVE_DATA, 3, 1)
15989 // Host: Send transaction (OUT from host)
15990 ADD_BITFIELD_RW(SEND_DATA, 2, 1)
15991 // Host: Send Setup packet
15992 ADD_BITFIELD_RW(SEND_SETUP, 1, 1)
15993 // Host: Start transaction
15994 ADD_BITFIELD_WO(START_TRANS, 0, 1)
15995 END_TYPE()
15996
15997 // SIE status register
15998 // Reset value: 0x00000000
15999 BEGIN_TYPE(SIE_STATUS_t, uint32_t)
16000 // Data Sequence Error. The device can raise a sequence error in the following conditions: * A SETUP packet is received followed by a DATA1 packet (data phase should always be DATA0) * An OUT packet is received from the host but doesn't match the data pid in the buffer control register read from DPSRAM The host can raise a data sequence error in the following conditions: * An IN packet from the device has the wrong data PID
16001 ADD_BITFIELD_RW(DATA_SEQ_ERROR, 31, 1)
16002 // ACK received. Raised by both host and device.
16003 ADD_BITFIELD_RW(ACK_REC, 30, 1)
16004 // Host: STALL received
16005 ADD_BITFIELD_RW(STALL_REC, 29, 1)
16006 // Host: NAK received
16007 ADD_BITFIELD_RW(NAK_REC, 28, 1)
16008 // RX timeout is raised by both the host and device if an ACK is not received in the maximum time specified by the USB spec.
16009 ADD_BITFIELD_RW(RX_TIMEOUT, 27, 1)
16010 // RX overflow is raised by the Serial RX engine if the incoming data is too fast.
16011 ADD_BITFIELD_RW(RX_OVERFLOW, 26, 1)
16012 // Bit Stuff Error. Raised by the Serial RX engine.
16013 ADD_BITFIELD_RW(BIT_STUFF_ERROR, 25, 1)
16014 // CRC Error. Raised by the Serial RX engine.
16015 ADD_BITFIELD_RW(CRC_ERROR, 24, 1)
16016 // An endpoint has encountered an error. Read the ep_rx_error and ep_tx_error registers to find out which endpoint had an error.
16017 ADD_BITFIELD_RW(ENDPOINT_ERROR, 23, 1)
16018 // Device: bus reset received
16019 ADD_BITFIELD_RW(BUS_RESET, 19, 1)
16020 // Transaction complete. Raised by device if: * An IN or OUT packet is sent with the `LAST_BUFF` bit set in the buffer control register Raised by host if: * A setup packet is sent when no data in or data out transaction follows * An IN packet is received and the `LAST_BUFF` bit is set in the buffer control register * An IN packet is received with zero length * An OUT packet is sent and the `LAST_BUFF` bit is set
16021 ADD_BITFIELD_RW(TRANS_COMPLETE, 18, 1)
16022 // Device: Setup packet received
16023 ADD_BITFIELD_RW(SETUP_REC, 17, 1)
16024 // Device: connected
16025 ADD_BITFIELD_RO(CONNECTED, 16, 1)
16026 // Device or Host has received a short packet. This is when the data received is less than configured in the buffer control register. Device: If using double buffered mode on device the buffer select will not be toggled after writing status back to the buffer control register. This is to prevent any further transactions on that endpoint until the user has reset the buffer control registers. Host: the current transfer will be stopped early.
16027 ADD_BITFIELD_RW(RX_SHORT_PACKET, 12, 1)
16028 // Host: Device has initiated a remote resume. Device: host has initiated a resume.
16029 ADD_BITFIELD_RW(RESUME, 11, 1)
16030 // VBUS over current detected
16031 ADD_BITFIELD_RO(VBUS_OVER_CURR, 10, 1)
16032 // Host: device speed. Disconnected = 00, LS = 01, FS = 10
16033 ADD_BITFIELD_RO(SPEED, 8, 2)
16034 // Bus in suspended state. Valid for device. Device will go into suspend if neither Keep Alive / SOF frames are enabled.
16035 ADD_BITFIELD_RW(SUSPENDED, 4, 1)
16036 // USB bus line state
16037 ADD_BITFIELD_RO(LINE_STATE, 2, 2)
16038 // Device: VBUS Detected
16039 ADD_BITFIELD_RO(VBUS_DETECTED, 0, 1)
16040 END_TYPE()
16041
16042 // interrupt endpoint control register
16043 // Reset value: 0x00000000
16044 BEGIN_TYPE(INT_EP_CTRL_t, uint32_t)
16045 // Host: Enable interrupt endpoint 1 -> 15
16046 ADD_BITFIELD_RW(INT_EP_ACTIVE, 1, 15)
16047 END_TYPE()
16048
16049 // Buffer status register. A bit set here indicates that a buffer has completed on the endpoint (if the buffer interrupt is enabled). It is possible for 2 buffers to be completed, so clearing the buffer status bit may instantly re set it on the next clock cycle.
16050 // Reset value: 0x00000000
16051 BEGIN_TYPE(BUFF_STATUS_t, uint32_t)
16052 ADD_BITFIELD_RW(EP15_OUT, 31, 1)
16053 ADD_BITFIELD_RW(EP15_IN, 30, 1)
16054 ADD_BITFIELD_RW(EP14_OUT, 29, 1)
16055 ADD_BITFIELD_RW(EP14_IN, 28, 1)
16056 ADD_BITFIELD_RW(EP13_OUT, 27, 1)
16057 ADD_BITFIELD_RW(EP13_IN, 26, 1)
16058 ADD_BITFIELD_RW(EP12_OUT, 25, 1)
16059 ADD_BITFIELD_RW(EP12_IN, 24, 1)
16060 ADD_BITFIELD_RW(EP11_OUT, 23, 1)
16061 ADD_BITFIELD_RW(EP11_IN, 22, 1)
16062 ADD_BITFIELD_RW(EP10_OUT, 21, 1)
16063 ADD_BITFIELD_RW(EP10_IN, 20, 1)
16064 ADD_BITFIELD_RW(EP9_OUT, 19, 1)
16065 ADD_BITFIELD_RW(EP9_IN, 18, 1)
16066 ADD_BITFIELD_RW(EP8_OUT, 17, 1)
16067 ADD_BITFIELD_RW(EP8_IN, 16, 1)
16068 ADD_BITFIELD_RW(EP7_OUT, 15, 1)
16069 ADD_BITFIELD_RW(EP7_IN, 14, 1)
16070 ADD_BITFIELD_RW(EP6_OUT, 13, 1)
16071 ADD_BITFIELD_RW(EP6_IN, 12, 1)
16072 ADD_BITFIELD_RW(EP5_OUT, 11, 1)
16073 ADD_BITFIELD_RW(EP5_IN, 10, 1)
16074 ADD_BITFIELD_RW(EP4_OUT, 9, 1)
16075 ADD_BITFIELD_RW(EP4_IN, 8, 1)
16076 ADD_BITFIELD_RW(EP3_OUT, 7, 1)
16077 ADD_BITFIELD_RW(EP3_IN, 6, 1)
16078 ADD_BITFIELD_RW(EP2_OUT, 5, 1)
16079 ADD_BITFIELD_RW(EP2_IN, 4, 1)
16080 ADD_BITFIELD_RW(EP1_OUT, 3, 1)
16081 ADD_BITFIELD_RW(EP1_IN, 2, 1)
16082 ADD_BITFIELD_RW(EP0_OUT, 1, 1)
16083 ADD_BITFIELD_RW(EP0_IN, 0, 1)
16084 END_TYPE()
16085
16086 // Which of the double buffers should be handled. Only valid if using an interrupt per buffer (i.e. not per 2 buffers). Not valid for host interrupt endpoint polling because they are only single buffered.
16087 // Reset value: 0x00000000
16088 BEGIN_TYPE(BUFF_CPU_SHOULD_HANDLE_t, uint32_t)
16089 ADD_BITFIELD_RO(EP15_OUT, 31, 1)
16090 ADD_BITFIELD_RO(EP15_IN, 30, 1)
16091 ADD_BITFIELD_RO(EP14_OUT, 29, 1)
16092 ADD_BITFIELD_RO(EP14_IN, 28, 1)
16093 ADD_BITFIELD_RO(EP13_OUT, 27, 1)
16094 ADD_BITFIELD_RO(EP13_IN, 26, 1)
16095 ADD_BITFIELD_RO(EP12_OUT, 25, 1)
16096 ADD_BITFIELD_RO(EP12_IN, 24, 1)
16097 ADD_BITFIELD_RO(EP11_OUT, 23, 1)
16098 ADD_BITFIELD_RO(EP11_IN, 22, 1)
16099 ADD_BITFIELD_RO(EP10_OUT, 21, 1)
16100 ADD_BITFIELD_RO(EP10_IN, 20, 1)
16101 ADD_BITFIELD_RO(EP9_OUT, 19, 1)
16102 ADD_BITFIELD_RO(EP9_IN, 18, 1)
16103 ADD_BITFIELD_RO(EP8_OUT, 17, 1)
16104 ADD_BITFIELD_RO(EP8_IN, 16, 1)
16105 ADD_BITFIELD_RO(EP7_OUT, 15, 1)
16106 ADD_BITFIELD_RO(EP7_IN, 14, 1)
16107 ADD_BITFIELD_RO(EP6_OUT, 13, 1)
16108 ADD_BITFIELD_RO(EP6_IN, 12, 1)
16109 ADD_BITFIELD_RO(EP5_OUT, 11, 1)
16110 ADD_BITFIELD_RO(EP5_IN, 10, 1)
16111 ADD_BITFIELD_RO(EP4_OUT, 9, 1)
16112 ADD_BITFIELD_RO(EP4_IN, 8, 1)
16113 ADD_BITFIELD_RO(EP3_OUT, 7, 1)
16114 ADD_BITFIELD_RO(EP3_IN, 6, 1)
16115 ADD_BITFIELD_RO(EP2_OUT, 5, 1)
16116 ADD_BITFIELD_RO(EP2_IN, 4, 1)
16117 ADD_BITFIELD_RO(EP1_OUT, 3, 1)
16118 ADD_BITFIELD_RO(EP1_IN, 2, 1)
16119 ADD_BITFIELD_RO(EP0_OUT, 1, 1)
16120 ADD_BITFIELD_RO(EP0_IN, 0, 1)
16121 END_TYPE()
16122
16123 // Device only: Can be set to ignore the buffer control register for this endpoint in case you would like to revoke a buffer. A NAK will be sent for every access to the endpoint until this bit is cleared. A corresponding bit in `EP_ABORT_DONE` is set when it is safe to modify the buffer control register.
16124 // Reset value: 0x00000000
16125 BEGIN_TYPE(EP_ABORT_t, uint32_t)
16126 ADD_BITFIELD_RW(EP15_OUT, 31, 1)
16127 ADD_BITFIELD_RW(EP15_IN, 30, 1)
16128 ADD_BITFIELD_RW(EP14_OUT, 29, 1)
16129 ADD_BITFIELD_RW(EP14_IN, 28, 1)
16130 ADD_BITFIELD_RW(EP13_OUT, 27, 1)
16131 ADD_BITFIELD_RW(EP13_IN, 26, 1)
16132 ADD_BITFIELD_RW(EP12_OUT, 25, 1)
16133 ADD_BITFIELD_RW(EP12_IN, 24, 1)
16134 ADD_BITFIELD_RW(EP11_OUT, 23, 1)
16135 ADD_BITFIELD_RW(EP11_IN, 22, 1)
16136 ADD_BITFIELD_RW(EP10_OUT, 21, 1)
16137 ADD_BITFIELD_RW(EP10_IN, 20, 1)
16138 ADD_BITFIELD_RW(EP9_OUT, 19, 1)
16139 ADD_BITFIELD_RW(EP9_IN, 18, 1)
16140 ADD_BITFIELD_RW(EP8_OUT, 17, 1)
16141 ADD_BITFIELD_RW(EP8_IN, 16, 1)
16142 ADD_BITFIELD_RW(EP7_OUT, 15, 1)
16143 ADD_BITFIELD_RW(EP7_IN, 14, 1)
16144 ADD_BITFIELD_RW(EP6_OUT, 13, 1)
16145 ADD_BITFIELD_RW(EP6_IN, 12, 1)
16146 ADD_BITFIELD_RW(EP5_OUT, 11, 1)
16147 ADD_BITFIELD_RW(EP5_IN, 10, 1)
16148 ADD_BITFIELD_RW(EP4_OUT, 9, 1)
16149 ADD_BITFIELD_RW(EP4_IN, 8, 1)
16150 ADD_BITFIELD_RW(EP3_OUT, 7, 1)
16151 ADD_BITFIELD_RW(EP3_IN, 6, 1)
16152 ADD_BITFIELD_RW(EP2_OUT, 5, 1)
16153 ADD_BITFIELD_RW(EP2_IN, 4, 1)
16154 ADD_BITFIELD_RW(EP1_OUT, 3, 1)
16155 ADD_BITFIELD_RW(EP1_IN, 2, 1)
16156 ADD_BITFIELD_RW(EP0_OUT, 1, 1)
16157 ADD_BITFIELD_RW(EP0_IN, 0, 1)
16158 END_TYPE()
16159
16160 // Device only: Used in conjunction with `EP_ABORT`. Set once an endpoint is idle so the programmer knows it is safe to modify the buffer control register.
16161 // Reset value: 0x00000000
16162 BEGIN_TYPE(EP_ABORT_DONE_t, uint32_t)
16163 ADD_BITFIELD_RW(EP15_OUT, 31, 1)
16164 ADD_BITFIELD_RW(EP15_IN, 30, 1)
16165 ADD_BITFIELD_RW(EP14_OUT, 29, 1)
16166 ADD_BITFIELD_RW(EP14_IN, 28, 1)
16167 ADD_BITFIELD_RW(EP13_OUT, 27, 1)
16168 ADD_BITFIELD_RW(EP13_IN, 26, 1)
16169 ADD_BITFIELD_RW(EP12_OUT, 25, 1)
16170 ADD_BITFIELD_RW(EP12_IN, 24, 1)
16171 ADD_BITFIELD_RW(EP11_OUT, 23, 1)
16172 ADD_BITFIELD_RW(EP11_IN, 22, 1)
16173 ADD_BITFIELD_RW(EP10_OUT, 21, 1)
16174 ADD_BITFIELD_RW(EP10_IN, 20, 1)
16175 ADD_BITFIELD_RW(EP9_OUT, 19, 1)
16176 ADD_BITFIELD_RW(EP9_IN, 18, 1)
16177 ADD_BITFIELD_RW(EP8_OUT, 17, 1)
16178 ADD_BITFIELD_RW(EP8_IN, 16, 1)
16179 ADD_BITFIELD_RW(EP7_OUT, 15, 1)
16180 ADD_BITFIELD_RW(EP7_IN, 14, 1)
16181 ADD_BITFIELD_RW(EP6_OUT, 13, 1)
16182 ADD_BITFIELD_RW(EP6_IN, 12, 1)
16183 ADD_BITFIELD_RW(EP5_OUT, 11, 1)
16184 ADD_BITFIELD_RW(EP5_IN, 10, 1)
16185 ADD_BITFIELD_RW(EP4_OUT, 9, 1)
16186 ADD_BITFIELD_RW(EP4_IN, 8, 1)
16187 ADD_BITFIELD_RW(EP3_OUT, 7, 1)
16188 ADD_BITFIELD_RW(EP3_IN, 6, 1)
16189 ADD_BITFIELD_RW(EP2_OUT, 5, 1)
16190 ADD_BITFIELD_RW(EP2_IN, 4, 1)
16191 ADD_BITFIELD_RW(EP1_OUT, 3, 1)
16192 ADD_BITFIELD_RW(EP1_IN, 2, 1)
16193 ADD_BITFIELD_RW(EP0_OUT, 1, 1)
16194 ADD_BITFIELD_RW(EP0_IN, 0, 1)
16195 END_TYPE()
16196
16197 // Device: this bit must be set in conjunction with the `STALL` bit in the buffer control register to send a STALL on EP0. The device controller clears these bits when a SETUP packet is received because the USB spec requires that a STALL condition is cleared when a SETUP packet is received.
16198 // Reset value: 0x00000000
16199 BEGIN_TYPE(EP_STALL_ARM_t, uint32_t)
16200 ADD_BITFIELD_RW(EP0_OUT, 1, 1)
16201 ADD_BITFIELD_RW(EP0_IN, 0, 1)
16202 END_TYPE()
16203
16204 // Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK.
16205 // Reset value: 0x00100010
16206 BEGIN_TYPE(NAK_POLL_t, uint32_t)
16207 // Bits 9:6 of nak_retry count
16208 ADD_BITFIELD_RO(RETRY_COUNT_HI, 28, 4)
16209 // EPX polling has stopped because a nak was received
16210 ADD_BITFIELD_RW(EPX_STOPPED_ON_NAK, 27, 1)
16211 // Stop polling epx when a nak is received
16212 ADD_BITFIELD_RW(STOP_EPX_ON_NAK, 26, 1)
16213 // NAK polling interval for a full speed device
16214 ADD_BITFIELD_RW(DELAY_FS, 16, 10)
16215 // Bits 5:0 of nak_retry_count
16216 ADD_BITFIELD_RO(RETRY_COUNT_LO, 10, 6)
16217 // NAK polling interval for a low speed device
16218 ADD_BITFIELD_RW(DELAY_LS, 0, 10)
16219 END_TYPE()
16220
16221 // Device: bits are set when the `IRQ_ON_NAK` or `IRQ_ON_STALL` bits are set. For EP0 this comes from `SIE_CTRL`. For all other endpoints it comes from the endpoint control register.
16222 // Reset value: 0x00000000
16223 BEGIN_TYPE(EP_STATUS_STALL_NAK_t, uint32_t)
16224 ADD_BITFIELD_RW(EP15_OUT, 31, 1)
16225 ADD_BITFIELD_RW(EP15_IN, 30, 1)
16226 ADD_BITFIELD_RW(EP14_OUT, 29, 1)
16227 ADD_BITFIELD_RW(EP14_IN, 28, 1)
16228 ADD_BITFIELD_RW(EP13_OUT, 27, 1)
16229 ADD_BITFIELD_RW(EP13_IN, 26, 1)
16230 ADD_BITFIELD_RW(EP12_OUT, 25, 1)
16231 ADD_BITFIELD_RW(EP12_IN, 24, 1)
16232 ADD_BITFIELD_RW(EP11_OUT, 23, 1)
16233 ADD_BITFIELD_RW(EP11_IN, 22, 1)
16234 ADD_BITFIELD_RW(EP10_OUT, 21, 1)
16235 ADD_BITFIELD_RW(EP10_IN, 20, 1)
16236 ADD_BITFIELD_RW(EP9_OUT, 19, 1)
16237 ADD_BITFIELD_RW(EP9_IN, 18, 1)
16238 ADD_BITFIELD_RW(EP8_OUT, 17, 1)
16239 ADD_BITFIELD_RW(EP8_IN, 16, 1)
16240 ADD_BITFIELD_RW(EP7_OUT, 15, 1)
16241 ADD_BITFIELD_RW(EP7_IN, 14, 1)
16242 ADD_BITFIELD_RW(EP6_OUT, 13, 1)
16243 ADD_BITFIELD_RW(EP6_IN, 12, 1)
16244 ADD_BITFIELD_RW(EP5_OUT, 11, 1)
16245 ADD_BITFIELD_RW(EP5_IN, 10, 1)
16246 ADD_BITFIELD_RW(EP4_OUT, 9, 1)
16247 ADD_BITFIELD_RW(EP4_IN, 8, 1)
16248 ADD_BITFIELD_RW(EP3_OUT, 7, 1)
16249 ADD_BITFIELD_RW(EP3_IN, 6, 1)
16250 ADD_BITFIELD_RW(EP2_OUT, 5, 1)
16251 ADD_BITFIELD_RW(EP2_IN, 4, 1)
16252 ADD_BITFIELD_RW(EP1_OUT, 3, 1)
16253 ADD_BITFIELD_RW(EP1_IN, 2, 1)
16254 ADD_BITFIELD_RW(EP0_OUT, 1, 1)
16255 ADD_BITFIELD_RW(EP0_IN, 0, 1)
16256 END_TYPE()
16257
16258 // Where to connect the USB controller. Should be to_phy by default.
16259 // Reset value: 0x00000001
16260 BEGIN_TYPE(USB_MUXING_t, uint32_t)
16261 // Swap the USB PHY DP and DM pins and all related controls and flip receive differential data. Can be used to switch USB DP/DP on the PCB. This is done at a low level so overrides all other controls.
16262 ADD_BITFIELD_RW(SWAP_DPDM, 31, 1)
16263 // Use the usb DP and DM pins as GPIO pins instead of connecting them to the USB controller.
16264 ADD_BITFIELD_RW(USBPHY_AS_GPIO, 4, 1)
16265 ADD_BITFIELD_RW(SOFTCON, 3, 1)
16266 ADD_BITFIELD_RW(TO_DIGITAL_PAD, 2, 1)
16267 ADD_BITFIELD_RW(TO_EXTPHY, 1, 1)
16268 ADD_BITFIELD_RW(TO_PHY, 0, 1)
16269 END_TYPE()
16270
16271 // Overrides for the power signals in the event that the VBUS signals are not hooked up to GPIO. Set the value of the override and then the override enable to switch over to the override value.
16272 // Reset value: 0x00000000
16273 BEGIN_TYPE(USB_PWR_t, uint32_t)
16274 ADD_BITFIELD_RW(OVERCURR_DETECT_EN, 5, 1)
16275 ADD_BITFIELD_RW(OVERCURR_DETECT, 4, 1)
16276 ADD_BITFIELD_RW(VBUS_DETECT_OVERRIDE_EN, 3, 1)
16277 ADD_BITFIELD_RW(VBUS_DETECT, 2, 1)
16278 ADD_BITFIELD_RW(VBUS_EN_OVERRIDE_EN, 1, 1)
16279 ADD_BITFIELD_RW(VBUS_EN, 0, 1)
16280 END_TYPE()
16281
16282 // This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit.
16283 // Reset value: 0x00000000
16284 BEGIN_TYPE(USBPHY_DIRECT_t, uint32_t)
16285 // Override rx_dm value into controller
16286 ADD_BITFIELD_RW(RX_DM_OVERRIDE, 25, 1)
16287 // Override rx_dp value into controller
16288 ADD_BITFIELD_RW(RX_DP_OVERRIDE, 24, 1)
16289 // Override rx_dd value into controller
16290 ADD_BITFIELD_RW(RX_DD_OVERRIDE, 23, 1)
16291 // DM over voltage
16292 ADD_BITFIELD_RO(DM_OVV, 22, 1)
16293 // DP over voltage
16294 ADD_BITFIELD_RO(DP_OVV, 21, 1)
16295 // DM overcurrent
16296 ADD_BITFIELD_RO(DM_OVCN, 20, 1)
16297 // DP overcurrent
16298 ADD_BITFIELD_RO(DP_OVCN, 19, 1)
16299 // DPM pin state
16300 ADD_BITFIELD_RO(RX_DM, 18, 1)
16301 // DPP pin state
16302 ADD_BITFIELD_RO(RX_DP, 17, 1)
16303 // Differential RX
16304 ADD_BITFIELD_RO(RX_DD, 16, 1)
16305 // TX_DIFFMODE=0: Single ended mode TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored)
16306 ADD_BITFIELD_RW(TX_DIFFMODE, 15, 1)
16307 // TX_FSSLEW=0: Low speed slew rate TX_FSSLEW=1: Full speed slew rate
16308 ADD_BITFIELD_RW(TX_FSSLEW, 14, 1)
16309 // TX power down override (if override enable is set). 1 = powered down.
16310 ADD_BITFIELD_RW(TX_PD, 13, 1)
16311 // RX power down override (if override enable is set). 1 = powered down.
16312 ADD_BITFIELD_RW(RX_PD, 12, 1)
16313 // Output data. TX_DIFFMODE=1, Ignored TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM
16314 ADD_BITFIELD_RW(TX_DM, 11, 1)
16315 // Output data. If TX_DIFFMODE=1, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP If TX_DIFFMODE=0, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP
16316 ADD_BITFIELD_RW(TX_DP, 10, 1)
16317 // Output enable. If TX_DIFFMODE=1, Ignored. If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving
16318 ADD_BITFIELD_RW(TX_DM_OE, 9, 1)
16319 // Output enable. If TX_DIFFMODE=1, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving If TX_DIFFMODE=0, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving
16320 ADD_BITFIELD_RW(TX_DP_OE, 8, 1)
16321 // DM pull down enable
16322 ADD_BITFIELD_RW(DM_PULLDN_EN, 6, 1)
16323 // DM pull up enable
16324 ADD_BITFIELD_RW(DM_PULLUP_EN, 5, 1)
16325 // Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2
16326 ADD_BITFIELD_RW(DM_PULLUP_HISEL, 4, 1)
16327 // DP pull down enable
16328 ADD_BITFIELD_RW(DP_PULLDN_EN, 2, 1)
16329 // DP pull up enable
16330 ADD_BITFIELD_RW(DP_PULLUP_EN, 1, 1)
16331 // Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2
16332 ADD_BITFIELD_RW(DP_PULLUP_HISEL, 0, 1)
16333 END_TYPE()
16334
16335 // Override enable for each control in usbphy_direct
16336 // Reset value: 0x00000000
16337 BEGIN_TYPE(USBPHY_DIRECT_OVERRIDE_t, uint32_t)
16338 ADD_BITFIELD_RW(RX_DM_OVERRIDE_EN, 18, 1)
16339 ADD_BITFIELD_RW(RX_DP_OVERRIDE_EN, 17, 1)
16340 ADD_BITFIELD_RW(RX_DD_OVERRIDE_EN, 16, 1)
16341 ADD_BITFIELD_RW(TX_DIFFMODE_OVERRIDE_EN, 15, 1)
16342 ADD_BITFIELD_RW(DM_PULLUP_OVERRIDE_EN, 12, 1)
16343 ADD_BITFIELD_RW(TX_FSSLEW_OVERRIDE_EN, 11, 1)
16344 ADD_BITFIELD_RW(TX_PD_OVERRIDE_EN, 10, 1)
16345 ADD_BITFIELD_RW(RX_PD_OVERRIDE_EN, 9, 1)
16346 ADD_BITFIELD_RW(TX_DM_OVERRIDE_EN, 8, 1)
16347 ADD_BITFIELD_RW(TX_DP_OVERRIDE_EN, 7, 1)
16348 ADD_BITFIELD_RW(TX_DM_OE_OVERRIDE_EN, 6, 1)
16349 ADD_BITFIELD_RW(TX_DP_OE_OVERRIDE_EN, 5, 1)
16350 ADD_BITFIELD_RW(DM_PULLDN_EN_OVERRIDE_EN, 4, 1)
16351 ADD_BITFIELD_RW(DP_PULLDN_EN_OVERRIDE_EN, 3, 1)
16352 ADD_BITFIELD_RW(DP_PULLUP_EN_OVERRIDE_EN, 2, 1)
16353 ADD_BITFIELD_RW(DM_PULLUP_HISEL_OVERRIDE_EN, 1, 1)
16354 ADD_BITFIELD_RW(DP_PULLUP_HISEL_OVERRIDE_EN, 0, 1)
16355 END_TYPE()
16356
16357 // Used to adjust trim values of USB phy pull down resistors.
16358 // Reset value: 0x00001f1f
16359 BEGIN_TYPE(USBPHY_TRIM_t, uint32_t)
16360 // Value to drive to USB PHY DM pulldown resistor trim control Experimental data suggests that the reset value will work, but this register allows adjustment if required
16361 ADD_BITFIELD_RW(DM_PULLDN_TRIM, 8, 5)
16362 // Value to drive to USB PHY DP pulldown resistor trim control Experimental data suggests that the reset value will work, but this register allows adjustment if required
16363 ADD_BITFIELD_RW(DP_PULLDN_TRIM, 0, 5)
16364 END_TYPE()
16365
16366 // Used for debug only.
16367 // Reset value: 0x000000f8
16368 BEGIN_TYPE(LINESTATE_TUNING_t, uint32_t)
16369 ADD_BITFIELD_RW(SPARE_FIX, 8, 4)
16370 // Device - exit suspend on any non-idle signalling, not qualified with a 1ms timer
16371 ADD_BITFIELD_RW(DEV_LS_WAKE_FIX, 7, 1)
16372 // Device - suppress repeated errors until the device FSM is next in the process of decoding an inbound packet.
16373 ADD_BITFIELD_RW(DEV_RX_ERR_QUIESCE, 6, 1)
16374 // RX - when recovering from line chatter or bitstuff errors, treat SE0 as the end of chatter as well as 8 consecutive idle bits.
16375 ADD_BITFIELD_RW(SIE_RX_CHATTER_SE0_FIX, 5, 1)
16376 // RX - when a bitstuff error is signalled by rx_dasm, unconditionally terminate RX decode to avoid a hang during certain packet phases.
16377 ADD_BITFIELD_RW(SIE_RX_BITSTUFF_FIX, 4, 1)
16378 // Device - the controller FSM performs two reads of the buffer status memory address to avoid sampling metastable data. An enabled buffer is only used if both reads match.
16379 ADD_BITFIELD_RW(DEV_BUFF_CONTROL_DOUBLE_READ_FIX, 3, 1)
16380 // Host - increase inter-packet and turnaround timeouts to accommodate worst-case hub delays.
16381 ADD_BITFIELD_RW(MULTI_HUB_FIX, 2, 1)
16382 // Device/Host - add an extra 1-bit debounce of linestate sampling.
16383 ADD_BITFIELD_RW(LINESTATE_DELAY, 1, 1)
16384 // Device - register the received data to account for hub bit dribble before EOP. Only affects certain hubs.
16385 ADD_BITFIELD_RW(RCV_DELAY, 0, 1)
16386 END_TYPE()
16387
16388 // Raw Interrupts
16389 // Reset value: 0x00000000
16390 BEGIN_TYPE(INTR_t, uint32_t)
16391 // Source: NAK_POLL.EPX_STOPPED_ON_NAK
16392 ADD_BITFIELD_RO(EPX_STOPPED_ON_NAK, 23, 1)
16393 // Source: DEV_SM_WATCHDOG.FIRED
16394 ADD_BITFIELD_RO(DEV_SM_WATCHDOG_FIRED, 22, 1)
16395 // Source: SIE_STATUS.ENDPOINT_ERROR
16396 ADD_BITFIELD_RO(ENDPOINT_ERROR, 21, 1)
16397 // Source: SIE_STATUS.RX_SHORT_PACKET
16398 ADD_BITFIELD_RO(RX_SHORT_PACKET, 20, 1)
16399 // Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK.
16400 ADD_BITFIELD_RO(EP_STALL_NAK, 19, 1)
16401 // Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE.
16402 ADD_BITFIELD_RO(ABORT_DONE, 18, 1)
16403 // Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD
16404 ADD_BITFIELD_RO(DEV_SOF, 17, 1)
16405 // Device. Source: SIE_STATUS.SETUP_REC
16406 ADD_BITFIELD_RO(SETUP_REQ, 16, 1)
16407 // Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME
16408 ADD_BITFIELD_RO(DEV_RESUME_FROM_HOST, 15, 1)
16409 // Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED
16410 ADD_BITFIELD_RO(DEV_SUSPEND, 14, 1)
16411 // Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED
16412 ADD_BITFIELD_RO(DEV_CONN_DIS, 13, 1)
16413 // Source: SIE_STATUS.BUS_RESET
16414 ADD_BITFIELD_RO(BUS_RESET, 12, 1)
16415 // Source: SIE_STATUS.VBUS_DETECTED
16416 ADD_BITFIELD_RO(VBUS_DETECT, 11, 1)
16417 // Source: SIE_STATUS.STALL_REC
16418 ADD_BITFIELD_RO(STALL, 10, 1)
16419 // Source: SIE_STATUS.CRC_ERROR
16420 ADD_BITFIELD_RO(ERROR_CRC, 9, 1)
16421 // Source: SIE_STATUS.BIT_STUFF_ERROR
16422 ADD_BITFIELD_RO(ERROR_BIT_STUFF, 8, 1)
16423 // Source: SIE_STATUS.RX_OVERFLOW
16424 ADD_BITFIELD_RO(ERROR_RX_OVERFLOW, 7, 1)
16425 // Source: SIE_STATUS.RX_TIMEOUT
16426 ADD_BITFIELD_RO(ERROR_RX_TIMEOUT, 6, 1)
16427 // Source: SIE_STATUS.DATA_SEQ_ERROR
16428 ADD_BITFIELD_RO(ERROR_DATA_SEQ, 5, 1)
16429 // Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS.
16430 ADD_BITFIELD_RO(BUFF_STATUS, 4, 1)
16431 // Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit.
16432 ADD_BITFIELD_RO(TRANS_COMPLETE, 3, 1)
16433 // Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD
16434 ADD_BITFIELD_RO(HOST_SOF, 2, 1)
16435 // Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME
16436 ADD_BITFIELD_RO(HOST_RESUME, 1, 1)
16437 // Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED
16438 ADD_BITFIELD_RO(HOST_CONN_DIS, 0, 1)
16439 END_TYPE()
16440
16441 // Interrupt Enable
16442 // Reset value: 0x00000000
16443 BEGIN_TYPE(INTE_t, uint32_t)
16444 // Source: NAK_POLL.EPX_STOPPED_ON_NAK
16445 ADD_BITFIELD_RW(EPX_STOPPED_ON_NAK, 23, 1)
16446 // Source: DEV_SM_WATCHDOG.FIRED
16447 ADD_BITFIELD_RW(DEV_SM_WATCHDOG_FIRED, 22, 1)
16448 // Source: SIE_STATUS.ENDPOINT_ERROR
16449 ADD_BITFIELD_RW(ENDPOINT_ERROR, 21, 1)
16450 // Source: SIE_STATUS.RX_SHORT_PACKET
16451 ADD_BITFIELD_RW(RX_SHORT_PACKET, 20, 1)
16452 // Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK.
16453 ADD_BITFIELD_RW(EP_STALL_NAK, 19, 1)
16454 // Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE.
16455 ADD_BITFIELD_RW(ABORT_DONE, 18, 1)
16456 // Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD
16457 ADD_BITFIELD_RW(DEV_SOF, 17, 1)
16458 // Device. Source: SIE_STATUS.SETUP_REC
16459 ADD_BITFIELD_RW(SETUP_REQ, 16, 1)
16460 // Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME
16461 ADD_BITFIELD_RW(DEV_RESUME_FROM_HOST, 15, 1)
16462 // Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED
16463 ADD_BITFIELD_RW(DEV_SUSPEND, 14, 1)
16464 // Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED
16465 ADD_BITFIELD_RW(DEV_CONN_DIS, 13, 1)
16466 // Source: SIE_STATUS.BUS_RESET
16467 ADD_BITFIELD_RW(BUS_RESET, 12, 1)
16468 // Source: SIE_STATUS.VBUS_DETECTED
16469 ADD_BITFIELD_RW(VBUS_DETECT, 11, 1)
16470 // Source: SIE_STATUS.STALL_REC
16471 ADD_BITFIELD_RW(STALL, 10, 1)
16472 // Source: SIE_STATUS.CRC_ERROR
16473 ADD_BITFIELD_RW(ERROR_CRC, 9, 1)
16474 // Source: SIE_STATUS.BIT_STUFF_ERROR
16475 ADD_BITFIELD_RW(ERROR_BIT_STUFF, 8, 1)
16476 // Source: SIE_STATUS.RX_OVERFLOW
16477 ADD_BITFIELD_RW(ERROR_RX_OVERFLOW, 7, 1)
16478 // Source: SIE_STATUS.RX_TIMEOUT
16479 ADD_BITFIELD_RW(ERROR_RX_TIMEOUT, 6, 1)
16480 // Source: SIE_STATUS.DATA_SEQ_ERROR
16481 ADD_BITFIELD_RW(ERROR_DATA_SEQ, 5, 1)
16482 // Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS.
16483 ADD_BITFIELD_RW(BUFF_STATUS, 4, 1)
16484 // Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit.
16485 ADD_BITFIELD_RW(TRANS_COMPLETE, 3, 1)
16486 // Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD
16487 ADD_BITFIELD_RW(HOST_SOF, 2, 1)
16488 // Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME
16489 ADD_BITFIELD_RW(HOST_RESUME, 1, 1)
16490 // Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED
16491 ADD_BITFIELD_RW(HOST_CONN_DIS, 0, 1)
16492 END_TYPE()
16493
16494 // Interrupt Force
16495 // Reset value: 0x00000000
16496 BEGIN_TYPE(INTF_t, uint32_t)
16497 // Source: NAK_POLL.EPX_STOPPED_ON_NAK
16498 ADD_BITFIELD_RW(EPX_STOPPED_ON_NAK, 23, 1)
16499 // Source: DEV_SM_WATCHDOG.FIRED
16500 ADD_BITFIELD_RW(DEV_SM_WATCHDOG_FIRED, 22, 1)
16501 // Source: SIE_STATUS.ENDPOINT_ERROR
16502 ADD_BITFIELD_RW(ENDPOINT_ERROR, 21, 1)
16503 // Source: SIE_STATUS.RX_SHORT_PACKET
16504 ADD_BITFIELD_RW(RX_SHORT_PACKET, 20, 1)
16505 // Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK.
16506 ADD_BITFIELD_RW(EP_STALL_NAK, 19, 1)
16507 // Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE.
16508 ADD_BITFIELD_RW(ABORT_DONE, 18, 1)
16509 // Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD
16510 ADD_BITFIELD_RW(DEV_SOF, 17, 1)
16511 // Device. Source: SIE_STATUS.SETUP_REC
16512 ADD_BITFIELD_RW(SETUP_REQ, 16, 1)
16513 // Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME
16514 ADD_BITFIELD_RW(DEV_RESUME_FROM_HOST, 15, 1)
16515 // Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED
16516 ADD_BITFIELD_RW(DEV_SUSPEND, 14, 1)
16517 // Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED
16518 ADD_BITFIELD_RW(DEV_CONN_DIS, 13, 1)
16519 // Source: SIE_STATUS.BUS_RESET
16520 ADD_BITFIELD_RW(BUS_RESET, 12, 1)
16521 // Source: SIE_STATUS.VBUS_DETECTED
16522 ADD_BITFIELD_RW(VBUS_DETECT, 11, 1)
16523 // Source: SIE_STATUS.STALL_REC
16524 ADD_BITFIELD_RW(STALL, 10, 1)
16525 // Source: SIE_STATUS.CRC_ERROR
16526 ADD_BITFIELD_RW(ERROR_CRC, 9, 1)
16527 // Source: SIE_STATUS.BIT_STUFF_ERROR
16528 ADD_BITFIELD_RW(ERROR_BIT_STUFF, 8, 1)
16529 // Source: SIE_STATUS.RX_OVERFLOW
16530 ADD_BITFIELD_RW(ERROR_RX_OVERFLOW, 7, 1)
16531 // Source: SIE_STATUS.RX_TIMEOUT
16532 ADD_BITFIELD_RW(ERROR_RX_TIMEOUT, 6, 1)
16533 // Source: SIE_STATUS.DATA_SEQ_ERROR
16534 ADD_BITFIELD_RW(ERROR_DATA_SEQ, 5, 1)
16535 // Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS.
16536 ADD_BITFIELD_RW(BUFF_STATUS, 4, 1)
16537 // Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit.
16538 ADD_BITFIELD_RW(TRANS_COMPLETE, 3, 1)
16539 // Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD
16540 ADD_BITFIELD_RW(HOST_SOF, 2, 1)
16541 // Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME
16542 ADD_BITFIELD_RW(HOST_RESUME, 1, 1)
16543 // Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED
16544 ADD_BITFIELD_RW(HOST_CONN_DIS, 0, 1)
16545 END_TYPE()
16546
16547 // Interrupt status after masking & forcing
16548 // Reset value: 0x00000000
16549 BEGIN_TYPE(INTS_t, uint32_t)
16550 // Source: NAK_POLL.EPX_STOPPED_ON_NAK
16551 ADD_BITFIELD_RO(EPX_STOPPED_ON_NAK, 23, 1)
16552 // Source: DEV_SM_WATCHDOG.FIRED
16553 ADD_BITFIELD_RO(DEV_SM_WATCHDOG_FIRED, 22, 1)
16554 // Source: SIE_STATUS.ENDPOINT_ERROR
16555 ADD_BITFIELD_RO(ENDPOINT_ERROR, 21, 1)
16556 // Source: SIE_STATUS.RX_SHORT_PACKET
16557 ADD_BITFIELD_RO(RX_SHORT_PACKET, 20, 1)
16558 // Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK.
16559 ADD_BITFIELD_RO(EP_STALL_NAK, 19, 1)
16560 // Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE.
16561 ADD_BITFIELD_RO(ABORT_DONE, 18, 1)
16562 // Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD
16563 ADD_BITFIELD_RO(DEV_SOF, 17, 1)
16564 // Device. Source: SIE_STATUS.SETUP_REC
16565 ADD_BITFIELD_RO(SETUP_REQ, 16, 1)
16566 // Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME
16567 ADD_BITFIELD_RO(DEV_RESUME_FROM_HOST, 15, 1)
16568 // Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED
16569 ADD_BITFIELD_RO(DEV_SUSPEND, 14, 1)
16570 // Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED
16571 ADD_BITFIELD_RO(DEV_CONN_DIS, 13, 1)
16572 // Source: SIE_STATUS.BUS_RESET
16573 ADD_BITFIELD_RO(BUS_RESET, 12, 1)
16574 // Source: SIE_STATUS.VBUS_DETECTED
16575 ADD_BITFIELD_RO(VBUS_DETECT, 11, 1)
16576 // Source: SIE_STATUS.STALL_REC
16577 ADD_BITFIELD_RO(STALL, 10, 1)
16578 // Source: SIE_STATUS.CRC_ERROR
16579 ADD_BITFIELD_RO(ERROR_CRC, 9, 1)
16580 // Source: SIE_STATUS.BIT_STUFF_ERROR
16581 ADD_BITFIELD_RO(ERROR_BIT_STUFF, 8, 1)
16582 // Source: SIE_STATUS.RX_OVERFLOW
16583 ADD_BITFIELD_RO(ERROR_RX_OVERFLOW, 7, 1)
16584 // Source: SIE_STATUS.RX_TIMEOUT
16585 ADD_BITFIELD_RO(ERROR_RX_TIMEOUT, 6, 1)
16586 // Source: SIE_STATUS.DATA_SEQ_ERROR
16587 ADD_BITFIELD_RO(ERROR_DATA_SEQ, 5, 1)
16588 // Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS.
16589 ADD_BITFIELD_RO(BUFF_STATUS, 4, 1)
16590 // Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit.
16591 ADD_BITFIELD_RO(TRANS_COMPLETE, 3, 1)
16592 // Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD
16593 ADD_BITFIELD_RO(HOST_SOF, 2, 1)
16594 // Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME
16595 ADD_BITFIELD_RO(HOST_RESUME, 1, 1)
16596 // Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED
16597 ADD_BITFIELD_RO(HOST_CONN_DIS, 0, 1)
16598 END_TYPE()
16599
16600 // Device only. Raw value of free-running PHY clock counter @48MHz. Used to calculate time between SOF events.
16601 // Reset value: 0x00000000
16602 BEGIN_TYPE(SOF_TIMESTAMP_RAW_t, uint32_t)
16603 ADD_BITFIELD_RO(SOF_TIMESTAMP_RAW, 0, 21)
16604 END_TYPE()
16605
16606 // Device only. Value of free-running PHY clock counter @48MHz when last SOF event occurred.
16607 // Reset value: 0x00000000
16608 BEGIN_TYPE(SOF_TIMESTAMP_LAST_t, uint32_t)
16609 ADD_BITFIELD_RO(SOF_TIMESTAMP_LAST, 0, 21)
16610 END_TYPE()
16611
16612 // Reset value: 0x00000000
16613 BEGIN_TYPE(SM_STATE_t, uint32_t)
16614 ADD_BITFIELD_RO(RX_DASM, 8, 4)
16615 ADD_BITFIELD_RO(BC_STATE, 5, 3)
16616 ADD_BITFIELD_RO(STATE, 0, 5)
16617 END_TYPE()
16618
16619 // TX error count for each endpoint. Write to each field to reset the counter to 0.
16620 // Reset value: 0x00000000
16621 BEGIN_TYPE(EP_TX_ERROR_t, uint32_t)
16622 ADD_BITFIELD_RW(EP15, 30, 2)
16623 ADD_BITFIELD_RW(EP14, 28, 2)
16624 ADD_BITFIELD_RW(EP13, 26, 2)
16625 ADD_BITFIELD_RW(EP12, 24, 2)
16626 ADD_BITFIELD_RW(EP11, 22, 2)
16627 ADD_BITFIELD_RW(EP10, 20, 2)
16628 ADD_BITFIELD_RW(EP9, 18, 2)
16629 ADD_BITFIELD_RW(EP8, 16, 2)
16630 ADD_BITFIELD_RW(EP7, 14, 2)
16631 ADD_BITFIELD_RW(EP6, 12, 2)
16632 ADD_BITFIELD_RW(EP5, 10, 2)
16633 ADD_BITFIELD_RW(EP4, 8, 2)
16634 ADD_BITFIELD_RW(EP3, 6, 2)
16635 ADD_BITFIELD_RW(EP2, 4, 2)
16636 ADD_BITFIELD_RW(EP1, 2, 2)
16637 ADD_BITFIELD_RW(EP0, 0, 2)
16638 END_TYPE()
16639
16640 // RX error count for each endpoint. Write to each field to reset the counter to 0.
16641 // Reset value: 0x00000000
16642 BEGIN_TYPE(EP_RX_ERROR_t, uint32_t)
16643 ADD_BITFIELD_RW(EP15_SEQ, 31, 1)
16644 ADD_BITFIELD_RW(EP15_TRANSACTION, 30, 1)
16645 ADD_BITFIELD_RW(EP14_SEQ, 29, 1)
16646 ADD_BITFIELD_RW(EP14_TRANSACTION, 28, 1)
16647 ADD_BITFIELD_RW(EP13_SEQ, 27, 1)
16648 ADD_BITFIELD_RW(EP13_TRANSACTION, 26, 1)
16649 ADD_BITFIELD_RW(EP12_SEQ, 25, 1)
16650 ADD_BITFIELD_RW(EP12_TRANSACTION, 24, 1)
16651 ADD_BITFIELD_RW(EP11_SEQ, 23, 1)
16652 ADD_BITFIELD_RW(EP11_TRANSACTION, 22, 1)
16653 ADD_BITFIELD_RW(EP10_SEQ, 21, 1)
16654 ADD_BITFIELD_RW(EP10_TRANSACTION, 20, 1)
16655 ADD_BITFIELD_RW(EP9_SEQ, 19, 1)
16656 ADD_BITFIELD_RW(EP9_TRANSACTION, 18, 1)
16657 ADD_BITFIELD_RW(EP8_SEQ, 17, 1)
16658 ADD_BITFIELD_RW(EP8_TRANSACTION, 16, 1)
16659 ADD_BITFIELD_RW(EP7_SEQ, 15, 1)
16660 ADD_BITFIELD_RW(EP7_TRANSACTION, 14, 1)
16661 ADD_BITFIELD_RW(EP6_SEQ, 13, 1)
16662 ADD_BITFIELD_RW(EP6_TRANSACTION, 12, 1)
16663 ADD_BITFIELD_RW(EP5_SEQ, 11, 1)
16664 ADD_BITFIELD_RW(EP5_TRANSACTION, 10, 1)
16665 ADD_BITFIELD_RW(EP4_SEQ, 9, 1)
16666 ADD_BITFIELD_RW(EP4_TRANSACTION, 8, 1)
16667 ADD_BITFIELD_RW(EP3_SEQ, 7, 1)
16668 ADD_BITFIELD_RW(EP3_TRANSACTION, 6, 1)
16669 ADD_BITFIELD_RW(EP2_SEQ, 5, 1)
16670 ADD_BITFIELD_RW(EP2_TRANSACTION, 4, 1)
16671 ADD_BITFIELD_RW(EP1_SEQ, 3, 1)
16672 ADD_BITFIELD_RW(EP1_TRANSACTION, 2, 1)
16673 ADD_BITFIELD_RW(EP0_SEQ, 1, 1)
16674 ADD_BITFIELD_RW(EP0_TRANSACTION, 0, 1)
16675 END_TYPE()
16676
16677 // Watchdog that forces the device state machine to idle and raises an interrupt if the device stays in a state that isn't idle for the configured limit. The counter is reset on every state transition. Set limit while enable is low and then set the enable.
16678 // Reset value: 0x00000000
16679 BEGIN_TYPE(DEV_SM_WATCHDOG_t, uint32_t)
16680 ADD_BITFIELD_RW(FIRED, 20, 1)
16681 // Set to 1 to forcibly reset the device state machine on watchdog expiry
16682 ADD_BITFIELD_RW(RESET, 19, 1)
16683 ADD_BITFIELD_RW(ENABLE, 18, 1)
16684 ADD_BITFIELD_RW(LIMIT, 0, 18)
16685 END_TYPE()
16686
16687 struct USB_t {
16688 ADDR_ENDP_t ADDR_ENDP;
16689 ADDR_ENDP__t ADDR_ENDP_1;
16690 ADDR_ENDP__t ADDR_ENDP_2;
16691 ADDR_ENDP__t ADDR_ENDP_3;
16692 ADDR_ENDP__t ADDR_ENDP_4;
16693 ADDR_ENDP__t ADDR_ENDP_5;
16694 ADDR_ENDP__t ADDR_ENDP_6;
16695 ADDR_ENDP__t ADDR_ENDP_7;
16696 ADDR_ENDP__t ADDR_ENDP_8;
16697 ADDR_ENDP__t ADDR_ENDP_9;
16698 ADDR_ENDP__t ADDR_ENDP_10;
16699 ADDR_ENDP__t ADDR_ENDP_11;
16700 ADDR_ENDP__t ADDR_ENDP_12;
16701 ADDR_ENDP__t ADDR_ENDP_13;
16702 ADDR_ENDP__t ADDR_ENDP_14;
16703 ADDR_ENDP__t ADDR_ENDP_15;
16704 MAIN_CTRL_t MAIN_CTRL;
16705 SOF_WR_t SOF_WR;
16706 SOF_RD_t SOF_RD;
16707 SIE_CTRL_t SIE_CTRL;
16708 SIE_STATUS_t SIE_STATUS;
16709 INT_EP_CTRL_t INT_EP_CTRL;
16710 BUFF_STATUS_t BUFF_STATUS;
16711 BUFF_CPU_SHOULD_HANDLE_t BUFF_CPU_SHOULD_HANDLE;
16712 EP_ABORT_t EP_ABORT;
16713 EP_ABORT_DONE_t EP_ABORT_DONE;
16714 EP_STALL_ARM_t EP_STALL_ARM;
16715 NAK_POLL_t NAK_POLL;
16716 EP_STATUS_STALL_NAK_t EP_STATUS_STALL_NAK;
16717 USB_MUXING_t USB_MUXING;
16718 USB_PWR_t USB_PWR;
16719 USBPHY_DIRECT_t USBPHY_DIRECT;
16720 USBPHY_DIRECT_OVERRIDE_t USBPHY_DIRECT_OVERRIDE;
16721 USBPHY_TRIM_t USBPHY_TRIM;
16722 LINESTATE_TUNING_t LINESTATE_TUNING;
16723 INTR_t INTR;
16724 INTE_t INTE;
16725 INTF_t INTF;
16726 INTS_t INTS;
16727 uint32_t reserved0[25];
16728 SOF_TIMESTAMP_RAW_t SOF_TIMESTAMP_RAW;
16729 SOF_TIMESTAMP_LAST_t SOF_TIMESTAMP_LAST;
16730 SM_STATE_t SM_STATE;
16731 EP_TX_ERROR_t EP_TX_ERROR;
16732 EP_RX_ERROR_t EP_RX_ERROR;
16733 DEV_SM_WATCHDOG_t DEV_SM_WATCHDOG;
16734 };
16735
16736 static USB_t & USB = (*(USB_t *)0x50110000);
16737 static USB_t & USB_XOR = (*(USB_t *)0x50111000);
16738 static USB_t & USB_SET = (*(USB_t *)0x50112000);
16739 static USB_t & USB_CLR = (*(USB_t *)0x50113000);
16740
16741} // _USB_
16742
16743// ARM TrustZone RNG register block
16744namespace _TRNG_ {
16745
16746 // Interrupt masking.
16747 // Reset value: 0x0000000f
16748 BEGIN_TYPE(RNG_IMR_t, uint32_t)
16749 // RESERVED
16750 ADD_BITFIELD_RO(RESERVED, 4, 28)
16751 // 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt.
16752 ADD_BITFIELD_RW(VN_ERR_INT_MASK, 3, 1)
16753 // 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt.
16754 ADD_BITFIELD_RW(CRNGT_ERR_INT_MASK, 2, 1)
16755 // 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt.
16756 ADD_BITFIELD_RW(AUTOCORR_ERR_INT_MASK, 1, 1)
16757 // 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt.
16758 ADD_BITFIELD_RW(EHR_VALID_INT_MASK, 0, 1)
16759 END_TYPE()
16760
16761 // RNG status register. If corresponding RNG_IMR bit is unmasked, an interrupt will be generated.
16762 // Reset value: 0x00000000
16763 BEGIN_TYPE(RNG_ISR_t, uint32_t)
16764 // RESERVED
16765 ADD_BITFIELD_RO(RESERVED, 4, 28)
16766 // 1'b1 indicates Von Neuman error. Error in von Neuman occurs if 32 consecutive collected bits are identical, ZERO or ONE.
16767 ADD_BITFIELD_RO(VN_ERR, 3, 1)
16768 // 1'b1 indicates CRNGT in the RNG test failed. Failure occurs when two consecutive blocks of 16 collected bits are equal.
16769 ADD_BITFIELD_RO(CRNGT_ERR, 2, 1)
16770 // 1'b1 indicates Autocorrelation test failed four times in a row. When set, RNG cease from functioning until next reset.
16771 ADD_BITFIELD_RO(AUTOCORR_ERR, 1, 1)
16772 // 1'b1 indicates that 192 bits have been collected in the RNG, and are ready to be read.
16773 ADD_BITFIELD_RO(EHR_VALID, 0, 1)
16774 END_TYPE()
16775
16776 // Interrupt/status bit clear Register.
16777 // Reset value: 0x00000000
16778 BEGIN_TYPE(RNG_ICR_t, uint32_t)
16779 // RESERVED
16780 ADD_BITFIELD_RO(RESERVED, 4, 28)
16781 // Write 1'b1 - clear corresponding bit in RNG_ISR.
16782 ADD_BITFIELD_RW(VN_ERR, 3, 1)
16783 // Write 1'b1 - clear corresponding bit in RNG_ISR.
16784 ADD_BITFIELD_RW(CRNGT_ERR, 2, 1)
16785 // Cannot be cleared by SW! Only RNG reset clears this bit.
16786 ADD_BITFIELD_RW(AUTOCORR_ERR, 1, 1)
16787 // Write 1'b1 - clear corresponding bit in RNG_ISR.
16788 ADD_BITFIELD_RW(EHR_VALID, 0, 1)
16789 END_TYPE()
16790
16791 // Selecting the inverter-chain length.
16792 // Reset value: 0x00000000
16793 BEGIN_TYPE(TRNG_CONFIG_t, uint32_t)
16794 // RESERVED
16795 ADD_BITFIELD_RO(RESERVED, 2, 30)
16796 // Selects the number of inverters (out of four possible selections) in the ring oscillator (the entropy source).
16797 ADD_BITFIELD_RW(RND_SRC_SEL, 0, 2)
16798 END_TYPE()
16799
16800 // 192 bit collection indication.
16801 // Reset value: 0x00000000
16802 BEGIN_TYPE(TRNG_VALID_t, uint32_t)
16803 // RESERVED
16804 ADD_BITFIELD_RO(RESERVED, 1, 31)
16805 // 1'b1 indicates that collection of bits in the RNG is completed, and data can be read from EHR_DATA register.
16806 ADD_BITFIELD_RO(EHR_VALID, 0, 1)
16807 END_TYPE()
16808
16809 // RNG collected bits.
16810 // Reset value: 0x00000000
16811 BEGIN_TYPE(EHR_DATA0_t, uint32_t)
16812 // Bits [31:0] of Entropy Holding Register (EHR) - RNG output register
16813 ADD_BITFIELD_RO(EHR_DATA0, 0, 32)
16814 END_TYPE()
16815
16816 // RNG collected bits.
16817 // Reset value: 0x00000000
16818 BEGIN_TYPE(EHR_DATA1_t, uint32_t)
16819 // Bits [63:32] of Entropy Holding Register (EHR) - RNG output register
16820 ADD_BITFIELD_RO(EHR_DATA1, 0, 32)
16821 END_TYPE()
16822
16823 // RNG collected bits.
16824 // Reset value: 0x00000000
16825 BEGIN_TYPE(EHR_DATA2_t, uint32_t)
16826 // Bits [95:64] of Entropy Holding Register (EHR) - RNG output register
16827 ADD_BITFIELD_RO(EHR_DATA2, 0, 32)
16828 END_TYPE()
16829
16830 // RNG collected bits.
16831 // Reset value: 0x00000000
16832 BEGIN_TYPE(EHR_DATA3_t, uint32_t)
16833 // Bits [127:96] of Entropy Holding Register (EHR) - RNG output register
16834 ADD_BITFIELD_RO(EHR_DATA3, 0, 32)
16835 END_TYPE()
16836
16837 // RNG collected bits.
16838 // Reset value: 0x00000000
16839 BEGIN_TYPE(EHR_DATA4_t, uint32_t)
16840 // Bits [159:128] of Entropy Holding Register (EHR) - RNG output register
16841 ADD_BITFIELD_RO(EHR_DATA4, 0, 32)
16842 END_TYPE()
16843
16844 // RNG collected bits.
16845 // Reset value: 0x00000000
16846 BEGIN_TYPE(EHR_DATA5_t, uint32_t)
16847 // Bits [191:160] of Entropy Holding Register (EHR) - RNG output register
16848 ADD_BITFIELD_RO(EHR_DATA5, 0, 32)
16849 END_TYPE()
16850
16851 // Enable signal for the random source.
16852 // Reset value: 0x00000000
16853 BEGIN_TYPE(RND_SOURCE_ENABLE_t, uint32_t)
16854 // RESERVED
16855 ADD_BITFIELD_RO(RESERVED, 1, 31)
16856 // * 1'b1 - entropy source is enabled. *1'b0 - entropy source is disabled
16857 ADD_BITFIELD_RW(RND_SRC_EN, 0, 1)
16858 END_TYPE()
16859
16860 // Counts clocks between sampling of random bit.
16861 // Reset value: 0x0000ffff
16862 BEGIN_TYPE(SAMPLE_CNT1_t, uint32_t)
16863 // Sets the number of rng_clk cycles between two consecutive ring oscillator samples. Note! If the Von-Neuman is bypassed, the minimum value for sample counter must not be less then decimal seventeen
16864 ADD_BITFIELD_RW(SAMPLE_CNTR1, 0, 32)
16865 END_TYPE()
16866
16867 // Statistic about Autocorrelation test activations.
16868 // Reset value: 0x00000000
16869 BEGIN_TYPE(AUTOCORR_STATISTIC_t, uint32_t)
16870 // RESERVED
16871 ADD_BITFIELD_RO(RESERVED, 22, 10)
16872 // Count each time an autocorrelation test fails. Any write to the register reset the counter. Stop collecting statistic if one of the counters reached the limit.
16873 ADD_BITFIELD_RW(AUTOCORR_FAILS, 14, 8)
16874 // Count each time an autocorrelation test starts. Any write to the register reset the counter. Stop collecting statistic if one of the counters reached the limit.
16875 ADD_BITFIELD_RW(AUTOCORR_TRYS, 0, 14)
16876 END_TYPE()
16877
16878 // Debug register.
16879 // Reset value: 0x00000000
16880 BEGIN_TYPE(TRNG_DEBUG_CONTROL_t, uint32_t)
16881 // When set, the autocorrelation test in the TRNG module is bypassed.
16882 ADD_BITFIELD_RW(AUTO_CORRELATE_BYPASS, 3, 1)
16883 // When set, the CRNGT test in the RNG is bypassed.
16884 ADD_BITFIELD_RW(TRNG_CRNGT_BYPASS, 2, 1)
16885 // When set, the Von-Neuman balancer is bypassed (including the 32 consecutive bits test).
16886 ADD_BITFIELD_RW(VNC_BYPASS, 1, 1)
16887 // N/A
16888 ADD_BITFIELD_RO(RESERVED, 0, 1)
16889 END_TYPE()
16890
16891 // Generate internal SW reset within the RNG block.
16892 // Reset value: 0x00000000
16893 BEGIN_TYPE(TRNG_SW_RESET_t, uint32_t)
16894 // RESERVED
16895 ADD_BITFIELD_RO(RESERVED, 1, 31)
16896 // Writing 1'b1 to this register causes an internal RNG reset.
16897 ADD_BITFIELD_RW(TRNG_SW_RESET, 0, 1)
16898 END_TYPE()
16899
16900 // Enable the RNG debug mode
16901 // Reset value: 0x00000000
16902 BEGIN_TYPE(RNG_DEBUG_EN_INPUT_t, uint32_t)
16903 // RESERVED
16904 ADD_BITFIELD_RO(RESERVED, 1, 31)
16905 // * 1'b1 - debug mode is enabled. *1'b0 - debug mode is disabled
16906 ADD_BITFIELD_RW(RNG_DEBUG_EN, 0, 1)
16907 END_TYPE()
16908
16909 // RNG Busy indication.
16910 // Reset value: 0x00000000
16911 BEGIN_TYPE(TRNG_BUSY_t, uint32_t)
16912 // RESERVED
16913 ADD_BITFIELD_RO(RESERVED, 1, 31)
16914 // Reflects rng_busy status.
16915 ADD_BITFIELD_RO(TRNG_BUSY, 0, 1)
16916 END_TYPE()
16917
16918 // Reset the counter of collected bits in the RNG.
16919 // Reset value: 0x00000000
16920 BEGIN_TYPE(RST_BITS_COUNTER_t, uint32_t)
16921 // RESERVED
16922 ADD_BITFIELD_RO(RESERVED, 1, 31)
16923 // Writing any value to this address will reset the bits counter and RNG valid registers. RND_SORCE_ENABLE register must be unset in order for the reset to take place.
16924 ADD_BITFIELD_RW(RST_BITS_COUNTER, 0, 1)
16925 END_TYPE()
16926
16927 // Displays the version settings of the TRNG.
16928 // Reset value: 0x00000000
16929 BEGIN_TYPE(RNG_VERSION_t, uint32_t)
16930 // RESERVED
16931 ADD_BITFIELD_RO(RESERVED, 8, 24)
16932 // * 1'b1 - 5 SBOX AES. *1'b0 - 20 SBOX AES
16933 ADD_BITFIELD_RO(RNG_USE_5_SBOXES, 7, 1)
16934 // * 1'b1 - Exists. *1'b0 - Does not exist
16935 ADD_BITFIELD_RO(RESEEDING_EXISTS, 6, 1)
16936 // * 1'b1 - Exists. *1'b0 - Does not exist
16937 ADD_BITFIELD_RO(KAT_EXISTS, 5, 1)
16938 // * 1'b1 - Exists. *1'b0 - Does not exist
16939 ADD_BITFIELD_RO(PRNG_EXISTS, 4, 1)
16940 // * 1'b1 - Exists. *1'b0 - Does not exist
16941 ADD_BITFIELD_RO(TRNG_TESTS_BYPASS_EN, 3, 1)
16942 // * 1'b1 - Exists. *1'b0 - Does not exist
16943 ADD_BITFIELD_RO(AUTOCORR_EXISTS, 2, 1)
16944 // * 1'b1 - Exists. *1'b0 - Does not exist
16945 ADD_BITFIELD_RO(CRNGT_EXISTS, 1, 1)
16946 // * 1'b1 - 192-bit EHR. *1'b0 - 128-bit EHR
16947 ADD_BITFIELD_RO(EHR_WIDTH_192, 0, 1)
16948 END_TYPE()
16949
16950 // Collected BIST results.
16951 // Reset value: 0x00000000
16952 BEGIN_TYPE(RNG_BIST_CNTR_0_t, uint32_t)
16953 // RESERVED
16954 ADD_BITFIELD_RO(RESERVED, 22, 10)
16955 // Reflects the results of RNG BIST counter.
16956 ADD_BITFIELD_RO(ROSC_CNTR_VAL, 0, 22)
16957 END_TYPE()
16958
16959 // Collected BIST results.
16960 // Reset value: 0x00000000
16961 BEGIN_TYPE(RNG_BIST_CNTR_1_t, uint32_t)
16962 // RESERVED
16963 ADD_BITFIELD_RO(RESERVED, 22, 10)
16964 // Reflects the results of RNG BIST counter.
16965 ADD_BITFIELD_RO(ROSC_CNTR_VAL, 0, 22)
16966 END_TYPE()
16967
16968 // Collected BIST results.
16969 // Reset value: 0x00000000
16970 BEGIN_TYPE(RNG_BIST_CNTR_2_t, uint32_t)
16971 // RESERVED
16972 ADD_BITFIELD_RO(RESERVED, 22, 10)
16973 // Reflects the results of RNG BIST counter.
16974 ADD_BITFIELD_RO(ROSC_CNTR_VAL, 0, 22)
16975 END_TYPE()
16976
16977 struct TRNG_t {
16978 uint32_t reserved0[64];
16979 RNG_IMR_t RNG_IMR;
16980 RNG_ISR_t RNG_ISR;
16981 RNG_ICR_t RNG_ICR;
16982 TRNG_CONFIG_t TRNG_CONFIG;
16983 TRNG_VALID_t TRNG_VALID;
16984 EHR_DATA0_t EHR_DATA0;
16985 EHR_DATA1_t EHR_DATA1;
16986 EHR_DATA2_t EHR_DATA2;
16987 EHR_DATA3_t EHR_DATA3;
16988 EHR_DATA4_t EHR_DATA4;
16989 EHR_DATA5_t EHR_DATA5;
16990 RND_SOURCE_ENABLE_t RND_SOURCE_ENABLE;
16991 SAMPLE_CNT1_t SAMPLE_CNT1;
16992 AUTOCORR_STATISTIC_t AUTOCORR_STATISTIC;
16993 TRNG_DEBUG_CONTROL_t TRNG_DEBUG_CONTROL;
16994 uint32_t reserved1;
16995 TRNG_SW_RESET_t TRNG_SW_RESET;
16996 uint32_t reserved2[28];
16997 RNG_DEBUG_EN_INPUT_t RNG_DEBUG_EN_INPUT;
16998 TRNG_BUSY_t TRNG_BUSY;
16999 RST_BITS_COUNTER_t RST_BITS_COUNTER;
17000 RNG_VERSION_t RNG_VERSION;
17001 uint32_t reserved3[7];
17002 RNG_BIST_CNTR_0_t RNG_BIST_CNTR_0;
17003 RNG_BIST_CNTR_1_t RNG_BIST_CNTR_1;
17004 RNG_BIST_CNTR_2_t RNG_BIST_CNTR_2;
17005 };
17006
17007 static TRNG_t & TRNG = (*(TRNG_t *)0x400f0000);
17008 static TRNG_t & TRNG_XOR = (*(TRNG_t *)0x400f1000);
17009 static TRNG_t & TRNG_SET = (*(TRNG_t *)0x400f2000);
17010 static TRNG_t & TRNG_CLR = (*(TRNG_t *)0x400f3000);
17011
17012} // _TRNG_
17013
17014// Glitch detector controls
17015namespace _GLITCH_DETECTOR_ {
17016
17017 // Forcibly arm the glitch detectors, if they are not already armed by OTP. When armed, any individual detector trigger will cause a restart of the switched core power domain's power-on reset state machine. Glitch detector triggers are recorded accumulatively in TRIG_STATUS. If the system is reset by a glitch detector trigger, this is recorded in POWMAN_CHIP_RESET. This register is Secure read/write only.
17018 // Reset value: 0x00005bad
17019 BEGIN_TYPE(ARM_t, uint32_t)
17020 ADD_BITFIELD_RW(ARM, 0, 16)
17021 END_TYPE()
17022
17023 // Do not force the glitch detectors to be armed
17024 static const uint32_t ARM_ARM__no = 23469;
17025 // Force the glitch detectors to be armed. (Any value other than ARM_NO counts as YES)
17026 static const uint32_t ARM_ARM__yes = 0;
17027
17028 // Reset value: 0x00000000
17029 BEGIN_TYPE(DISARM_t, uint32_t)
17030 // Forcibly disarm the glitch detectors, if they are armed by OTP. Ignored if ARM is YES. This register is Secure read/write only.
17031 ADD_BITFIELD_RW(DISARM, 0, 16)
17032 END_TYPE()
17033
17034 // Do not disarm the glitch detectors. (Any value other than DISARM_YES counts as NO)
17035 static const uint32_t DISARM_DISARM__no = 0;
17036 // Disarm the glitch detectors
17037 static const uint32_t DISARM_DISARM__yes = 56495;
17038
17039 // Adjust the sensitivity of glitch detectors to values other than their OTP-provided defaults. This register is Secure read/write only.
17040 // Reset value: 0x00000000
17041 BEGIN_TYPE(SENSITIVITY_t, uint32_t)
17042 ADD_BITFIELD_RW(DEFAULT, 24, 8)
17043 // Must be the inverse of DET3, else the default value is used.
17044 ADD_BITFIELD_RW(DET3_INV, 14, 2)
17045 // Must be the inverse of DET2, else the default value is used.
17046 ADD_BITFIELD_RW(DET2_INV, 12, 2)
17047 // Must be the inverse of DET1, else the default value is used.
17048 ADD_BITFIELD_RW(DET1_INV, 10, 2)
17049 // Must be the inverse of DET0, else the default value is used.
17050 ADD_BITFIELD_RW(DET0_INV, 8, 2)
17051 // Set sensitivity for detector 3. Higher values are more sensitive.
17052 ADD_BITFIELD_RW(DET3, 6, 2)
17053 // Set sensitivity for detector 2. Higher values are more sensitive.
17054 ADD_BITFIELD_RW(DET2, 4, 2)
17055 // Set sensitivity for detector 1. Higher values are more sensitive.
17056 ADD_BITFIELD_RW(DET1, 2, 2)
17057 // Set sensitivity for detector 0. Higher values are more sensitive.
17058 ADD_BITFIELD_RW(DET0, 0, 2)
17059 END_TYPE()
17060
17061 // Use the default sensitivity configured in OTP for all detectors. (Any value other than DEFAULT_NO counts as YES)
17062 static const uint32_t SENSITIVITY_DEFAULT__yes = 0;
17063 // Do not use the default sensitivity configured in OTP. Instead use the value from this register.
17064 static const uint32_t SENSITIVITY_DEFAULT__no = 222;
17065
17066 // Reset value: 0x00000000
17067 BEGIN_TYPE(LOCK_t, uint32_t)
17068 // Write any nonzero value to disable writes to ARM, DISARM, SENSITIVITY and LOCK. This register is Secure read/write only.
17069 ADD_BITFIELD_RW(LOCK, 0, 8)
17070 END_TYPE()
17071
17072 // Set when a detector output triggers. Write-1-clear. (May immediately return high if the detector remains in a failed state. Detectors can only be cleared by a full reset of the switched core power domain.) This register is Secure read/write only.
17073 // Reset value: 0x00000000
17074 BEGIN_TYPE(TRIG_STATUS_t, uint32_t)
17075 ADD_BITFIELD_RW(DET3, 3, 1)
17076 ADD_BITFIELD_RW(DET2, 2, 1)
17077 ADD_BITFIELD_RW(DET1, 1, 1)
17078 ADD_BITFIELD_RW(DET0, 0, 1)
17079 END_TYPE()
17080
17081 // Simulate the firing of one or more detectors. Writing ones to this register will set the matching bits in STATUS_TRIG. If the glitch detectors are currently armed, writing ones will also immediately reset the switched core power domain, and set the reset reason latches in POWMAN_CHIP_RESET to indicate a glitch detector resets. This register is Secure read/write only.
17082 // Reset value: 0x00000000
17083 BEGIN_TYPE(TRIG_FORCE_t, uint32_t)
17084 ADD_BITFIELD_WO(TRIG_FORCE, 0, 4)
17085 END_TYPE()
17086
17088 ARM_t ARM;
17089 DISARM_t DISARM;
17090 SENSITIVITY_t SENSITIVITY;
17091 LOCK_t LOCK;
17092 TRIG_STATUS_t TRIG_STATUS;
17093 TRIG_FORCE_t TRIG_FORCE;
17094 };
17095
17096 static GLITCH_DETECTOR_t & GLITCH_DETECTOR = (*(GLITCH_DETECTOR_t *)0x40158000);
17097 static GLITCH_DETECTOR_t & GLITCH_DETECTOR_XOR = (*(GLITCH_DETECTOR_t *)0x40159000);
17098 static GLITCH_DETECTOR_t & GLITCH_DETECTOR_SET = (*(GLITCH_DETECTOR_t *)0x4015a000);
17099 static GLITCH_DETECTOR_t & GLITCH_DETECTOR_CLR = (*(GLITCH_DETECTOR_t *)0x4015b000);
17100
17101} // _GLITCH_DETECTOR_
17102
17103// SNPS OTP control IF (SBPI and RPi wrapper control)
17104namespace _OTP_ {
17105
17106 // Software lock register for page n [0..63].
17107 // Locks are initialised from the OTP lock pages at reset.
17108 // This register can be written to further advance the lock state of each page
17109 // (until next reset), and read to check the current lock state of a page.
17110 // Reset value: 0x00000000
17111 BEGIN_TYPE(SW_LOCK_t, uint32_t)
17112 // Non-secure lock status. Writes are OR'd with the current value.
17113 ADD_BITFIELD_RW(NSEC, 2, 2)
17114 // Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code.
17115 ADD_BITFIELD_RW(SEC, 0, 2)
17116 END_TYPE()
17117
17118 static const uint32_t SW_LOCK_NSEC__read_write = 0;
17119 static const uint32_t SW_LOCK_NSEC__read_only = 1;
17120 static const uint32_t SW_LOCK_NSEC__inaccessible = 3;
17121 static const uint32_t SW_LOCK_SEC__read_write = 0;
17122 static const uint32_t SW_LOCK_SEC__read_only = 1;
17123 static const uint32_t SW_LOCK_SEC__inaccessible = 3;
17124
17125 // Dispatch instructions to the SBPI interface, used for programming the OTP fuses.
17126 // Reset value: 0x00000000
17127 BEGIN_TYPE(SBPI_INSTR_t, uint32_t)
17128 // Execute instruction
17129 ADD_BITFIELD_WO(EXEC, 30, 1)
17130 // Payload type is write
17131 ADD_BITFIELD_RW(IS_WR, 29, 1)
17132 // Instruction has payload (data to be written or to be read)
17133 ADD_BITFIELD_RW(HAS_PAYLOAD, 28, 1)
17134 // Instruction payload size in bytes minus 1
17135 ADD_BITFIELD_RW(PAYLOAD_SIZE_M1, 24, 4)
17136 // Instruction target, it can be PMC (0x3a) or DAP (0x02)
17137 ADD_BITFIELD_RW(TARGET, 16, 8)
17138 ADD_BITFIELD_RW(CMD, 8, 8)
17139 // wdata to be used only when payload_size_m1=0
17140 ADD_BITFIELD_RW(SHORT_WDATA, 0, 8)
17141 END_TYPE()
17142
17143 // SBPI write payload bytes 3..0
17144 // Reset value: 0x00000000
17145 BEGIN_TYPE(SBPI_WDATA_0_t, uint32_t)
17146 ADD_BITFIELD_RW(SBPI_WDATA_0, 0, 32)
17147 END_TYPE()
17148
17149 // SBPI write payload bytes 7..4
17150 // Reset value: 0x00000000
17151 BEGIN_TYPE(SBPI_WDATA_1_t, uint32_t)
17152 ADD_BITFIELD_RW(SBPI_WDATA_1, 0, 32)
17153 END_TYPE()
17154
17155 // SBPI write payload bytes 11..8
17156 // Reset value: 0x00000000
17157 BEGIN_TYPE(SBPI_WDATA_2_t, uint32_t)
17158 ADD_BITFIELD_RW(SBPI_WDATA_2, 0, 32)
17159 END_TYPE()
17160
17161 // SBPI write payload bytes 15..12
17162 // Reset value: 0x00000000
17163 BEGIN_TYPE(SBPI_WDATA_3_t, uint32_t)
17164 ADD_BITFIELD_RW(SBPI_WDATA_3, 0, 32)
17165 END_TYPE()
17166
17167 // Read payload bytes 3..0. Once read, the data in the register will automatically clear to 0.
17168 // Reset value: 0x00000000
17169 BEGIN_TYPE(SBPI_RDATA_0_t, uint32_t)
17170 ADD_BITFIELD_RO(SBPI_RDATA_0, 0, 32)
17171 END_TYPE()
17172
17173 // Read payload bytes 7..4. Once read, the data in the register will automatically clear to 0.
17174 // Reset value: 0x00000000
17175 BEGIN_TYPE(SBPI_RDATA_1_t, uint32_t)
17176 ADD_BITFIELD_RO(SBPI_RDATA_1, 0, 32)
17177 END_TYPE()
17178
17179 // Read payload bytes 11..8. Once read, the data in the register will automatically clear to 0.
17180 // Reset value: 0x00000000
17181 BEGIN_TYPE(SBPI_RDATA_2_t, uint32_t)
17182 ADD_BITFIELD_RO(SBPI_RDATA_2, 0, 32)
17183 END_TYPE()
17184
17185 // Read payload bytes 15..12. Once read, the data in the register will automatically clear to 0.
17186 // Reset value: 0x00000000
17187 BEGIN_TYPE(SBPI_RDATA_3_t, uint32_t)
17188 ADD_BITFIELD_RO(SBPI_RDATA_3, 0, 32)
17189 END_TYPE()
17190
17191 // Reset value: 0x00000000
17192 BEGIN_TYPE(SBPI_STATUS_t, uint32_t)
17193 // SBPI MISO (master in - slave out): response from SBPI
17194 ADD_BITFIELD_RO(MISO, 16, 8)
17195 // SBPI flag
17196 ADD_BITFIELD_RO(FLAG, 12, 1)
17197 // Last instruction missed (dropped), as the previous has not finished running
17198 ADD_BITFIELD_RW(INSTR_MISS, 8, 1)
17199 // Last instruction done
17200 ADD_BITFIELD_RW(INSTR_DONE, 4, 1)
17201 // Read command has returned data
17202 ADD_BITFIELD_RW(RDATA_VLD, 0, 1)
17203 END_TYPE()
17204
17205 // Controls for APB data read interface (USER interface)
17206 // Reset value: 0x00000001
17207 BEGIN_TYPE(USR_t, uint32_t)
17208 // Power-down; 1 disables current reference. Must be 0 to read data from the OTP.
17209 ADD_BITFIELD_RW(PD, 4, 1)
17210 // 1 enables USER interface; 0 disables USER interface (enables SBPI). This bit must be cleared before performing any SBPI access, such as when programming the OTP. The APB data read interface (USER interface) will be inaccessible during this time, and will return a bus error if any read is attempted.
17211 ADD_BITFIELD_RW(DCTRL, 0, 1)
17212 END_TYPE()
17213
17214 // Debug for OTP power-on state machine
17215 // Reset value: 0x00000000
17216 BEGIN_TYPE(DBG_t, uint32_t)
17217 // The chip is in RMA mode
17218 ADD_BITFIELD_RO(CUSTOMER_RMA_FLAG, 12, 1)
17219 // Monitor the PSM FSM's state
17220 ADD_BITFIELD_RO(PSM_STATE, 4, 4)
17221 // Ring oscillator is up and running
17222 ADD_BITFIELD_RO(ROSC_UP, 3, 1)
17223 // Ring oscillator was seen up and running
17224 ADD_BITFIELD_RW(ROSC_UP_SEEN, 2, 1)
17225 // PSM boot done status flag
17226 ADD_BITFIELD_RO(BOOT_DONE, 1, 1)
17227 // PSM done status flag
17228 ADD_BITFIELD_RO(PSM_DONE, 0, 1)
17229 END_TYPE()
17230
17231 // During BIST, count address locations that have at least one leaky bit
17232 // Reset value: 0x0fff0000
17233 BEGIN_TYPE(BIST_t, uint32_t)
17234 // Flag if the count of address locations with at least one leaky bit exceeds cnt_max
17235 ADD_BITFIELD_RO(CNT_FAIL, 30, 1)
17236 // Clear counter before use
17237 ADD_BITFIELD_WO(CNT_CLR, 29, 1)
17238 // Enable the counter before the BIST function is initiated
17239 ADD_BITFIELD_RW(CNT_ENA, 28, 1)
17240 // The cnt_fail flag will be set if the number of leaky locations exceeds this number
17241 ADD_BITFIELD_RW(CNT_MAX, 16, 12)
17242 // Number of locations that have at least one leaky bit. Note: This count is true only if the BIST was initiated without the fix option.
17243 ADD_BITFIELD_RO(CNT, 0, 13)
17244 END_TYPE()
17245
17246 // Word 0 (bits 31..0) of the key. Write only, read returns 0x0
17247 // Reset value: 0x00000000
17248 BEGIN_TYPE(CRT_KEY_W0_t, uint32_t)
17249 ADD_BITFIELD_WO(CRT_KEY_W0, 0, 32)
17250 END_TYPE()
17251
17252 // Word 1 (bits 63..32) of the key. Write only, read returns 0x0
17253 // Reset value: 0x00000000
17254 BEGIN_TYPE(CRT_KEY_W1_t, uint32_t)
17255 ADD_BITFIELD_WO(CRT_KEY_W1, 0, 32)
17256 END_TYPE()
17257
17258 // Word 2 (bits 95..64) of the key. Write only, read returns 0x0
17259 // Reset value: 0x00000000
17260 BEGIN_TYPE(CRT_KEY_W2_t, uint32_t)
17261 ADD_BITFIELD_WO(CRT_KEY_W2, 0, 32)
17262 END_TYPE()
17263
17264 // Word 3 (bits 127..96) of the key. Write only, read returns 0x0
17265 // Reset value: 0x00000000
17266 BEGIN_TYPE(CRT_KEY_W3_t, uint32_t)
17267 ADD_BITFIELD_WO(CRT_KEY_W3, 0, 32)
17268 END_TYPE()
17269
17270 // Quickly check values of critical flags read during boot up
17271 // Reset value: 0x00000000
17272 BEGIN_TYPE(CRITICAL_t, uint32_t)
17273 ADD_BITFIELD_RO(RISCV_DISABLE, 17, 1)
17274 ADD_BITFIELD_RO(ARM_DISABLE, 16, 1)
17275 ADD_BITFIELD_RO(GLITCH_DETECTOR_SENS, 5, 2)
17276 ADD_BITFIELD_RO(GLITCH_DETECTOR_ENABLE, 4, 1)
17277 ADD_BITFIELD_RO(DEFAULT_ARCHSEL, 3, 1)
17278 ADD_BITFIELD_RO(DEBUG_DISABLE, 2, 1)
17279 ADD_BITFIELD_RO(SECURE_DEBUG_DISABLE, 1, 1)
17280 ADD_BITFIELD_RO(SECURE_BOOT_ENABLE, 0, 1)
17281 END_TYPE()
17282
17283 // Which keys were valid (enrolled) at boot time
17284 // Reset value: 0x00000000
17285 BEGIN_TYPE(KEY_VALID_t, uint32_t)
17286 ADD_BITFIELD_RO(KEY_VALID, 0, 8)
17287 END_TYPE()
17288
17289 // Enable a debug feature that has been disabled. Debug features are disabled if one of the relevant critical boot flags is set in OTP (DEBUG_DISABLE or SECURE_DEBUG_DISABLE), OR if a debug key is marked valid in OTP, and the matching key value has not been supplied over SWD. Specifically: - The DEBUG_DISABLE flag disables all debug features. This can be fully overridden by setting all bits of this register. - The SECURE_DEBUG_DISABLE flag disables secure processor debug. This can be fully overridden by setting the PROC0_SECURE and PROC1_SECURE bits of this register. - If a single debug key has been registered, and no matching key value has been supplied over SWD, then all debug features are disabled. This can be fully overridden by setting all bits of this register. - If both debug keys have been registered, and the Non-secure key's value (key 6) has been supplied over SWD, secure processor debug is disabled. This can be fully overridden by setting the PROC0_SECURE and PROC1_SECURE bits of this register. - If both debug keys have been registered, and the Secure key's value (key 5) has been supplied over SWD, then no debug features are disabled by the key mechanism. However, note that in this case debug features may still be disabled by the critical boot flags.
17290 // Reset value: 0x00000000
17291 BEGIN_TYPE(DEBUGEN_t, uint32_t)
17292 // Enable other debug components. Specifically, the CTI, and the APB-AP used to access the RISC-V Debug Module. These components are disabled by default if either of the debug disable critical flags is set, or if at least one debug key has been enrolled and the least secure of these enrolled key values has not been provided over SWD.
17293 ADD_BITFIELD_RW(MISC, 8, 1)
17294 // Permit core 1's Mem-AP to generate Secure accesses, assuming it is enabled at all. Also enable secure debug of core 1 (SPIDEN and SPNIDEN). Secure debug of core 1 is disabled by default if the secure debug disable critical flag is set, or if at least one debug key has been enrolled and the most secure of these enrolled key values not yet provided over SWD.
17295 ADD_BITFIELD_RW(PROC1_SECURE, 3, 1)
17296 // Enable core 1's Mem-AP if it is currently disabled. The Mem-AP is disabled by default if either of the debug disable critical flags is set, or if at least one debug key has been enrolled and the least secure of these enrolled key values has not been provided over SWD.
17297 ADD_BITFIELD_RW(PROC1, 2, 1)
17298 // Permit core 0's Mem-AP to generate Secure accesses, assuming it is enabled at all. Also enable secure debug of core 0 (SPIDEN and SPNIDEN). Secure debug of core 0 is disabled by default if the secure debug disable critical flag is set, or if at least one debug key has been enrolled and the most secure of these enrolled key values not yet provided over SWD. Note also that core Mem-APs are unconditionally disabled when a core is switched to RISC-V mode (by setting the ARCHSEL bit and performing a warm reset of the core).
17299 ADD_BITFIELD_RW(PROC0_SECURE, 1, 1)
17300 // Enable core 0's Mem-AP if it is currently disabled. The Mem-AP is disabled by default if either of the debug disable critical flags is set, or if at least one debug key has been enrolled and the least secure of these enrolled key values has not been provided over SWD. Note also that core Mem-APs are unconditionally disabled when a core is switched to RISC-V mode (by setting the ARCHSEL bit and performing a warm reset of the core).
17301 ADD_BITFIELD_RW(PROC0, 0, 1)
17302 END_TYPE()
17303
17304 // Write 1s to lock corresponding bits in DEBUGEN. This register is reset by the processor cold reset.
17305 // Reset value: 0x00000000
17306 BEGIN_TYPE(DEBUGEN_LOCK_t, uint32_t)
17307 // Write 1 to lock the MISC bit of DEBUGEN. Can't be cleared once set.
17308 ADD_BITFIELD_RW(MISC, 8, 1)
17309 // Write 1 to lock the PROC1_SECURE bit of DEBUGEN. Can't be cleared once set.
17310 ADD_BITFIELD_RW(PROC1_SECURE, 3, 1)
17311 // Write 1 to lock the PROC1 bit of DEBUGEN. Can't be cleared once set.
17312 ADD_BITFIELD_RW(PROC1, 2, 1)
17313 // Write 1 to lock the PROC0_SECURE bit of DEBUGEN. Can't be cleared once set.
17314 ADD_BITFIELD_RW(PROC0_SECURE, 1, 1)
17315 // Write 1 to lock the PROC0 bit of DEBUGEN. Can't be cleared once set.
17316 ADD_BITFIELD_RW(PROC0, 0, 1)
17317 END_TYPE()
17318
17319 // Architecture select (Arm/RISC-V). The default and allowable values of this register are constrained by the critical boot flags. This register is reset by the earliest reset in the switched core power domain (before a processor cold reset). Cores sample their architecture select signal on a warm reset. The source of the warm reset could be the system power-up state machine, the watchdog timer, Arm SYSRESETREQ or from RISC-V hartresetreq. Note that when an Arm core is deselected, its cold reset domain is also held in reset, since in particular the SYSRESETREQ bit becomes inaccessible once the core is deselected. Note also the RISC-V cores do not have a cold reset domain, since their corresponding controls are located in the Debug Module.
17320 // Reset value: 0x00000000
17321 BEGIN_TYPE(ARCHSEL_t, uint32_t)
17322 // Select architecture for core 1.
17323 ADD_BITFIELD_RW(CORE1, 1, 1)
17324 // Select architecture for core 0.
17325 ADD_BITFIELD_RW(CORE0, 0, 1)
17326 END_TYPE()
17327
17328 // Switch core 1 to Arm (Cortex-M33)
17329 static const uint32_t ARCHSEL_CORE1__arm = 0;
17330 // Switch core 1 to RISC-V (Hazard3)
17331 static const uint32_t ARCHSEL_CORE1__riscv = 1;
17332 // Switch core 0 to Arm (Cortex-M33)
17333 static const uint32_t ARCHSEL_CORE0__arm = 0;
17334 // Switch core 0 to RISC-V (Hazard3)
17335 static const uint32_t ARCHSEL_CORE0__riscv = 1;
17336
17337 // Get the current architecture select state of each core. Cores sample the current value of the ARCHSEL register when their warm reset is released, at which point the corresponding bit in this register will also update.
17338 // Reset value: 0x00000000
17339 BEGIN_TYPE(ARCHSEL_STATUS_t, uint32_t)
17340 // Current architecture for core 0. Updated on processor warm reset.
17341 ADD_BITFIELD_RO(CORE1, 1, 1)
17342 // Current architecture for core 0. Updated on processor warm reset.
17343 ADD_BITFIELD_RO(CORE0, 0, 1)
17344 END_TYPE()
17345
17346 // Core 1 is currently Arm (Cortex-M33)
17347 static const uint32_t ARCHSEL_STATUS_CORE1__arm = 0;
17348 // Core 1 is currently RISC-V (Hazard3)
17349 static const uint32_t ARCHSEL_STATUS_CORE1__riscv = 1;
17350 // Core 0 is currently Arm (Cortex-M33)
17351 static const uint32_t ARCHSEL_STATUS_CORE0__arm = 0;
17352 // Core 0 is currently RISC-V (Hazard3)
17353 static const uint32_t ARCHSEL_STATUS_CORE0__riscv = 1;
17354
17355 // Tell the bootrom to ignore scratch register boot vectors (both power manager and watchdog) on the next power up. If an early boot stage has soft-locked some OTP pages in order to protect their contents from later stages, there is a risk that Secure code running at a later stage can unlock the pages by performing a watchdog reset that resets the OTP. This register can be used to ensure that the bootloader runs as normal on the next power up, preventing Secure code at a later stage from accessing OTP in its unlocked state. Should be used in conjunction with the power manager BOOTDIS register.
17356 // Reset value: 0x00000000
17357 BEGIN_TYPE(BOOTDIS_t, uint32_t)
17358 // This flag always ORs writes into its current contents. It can be set but not cleared by software. The BOOTDIS_NEXT bit is OR'd into the BOOTDIS_NOW bit when the core is powered down. Simultaneously, the BOOTDIS_NEXT bit is cleared. Setting this bit means that the boot scratch registers will be ignored following the next core power down. This flag should be set by an early boot stage that has soft-locked OTP pages, to prevent later stages from unlocking it via watchdog reset.
17359 ADD_BITFIELD_RW(NEXT, 1, 1)
17360 // When the core is powered down, the current value of BOOTDIS_NEXT is OR'd into BOOTDIS_NOW, and BOOTDIS_NEXT is cleared. The bootrom checks this flag before reading the boot scratch registers. If it is set, the bootrom clears it, and ignores the BOOT registers. This prevents Secure software from diverting the boot path before a bootloader has had the chance to soft lock OTP pages containing sensitive data.
17361 ADD_BITFIELD_RW(NOW, 0, 1)
17362 END_TYPE()
17363
17364 // Raw Interrupts
17365 // Reset value: 0x00000000
17366 BEGIN_TYPE(INTR_t, uint32_t)
17367 ADD_BITFIELD_RW(APB_RD_NSEC_FAIL, 4, 1)
17368 ADD_BITFIELD_RW(APB_RD_SEC_FAIL, 3, 1)
17369 ADD_BITFIELD_RW(APB_DCTRL_FAIL, 2, 1)
17370 ADD_BITFIELD_RW(SBPI_WR_FAIL, 1, 1)
17371 ADD_BITFIELD_RO(SBPI_FLAG_N, 0, 1)
17372 END_TYPE()
17373
17374 // Interrupt Enable
17375 // Reset value: 0x00000000
17376 BEGIN_TYPE(INTE_t, uint32_t)
17377 ADD_BITFIELD_RW(APB_RD_NSEC_FAIL, 4, 1)
17378 ADD_BITFIELD_RW(APB_RD_SEC_FAIL, 3, 1)
17379 ADD_BITFIELD_RW(APB_DCTRL_FAIL, 2, 1)
17380 ADD_BITFIELD_RW(SBPI_WR_FAIL, 1, 1)
17381 ADD_BITFIELD_RW(SBPI_FLAG_N, 0, 1)
17382 END_TYPE()
17383
17384 // Interrupt Force
17385 // Reset value: 0x00000000
17386 BEGIN_TYPE(INTF_t, uint32_t)
17387 ADD_BITFIELD_RW(APB_RD_NSEC_FAIL, 4, 1)
17388 ADD_BITFIELD_RW(APB_RD_SEC_FAIL, 3, 1)
17389 ADD_BITFIELD_RW(APB_DCTRL_FAIL, 2, 1)
17390 ADD_BITFIELD_RW(SBPI_WR_FAIL, 1, 1)
17391 ADD_BITFIELD_RW(SBPI_FLAG_N, 0, 1)
17392 END_TYPE()
17393
17394 // Interrupt status after masking & forcing
17395 // Reset value: 0x00000000
17396 BEGIN_TYPE(INTS_t, uint32_t)
17397 ADD_BITFIELD_RO(APB_RD_NSEC_FAIL, 4, 1)
17398 ADD_BITFIELD_RO(APB_RD_SEC_FAIL, 3, 1)
17399 ADD_BITFIELD_RO(APB_DCTRL_FAIL, 2, 1)
17400 ADD_BITFIELD_RO(SBPI_WR_FAIL, 1, 1)
17401 ADD_BITFIELD_RO(SBPI_FLAG_N, 0, 1)
17402 END_TYPE()
17403
17404 struct OTP_t {
17405 SW_LOCK_t SW_LOCK[64];
17406 SBPI_INSTR_t SBPI_INSTR;
17407 SBPI_WDATA_0_t SBPI_WDATA_0;
17408 SBPI_WDATA_1_t SBPI_WDATA_1;
17409 SBPI_WDATA_2_t SBPI_WDATA_2;
17410 SBPI_WDATA_3_t SBPI_WDATA_3;
17411 SBPI_RDATA_0_t SBPI_RDATA_0;
17412 SBPI_RDATA_1_t SBPI_RDATA_1;
17413 SBPI_RDATA_2_t SBPI_RDATA_2;
17414 SBPI_RDATA_3_t SBPI_RDATA_3;
17415 SBPI_STATUS_t SBPI_STATUS;
17416 USR_t USR;
17417 DBG_t DBG;
17418 uint32_t reserved0;
17419 BIST_t BIST;
17420 CRT_KEY_W0_t CRT_KEY_W0;
17421 CRT_KEY_W1_t CRT_KEY_W1;
17422 CRT_KEY_W2_t CRT_KEY_W2;
17423 CRT_KEY_W3_t CRT_KEY_W3;
17424 CRITICAL_t CRITICAL;
17425 KEY_VALID_t KEY_VALID;
17426 DEBUGEN_t DEBUGEN;
17427 DEBUGEN_LOCK_t DEBUGEN_LOCK;
17428 ARCHSEL_t ARCHSEL;
17429 ARCHSEL_STATUS_t ARCHSEL_STATUS;
17430 BOOTDIS_t BOOTDIS;
17431 INTR_t INTR;
17432 INTE_t INTE;
17433 INTF_t INTF;
17434 INTS_t INTS;
17435 };
17436
17437 static OTP_t & OTP = (*(OTP_t *)0x40120000);
17438 static OTP_t & OTP_XOR = (*(OTP_t *)0x40121000);
17439 static OTP_t & OTP_SET = (*(OTP_t *)0x40122000);
17440 static OTP_t & OTP_CLR = (*(OTP_t *)0x40123000);
17441
17442} // _OTP_
17443
17444// Predefined OTP data layout for RP2350
17445namespace _OTP_DATA_ {
17446
17447 // Bits 15:0 of public device ID. (ECC) The CHIPID0..3 rows contain a 64-bit random identifier for this chip, which can be read from the USB bootloader PICOBOOT interface or from the get_sys_info ROM API. The number of random bits makes the occurrence of twins exceedingly unlikely: for example, a fleet of a hundred million devices has a 99.97% probability of no twinned IDs. This is estimated to be lower than the occurrence of process errors in the assignment of sequential random IDs, and for practical purposes CHIPID may be treated as unique.
17448 BEGIN_TYPE(CHIPID0_t, uint16_t)
17449 ADD_BITFIELD_RO(CHIPID0, 0, 16)
17450 END_TYPE()
17451
17452 // Bits 31:16 of public device ID (ECC)
17453 BEGIN_TYPE(CHIPID1_t, uint16_t)
17454 ADD_BITFIELD_RO(CHIPID1, 0, 16)
17455 END_TYPE()
17456
17457 // Bits 47:32 of public device ID (ECC)
17458 BEGIN_TYPE(CHIPID2_t, uint16_t)
17459 ADD_BITFIELD_RO(CHIPID2, 0, 16)
17460 END_TYPE()
17461
17462 // Bits 63:48 of public device ID (ECC)
17463 BEGIN_TYPE(CHIPID3_t, uint16_t)
17464 ADD_BITFIELD_RO(CHIPID3, 0, 16)
17465 END_TYPE()
17466
17467 // Bits 15:0 of private per-device random number (ECC) The RANDID0..7 rows form a 128-bit random number generated during device test. This ID is not exposed through the USB PICOBOOT GET_INFO command or the ROM `get_sys_info()` API. However note that the USB PICOBOOT OTP access point can read the entirety of page 0, so this value is not meaningfully private unless the USB PICOBOOT interface is disabled via the DISABLE_BOOTSEL_USB_PICOBOOT_IFC flag in BOOT_FLAGS0.
17468 BEGIN_TYPE(RANDID0_t, uint16_t)
17469 ADD_BITFIELD_RO(RANDID0, 0, 16)
17470 END_TYPE()
17471
17472 // Bits 31:16 of private per-device random number (ECC)
17473 BEGIN_TYPE(RANDID1_t, uint16_t)
17474 ADD_BITFIELD_RO(RANDID1, 0, 16)
17475 END_TYPE()
17476
17477 // Bits 47:32 of private per-device random number (ECC)
17478 BEGIN_TYPE(RANDID2_t, uint16_t)
17479 ADD_BITFIELD_RO(RANDID2, 0, 16)
17480 END_TYPE()
17481
17482 // Bits 63:48 of private per-device random number (ECC)
17483 BEGIN_TYPE(RANDID3_t, uint16_t)
17484 ADD_BITFIELD_RO(RANDID3, 0, 16)
17485 END_TYPE()
17486
17487 // Bits 79:64 of private per-device random number (ECC)
17488 BEGIN_TYPE(RANDID4_t, uint16_t)
17489 ADD_BITFIELD_RO(RANDID4, 0, 16)
17490 END_TYPE()
17491
17492 // Bits 95:80 of private per-device random number (ECC)
17493 BEGIN_TYPE(RANDID5_t, uint16_t)
17494 ADD_BITFIELD_RO(RANDID5, 0, 16)
17495 END_TYPE()
17496
17497 // Bits 111:96 of private per-device random number (ECC)
17498 BEGIN_TYPE(RANDID6_t, uint16_t)
17499 ADD_BITFIELD_RO(RANDID6, 0, 16)
17500 END_TYPE()
17501
17502 // Bits 127:112 of private per-device random number (ECC)
17503 BEGIN_TYPE(RANDID7_t, uint16_t)
17504 ADD_BITFIELD_RO(RANDID7, 0, 16)
17505 END_TYPE()
17506
17507 // Ring oscillator frequency in kHz, measured during manufacturing (ECC) This is measured at 1.1 V, at room temperature, with the ROSC configuration registers in their reset state.
17508 BEGIN_TYPE(ROSC_CALIB_t, uint16_t)
17509 ADD_BITFIELD_RO(ROSC_CALIB, 0, 16)
17510 END_TYPE()
17511
17512 // Low-power oscillator frequency in Hz, measured during manufacturing (ECC) This is measured at 1.1V, at room temperature, with the LPOSC trim register in its reset state.
17513 BEGIN_TYPE(LPOSC_CALIB_t, uint16_t)
17514 ADD_BITFIELD_RO(LPOSC_CALIB, 0, 16)
17515 END_TYPE()
17516
17517 // The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)
17518 BEGIN_TYPE(NUM_GPIOS_t, uint16_t)
17519 ADD_BITFIELD_RO(NUM_GPIOS, 0, 8)
17520 END_TYPE()
17521
17522 // Lower 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (polynomial 0x4c11db7, input reflected, output reflected, seed all-ones, final XOR all-ones) (ECC)
17523 BEGIN_TYPE(INFO_CRC0_t, uint16_t)
17524 ADD_BITFIELD_RO(INFO_CRC0, 0, 16)
17525 END_TYPE()
17526
17527 // Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)
17528 BEGIN_TYPE(INFO_CRC1_t, uint16_t)
17529 ADD_BITFIELD_RO(INFO_CRC1, 0, 16)
17530 END_TYPE()
17531
17532 // Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set.
17533 // Reset value: 0x0000
17534 BEGIN_TYPE(FLASH_DEVINFO_t, uint16_t)
17535 // The size of the flash/PSRAM device on chip select 1 (addressable at 0x11000000 through 0x11ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values are decoded as 4kiB << CS1_SIZE. For example, four megabytes is encoded with a CS1_SIZE value of 10, and 16 megabytes is encoded with a CS1_SIZE value of 12. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of zero is used.
17536 ADD_BITFIELD_RO(CS1_SIZE, 12, 4)
17537 // The size of the flash/PSRAM device on chip select 0 (addressable at 0x10000000 through 0x10ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values are decoded as 4kiB << CS0_SIZE. For example, four megabytes is encoded with a CS0_SIZE value of 10, and 16 megabytes is encoded with a CS0_SIZE value of 12. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of 12 (16 MiB) is used.
17538 ADD_BITFIELD_RO(CS0_SIZE, 8, 4)
17539 // If true, all attached devices are assumed to support (or ignore, in the case of PSRAM) a block erase command with a command prefix of D8h, an erase size of 64 kiB, and a 24-bit address. Almost all 25-series flash devices support this command. If set, the bootrom will use the D8h erase command where it is able, to accelerate bulk erase operations. This makes flash programming faster. When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, this field defaults to false.
17540 ADD_BITFIELD_RO(D8H_ERASE_SUPPORTED, 7, 1)
17541 // Indicate a GPIO number to be used for the secondary flash chip select (CS1), which selects the external QSPI device mapped at system addresses 0x11000000 through 0x11ffffff. There is no such configuration for CS0, as the primary chip select has a dedicated pin. On RP2350 the permissible GPIO numbers are 0, 8, 19 and 47. Ignored if CS1_size is zero. If CS1_SIZE is nonzero, the bootrom will automatically configure this GPIO as a second chip select upon entering the flash boot path, or entering any other path that may use the QSPI flash interface, such as BOOTSEL mode (nsboot).
17542 ADD_BITFIELD_RO(CS1_GPIO, 0, 6)
17543 END_TYPE()
17544
17545 static const uint32_t FLASH_DEVINFO_CS1_SIZE__NONE = 0;
17546 static const uint32_t FLASH_DEVINFO_CS1_SIZE__8K = 1;
17547 static const uint32_t FLASH_DEVINFO_CS1_SIZE__16K = 2;
17548 static const uint32_t FLASH_DEVINFO_CS1_SIZE__32K = 3;
17549 static const uint32_t FLASH_DEVINFO_CS1_SIZE__64k = 4;
17550 static const uint32_t FLASH_DEVINFO_CS1_SIZE__128K = 5;
17551 static const uint32_t FLASH_DEVINFO_CS1_SIZE__256K = 6;
17552 static const uint32_t FLASH_DEVINFO_CS1_SIZE__512K = 7;
17553 static const uint32_t FLASH_DEVINFO_CS1_SIZE__1M = 8;
17554 static const uint32_t FLASH_DEVINFO_CS1_SIZE__2M = 9;
17555 static const uint32_t FLASH_DEVINFO_CS1_SIZE__4M = 10;
17556 static const uint32_t FLASH_DEVINFO_CS1_SIZE__8M = 11;
17557 static const uint32_t FLASH_DEVINFO_CS1_SIZE__16M = 12;
17558 static const uint32_t FLASH_DEVINFO_CS0_SIZE__NONE = 0;
17559 static const uint32_t FLASH_DEVINFO_CS0_SIZE__8K = 1;
17560 static const uint32_t FLASH_DEVINFO_CS0_SIZE__16K = 2;
17561 static const uint32_t FLASH_DEVINFO_CS0_SIZE__32K = 3;
17562 static const uint32_t FLASH_DEVINFO_CS0_SIZE__64k = 4;
17563 static const uint32_t FLASH_DEVINFO_CS0_SIZE__128K = 5;
17564 static const uint32_t FLASH_DEVINFO_CS0_SIZE__256K = 6;
17565 static const uint32_t FLASH_DEVINFO_CS0_SIZE__512K = 7;
17566 static const uint32_t FLASH_DEVINFO_CS0_SIZE__1M = 8;
17567 static const uint32_t FLASH_DEVINFO_CS0_SIZE__2M = 9;
17568 static const uint32_t FLASH_DEVINFO_CS0_SIZE__4M = 10;
17569 static const uint32_t FLASH_DEVINFO_CS0_SIZE__8M = 11;
17570 static const uint32_t FLASH_DEVINFO_CS0_SIZE__16M = 12;
17571
17572 // Gap between partition table slot 0 and slot 1 at the start of flash (the default size is 4096 bytes) (ECC) Enabled by the OVERRIDE_FLASH_PARTITION_SLOT_SIZE bit in BOOT_FLAGS, the size is 4096 * (value + 1)
17573 BEGIN_TYPE(FLASH_PARTITION_SLOT_SIZE_t, uint16_t)
17574 ADD_BITFIELD_RO(FLASH_PARTITION_SLOT_SIZE, 0, 16)
17575 END_TYPE()
17576
17577 // Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set.
17578 // Reset value: 0x0000
17579 BEGIN_TYPE(BOOTSEL_LED_CFG_t, uint16_t)
17580 // LED is active-low. (Default: active-high.)
17581 ADD_BITFIELD_RO(ACTIVELOW, 8, 1)
17582 // GPIO index to use for bootloader activity LED.
17583 ADD_BITFIELD_RO(PIN, 0, 6)
17584 END_TYPE()
17585
17586 // Optional PLL configuration for BOOTSEL mode. (ECC) This should be configured to produce an exact 48 MHz based on the crystal oscillator frequency. User mode software may also use this value to calculate the expected crystal frequency based on an assumed 48 MHz PLL output. If no configuration is given, the crystal is assumed to be 12 MHz. The PLL frequency can be calculated as: PLL out = (XOSC frequency / (REFDIV+1)) x FBDIV / (POSTDIV1 x POSTDIV2) Conversely the crystal frequency can be calculated as: XOSC frequency = 48 MHz x (REFDIV+1) x (POSTDIV1 x POSTDIV2) / FBDIV (Note the +1 on REFDIV is because the value stored in this OTP location is the actual divisor value minus one.) Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0. That bit should be set only after this row and BOOTSEL_XOSC_CFG are both correctly programmed.
17587 // Reset value: 0x0000
17588 BEGIN_TYPE(BOOTSEL_PLL_CFG_t, uint16_t)
17589 // PLL reference divisor, minus one. Programming a value of 0 means a reference divisor of 1. Programming a value of 1 means a reference divisor of 2 (for exceptionally fast XIN inputs)
17590 ADD_BITFIELD_RO(REFDIV, 15, 1)
17591 // PLL post-divide 2 divisor, in the range 1..7 inclusive.
17592 ADD_BITFIELD_RO(POSTDIV2, 12, 3)
17593 // PLL post-divide 1 divisor, in the range 1..7 inclusive.
17594 ADD_BITFIELD_RO(POSTDIV1, 9, 3)
17595 // PLL feedback divisor, in the range 16..320 inclusive.
17596 ADD_BITFIELD_RO(FBDIV, 0, 9)
17597 END_TYPE()
17598
17599 // Non-default crystal oscillator configuration for the USB bootloader. (ECC) These values may also be used by user code configuring the crystal oscillator. Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0. That bit should be set only after this row and BOOTSEL_PLL_CFG are both correctly programmed.
17600 // Reset value: 0x0000
17601 BEGIN_TYPE(BOOTSEL_XOSC_CFG_t, uint16_t)
17602 // Value of the XOSC_CTRL_FREQ_RANGE register.
17603 ADD_BITFIELD_RO(RANGE, 14, 2)
17604 // Value of the XOSC_STARTUP register
17605 ADD_BITFIELD_RO(STARTUP, 0, 14)
17606 END_TYPE()
17607
17608 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__1_15MHZ = 0;
17609 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__10_30MHZ = 1;
17610 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__25_60MHZ = 2;
17611 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__40_100MHZ = 3;
17612
17613 // Row index of the USB_WHITE_LABEL structure within OTP (ECC) The table has 16 rows, each of which are also ECC and marked valid by the corresponding valid bit in USB_BOOT_FLAGS (ECC). The entries are either _VALUEs where the 16 bit value is used as is, or _STRDEFs which acts as a pointers to a string value. The value stored in a _STRDEF is two separate bytes: The low seven bits of the first (LSB) byte indicates the number of characters in the string, and the top bit of the first (LSB) byte if set to indicate that each character in the string is two bytes (Unicode) versus one byte if unset. The second (MSB) byte represents the location of the string data, and is encoded as the number of rows from this USB_WHITE_LABEL_ADDR; i.e. the row of the start of the string is USB_WHITE_LABEL_ADDR value + msb_byte. In each case, the corresponding valid bit enables replacing the default value for the corresponding item provided by the boot rom. Note that Unicode _STRDEFs are only supported for USB_DEVICE_PRODUCT_STRDEF, USB_DEVICE_SERIAL_NUMBER_STRDEF and USB_DEVICE_MANUFACTURER_STRDEF. Unicode values will be ignored if specified for other fields, and non-unicode values for these three items will be converted to Unicode characters by setting the upper 8 bits to zero. Note that if the USB_WHITE_LABEL structure or the corresponding strings are not readable by BOOTSEL mode based on OTP permissions, or if alignment requirements are not met, then the corresponding default values are used. The index values indicate where each field is located (row USB_WHITE_LABEL_ADDR value + index):
17614 BEGIN_TYPE(USB_WHITE_LABEL_ADDR_t, uint16_t)
17615 ADD_BITFIELD_RO(USB_WHITE_LABEL_ADDR, 0, 16)
17616 END_TYPE()
17617
17618 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_VID_VALUE = 0;
17619 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_PID_VALUE = 1;
17620 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_BCD_DEVICE_VALUE = 2;
17621 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_LANG_ID_VALUE = 3;
17622 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_MANUFACTURER_STRDEF = 4;
17623 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_PRODUCT_STRDEF = 5;
17624 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_SERIAL_NUMBER_STRDEF = 6;
17625 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES = 7;
17626 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_VOLUME_LABEL_STRDEF = 8;
17627 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_SCSI_INQUIRY_VENDOR_STRDEF = 9;
17628 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_SCSI_INQUIRY_PRODUCT_STRDEF = 10;
17629 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_SCSI_INQUIRY_VERSION_STRDEF = 11;
17630 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INDEX_HTM_REDIRECT_URL_STRDEF = 12;
17631 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INDEX_HTM_REDIRECT_NAME_STRDEF = 13;
17632 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INFO_UF2_TXT_MODEL_STRDEF = 14;
17633 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INFO_UF2_TXT_BOARD_ID_STRDEF = 15;
17634
17635 // OTP start row for the OTP boot image. (ECC) If OTP boot is enabled, the bootrom will load from this location into SRAM and then directly enter the loaded image. Note that the image must be signed if SECURE_BOOT_ENABLE is set. The image itself is assumed to be ECC-protected. This must be an even number. Equivalently, the OTP boot image must start at a word-aligned location in the ECC read data address window.
17636 BEGIN_TYPE(OTPBOOT_SRC_t, uint16_t)
17637 ADD_BITFIELD_RO(OTPBOOT_SRC, 0, 16)
17638 END_TYPE()
17639
17640 // Length in rows of the OTP boot image. (ECC) OTPBOOT_LEN must be even. The total image size must be a multiple of 4 bytes (32 bits).
17641 BEGIN_TYPE(OTPBOOT_LEN_t, uint16_t)
17642 ADD_BITFIELD_RO(OTPBOOT_LEN, 0, 16)
17643 END_TYPE()
17644
17645 // Bits 15:0 of the OTP boot image load destination (and entry point). (ECC) This must be a location in main SRAM (main SRAM is addresses 0x20000000 through 0x20082000) and must be word-aligned.
17646 BEGIN_TYPE(OTPBOOT_DST0_t, uint16_t)
17647 ADD_BITFIELD_RO(OTPBOOT_DST0, 0, 16)
17648 END_TYPE()
17649
17650 // Bits 31:16 of the OTP boot image load destination (and entry point). (ECC) This must be a location in main SRAM (main SRAM is addresses 0x20000000 through 0x20082000) and must be word-aligned.
17651 BEGIN_TYPE(OTPBOOT_DST1_t, uint16_t)
17652 ADD_BITFIELD_RO(OTPBOOT_DST1, 0, 16)
17653 END_TYPE()
17654
17655 // Bits 15:0 of SHA-256 hash of boot key 0 (ECC)
17656 BEGIN_TYPE(BOOTKEY_0_t, uint16_t)
17657 ADD_BITFIELD_RO(BOOTKEY_0, 0, 16)
17658 END_TYPE()
17659
17660 // Bits 31:16 of SHA-256 hash of boot key 0 (ECC)
17661 BEGIN_TYPE(BOOTKEY_1_t, uint16_t)
17662 ADD_BITFIELD_RO(BOOTKEY_1, 0, 16)
17663 END_TYPE()
17664
17665 // Bits 47:32 of SHA-256 hash of boot key 0 (ECC)
17666 BEGIN_TYPE(BOOTKEY_2_t, uint16_t)
17667 ADD_BITFIELD_RO(BOOTKEY_2, 0, 16)
17668 END_TYPE()
17669
17670 // Bits 63:48 of SHA-256 hash of boot key 0 (ECC)
17671 BEGIN_TYPE(BOOTKEY_3_t, uint16_t)
17672 ADD_BITFIELD_RO(BOOTKEY_3, 0, 16)
17673 END_TYPE()
17674
17675 // Bits 79:64 of SHA-256 hash of boot key 0 (ECC)
17676 BEGIN_TYPE(BOOTKEY_4_t, uint16_t)
17677 ADD_BITFIELD_RO(BOOTKEY_4, 0, 16)
17678 END_TYPE()
17679
17680 // Bits 95:80 of SHA-256 hash of boot key 0 (ECC)
17681 BEGIN_TYPE(BOOTKEY_5_t, uint16_t)
17682 ADD_BITFIELD_RO(BOOTKEY_5, 0, 16)
17683 END_TYPE()
17684
17685 // Bits 111:96 of SHA-256 hash of boot key 0 (ECC)
17686 BEGIN_TYPE(BOOTKEY_6_t, uint16_t)
17687 ADD_BITFIELD_RO(BOOTKEY_6, 0, 16)
17688 END_TYPE()
17689
17690 // Bits 127:112 of SHA-256 hash of boot key 0 (ECC)
17691 BEGIN_TYPE(BOOTKEY_7_t, uint16_t)
17692 ADD_BITFIELD_RO(BOOTKEY_7, 0, 16)
17693 END_TYPE()
17694
17695 // Bits 143:128 of SHA-256 hash of boot key 0 (ECC)
17696 BEGIN_TYPE(BOOTKEY_8_t, uint16_t)
17697 ADD_BITFIELD_RO(BOOTKEY_8, 0, 16)
17698 END_TYPE()
17699
17700 // Bits 159:144 of SHA-256 hash of boot key 0 (ECC)
17701 BEGIN_TYPE(BOOTKEY_9_t, uint16_t)
17702 ADD_BITFIELD_RO(BOOTKEY_9, 0, 16)
17703 END_TYPE()
17704
17705 // Bits 175:160 of SHA-256 hash of boot key 0 (ECC)
17706 BEGIN_TYPE(BOOTKEY_10_t, uint16_t)
17707 ADD_BITFIELD_RO(BOOTKEY_10, 0, 16)
17708 END_TYPE()
17709
17710 // Bits 191:176 of SHA-256 hash of boot key 0 (ECC)
17711 BEGIN_TYPE(BOOTKEY_11_t, uint16_t)
17712 ADD_BITFIELD_RO(BOOTKEY_11, 0, 16)
17713 END_TYPE()
17714
17715 // Bits 207:192 of SHA-256 hash of boot key 0 (ECC)
17716 BEGIN_TYPE(BOOTKEY_12_t, uint16_t)
17717 ADD_BITFIELD_RO(BOOTKEY_12, 0, 16)
17718 END_TYPE()
17719
17720 // Bits 223:208 of SHA-256 hash of boot key 0 (ECC)
17721 BEGIN_TYPE(BOOTKEY_13_t, uint16_t)
17722 ADD_BITFIELD_RO(BOOTKEY_13, 0, 16)
17723 END_TYPE()
17724
17725 // Bits 239:224 of SHA-256 hash of boot key 0 (ECC)
17726 BEGIN_TYPE(BOOTKEY_14_t, uint16_t)
17727 ADD_BITFIELD_RO(BOOTKEY_14, 0, 16)
17728 END_TYPE()
17729
17730 // Bits 255:240 of SHA-256 hash of boot key 0 (ECC)
17731 BEGIN_TYPE(BOOTKEY_15_t, uint16_t)
17732 ADD_BITFIELD_RO(BOOTKEY_15, 0, 16)
17733 END_TYPE()
17734
17735 // Bits 15:0 of OTP access key 1 (ECC)
17736 BEGIN_TYPE(KEY_0_t, uint16_t)
17737 ADD_BITFIELD_RO(KEY_0, 0, 16)
17738 END_TYPE()
17739
17740 // Bits 31:16 of OTP access key 1 (ECC)
17741 BEGIN_TYPE(KEY_1_t, uint16_t)
17742 ADD_BITFIELD_RO(KEY_1, 0, 16)
17743 END_TYPE()
17744
17745 // Bits 47:32 of OTP access key 1 (ECC)
17746 BEGIN_TYPE(KEY_2_t, uint16_t)
17747 ADD_BITFIELD_RO(KEY_2, 0, 16)
17748 END_TYPE()
17749
17750 // Bits 63:48 of OTP access key 1 (ECC)
17751 BEGIN_TYPE(KEY_3_t, uint16_t)
17752 ADD_BITFIELD_RO(KEY_3, 0, 16)
17753 END_TYPE()
17754
17755 // Bits 79:64 of OTP access key 1 (ECC)
17756 BEGIN_TYPE(KEY_4_t, uint16_t)
17757 ADD_BITFIELD_RO(KEY_4, 0, 16)
17758 END_TYPE()
17759
17760 // Bits 95:80 of OTP access key 1 (ECC)
17761 BEGIN_TYPE(KEY_5_t, uint16_t)
17762 ADD_BITFIELD_RO(KEY_5, 0, 16)
17763 END_TYPE()
17764
17765 // Bits 111:96 of OTP access key 1 (ECC)
17766 BEGIN_TYPE(KEY_6_t, uint16_t)
17767 ADD_BITFIELD_RO(KEY_6, 0, 16)
17768 END_TYPE()
17769
17770 // Bits 127:112 of OTP access key 1 (ECC)
17771 BEGIN_TYPE(KEY_7_t, uint16_t)
17772 ADD_BITFIELD_RO(KEY_7, 0, 16)
17773 END_TYPE()
17774
17775 struct OTP_DATA_t {
17776 CHIPID0_t CHIPID0;
17777 CHIPID1_t CHIPID1;
17778 CHIPID2_t CHIPID2;
17779 CHIPID3_t CHIPID3;
17780 RANDID0_t RANDID0;
17781 RANDID1_t RANDID1;
17782 RANDID2_t RANDID2;
17783 RANDID3_t RANDID3;
17784 RANDID4_t RANDID4;
17785 RANDID5_t RANDID5;
17786 RANDID6_t RANDID6;
17787 RANDID7_t RANDID7;
17788 uint16_t reserved0[4];
17789 ROSC_CALIB_t ROSC_CALIB;
17790 LPOSC_CALIB_t LPOSC_CALIB;
17791 uint16_t reserved1[6];
17792 NUM_GPIOS_t NUM_GPIOS;
17793 uint16_t reserved2[29];
17794 INFO_CRC0_t INFO_CRC0;
17795 INFO_CRC1_t INFO_CRC1;
17796 uint16_t reserved3[28];
17797 FLASH_DEVINFO_t FLASH_DEVINFO;
17798 FLASH_PARTITION_SLOT_SIZE_t FLASH_PARTITION_SLOT_SIZE;
17799 BOOTSEL_LED_CFG_t BOOTSEL_LED_CFG;
17800 BOOTSEL_PLL_CFG_t BOOTSEL_PLL_CFG;
17801 BOOTSEL_XOSC_CFG_t BOOTSEL_XOSC_CFG;
17802 uint16_t reserved4[3];
17803 USB_WHITE_LABEL_ADDR_t USB_WHITE_LABEL_ADDR;
17804 uint16_t reserved5;
17805 OTPBOOT_SRC_t OTPBOOT_SRC;
17806 OTPBOOT_LEN_t OTPBOOT_LEN;
17807 OTPBOOT_DST0_t OTPBOOT_DST0;
17808 OTPBOOT_DST1_t OTPBOOT_DST1;
17809 uint16_t reserved6[30];
17810 BOOTKEY_0_t BOOTKEY0_0;
17811 BOOTKEY_1_t BOOTKEY0_1;
17812 BOOTKEY_2_t BOOTKEY0_2;
17813 BOOTKEY_3_t BOOTKEY0_3;
17814 BOOTKEY_4_t BOOTKEY0_4;
17815 BOOTKEY_5_t BOOTKEY0_5;
17816 BOOTKEY_6_t BOOTKEY0_6;
17817 BOOTKEY_7_t BOOTKEY0_7;
17818 BOOTKEY_8_t BOOTKEY0_8;
17819 BOOTKEY_9_t BOOTKEY0_9;
17820 BOOTKEY_10_t BOOTKEY0_10;
17821 BOOTKEY_11_t BOOTKEY0_11;
17822 BOOTKEY_12_t BOOTKEY0_12;
17823 BOOTKEY_13_t BOOTKEY0_13;
17824 BOOTKEY_14_t BOOTKEY0_14;
17825 BOOTKEY_15_t BOOTKEY0_15;
17826 uint16_t reserved7[16];
17827 BOOTKEY_0_t BOOTKEY1_0;
17828 BOOTKEY_1_t BOOTKEY1_1;
17829 BOOTKEY_2_t BOOTKEY1_2;
17830 BOOTKEY_3_t BOOTKEY1_3;
17831 BOOTKEY_4_t BOOTKEY1_4;
17832 BOOTKEY_5_t BOOTKEY1_5;
17833 BOOTKEY_6_t BOOTKEY1_6;
17834 BOOTKEY_7_t BOOTKEY1_7;
17835 BOOTKEY_8_t BOOTKEY1_8;
17836 BOOTKEY_9_t BOOTKEY1_9;
17837 BOOTKEY_10_t BOOTKEY1_10;
17838 BOOTKEY_11_t BOOTKEY1_11;
17839 BOOTKEY_12_t BOOTKEY1_12;
17840 BOOTKEY_13_t BOOTKEY1_13;
17841 BOOTKEY_14_t BOOTKEY1_14;
17842 BOOTKEY_15_t BOOTKEY1_15;
17843 uint16_t reserved8[16];
17844 BOOTKEY_0_t BOOTKEY2_0;
17845 BOOTKEY_1_t BOOTKEY2_1;
17846 BOOTKEY_2_t BOOTKEY2_2;
17847 BOOTKEY_3_t BOOTKEY2_3;
17848 BOOTKEY_4_t BOOTKEY2_4;
17849 BOOTKEY_5_t BOOTKEY2_5;
17850 BOOTKEY_6_t BOOTKEY2_6;
17851 BOOTKEY_7_t BOOTKEY2_7;
17852 BOOTKEY_8_t BOOTKEY2_8;
17853 BOOTKEY_9_t BOOTKEY2_9;
17854 BOOTKEY_10_t BOOTKEY2_10;
17855 BOOTKEY_11_t BOOTKEY2_11;
17856 BOOTKEY_12_t BOOTKEY2_12;
17857 BOOTKEY_13_t BOOTKEY2_13;
17858 BOOTKEY_14_t BOOTKEY2_14;
17859 BOOTKEY_15_t BOOTKEY2_15;
17860 uint16_t reserved9[16];
17861 BOOTKEY_0_t BOOTKEY3_0;
17862 BOOTKEY_1_t BOOTKEY3_1;
17863 BOOTKEY_2_t BOOTKEY3_2;
17864 BOOTKEY_3_t BOOTKEY3_3;
17865 BOOTKEY_4_t BOOTKEY3_4;
17866 BOOTKEY_5_t BOOTKEY3_5;
17867 BOOTKEY_6_t BOOTKEY3_6;
17868 BOOTKEY_7_t BOOTKEY3_7;
17869 BOOTKEY_8_t BOOTKEY3_8;
17870 BOOTKEY_9_t BOOTKEY3_9;
17871 BOOTKEY_10_t BOOTKEY3_10;
17872 BOOTKEY_11_t BOOTKEY3_11;
17873 BOOTKEY_12_t BOOTKEY3_12;
17874 BOOTKEY_13_t BOOTKEY3_13;
17875 BOOTKEY_14_t BOOTKEY3_14;
17876 BOOTKEY_15_t BOOTKEY3_15;
17877 uint16_t reserved10[3672];
17878 KEY_0_t KEY1_0;
17879 KEY_1_t KEY1_1;
17880 KEY_2_t KEY1_2;
17881 KEY_3_t KEY1_3;
17882 KEY_4_t KEY1_4;
17883 KEY_5_t KEY1_5;
17884 KEY_6_t KEY1_6;
17885 KEY_7_t KEY1_7;
17886 uint16_t reserved11[8];
17887 KEY_0_t KEY2_0;
17888 KEY_1_t KEY2_1;
17889 KEY_2_t KEY2_2;
17890 KEY_3_t KEY2_3;
17891 KEY_4_t KEY2_4;
17892 KEY_5_t KEY2_5;
17893 KEY_6_t KEY2_6;
17894 KEY_7_t KEY2_7;
17895 uint16_t reserved12[8];
17896 KEY_0_t KEY3_0;
17897 KEY_1_t KEY3_1;
17898 KEY_2_t KEY3_2;
17899 KEY_3_t KEY3_3;
17900 KEY_4_t KEY3_4;
17901 KEY_5_t KEY3_5;
17902 KEY_6_t KEY3_6;
17903 KEY_7_t KEY3_7;
17904 uint16_t reserved13[8];
17905 KEY_0_t KEY4_0;
17906 KEY_1_t KEY4_1;
17907 KEY_2_t KEY4_2;
17908 KEY_3_t KEY4_3;
17909 KEY_4_t KEY4_4;
17910 KEY_5_t KEY4_5;
17911 KEY_6_t KEY4_6;
17912 KEY_7_t KEY4_7;
17913 uint16_t reserved14[8];
17914 KEY_0_t KEY5_0;
17915 KEY_1_t KEY5_1;
17916 KEY_2_t KEY5_2;
17917 KEY_3_t KEY5_3;
17918 KEY_4_t KEY5_4;
17919 KEY_5_t KEY5_5;
17920 KEY_6_t KEY5_6;
17921 KEY_7_t KEY5_7;
17922 uint16_t reserved15[8];
17923 KEY_0_t KEY6_0;
17924 KEY_1_t KEY6_1;
17925 KEY_2_t KEY6_2;
17926 KEY_3_t KEY6_3;
17927 KEY_4_t KEY6_4;
17928 KEY_5_t KEY6_5;
17929 KEY_6_t KEY6_6;
17930 KEY_7_t KEY6_7;
17931 };
17932
17933 static OTP_DATA_t & OTP_DATA = (*(OTP_DATA_t *)0x40130000);
17934 static OTP_DATA_t & OTP_DATA_XOR = (*(OTP_DATA_t *)0x40131000);
17935 static OTP_DATA_t & OTP_DATA_SET = (*(OTP_DATA_t *)0x40132000);
17936 static OTP_DATA_t & OTP_DATA_CLR = (*(OTP_DATA_t *)0x40133000);
17937
17938} // _OTP_DATA_
17939
17940// Predefined OTP data layout for RP2350
17941namespace _OTP_DATA_RAW_ {
17942
17943 // Bits 15:0 of public device ID. (ECC) The CHIPID0..3 rows contain a 64-bit random identifier for this chip, which can be read from the USB bootloader PICOBOOT interface or from the get_sys_info ROM API. The number of random bits makes the occurrence of twins exceedingly unlikely: for example, a fleet of a hundred million devices has a 99.97% probability of no twinned IDs. This is estimated to be lower than the occurrence of process errors in the assignment of sequential random IDs, and for practical purposes CHIPID may be treated as unique.
17944 BEGIN_TYPE(CHIPID0_t, uint32_t)
17945 ADD_BITFIELD_RO(CHIPID0, 0, 16)
17946 END_TYPE()
17947
17948 // Bits 31:16 of public device ID (ECC)
17949 BEGIN_TYPE(CHIPID1_t, uint32_t)
17950 ADD_BITFIELD_RO(CHIPID1, 0, 16)
17951 END_TYPE()
17952
17953 // Bits 47:32 of public device ID (ECC)
17954 BEGIN_TYPE(CHIPID2_t, uint32_t)
17955 ADD_BITFIELD_RO(CHIPID2, 0, 16)
17956 END_TYPE()
17957
17958 // Bits 63:48 of public device ID (ECC)
17959 BEGIN_TYPE(CHIPID3_t, uint32_t)
17960 ADD_BITFIELD_RO(CHIPID3, 0, 16)
17961 END_TYPE()
17962
17963 // Bits 15:0 of private per-device random number (ECC) The RANDID0..7 rows form a 128-bit random number generated during device test. This ID is not exposed through the USB PICOBOOT GET_INFO command or the ROM `get_sys_info()` API. However note that the USB PICOBOOT OTP access point can read the entirety of page 0, so this value is not meaningfully private unless the USB PICOBOOT interface is disabled via the DISABLE_BOOTSEL_USB_PICOBOOT_IFC flag in BOOT_FLAGS0.
17964 BEGIN_TYPE(RANDID0_t, uint32_t)
17965 ADD_BITFIELD_RO(RANDID0, 0, 16)
17966 END_TYPE()
17967
17968 // Bits 31:16 of private per-device random number (ECC)
17969 BEGIN_TYPE(RANDID1_t, uint32_t)
17970 ADD_BITFIELD_RO(RANDID1, 0, 16)
17971 END_TYPE()
17972
17973 // Bits 47:32 of private per-device random number (ECC)
17974 BEGIN_TYPE(RANDID2_t, uint32_t)
17975 ADD_BITFIELD_RO(RANDID2, 0, 16)
17976 END_TYPE()
17977
17978 // Bits 63:48 of private per-device random number (ECC)
17979 BEGIN_TYPE(RANDID3_t, uint32_t)
17980 ADD_BITFIELD_RO(RANDID3, 0, 16)
17981 END_TYPE()
17982
17983 // Bits 79:64 of private per-device random number (ECC)
17984 BEGIN_TYPE(RANDID4_t, uint32_t)
17985 ADD_BITFIELD_RO(RANDID4, 0, 16)
17986 END_TYPE()
17987
17988 // Bits 95:80 of private per-device random number (ECC)
17989 BEGIN_TYPE(RANDID5_t, uint32_t)
17990 ADD_BITFIELD_RO(RANDID5, 0, 16)
17991 END_TYPE()
17992
17993 // Bits 111:96 of private per-device random number (ECC)
17994 BEGIN_TYPE(RANDID6_t, uint32_t)
17995 ADD_BITFIELD_RO(RANDID6, 0, 16)
17996 END_TYPE()
17997
17998 // Bits 127:112 of private per-device random number (ECC)
17999 BEGIN_TYPE(RANDID7_t, uint32_t)
18000 ADD_BITFIELD_RO(RANDID7, 0, 16)
18001 END_TYPE()
18002
18003 // Ring oscillator frequency in kHz, measured during manufacturing (ECC) This is measured at 1.1 V, at room temperature, with the ROSC configuration registers in their reset state.
18004 BEGIN_TYPE(ROSC_CALIB_t, uint32_t)
18005 ADD_BITFIELD_RO(ROSC_CALIB, 0, 16)
18006 END_TYPE()
18007
18008 // Low-power oscillator frequency in Hz, measured during manufacturing (ECC) This is measured at 1.1V, at room temperature, with the LPOSC trim register in its reset state.
18009 BEGIN_TYPE(LPOSC_CALIB_t, uint32_t)
18010 ADD_BITFIELD_RO(LPOSC_CALIB, 0, 16)
18011 END_TYPE()
18012
18013 // The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)
18014 BEGIN_TYPE(NUM_GPIOS_t, uint32_t)
18015 ADD_BITFIELD_RO(NUM_GPIOS, 0, 8)
18016 END_TYPE()
18017
18018 // Lower 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (polynomial 0x4c11db7, input reflected, output reflected, seed all-ones, final XOR all-ones) (ECC)
18019 BEGIN_TYPE(INFO_CRC0_t, uint32_t)
18020 ADD_BITFIELD_RO(INFO_CRC0, 0, 16)
18021 END_TYPE()
18022
18023 // Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)
18024 BEGIN_TYPE(INFO_CRC1_t, uint32_t)
18025 ADD_BITFIELD_RO(INFO_CRC1, 0, 16)
18026 END_TYPE()
18027
18028 // Page 0 critical boot flags (RBIT-8)
18029 // Reset value: 0x00000000
18030 BEGIN_TYPE(CRIT0_t, uint32_t)
18031 // Permanently disable RISC-V processors (Hazard3)
18032 ADD_BITFIELD_RO(RISCV_DISABLE, 1, 1)
18033 // Permanently disable ARM processors (Cortex-M33)
18034 ADD_BITFIELD_RO(ARM_DISABLE, 0, 1)
18035 END_TYPE()
18036
18037 // Redundant copy of CRIT0
18038 BEGIN_TYPE(CRIT0_R1_t, uint32_t)
18039 ADD_BITFIELD_RO(CRIT0_R1, 0, 24)
18040 END_TYPE()
18041
18042 // Redundant copy of CRIT0
18043 BEGIN_TYPE(CRIT0_R2_t, uint32_t)
18044 ADD_BITFIELD_RO(CRIT0_R2, 0, 24)
18045 END_TYPE()
18046
18047 // Redundant copy of CRIT0
18048 BEGIN_TYPE(CRIT0_R3_t, uint32_t)
18049 ADD_BITFIELD_RO(CRIT0_R3, 0, 24)
18050 END_TYPE()
18051
18052 // Redundant copy of CRIT0
18053 BEGIN_TYPE(CRIT0_R4_t, uint32_t)
18054 ADD_BITFIELD_RO(CRIT0_R4, 0, 24)
18055 END_TYPE()
18056
18057 // Redundant copy of CRIT0
18058 BEGIN_TYPE(CRIT0_R5_t, uint32_t)
18059 ADD_BITFIELD_RO(CRIT0_R5, 0, 24)
18060 END_TYPE()
18061
18062 // Redundant copy of CRIT0
18063 BEGIN_TYPE(CRIT0_R6_t, uint32_t)
18064 ADD_BITFIELD_RO(CRIT0_R6, 0, 24)
18065 END_TYPE()
18066
18067 // Redundant copy of CRIT0
18068 BEGIN_TYPE(CRIT0_R7_t, uint32_t)
18069 ADD_BITFIELD_RO(CRIT0_R7, 0, 24)
18070 END_TYPE()
18071
18072 // Page 1 critical boot flags (RBIT-8)
18073 // Reset value: 0x00000000
18074 BEGIN_TYPE(CRIT1_t, uint32_t)
18075 // Increase the sensitivity of the glitch detectors from their default.
18076 ADD_BITFIELD_RO(GLITCH_DETECTOR_SENS, 5, 2)
18077 // Arm the glitch detectors to reset the system if an abnormal clock/power event is observed.
18078 ADD_BITFIELD_RO(GLITCH_DETECTOR_ENABLE, 4, 1)
18079 // Set the default boot architecture, 0=ARM 1=RISC-V. Ignored if ARM_DISABLE, RISCV_DISABLE or SECURE_BOOT_ENABLE is set.
18080 ADD_BITFIELD_RO(BOOT_ARCH, 3, 1)
18081 // Disable all debug access
18082 ADD_BITFIELD_RO(DEBUG_DISABLE, 2, 1)
18083 // Disable Secure debug access
18084 ADD_BITFIELD_RO(SECURE_DEBUG_DISABLE, 1, 1)
18085 // Enable boot signature enforcement, and permanently disable the RISC-V cores.
18086 ADD_BITFIELD_RO(SECURE_BOOT_ENABLE, 0, 1)
18087 END_TYPE()
18088
18089 // Redundant copy of CRIT1
18090 BEGIN_TYPE(CRIT1_R1_t, uint32_t)
18091 ADD_BITFIELD_RO(CRIT1_R1, 0, 24)
18092 END_TYPE()
18093
18094 // Redundant copy of CRIT1
18095 BEGIN_TYPE(CRIT1_R2_t, uint32_t)
18096 ADD_BITFIELD_RO(CRIT1_R2, 0, 24)
18097 END_TYPE()
18098
18099 // Redundant copy of CRIT1
18100 BEGIN_TYPE(CRIT1_R3_t, uint32_t)
18101 ADD_BITFIELD_RO(CRIT1_R3, 0, 24)
18102 END_TYPE()
18103
18104 // Redundant copy of CRIT1
18105 BEGIN_TYPE(CRIT1_R4_t, uint32_t)
18106 ADD_BITFIELD_RO(CRIT1_R4, 0, 24)
18107 END_TYPE()
18108
18109 // Redundant copy of CRIT1
18110 BEGIN_TYPE(CRIT1_R5_t, uint32_t)
18111 ADD_BITFIELD_RO(CRIT1_R5, 0, 24)
18112 END_TYPE()
18113
18114 // Redundant copy of CRIT1
18115 BEGIN_TYPE(CRIT1_R6_t, uint32_t)
18116 ADD_BITFIELD_RO(CRIT1_R6, 0, 24)
18117 END_TYPE()
18118
18119 // Redundant copy of CRIT1
18120 BEGIN_TYPE(CRIT1_R7_t, uint32_t)
18121 ADD_BITFIELD_RO(CRIT1_R7, 0, 24)
18122 END_TYPE()
18123
18124 // Disable/Enable boot paths/features in the RP2350 mask ROM. Disables always supersede enables. Enables are provided where there are other configurations in OTP that must be valid. (RBIT-3)
18125 // Reset value: 0x00000000
18126 BEGIN_TYPE(BOOT_FLAGS0_t, uint32_t)
18127 ADD_BITFIELD_RO(DISABLE_SRAM_WINDOW_BOOT, 21, 1)
18128 // Disable all access to XIP after entering an SRAM binary. Note that this will cause bootrom APIs that access XIP to fail, including APIs that interact with the partition table.
18129 ADD_BITFIELD_RO(DISABLE_XIP_ACCESS_ON_SRAM_ENTRY, 20, 1)
18130 ADD_BITFIELD_RO(DISABLE_BOOTSEL_UART_BOOT, 19, 1)
18131 ADD_BITFIELD_RO(DISABLE_BOOTSEL_USB_PICOBOOT_IFC, 18, 1)
18132 ADD_BITFIELD_RO(DISABLE_BOOTSEL_USB_MSD_IFC, 17, 1)
18133 ADD_BITFIELD_RO(DISABLE_WATCHDOG_SCRATCH, 16, 1)
18134 ADD_BITFIELD_RO(DISABLE_POWER_SCRATCH, 15, 1)
18135 // Enable OTP boot. A number of OTP rows specified by OTPBOOT_LEN will be loaded, starting from OTPBOOT_SRC, into the SRAM location specified by OTPBOOT_DST1 and OTPBOOT_DST0. The loaded program image is stored with ECC, 16 bits per row, and must contain a valid IMAGE_DEF. Do not set this bit without first programming an image into OTP and configuring OTPBOOT_LEN, OTPBOOT_SRC, OTPBOOT_DST0 and OTPBOOT_DST1. Note that OTPBOOT_LEN and OTPBOOT_SRC must be even numbers of OTP rows. Equivalently, the image must be a multiple of 32 bits in size, and must start at a 32-bit-aligned address in the ECC read data address window.
18136 ADD_BITFIELD_RO(ENABLE_OTP_BOOT, 14, 1)
18137 // Takes precedence over ENABLE_OTP_BOOT.
18138 ADD_BITFIELD_RO(DISABLE_OTP_BOOT, 13, 1)
18139 ADD_BITFIELD_RO(DISABLE_FLASH_BOOT, 12, 1)
18140 // Require binaries to have a rollback version. Set automatically the first time a binary with a rollback version is booted.
18141 ADD_BITFIELD_RO(ROLLBACK_REQUIRED, 11, 1)
18142 // Require a partition table to be hashed (if not signed)
18143 ADD_BITFIELD_RO(HASHED_PARTITION_TABLE, 10, 1)
18144 // Require a partition table to be signed
18145 ADD_BITFIELD_RO(SECURE_PARTITION_TABLE, 9, 1)
18146 // Disable auto-switch of CPU architecture on boot when the (only) binary to be booted is for the other Arm/RISC-V architecture and both architectures are enabled
18147 ADD_BITFIELD_RO(DISABLE_AUTO_SWITCH_ARCH, 8, 1)
18148 // Restrict flash boot path to use of a single binary at the start of flash
18149 ADD_BITFIELD_RO(SINGLE_FLASH_BINARY, 7, 1)
18150 // Override the limit for default flash metadata scanning. The value is specified in FLASH_PARTITION_SLOT_SIZE. Make sure FLASH_PARTITION_SLOT_SIZE is valid before setting this bit
18151 ADD_BITFIELD_RO(OVERRIDE_FLASH_PARTITION_SLOT_SIZE, 6, 1)
18152 // Mark FLASH_DEVINFO as containing valid, ECC'd data which describes external flash devices.
18153 ADD_BITFIELD_RO(FLASH_DEVINFO_ENABLE, 5, 1)
18154 // Enable quartering of ROSC divisor during signature check, to reduce secure boot time
18155 ADD_BITFIELD_RO(FAST_SIGCHECK_ROSC_DIV, 4, 1)
18156 // If 1, configure the QSPI pads for 1.8 V operation when accessing flash for the first time from the bootrom, using the VOLTAGE_SELECT register for the QSPI pads bank. This slightly improves the input timing of the pads at low voltages, but does not affect their output characteristics. If 0, leave VOLTAGE_SELECT in its reset state (suitable for operation at and above 2.5 V)
18157 ADD_BITFIELD_RO(FLASH_IO_VOLTAGE_1V8, 3, 1)
18158 // Enable loading of the non-default XOSC and PLL configuration before entering BOOTSEL mode. Ensure that BOOTSEL_XOSC_CFG and BOOTSEL_PLL_CFG are correctly programmed before setting this bit. If this bit is set, user software may use the contents of BOOTSEL_PLL_CFG to calculated the expected XOSC frequency based on the fixed USB boot frequency of 48 MHz.
18159 ADD_BITFIELD_RO(ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG, 2, 1)
18160 // Enable bootloader activity LED. If set, bootsel_led_cfg is assumed to be valid
18161 ADD_BITFIELD_RO(ENABLE_BOOTSEL_LED, 1, 1)
18162 ADD_BITFIELD_RO(DISABLE_BOOTSEL_EXEC2, 0, 1)
18163 END_TYPE()
18164
18165 // Redundant copy of BOOT_FLAGS0
18166 BEGIN_TYPE(BOOT_FLAGS0_R1_t, uint32_t)
18167 ADD_BITFIELD_RO(BOOT_FLAGS0_R1, 0, 24)
18168 END_TYPE()
18169
18170 // Redundant copy of BOOT_FLAGS0
18171 BEGIN_TYPE(BOOT_FLAGS0_R2_t, uint32_t)
18172 ADD_BITFIELD_RO(BOOT_FLAGS0_R2, 0, 24)
18173 END_TYPE()
18174
18175 // Disable/Enable boot paths/features in the RP2350 mask ROM. Disables always supersede
18176 // enables. Enables are provided where there are other configurations in OTP that must
18177 // be valid. (RBIT-3)
18178 // Reset value: 0x00000000
18179 BEGIN_TYPE(BOOT_FLAGS1_t, uint32_t)
18180 // Enable entering BOOTSEL mode via double-tap of the RUN/RSTn pin. Adds a
18181 // significant delay to boot time, as configured by DOUBLE_TAP_DELAY.
18182 // This functions by waiting at startup (i.e. following a reset) to see if a
18183 // second reset is applied soon afterward. The second reset is detected by the
18184 // bootrom with help of the POWMAN_CHIP_RESET_DOUBLE_TAP flag, which is not
18185 // reset by the external reset pin, and the bootrom enters BOOTSEL mode
18186 // (NSBOOT) to await further instruction over USB or UART.
18187 ADD_BITFIELD_RO(DOUBLE_TAP, 19, 1)
18188 // Adjust how long to wait for a second reset when double tap BOOTSEL mode is enabled
18189 // via DOUBLE_TAP. The minimum is 50 milliseconds, and each unit of this field adds an
18190 // additional 50 milliseconds. For example, settings this field to its maximum value of
18191 // 7 will cause the chip to wait for 400 milliseconds at boot to check for a second reset
18192 // which requests entry to BOOTSEL mode.
18193 // 200 milliseconds (DOUBLE_TAP_DELAY=3) is a good intermediate value.
18194 ADD_BITFIELD_RO(DOUBLE_TAP_DELAY, 16, 3)
18195 // Mark a boot key as invalid, or prevent it from ever becoming valid. The bootrom
18196 // will ignore any boot key marked as invalid during secure boot signature checks.
18197 // Each bit in this field corresponds to one of the four 256-bit boot key hashes that
18198 // may be stored in page 2 of the OTP. When provisioning boot keys, it's recommended
18199 // to mark any boot key slots you don't intend to use as KEY_INVALID, so that
18200 // spurious keys can not be installed at a later time.
18201 ADD_BITFIELD_RO(KEY_INVALID, 8, 4)
18202 // Mark each of the possible boot keys as valid. The bootrom will check signatures
18203 // against all valid boot keys, and ignore invalid boot keys. Each bit in this field
18204 // corresponds to one of the four 256-bit boot key hashes that may be stored in page 2
18205 // of the OTP. A KEY_VALID bit is ignored if the corresponding KEY_INVALID bit is set.
18206 // Boot keys are considered valid only when KEY_VALID is set and KEY_INVALID is clear.
18207 // Do not mark a boot key as KEY_VALID if it does not contain a valid SHA-256 hash of
18208 // your secp256k1 public key. Verify keys after programming, before setting the KEY_VALID
18209 // bits -- a boot key with uncorrectable ECC faults will render your device unbootable if
18210 // secure boot is enabled.
18211 // Do not enable secure boot without first installing a valid key. This will render your
18212 // device unbootable.
18213 ADD_BITFIELD_RO(KEY_VALID, 0, 4)
18214 END_TYPE()
18215
18216 // Redundant copy of BOOT_FLAGS1
18217 BEGIN_TYPE(BOOT_FLAGS1_R1_t, uint32_t)
18218 ADD_BITFIELD_RO(BOOT_FLAGS1_R1, 0, 24)
18219 END_TYPE()
18220
18221 // Redundant copy of BOOT_FLAGS1
18222 BEGIN_TYPE(BOOT_FLAGS1_R2_t, uint32_t)
18223 ADD_BITFIELD_RO(BOOT_FLAGS1_R2, 0, 24)
18224 END_TYPE()
18225
18226 // Default boot version thermometer counter, bits 23:0 (RBIT-3)
18227 BEGIN_TYPE(DEFAULT_BOOT_VERSION0_t, uint32_t)
18228 ADD_BITFIELD_RO(DEFAULT_BOOT_VERSION0, 0, 24)
18229 END_TYPE()
18230
18231 // Redundant copy of DEFAULT_BOOT_VERSION0
18232 BEGIN_TYPE(DEFAULT_BOOT_VERSION0_R1_t, uint32_t)
18233 ADD_BITFIELD_RO(DEFAULT_BOOT_VERSION0_R1, 0, 24)
18234 END_TYPE()
18235
18236 // Redundant copy of DEFAULT_BOOT_VERSION0
18237 BEGIN_TYPE(DEFAULT_BOOT_VERSION0_R2_t, uint32_t)
18238 ADD_BITFIELD_RO(DEFAULT_BOOT_VERSION0_R2, 0, 24)
18239 END_TYPE()
18240
18241 // Default boot version thermometer counter, bits 47:24 (RBIT-3)
18242 BEGIN_TYPE(DEFAULT_BOOT_VERSION1_t, uint32_t)
18243 ADD_BITFIELD_RO(DEFAULT_BOOT_VERSION1, 0, 24)
18244 END_TYPE()
18245
18246 // Redundant copy of DEFAULT_BOOT_VERSION1
18247 BEGIN_TYPE(DEFAULT_BOOT_VERSION1_R1_t, uint32_t)
18248 ADD_BITFIELD_RO(DEFAULT_BOOT_VERSION1_R1, 0, 24)
18249 END_TYPE()
18250
18251 // Redundant copy of DEFAULT_BOOT_VERSION1
18252 BEGIN_TYPE(DEFAULT_BOOT_VERSION1_R2_t, uint32_t)
18253 ADD_BITFIELD_RO(DEFAULT_BOOT_VERSION1_R2, 0, 24)
18254 END_TYPE()
18255
18256 // Stores information about external flash device(s). (ECC)
18257 // Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set.
18258 // Reset value: 0x00000000
18259 BEGIN_TYPE(FLASH_DEVINFO_t, uint32_t)
18260 // The size of the flash/PSRAM device on chip select 1 (addressable at 0x11000000
18261 // through 0x11ffffff). A value of zero is decoded as a size of zero (no device).
18262 // Nonzero values are decoded as 4kiB << CS1_SIZE. For example, four megabytes
18263 // is encoded with a CS1_SIZE value of 10, and 16 megabytes is encoded with a
18264 // CS1_SIZE value of 12.
18265 // When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of zero is used.
18266 ADD_BITFIELD_RO(CS1_SIZE, 12, 4)
18267 // The size of the flash/PSRAM device on chip select 0 (addressable at 0x10000000 through
18268 // 0x10ffffff). A value of zero is decoded as a size of zero (no device). Nonzero values
18269 // are decoded as 4kiB << CS0_SIZE. For example, four megabytes is encoded with a
18270 // CS0_SIZE value of 10, and 16 megabytes is encoded with a CS0_SIZE value of 12.
18271 // When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, a default of 12 (16 MiB) is used.
18272 ADD_BITFIELD_RO(CS0_SIZE, 8, 4)
18273 // If true, all attached devices are assumed to support (or ignore, in the case of
18274 // PSRAM) a block erase command with a command prefix of D8h, an erase size of 64 kiB,
18275 // and a 24-bit address. Almost all 25-series flash devices support this command.
18276 // If set, the bootrom will use the D8h erase command where it is able, to accelerate
18277 // bulk erase operations. This makes flash programming faster.
18278 // When BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is not set, this field defaults to false.
18279 ADD_BITFIELD_RO(D8H_ERASE_SUPPORTED, 7, 1)
18280 // Indicate a GPIO number to be used for the secondary flash chip select (CS1), which
18281 // selects the external QSPI device mapped at system addresses 0x11000000 through 0x11ffffff.
18282 // There is no such configuration for CS0, as the primary chip select has a dedicated pin.
18283 // On RP2350 the permissible GPIO numbers are 0, 8, 19 and 47.
18284 // Ignored if CS1_size is zero. If CS1_SIZE is nonzero, the bootrom will automatically
18285 // configure this GPIO as a second chip select upon entering the flash boot path, or entering
18286 // any other path that may use the QSPI flash interface, such as BOOTSEL mode (nsboot).
18287 ADD_BITFIELD_RO(CS1_GPIO, 0, 6)
18288 END_TYPE()
18289
18290 static const uint32_t FLASH_DEVINFO_CS1_SIZE__NONE = 0;
18291 static const uint32_t FLASH_DEVINFO_CS1_SIZE__8K = 1;
18292 static const uint32_t FLASH_DEVINFO_CS1_SIZE__16K = 2;
18293 static const uint32_t FLASH_DEVINFO_CS1_SIZE__32K = 3;
18294 static const uint32_t FLASH_DEVINFO_CS1_SIZE__64k = 4;
18295 static const uint32_t FLASH_DEVINFO_CS1_SIZE__128K = 5;
18296 static const uint32_t FLASH_DEVINFO_CS1_SIZE__256K = 6;
18297 static const uint32_t FLASH_DEVINFO_CS1_SIZE__512K = 7;
18298 static const uint32_t FLASH_DEVINFO_CS1_SIZE__1M = 8;
18299 static const uint32_t FLASH_DEVINFO_CS1_SIZE__2M = 9;
18300 static const uint32_t FLASH_DEVINFO_CS1_SIZE__4M = 10;
18301 static const uint32_t FLASH_DEVINFO_CS1_SIZE__8M = 11;
18302 static const uint32_t FLASH_DEVINFO_CS1_SIZE__16M = 12;
18303 static const uint32_t FLASH_DEVINFO_CS0_SIZE__NONE = 0;
18304 static const uint32_t FLASH_DEVINFO_CS0_SIZE__8K = 1;
18305 static const uint32_t FLASH_DEVINFO_CS0_SIZE__16K = 2;
18306 static const uint32_t FLASH_DEVINFO_CS0_SIZE__32K = 3;
18307 static const uint32_t FLASH_DEVINFO_CS0_SIZE__64k = 4;
18308 static const uint32_t FLASH_DEVINFO_CS0_SIZE__128K = 5;
18309 static const uint32_t FLASH_DEVINFO_CS0_SIZE__256K = 6;
18310 static const uint32_t FLASH_DEVINFO_CS0_SIZE__512K = 7;
18311 static const uint32_t FLASH_DEVINFO_CS0_SIZE__1M = 8;
18312 static const uint32_t FLASH_DEVINFO_CS0_SIZE__2M = 9;
18313 static const uint32_t FLASH_DEVINFO_CS0_SIZE__4M = 10;
18314 static const uint32_t FLASH_DEVINFO_CS0_SIZE__8M = 11;
18315 static const uint32_t FLASH_DEVINFO_CS0_SIZE__16M = 12;
18316
18317 // Gap between partition table slot 0 and slot 1 at the start of flash (the default size is
18318 // 4096 bytes) (ECC) Enabled by the OVERRIDE_FLASH_PARTITION_SLOT_SIZE bit in BOOT_FLAGS,
18319 // the size is 4096 * (value + 1)
18320 BEGIN_TYPE(FLASH_PARTITION_SLOT_SIZE_t, uint32_t)
18321 ADD_BITFIELD_RO(FLASH_PARTITION_SLOT_SIZE, 0, 16)
18322 END_TYPE()
18323
18324 // Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set.
18325 // Reset value: 0x00000000
18326 BEGIN_TYPE(BOOTSEL_LED_CFG_t, uint32_t)
18327 // LED is active-low. (Default: active-high.)
18328 ADD_BITFIELD_RO(ACTIVELOW, 8, 1)
18329 // GPIO index to use for bootloader activity LED.
18330 ADD_BITFIELD_RO(PIN, 0, 6)
18331 END_TYPE()
18332
18333 // Optional PLL configuration for BOOTSEL mode. (ECC)
18334 // This should be configured to produce an exact 48 MHz based on the crystal
18335 // oscillator frequency. User mode software may also use this value to calculate
18336 // the expected crystal frequency based on an assumed 48 MHz PLL output.
18337 // If no configuration is given, the crystal is assumed to be 12 MHz.
18338 // The PLL frequency can be calculated as:
18339 // PLL out = (XOSC frequency / (REFDIV+1)) x FBDIV / (POSTDIV1 x POSTDIV2)
18340 // Conversely the crystal frequency can be calculated as:
18341 // XOSC frequency = 48 MHz x (REFDIV+1) x (POSTDIV1 x POSTDIV2) / FBDIV
18342 // (Note the +1 on REFDIV is because the value stored in this OTP location is
18343 // the actual divisor value minus one.)
18344 // Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0.
18345 // That bit should be set only after this row and BOOTSEL_XOSC_CFG are both correctly
18346 // programmed.
18347 // Reset value: 0x00000000
18348 BEGIN_TYPE(BOOTSEL_PLL_CFG_t, uint32_t)
18349 // PLL reference divisor, minus one. Programming a value of 0 means a reference divisor of 1. Programming a value of 1 means a reference divisor of 2 (for exceptionally fast XIN inputs)
18350 ADD_BITFIELD_RO(REFDIV, 15, 1)
18351 // PLL post-divide 2 divisor, in the range 1..7 inclusive.
18352 ADD_BITFIELD_RO(POSTDIV2, 12, 3)
18353 // PLL post-divide 1 divisor, in the range 1..7 inclusive.
18354 ADD_BITFIELD_RO(POSTDIV1, 9, 3)
18355 // PLL feedback divisor, in the range 16..320 inclusive.
18356 ADD_BITFIELD_RO(FBDIV, 0, 9)
18357 END_TYPE()
18358
18359 // Non-default crystal oscillator configuration for the USB bootloader. (ECC)
18360 // These values may also be used by user code configuring the crystal oscillator.
18361 // Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0.
18362 // That bit should be set only after this row and BOOTSEL_PLL_CFG are both correctly
18363 // programmed.
18364 // Reset value: 0x00000000
18365 BEGIN_TYPE(BOOTSEL_XOSC_CFG_t, uint32_t)
18366 // Value of the XOSC_CTRL_FREQ_RANGE register.
18367 ADD_BITFIELD_RO(RANGE, 14, 2)
18368 // Value of the XOSC_STARTUP register
18369 ADD_BITFIELD_RO(STARTUP, 0, 14)
18370 END_TYPE()
18371
18372 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__1_15MHZ = 0;
18373 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__10_30MHZ = 1;
18374 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__25_60MHZ = 2;
18375 static const uint32_t BOOTSEL_XOSC_CFG_RANGE__40_100MHZ = 3;
18376
18377 // USB boot specific feature flags (RBIT-3)
18378 // Reset value: 0x00000000
18379 BEGIN_TYPE(USB_BOOT_FLAGS_t, uint32_t)
18380 // Swap DM/DP during USB boot, to support board layouts with mirrored
18381 // USB routing (deliberate or accidental).
18382 ADD_BITFIELD_RO(DP_DM_SWAP, 23, 1)
18383 // valid flag for INFO_UF2_TXT_BOARD_ID_STRDEF entry of the USB_WHITE_LABEL
18384 // struct (index 15)
18385 ADD_BITFIELD_RO(WHITE_LABEL_ADDR_VALID, 22, 1)
18386 // valid flag for the USB_WHITE_LABEL_ADDR field
18387 ADD_BITFIELD_RO(WL_INFO_UF2_TXT_BOARD_ID_STRDEF_VALID, 15, 1)
18388 // valid flag for INFO_UF2_TXT_MODEL_STRDEF entry of the USB_WHITE_LABEL
18389 // struct (index 14)
18390 ADD_BITFIELD_RO(WL_INFO_UF2_TXT_MODEL_STRDEF_VALID, 14, 1)
18391 // valid flag for INDEX_HTM_REDIRECT_NAME_STRDEF entry of the USB_WHITE_LABEL
18392 // struct (index 13)
18393 ADD_BITFIELD_RO(WL_INDEX_HTM_REDIRECT_NAME_STRDEF_VALID, 13, 1)
18394 // valid flag for INDEX_HTM_REDIRECT_URL_STRDEF entry of the USB_WHITE_LABEL
18395 // struct (index 12)
18396 ADD_BITFIELD_RO(WL_INDEX_HTM_REDIRECT_URL_STRDEF_VALID, 12, 1)
18397 // valid flag for SCSI_INQUIRY_VERSION_STRDEF entry of the USB_WHITE_LABEL
18398 // struct (index 11)
18399 ADD_BITFIELD_RO(WL_SCSI_INQUIRY_VERSION_STRDEF_VALID, 11, 1)
18400 // valid flag for SCSI_INQUIRY_PRODUCT_STRDEF entry of the USB_WHITE_LABEL
18401 // struct (index 10)
18402 ADD_BITFIELD_RO(WL_SCSI_INQUIRY_PRODUCT_STRDEF_VALID, 10, 1)
18403 // valid flag for SCSI_INQUIRY_VENDOR_STRDEF entry of the USB_WHITE_LABEL
18404 // struct (index 9)
18405 ADD_BITFIELD_RO(WL_SCSI_INQUIRY_VENDOR_STRDEF_VALID, 9, 1)
18406 // valid flag for VOLUME_LABEL_STRDEF entry of the USB_WHITE_LABEL
18407 // struct (index 8)
18408 ADD_BITFIELD_RO(WL_VOLUME_LABEL_STRDEF_VALID, 8, 1)
18409 // valid flag for USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES entry of the
18410 // USB_WHITE_LABEL struct (index 7)
18411 ADD_BITFIELD_RO(WL_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES_VALID, 7, 1)
18412 // valid flag for USB_DEVICE_SERIAL_NUMBER_STRDEF entry of the USB_WHITE_LABEL
18413 // struct (index 6)
18414 ADD_BITFIELD_RO(WL_USB_DEVICE_SERIAL_NUMBER_STRDEF_VALID, 6, 1)
18415 // valid flag for USB_DEVICE_PRODUCT_STRDEF entry of the USB_WHITE_LABEL
18416 // struct (index 5)
18417 ADD_BITFIELD_RO(WL_USB_DEVICE_PRODUCT_STRDEF_VALID, 5, 1)
18418 // valid flag for USB_DEVICE_MANUFACTURER_STRDEF entry of the USB_WHITE_LABEL
18419 // struct (index 4)
18420 ADD_BITFIELD_RO(WL_USB_DEVICE_MANUFACTURER_STRDEF_VALID, 4, 1)
18421 // valid flag for USB_DEVICE_LANG_ID_VALUE entry of the USB_WHITE_LABEL struct
18422 // (index 3)
18423 ADD_BITFIELD_RO(WL_USB_DEVICE_LANG_ID_VALUE_VALID, 3, 1)
18424 // valid flag for USB_DEVICE_BCD_DEVICEVALUE entry of the USB_WHITE_LABEL struct
18425 // (index 2)
18426 ADD_BITFIELD_RO(WL_USB_DEVICE_SERIAL_NUMBER_VALUE_VALID, 2, 1)
18427 // valid flag for USB_DEVICE_PID_VALUE entry of the USB_WHITE_LABEL struct
18428 // (index 1)
18429 ADD_BITFIELD_RO(WL_USB_DEVICE_PID_VALUE_VALID, 1, 1)
18430 // valid flag for USB_DEVICE_VID_VALUE entry of the USB_WHITE_LABEL struct
18431 // (index 0)
18432 ADD_BITFIELD_RO(WL_USB_DEVICE_VID_VALUE_VALID, 0, 1)
18433 END_TYPE()
18434
18435 // Redundant copy of USB_BOOT_FLAGS
18436 BEGIN_TYPE(USB_BOOT_FLAGS_R1_t, uint32_t)
18437 ADD_BITFIELD_RO(USB_BOOT_FLAGS_R1, 0, 24)
18438 END_TYPE()
18439
18440 // Redundant copy of USB_BOOT_FLAGS
18441 BEGIN_TYPE(USB_BOOT_FLAGS_R2_t, uint32_t)
18442 ADD_BITFIELD_RO(USB_BOOT_FLAGS_R2, 0, 24)
18443 END_TYPE()
18444
18445 // Row index of the USB_WHITE_LABEL structure within OTP (ECC)
18446 // The table has 16 rows, each of which are also ECC and marked valid by the
18447 // corresponding valid bit in USB_BOOT_FLAGS (ECC). The entries are either
18448 // _VALUEs where the 16 bit value is used as is, or _STRDEFs which acts as a
18449 // pointers to a string value. The value stored in a _STRDEF is two separate bytes:
18450 // The low seven bits of the first (LSB) byte indicates the number of characters
18451 // in the string, and the top bit of the first (LSB) byte if set to indicate that
18452 // each character in the string is two bytes (Unicode) versus one byte if unset.
18453 // The second (MSB) byte represents the location of the string data, and is encoded
18454 // as the number of rows from this USB_WHITE_LABEL_ADDR; i.e. the row of the start
18455 // of the string is USB_WHITE_LABEL_ADDR value + msb_byte.
18456 // In each case, the corresponding valid bit enables replacing the default value for
18457 // the corresponding item provided by the boot rom.
18458 // Note that Unicode _STRDEFs are only supported for USB_DEVICE_PRODUCT_STRDEF,
18459 // USB_DEVICE_SERIAL_NUMBER_STRDEF and USB_DEVICE_MANUFACTURER_STRDEF. Unicode values
18460 // will be ignored if specified for other fields, and non-unicode values for these
18461 // three items will be converted to Unicode characters by setting the upper 8 bits to zero.
18462 // Note that if the USB_WHITE_LABEL structure or the corresponding strings are not
18463 // readable by BOOTSEL mode based on OTP permissions, or if alignment requirements
18464 // are not met, then the corresponding default values are used. The index values
18465 // indicate where each field is located (row USB_WHITE_LABEL_ADDR value + index).
18466 BEGIN_TYPE(USB_WHITE_LABEL_ADDR_t, uint32_t)
18467 ADD_BITFIELD_RO(USB_WHITE_LABEL_ADDR, 0, 16)
18468 END_TYPE()
18469
18470 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_VID_VALUE = 0;
18471 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_PID_VALUE = 1;
18472 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_BCD_DEVICE_VALUE = 2;
18473 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_LANG_ID_VALUE = 3;
18474 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_MANUFACTURER_STRDEF = 4;
18475 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_PRODUCT_STRDEF = 5;
18476 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_DEVICE_SERIAL_NUMBER_STRDEF = 6;
18477 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES = 7;
18478 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_VOLUME_LABEL_STRDEF = 8;
18479 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_SCSI_INQUIRY_VENDOR_STRDEF = 9;
18480 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_SCSI_INQUIRY_PRODUCT_STRDEF = 10;
18481 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_SCSI_INQUIRY_VERSION_STRDEF = 11;
18482 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INDEX_HTM_REDIRECT_URL_STRDEF = 12;
18483 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INDEX_HTM_REDIRECT_NAME_STRDEF = 13;
18484 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INFO_UF2_TXT_MODEL_STRDEF = 14;
18485 static const uint32_t USB_WHITE_LABEL_ADDR_USB_WHITE_LABEL_ADDR__INDEX_INFO_UF2_TXT_BOARD_ID_STRDEF = 15;
18486
18487 // OTP start row for the OTP boot image. (ECC)
18488 // If OTP boot is enabled, the bootrom will load from this location into
18489 // SRAM and then directly enter the loaded image. Note that the image must
18490 // be signed if SECURE_BOOT_ENABLE is set. The image itself is assumed to be
18491 // ECC-protected.
18492 // This must be an even number. Equivalently, the OTP boot image must start
18493 // at a word-aligned location in the ECC read data address window.
18494 BEGIN_TYPE(OTPBOOT_SRC_t, uint32_t)
18495 ADD_BITFIELD_RO(OTPBOOT_SRC, 0, 16)
18496 END_TYPE()
18497
18498 // Length in rows of the OTP boot image. (ECC)
18499 // OTPBOOT_LEN must be even. The total image size must be a
18500 // multiple of 4 bytes (32 bits).
18501 BEGIN_TYPE(OTPBOOT_LEN_t, uint32_t)
18502 ADD_BITFIELD_RO(OTPBOOT_LEN, 0, 16)
18503 END_TYPE()
18504
18505 // Bits 15:0 of the OTP boot image load destination (and entry point). (ECC)
18506 // This must be a location in main SRAM (main SRAM is addresses 0x20000000 through
18507 // 0x20082000) and must be word-aligned.
18508 BEGIN_TYPE(OTPBOOT_DST0_t, uint32_t)
18509 ADD_BITFIELD_RO(OTPBOOT_DST0, 0, 16)
18510 END_TYPE()
18511
18512 // Bits 31:16 of the OTP boot image load destination (and entry point). (ECC)
18513 // This must be a location in main SRAM (main SRAM is addresses 0x20000000 through
18514 // 0x20082000) and must be word-aligned.
18515 BEGIN_TYPE(OTPBOOT_DST1_t, uint32_t)
18516 ADD_BITFIELD_RO(OTPBOOT_DST1, 0, 16)
18517 END_TYPE()
18518
18519 // Bits 15:0 of SHA-256 hash of boot key 0 (ECC)
18520 BEGIN_TYPE(BOOTKEY_0_t, uint32_t)
18521 ADD_BITFIELD_RO(BOOTKEY_0, 0, 16)
18522 END_TYPE()
18523
18524 // Bits 31:16 of SHA-256 hash of boot key 0 (ECC)
18525 BEGIN_TYPE(BOOTKEY_1_t, uint32_t)
18526 ADD_BITFIELD_RO(BOOTKEY_1, 0, 16)
18527 END_TYPE()
18528
18529 // Bits 47:32 of SHA-256 hash of boot key 0 (ECC)
18530 BEGIN_TYPE(BOOTKEY_2_t, uint32_t)
18531 ADD_BITFIELD_RO(BOOTKEY_2, 0, 16)
18532 END_TYPE()
18533
18534 // Bits 63:48 of SHA-256 hash of boot key 0 (ECC)
18535 BEGIN_TYPE(BOOTKEY_3_t, uint32_t)
18536 ADD_BITFIELD_RO(BOOTKEY_3, 0, 16)
18537 END_TYPE()
18538
18539 // Bits 79:64 of SHA-256 hash of boot key 0 (ECC)
18540 BEGIN_TYPE(BOOTKEY_4_t, uint32_t)
18541 ADD_BITFIELD_RO(BOOTKEY_4, 0, 16)
18542 END_TYPE()
18543
18544 // Bits 95:80 of SHA-256 hash of boot key 0 (ECC)
18545 BEGIN_TYPE(BOOTKEY_5_t, uint32_t)
18546 ADD_BITFIELD_RO(BOOTKEY_5, 0, 16)
18547 END_TYPE()
18548
18549 // Bits 111:96 of SHA-256 hash of boot key 0 (ECC)
18550 BEGIN_TYPE(BOOTKEY_6_t, uint32_t)
18551 ADD_BITFIELD_RO(BOOTKEY_6, 0, 16)
18552 END_TYPE()
18553
18554 // Bits 127:112 of SHA-256 hash of boot key 0 (ECC)
18555 BEGIN_TYPE(BOOTKEY_7_t, uint32_t)
18556 ADD_BITFIELD_RO(BOOTKEY_7, 0, 16)
18557 END_TYPE()
18558
18559 // Bits 143:128 of SHA-256 hash of boot key 0 (ECC)
18560 BEGIN_TYPE(BOOTKEY_8_t, uint32_t)
18561 ADD_BITFIELD_RO(BOOTKEY_8, 0, 16)
18562 END_TYPE()
18563
18564 // Bits 159:144 of SHA-256 hash of boot key 0 (ECC)
18565 BEGIN_TYPE(BOOTKEY_9_t, uint32_t)
18566 ADD_BITFIELD_RO(BOOTKEY_9, 0, 16)
18567 END_TYPE()
18568
18569 // Bits 175:160 of SHA-256 hash of boot key 0 (ECC)
18570 BEGIN_TYPE(BOOTKEY_10_t, uint32_t)
18571 ADD_BITFIELD_RO(BOOTKEY_10, 0, 16)
18572 END_TYPE()
18573
18574 // Bits 191:176 of SHA-256 hash of boot key 0 (ECC)
18575 BEGIN_TYPE(BOOTKEY_11_t, uint32_t)
18576 ADD_BITFIELD_RO(BOOTKEY_11, 0, 16)
18577 END_TYPE()
18578
18579 // Bits 207:192 of SHA-256 hash of boot key 0 (ECC)
18580 BEGIN_TYPE(BOOTKEY_12_t, uint32_t)
18581 ADD_BITFIELD_RO(BOOTKEY_12, 0, 16)
18582 END_TYPE()
18583
18584 // Bits 223:208 of SHA-256 hash of boot key 0 (ECC)
18585 BEGIN_TYPE(BOOTKEY_13_t, uint32_t)
18586 ADD_BITFIELD_RO(BOOTKEY_13, 0, 16)
18587 END_TYPE()
18588
18589 // Bits 239:224 of SHA-256 hash of boot key 0 (ECC)
18590 BEGIN_TYPE(BOOTKEY_14_t, uint32_t)
18591 ADD_BITFIELD_RO(BOOTKEY_14, 0, 16)
18592 END_TYPE()
18593
18594 // Bits 255:240 of SHA-256 hash of boot key 0 (ECC)
18595 BEGIN_TYPE(BOOTKEY_15_t, uint32_t)
18596 ADD_BITFIELD_RO(BOOTKEY_15, 0, 16)
18597 END_TYPE()
18598
18599 // Bits 15:0 of OTP access key 1 (ECC)
18600 BEGIN_TYPE(KEY_0_t, uint32_t)
18601 ADD_BITFIELD_RO(KEY_0, 0, 16)
18602 END_TYPE()
18603
18604 // Bits 31:16 of OTP access key 1 (ECC)
18605 BEGIN_TYPE(KEY_1_t, uint32_t)
18606 ADD_BITFIELD_RO(KEY_1, 0, 16)
18607 END_TYPE()
18608
18609 // Bits 47:32 of OTP access key 1 (ECC)
18610 BEGIN_TYPE(KEY_2_t, uint32_t)
18611 ADD_BITFIELD_RO(KEY_2, 0, 16)
18612 END_TYPE()
18613
18614 // Bits 63:48 of OTP access key 1 (ECC)
18615 BEGIN_TYPE(KEY_3_t, uint32_t)
18616 ADD_BITFIELD_RO(KEY_3, 0, 16)
18617 END_TYPE()
18618
18619 // Bits 79:64 of OTP access key 1 (ECC)
18620 BEGIN_TYPE(KEY_4_t, uint32_t)
18621 ADD_BITFIELD_RO(KEY_4, 0, 16)
18622 END_TYPE()
18623
18624 // Bits 95:80 of OTP access key 1 (ECC)
18625 BEGIN_TYPE(KEY_5_t, uint32_t)
18626 ADD_BITFIELD_RO(KEY_5, 0, 16)
18627 END_TYPE()
18628
18629 // Bits 111:96 of OTP access key 1 (ECC)
18630 BEGIN_TYPE(KEY_6_t, uint32_t)
18631 ADD_BITFIELD_RO(KEY_6, 0, 16)
18632 END_TYPE()
18633
18634 // Bits 127:112 of OTP access key 1 (ECC)
18635 BEGIN_TYPE(KEY_7_t, uint32_t)
18636 ADD_BITFIELD_RO(KEY_7, 0, 16)
18637 END_TYPE()
18638
18639 // Valid flag for key 1. Once the valid flag is set, the key can no longer be read
18640 // or written, and becomes a valid fixed key for protecting OTP pages.
18641 // Reset value: 0x00000000
18642 BEGIN_TYPE(KEY1_VALID_t, uint32_t)
18643 // Redundant copy of VALID, with 3-way majority vote
18644 ADD_BITFIELD_RO(VALID_R2, 16, 1)
18645 // Redundant copy of VALID, with 3-way majority vote
18646 ADD_BITFIELD_RO(VALID_R1, 8, 1)
18647 ADD_BITFIELD_RO(VALID, 0, 1)
18648 END_TYPE()
18649
18650 // Valid flag for key 2. Once the valid flag is set, the key can no longer be read
18651 // or written, and becomes a valid fixed key for protecting OTP pages.
18652 // Reset value: 0x00000000
18653 BEGIN_TYPE(KEY2_VALID_t, uint32_t)
18654 // Redundant copy of VALID, with 3-way majority vote
18655 ADD_BITFIELD_RO(VALID_R2, 16, 1)
18656 // Redundant copy of VALID, with 3-way majority vote
18657 ADD_BITFIELD_RO(VALID_R1, 8, 1)
18658 ADD_BITFIELD_RO(VALID, 0, 1)
18659 END_TYPE()
18660
18661 // Valid flag for key 3. Once the valid flag is set, the key can no longer be read
18662 // or written, and becomes a valid fixed key for protecting OTP pages.
18663 // Reset value: 0x00000000
18664 BEGIN_TYPE(KEY3_VALID_t, uint32_t)
18665 // Redundant copy of VALID, with 3-way majority vote
18666 ADD_BITFIELD_RO(VALID_R2, 16, 1)
18667 // Redundant copy of VALID, with 3-way majority vote
18668 ADD_BITFIELD_RO(VALID_R1, 8, 1)
18669 ADD_BITFIELD_RO(VALID, 0, 1)
18670 END_TYPE()
18671
18672 // Valid flag for key 4. Once the valid flag is set, the key can no longer be read
18673 // or written, and becomes a valid fixed key for protecting OTP pages.
18674 // Reset value: 0x00000000
18675 BEGIN_TYPE(KEY4_VALID_t, uint32_t)
18676 // Redundant copy of VALID, with 3-way majority vote
18677 ADD_BITFIELD_RO(VALID_R2, 16, 1)
18678 // Redundant copy of VALID, with 3-way majority vote
18679 ADD_BITFIELD_RO(VALID_R1, 8, 1)
18680 ADD_BITFIELD_RO(VALID, 0, 1)
18681 END_TYPE()
18682
18683 // Valid flag for key 5. Once the valid flag is set, the key can no longer be read
18684 // or written, and becomes a valid fixed key for protecting OTP pages.
18685 // Reset value: 0x00000000
18686 BEGIN_TYPE(KEY5_VALID_t, uint32_t)
18687 // Redundant copy of VALID, with 3-way majority vote
18688 ADD_BITFIELD_RO(VALID_R2, 16, 1)
18689 // Redundant copy of VALID, with 3-way majority vote
18690 ADD_BITFIELD_RO(VALID_R1, 8, 1)
18691 ADD_BITFIELD_RO(VALID, 0, 1)
18692 END_TYPE()
18693
18694 // Valid flag for key 6. Once the valid flag is set, the key can no longer be
18695 // read or written, and becomes a valid fixed key for protecting OTP pages.
18696 // Reset value: 0x00000000
18697 BEGIN_TYPE(KEY6_VALID_t, uint32_t)
18698 // Redundant copy of VALID, with 3-way majority vote
18699 ADD_BITFIELD_RO(VALID_R2, 16, 1)
18700 // Redundant copy of VALID, with 3-way majority vote
18701 ADD_BITFIELD_RO(VALID_R1, 8, 1)
18702 ADD_BITFIELD_RO(VALID, 0, 1)
18703 END_TYPE()
18704
18705 // Lock configuration LSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with
18706 // 3-way majority vote encoding, so that bits can be set independently.
18707 // This OTP location is always readable, and is write-protected by its own permissions.
18708 // Reset value: 0x00000000
18709 BEGIN_TYPE(PAGE_LOCK0_t, uint32_t)
18710 // Redundant copy of bits 7:0
18711 ADD_BITFIELD_RO(R2, 16, 8)
18712 // Redundant copy of bits 7:0
18713 ADD_BITFIELD_RO(R1, 8, 8)
18714 // State when at least one key is registered for this page and no matching
18715 // key has been entered.
18716 ADD_BITFIELD_RO(NO_KEY_STATE, 6, 1)
18717 // Index 1-6 of a hardware key which must be entered to grant read access,
18718 // or 0 if no such key is required.
18719 ADD_BITFIELD_RO(KEY_R, 3, 3)
18720 // Index 1-6 of a hardware key which must be entered to grant write access,
18721 // or 0 if no such key is required.
18722 ADD_BITFIELD_RO(KEY_W, 0, 3)
18723 END_TYPE()
18724
18725 static const uint32_t PAGE_LOCK0_NO_KEY_STATE__read_only = 0;
18726 static const uint32_t PAGE_LOCK0_NO_KEY_STATE__inaccessible = 1;
18727
18728 // Lock configuration MSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way
18729 // majority vote encoding, so that bits can be set independently.
18730 // This OTP location is always readable, and is write-protected by its own permissions.
18731 // Reset value: 0x00000000
18732 BEGIN_TYPE(PAGE_LOCK1_t, uint32_t)
18733 // Redundant copy of bits 7:0
18734 ADD_BITFIELD_RO(R2, 16, 8)
18735 // Redundant copy of bits 7:0
18736 ADD_BITFIELD_RO(R1, 8, 8)
18737 // Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader)
18738 // to store their own OTP access permissions. No hardware effect, and no corresponding
18739 // SW_LOCKx registers.
18740 ADD_BITFIELD_RO(LOCK_BL, 4, 2)
18741 // Lock state for Non-secure accesses to this page. Thermometer-coded, so
18742 // lock state can be advanced permanently from any state to any less-permissive
18743 // state by programming OTP. Software can also advance the lock state temporarily
18744 // (until next OTP reset) using the SW_LOCKx registers.
18745 // Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI
18746 // programming interface is not accessible to Non-secure software.
18747 // However, Secure software may check these bits to apply write permissions to
18748 // a Non-secure OTP programming API.
18749 ADD_BITFIELD_RO(LOCK_NS, 2, 2)
18750 // Lock state for Secure accesses to this page. Thermometer-coded, so lock
18751 // state can be advanced permanently from any state to any less-permissive state
18752 // by programming OTP. Software can also advance the lock state temporarily
18753 // (until next OTP reset) using the SW_LOCKx registers.
18754 ADD_BITFIELD_RO(LOCK_S, 0, 2)
18755 END_TYPE()
18756
18757 // Bootloader permits user reads and writes to this page
18758 static const uint32_t PAGE_LOCK1_LOCK_BL__read_write = 0;
18759 // Bootloader permits user reads of this page
18760 static const uint32_t PAGE_LOCK1_LOCK_BL__read_only = 1;
18761 // Do not use. Behaves the same as INACCESSIBLE
18762 static const uint32_t PAGE_LOCK1_LOCK_BL__reserved = 2;
18763 // Bootloader does not permit user access to this page
18764 static const uint32_t PAGE_LOCK1_LOCK_BL__inaccessible = 3;
18765 // Page can be read by Non-secure software, and Secure software may
18766 // permit Non-secure writes.
18767 static const uint32_t PAGE_LOCK1_LOCK_NS__read_write = 0;
18768 // Page can be read by Non-secure software
18769 static const uint32_t PAGE_LOCK1_LOCK_NS__read_only = 1;
18770 // Do not use. Behaves the same as INACCESSIBLE.
18771 static const uint32_t PAGE_LOCK1_LOCK_NS__reserved = 2;
18772 // Page can not be accessed by Non-secure software.
18773 static const uint32_t PAGE_LOCK1_LOCK_NS__inaccessible = 3;
18774 // Page is fully accessible by Secure software.
18775 static const uint32_t PAGE_LOCK1_LOCK_S__read_write = 0;
18776 // Page can be read by Secure software, but can not be written.
18777 static const uint32_t PAGE_LOCK1_LOCK_S__read_only = 1;
18778 // Do not use. Behaves the same as INACCESSIBLE.
18779 static const uint32_t PAGE_LOCK1_LOCK_S__reserved = 2;
18780 // Page can not be accessed by Secure software.
18781 static const uint32_t PAGE_LOCK1_LOCK_S__inaccessible = 3;
18782
18783 // Lock configuration LSBs for page 63 (rows 0xfc0 through 0xfff). Locks are
18784 // stored with 3-way majority vote encoding, so that bits can be set independently.
18785 // This OTP location is always readable, and is write-protected by its own permissions.
18786 // Reset value: 0x00000000
18787 BEGIN_TYPE(PAGE63_LOCK0_t, uint32_t)
18788 // Redundant copy of bits 7:0
18789 ADD_BITFIELD_RO(R2, 16, 8)
18790 // Redundant copy of bits 7:0
18791 ADD_BITFIELD_RO(R1, 8, 8)
18792 // Decommission for RMA of a suspected faulty device. This re-enables the
18793 // factory test JTAG interface, and makes pages 3 through 61 of the OTP
18794 // permanently inaccessible.
18795 ADD_BITFIELD_RO(RMA, 7, 1)
18796 // State when at least one key is registered for this page and no matching
18797 // key has been entered.
18798 ADD_BITFIELD_RO(NO_KEY_STATE, 6, 1)
18799 // Index 1-6 of a hardware key which must be entered to grant read access,
18800 // or 0 if no such key is required.
18801 ADD_BITFIELD_RO(KEY_R, 3, 3)
18802 // Index 1-6 of a hardware key which must be entered to grant write access,
18803 // or 0 if no such key is required.
18804 ADD_BITFIELD_RO(KEY_W, 0, 3)
18805 END_TYPE()
18806
18807 static const uint32_t PAGE63_LOCK0_NO_KEY_STATE__read_only = 0;
18808 static const uint32_t PAGE63_LOCK0_NO_KEY_STATE__inaccessible = 1;
18809
18810 // Lock configuration MSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored
18811 // with 3-way majority vote encoding, so that bits can be set independently.
18812 // This OTP location is always readable, and is write-protected by its own permissions.
18813 // Reset value: 0x00000000
18814 BEGIN_TYPE(PAGE63_LOCK1_t, uint32_t)
18815 // Redundant copy of bits 7:0
18816 ADD_BITFIELD_RO(R2, 16, 8)
18817 // Redundant copy of bits 7:0
18818 ADD_BITFIELD_RO(R1, 8, 8)
18819 // Dummy lock bits reserved for bootloaders (including the RP2350 USB
18820 // bootloader) to store their own OTP access permissions. No hardware
18821 // effect, and no corresponding SW_LOCKx registers.
18822 ADD_BITFIELD_RO(LOCK_BL, 4, 2)
18823 // Lock state for Non-secure accesses to this page. Thermometer-coded, so
18824 // lock state can be advanced permanently from any state to any less-permissive
18825 // state by programming OTP. Software can also advance the lock state temporarily
18826 // (until next OTP reset) using the SW_LOCKx registers.
18827 // Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI
18828 // programming interface is not accessible to Non-secure software. However,
18829 // Secure software may check these bits to apply write permissions to a
18830 // Non-secure OTP programming API.
18831 ADD_BITFIELD_RO(LOCK_NS, 2, 2)
18832 // Lock state for Secure accesses to this page. Thermometer-coded, so lock
18833 // state can be advanced permanently from any state to any less-permissive
18834 // state by programming OTP. Software can also advance the lock state
18835 // temporarily (until next OTP reset) using the SW_LOCKx registers.
18836 ADD_BITFIELD_RO(LOCK_S, 0, 2)
18837 END_TYPE()
18838
18839 // Bootloader permits user reads and writes to this page
18840 static const uint32_t PAGE63_LOCK1_LOCK_BL__read_write = 0;
18841 // Bootloader permits user reads of this page
18842 static const uint32_t PAGE63_LOCK1_LOCK_BL__read_only = 1;
18843 // Do not use. Behaves the same as INACCESSIBLE
18844 static const uint32_t PAGE63_LOCK1_LOCK_BL__reserved = 2;
18845 // Bootloader does not permit user access to this page
18846 static const uint32_t PAGE63_LOCK1_LOCK_BL__inaccessible = 3;
18847 // Page can be read by Non-secure software, and Secure software may
18848 // permit Non-secure writes.
18849 static const uint32_t PAGE63_LOCK1_LOCK_NS__read_write = 0;
18850 // Page can be read by Non-secure software
18851 static const uint32_t PAGE63_LOCK1_LOCK_NS__read_only = 1;
18852 // Do not use. Behaves the same as INACCESSIBLE.
18853 static const uint32_t PAGE63_LOCK1_LOCK_NS__reserved = 2;
18854 // Page can not be accessed by Non-secure software.
18855 static const uint32_t PAGE63_LOCK1_LOCK_NS__inaccessible = 3;
18856 // Page is fully accessible by Secure software.
18857 static const uint32_t PAGE63_LOCK1_LOCK_S__read_write = 0;
18858 // Page can be read by Secure software, but can not be written.
18859 static const uint32_t PAGE63_LOCK1_LOCK_S__read_only = 1;
18860 // Do not use. Behaves the same as INACCESSIBLE.
18861 static const uint32_t PAGE63_LOCK1_LOCK_S__reserved = 2;
18862 // Page can not be accessed by Secure software.
18863 static const uint32_t PAGE63_LOCK1_LOCK_S__inaccessible = 3;
18864
18866 CHIPID0_t CHIPID0;
18867 CHIPID1_t CHIPID1;
18868 CHIPID2_t CHIPID2;
18869 CHIPID3_t CHIPID3;
18870 RANDID0_t RANDID0;
18871 RANDID1_t RANDID1;
18872 RANDID2_t RANDID2;
18873 RANDID3_t RANDID3;
18874 RANDID4_t RANDID4;
18875 RANDID5_t RANDID5;
18876 RANDID6_t RANDID6;
18877 RANDID7_t RANDID7;
18878 uint32_t reserved0[4];
18879 ROSC_CALIB_t ROSC_CALIB;
18880 LPOSC_CALIB_t LPOSC_CALIB;
18881 uint32_t reserved1[6];
18882 NUM_GPIOS_t NUM_GPIOS;
18883 uint32_t reserved2[29];
18884 INFO_CRC0_t INFO_CRC0;
18885 INFO_CRC1_t INFO_CRC1;
18886 CRIT0_t CRIT0;
18887 CRIT0_R1_t CRIT0_R1;
18888 CRIT0_R2_t CRIT0_R2;
18889 CRIT0_R3_t CRIT0_R3;
18890 CRIT0_R4_t CRIT0_R4;
18891 CRIT0_R5_t CRIT0_R5;
18892 CRIT0_R6_t CRIT0_R6;
18893 CRIT0_R7_t CRIT0_R7;
18894 CRIT1_t CRIT1;
18895 CRIT1_R1_t CRIT1_R1;
18896 CRIT1_R2_t CRIT1_R2;
18897 CRIT1_R3_t CRIT1_R3;
18898 CRIT1_R4_t CRIT1_R4;
18899 CRIT1_R5_t CRIT1_R5;
18900 CRIT1_R6_t CRIT1_R6;
18901 CRIT1_R7_t CRIT1_R7;
18902 BOOT_FLAGS0_t BOOT_FLAGS0;
18903 BOOT_FLAGS0_R1_t BOOT_FLAGS0_R1;
18904 BOOT_FLAGS0_R2_t BOOT_FLAGS0_R2;
18905 BOOT_FLAGS1_t BOOT_FLAGS1;
18906 BOOT_FLAGS1_R1_t BOOT_FLAGS1_R1;
18907 BOOT_FLAGS1_R2_t BOOT_FLAGS1_R2;
18908 DEFAULT_BOOT_VERSION0_t DEFAULT_BOOT_VERSION0;
18909 DEFAULT_BOOT_VERSION0_R1_t DEFAULT_BOOT_VERSION0_R1;
18910 DEFAULT_BOOT_VERSION0_R2_t DEFAULT_BOOT_VERSION0_R2;
18911 DEFAULT_BOOT_VERSION1_t DEFAULT_BOOT_VERSION1;
18912 DEFAULT_BOOT_VERSION1_R1_t DEFAULT_BOOT_VERSION1_R1;
18913 DEFAULT_BOOT_VERSION1_R2_t DEFAULT_BOOT_VERSION1_R2;
18914 FLASH_DEVINFO_t FLASH_DEVINFO;
18915 FLASH_PARTITION_SLOT_SIZE_t FLASH_PARTITION_SLOT_SIZE;
18916 BOOTSEL_LED_CFG_t BOOTSEL_LED_CFG;
18917 BOOTSEL_PLL_CFG_t BOOTSEL_PLL_CFG;
18918 BOOTSEL_XOSC_CFG_t BOOTSEL_XOSC_CFG;
18919 USB_BOOT_FLAGS_t USB_BOOT_FLAGS;
18920 USB_BOOT_FLAGS_R1_t USB_BOOT_FLAGS_R1;
18921 USB_BOOT_FLAGS_R2_t USB_BOOT_FLAGS_R2;
18922 USB_WHITE_LABEL_ADDR_t USB_WHITE_LABEL_ADDR;
18923 uint32_t reserved3;
18924 OTPBOOT_SRC_t OTPBOOT_SRC;
18925 OTPBOOT_LEN_t OTPBOOT_LEN;
18926 OTPBOOT_DST0_t OTPBOOT_DST0;
18927 OTPBOOT_DST1_t OTPBOOT_DST1;
18928 uint32_t reserved4[30];
18929 BOOTKEY_0_t BOOTKEY0_0;
18930 BOOTKEY_1_t BOOTKEY0_1;
18931 BOOTKEY_2_t BOOTKEY0_2;
18932 BOOTKEY_3_t BOOTKEY0_3;
18933 BOOTKEY_4_t BOOTKEY0_4;
18934 BOOTKEY_5_t BOOTKEY0_5;
18935 BOOTKEY_6_t BOOTKEY0_6;
18936 BOOTKEY_7_t BOOTKEY0_7;
18937 BOOTKEY_8_t BOOTKEY0_8;
18938 BOOTKEY_9_t BOOTKEY0_9;
18939 BOOTKEY_10_t BOOTKEY0_10;
18940 BOOTKEY_11_t BOOTKEY0_11;
18941 BOOTKEY_12_t BOOTKEY0_12;
18942 BOOTKEY_13_t BOOTKEY0_13;
18943 BOOTKEY_14_t BOOTKEY0_14;
18944 BOOTKEY_15_t BOOTKEY0_15;
18945 BOOTKEY_0_t BOOTKEY1_0;
18946 BOOTKEY_1_t BOOTKEY1_1;
18947 BOOTKEY_2_t BOOTKEY1_2;
18948 BOOTKEY_3_t BOOTKEY1_3;
18949 BOOTKEY_4_t BOOTKEY1_4;
18950 BOOTKEY_5_t BOOTKEY1_5;
18951 BOOTKEY_6_t BOOTKEY1_6;
18952 BOOTKEY_7_t BOOTKEY1_7;
18953 BOOTKEY_8_t BOOTKEY1_8;
18954 BOOTKEY_9_t BOOTKEY1_9;
18955 BOOTKEY_10_t BOOTKEY1_10;
18956 BOOTKEY_11_t BOOTKEY1_11;
18957 BOOTKEY_12_t BOOTKEY1_12;
18958 BOOTKEY_13_t BOOTKEY1_13;
18959 BOOTKEY_14_t BOOTKEY1_14;
18960 BOOTKEY_15_t BOOTKEY1_15;
18961 BOOTKEY_0_t BOOTKEY2_0;
18962 BOOTKEY_1_t BOOTKEY2_1;
18963 BOOTKEY_2_t BOOTKEY2_2;
18964 BOOTKEY_3_t BOOTKEY2_3;
18965 BOOTKEY_4_t BOOTKEY2_4;
18966 BOOTKEY_5_t BOOTKEY2_5;
18967 BOOTKEY_6_t BOOTKEY2_6;
18968 BOOTKEY_7_t BOOTKEY2_7;
18969 BOOTKEY_8_t BOOTKEY2_8;
18970 BOOTKEY_9_t BOOTKEY2_9;
18971 BOOTKEY_10_t BOOTKEY2_10;
18972 BOOTKEY_11_t BOOTKEY2_11;
18973 BOOTKEY_12_t BOOTKEY2_12;
18974 BOOTKEY_13_t BOOTKEY2_13;
18975 BOOTKEY_14_t BOOTKEY2_14;
18976 BOOTKEY_15_t BOOTKEY2_15;
18977 BOOTKEY_0_t BOOTKEY3_0;
18978 BOOTKEY_1_t BOOTKEY3_1;
18979 BOOTKEY_2_t BOOTKEY3_2;
18980 BOOTKEY_3_t BOOTKEY3_3;
18981 BOOTKEY_4_t BOOTKEY3_4;
18982 BOOTKEY_5_t BOOTKEY3_5;
18983 BOOTKEY_6_t BOOTKEY3_6;
18984 BOOTKEY_7_t BOOTKEY3_7;
18985 BOOTKEY_8_t BOOTKEY3_8;
18986 BOOTKEY_9_t BOOTKEY3_9;
18987 BOOTKEY_10_t BOOTKEY3_10;
18988 BOOTKEY_11_t BOOTKEY3_11;
18989 BOOTKEY_12_t BOOTKEY3_12;
18990 BOOTKEY_13_t BOOTKEY3_13;
18991 BOOTKEY_14_t BOOTKEY3_14;
18992 BOOTKEY_15_t BOOTKEY3_15;
18993 uint32_t reserved5[3720];
18994 KEY_0_t KEY1_0;
18995 KEY_1_t KEY1_1;
18996 KEY_2_t KEY1_2;
18997 KEY_3_t KEY1_3;
18998 KEY_4_t KEY1_4;
18999 KEY_5_t KEY1_5;
19000 KEY_6_t KEY1_6;
19001 KEY_7_t KEY1_7;
19002 KEY_0_t KEY2_0;
19003 KEY_1_t KEY2_1;
19004 KEY_2_t KEY2_2;
19005 KEY_3_t KEY2_3;
19006 KEY_4_t KEY2_4;
19007 KEY_5_t KEY2_5;
19008 KEY_6_t KEY2_6;
19009 KEY_7_t KEY2_7;
19010 KEY_0_t KEY3_0;
19011 KEY_1_t KEY3_1;
19012 KEY_2_t KEY3_2;
19013 KEY_3_t KEY3_3;
19014 KEY_4_t KEY3_4;
19015 KEY_5_t KEY3_5;
19016 KEY_6_t KEY3_6;
19017 KEY_7_t KEY3_7;
19018 KEY_0_t KEY4_0;
19019 KEY_1_t KEY4_1;
19020 KEY_2_t KEY4_2;
19021 KEY_3_t KEY4_3;
19022 KEY_4_t KEY4_4;
19023 KEY_5_t KEY4_5;
19024 KEY_6_t KEY4_6;
19025 KEY_7_t KEY4_7;
19026 KEY_0_t KEY5_0;
19027 KEY_1_t KEY5_1;
19028 KEY_2_t KEY5_2;
19029 KEY_3_t KEY5_3;
19030 KEY_4_t KEY5_4;
19031 KEY_5_t KEY5_5;
19032 KEY_6_t KEY5_6;
19033 KEY_7_t KEY5_7;
19034 KEY_0_t KEY6_0;
19035 KEY_1_t KEY6_1;
19036 KEY_2_t KEY6_2;
19037 KEY_3_t KEY6_3;
19038 KEY_4_t KEY6_4;
19039 KEY_5_t KEY6_5;
19040 KEY_6_t KEY6_6;
19041 KEY_7_t KEY6_7;
19042 uint32_t reserved6;
19043 KEY1_VALID_t KEY1_VALID;
19044 KEY2_VALID_t KEY2_VALID;
19045 KEY3_VALID_t KEY3_VALID;
19046 KEY4_VALID_t KEY4_VALID;
19047 KEY5_VALID_t KEY5_VALID;
19048 KEY6_VALID_t KEY6_VALID;
19049 uint32_t reserved7;
19050 PAGE_LOCK0_t PAGE0_LOCK0;
19051 PAGE_LOCK1_t PAGE0_LOCK1;
19052 PAGE_LOCK0_t PAGE1_LOCK0;
19053 PAGE_LOCK1_t PAGE1_LOCK1;
19054 PAGE_LOCK0_t PAGE2_LOCK0;
19055 PAGE_LOCK1_t PAGE2_LOCK1;
19056 PAGE_LOCK0_t PAGE3_LOCK0;
19057 PAGE_LOCK1_t PAGE3_LOCK1;
19058 PAGE_LOCK0_t PAGE4_LOCK0;
19059 PAGE_LOCK1_t PAGE4_LOCK1;
19060 PAGE_LOCK0_t PAGE5_LOCK0;
19061 PAGE_LOCK1_t PAGE5_LOCK1;
19062 PAGE_LOCK0_t PAGE6_LOCK0;
19063 PAGE_LOCK1_t PAGE6_LOCK1;
19064 PAGE_LOCK0_t PAGE7_LOCK0;
19065 PAGE_LOCK1_t PAGE7_LOCK1;
19066 PAGE_LOCK0_t PAGE8_LOCK0;
19067 PAGE_LOCK1_t PAGE8_LOCK1;
19068 PAGE_LOCK0_t PAGE9_LOCK0;
19069 PAGE_LOCK1_t PAGE9_LOCK1;
19070 PAGE_LOCK0_t PAGE10_LOCK0;
19071 PAGE_LOCK1_t PAGE10_LOCK1;
19072 PAGE_LOCK0_t PAGE11_LOCK0;
19073 PAGE_LOCK1_t PAGE11_LOCK1;
19074 PAGE_LOCK0_t PAGE12_LOCK0;
19075 PAGE_LOCK1_t PAGE12_LOCK1;
19076 PAGE_LOCK0_t PAGE13_LOCK0;
19077 PAGE_LOCK1_t PAGE13_LOCK1;
19078 PAGE_LOCK0_t PAGE14_LOCK0;
19079 PAGE_LOCK1_t PAGE14_LOCK1;
19080 PAGE_LOCK0_t PAGE15_LOCK0;
19081 PAGE_LOCK1_t PAGE15_LOCK1;
19082 PAGE_LOCK0_t PAGE16_LOCK0;
19083 PAGE_LOCK1_t PAGE16_LOCK1;
19084 PAGE_LOCK0_t PAGE17_LOCK0;
19085 PAGE_LOCK1_t PAGE17_LOCK1;
19086 PAGE_LOCK0_t PAGE18_LOCK0;
19087 PAGE_LOCK1_t PAGE18_LOCK1;
19088 PAGE_LOCK0_t PAGE19_LOCK0;
19089 PAGE_LOCK1_t PAGE19_LOCK1;
19090 PAGE_LOCK0_t PAGE20_LOCK0;
19091 PAGE_LOCK1_t PAGE20_LOCK1;
19092 PAGE_LOCK0_t PAGE21_LOCK0;
19093 PAGE_LOCK1_t PAGE21_LOCK1;
19094 PAGE_LOCK0_t PAGE22_LOCK0;
19095 PAGE_LOCK1_t PAGE22_LOCK1;
19096 PAGE_LOCK0_t PAGE23_LOCK0;
19097 PAGE_LOCK1_t PAGE23_LOCK1;
19098 PAGE_LOCK0_t PAGE24_LOCK0;
19099 PAGE_LOCK1_t PAGE24_LOCK1;
19100 PAGE_LOCK0_t PAGE25_LOCK0;
19101 PAGE_LOCK1_t PAGE25_LOCK1;
19102 PAGE_LOCK0_t PAGE26_LOCK0;
19103 PAGE_LOCK1_t PAGE26_LOCK1;
19104 PAGE_LOCK0_t PAGE27_LOCK0;
19105 PAGE_LOCK1_t PAGE27_LOCK1;
19106 PAGE_LOCK0_t PAGE28_LOCK0;
19107 PAGE_LOCK1_t PAGE28_LOCK1;
19108 PAGE_LOCK0_t PAGE29_LOCK0;
19109 PAGE_LOCK1_t PAGE29_LOCK1;
19110 PAGE_LOCK0_t PAGE30_LOCK0;
19111 PAGE_LOCK1_t PAGE30_LOCK1;
19112 PAGE_LOCK0_t PAGE31_LOCK0;
19113 PAGE_LOCK1_t PAGE31_LOCK1;
19114 PAGE_LOCK0_t PAGE32_LOCK0;
19115 PAGE_LOCK1_t PAGE32_LOCK1;
19116 PAGE_LOCK0_t PAGE33_LOCK0;
19117 PAGE_LOCK1_t PAGE33_LOCK1;
19118 PAGE_LOCK0_t PAGE34_LOCK0;
19119 PAGE_LOCK1_t PAGE34_LOCK1;
19120 PAGE_LOCK0_t PAGE35_LOCK0;
19121 PAGE_LOCK1_t PAGE35_LOCK1;
19122 PAGE_LOCK0_t PAGE36_LOCK0;
19123 PAGE_LOCK1_t PAGE36_LOCK1;
19124 PAGE_LOCK0_t PAGE37_LOCK0;
19125 PAGE_LOCK1_t PAGE37_LOCK1;
19126 PAGE_LOCK0_t PAGE38_LOCK0;
19127 PAGE_LOCK1_t PAGE38_LOCK1;
19128 PAGE_LOCK0_t PAGE39_LOCK0;
19129 PAGE_LOCK1_t PAGE39_LOCK1;
19130 PAGE_LOCK0_t PAGE40_LOCK0;
19131 PAGE_LOCK1_t PAGE40_LOCK1;
19132 PAGE_LOCK0_t PAGE41_LOCK0;
19133 PAGE_LOCK1_t PAGE41_LOCK1;
19134 PAGE_LOCK0_t PAGE42_LOCK0;
19135 PAGE_LOCK1_t PAGE42_LOCK1;
19136 PAGE_LOCK0_t PAGE43_LOCK0;
19137 PAGE_LOCK1_t PAGE43_LOCK1;
19138 PAGE_LOCK0_t PAGE44_LOCK0;
19139 PAGE_LOCK1_t PAGE44_LOCK1;
19140 PAGE_LOCK0_t PAGE45_LOCK0;
19141 PAGE_LOCK1_t PAGE45_LOCK1;
19142 PAGE_LOCK0_t PAGE46_LOCK0;
19143 PAGE_LOCK1_t PAGE46_LOCK1;
19144 PAGE_LOCK0_t PAGE47_LOCK0;
19145 PAGE_LOCK1_t PAGE47_LOCK1;
19146 PAGE_LOCK0_t PAGE48_LOCK0;
19147 PAGE_LOCK1_t PAGE48_LOCK1;
19148 PAGE_LOCK0_t PAGE49_LOCK0;
19149 PAGE_LOCK1_t PAGE49_LOCK1;
19150 PAGE_LOCK0_t PAGE50_LOCK0;
19151 PAGE_LOCK1_t PAGE50_LOCK1;
19152 PAGE_LOCK0_t PAGE51_LOCK0;
19153 PAGE_LOCK1_t PAGE51_LOCK1;
19154 PAGE_LOCK0_t PAGE52_LOCK0;
19155 PAGE_LOCK1_t PAGE52_LOCK1;
19156 PAGE_LOCK0_t PAGE53_LOCK0;
19157 PAGE_LOCK1_t PAGE53_LOCK1;
19158 PAGE_LOCK0_t PAGE54_LOCK0;
19159 PAGE_LOCK1_t PAGE54_LOCK1;
19160 PAGE_LOCK0_t PAGE55_LOCK0;
19161 PAGE_LOCK1_t PAGE55_LOCK1;
19162 PAGE_LOCK0_t PAGE56_LOCK0;
19163 PAGE_LOCK1_t PAGE56_LOCK1;
19164 PAGE_LOCK0_t PAGE57_LOCK0;
19165 PAGE_LOCK1_t PAGE57_LOCK1;
19166 PAGE_LOCK0_t PAGE58_LOCK0;
19167 PAGE_LOCK1_t PAGE58_LOCK1;
19168 PAGE_LOCK0_t PAGE59_LOCK0;
19169 PAGE_LOCK1_t PAGE59_LOCK1;
19170 PAGE_LOCK0_t PAGE60_LOCK0;
19171 PAGE_LOCK1_t PAGE60_LOCK1;
19172 PAGE_LOCK0_t PAGE61_LOCK0;
19173 PAGE_LOCK1_t PAGE61_LOCK1;
19174 PAGE_LOCK0_t PAGE62_LOCK0;
19175 PAGE_LOCK1_t PAGE62_LOCK1;
19176 PAGE63_LOCK0_t PAGE63_LOCK0;
19177 PAGE63_LOCK1_t PAGE63_LOCK1;
19178 };
19179
19180 static OTP_DATA_RAW_t & OTP_DATA_RAW = (*(OTP_DATA_RAW_t *)0x40134000);
19181 static OTP_DATA_RAW_t & OTP_DATA_RAW_XOR = (*(OTP_DATA_RAW_t *)0x40135000);
19182 static OTP_DATA_RAW_t & OTP_DATA_RAW_SET = (*(OTP_DATA_RAW_t *)0x40136000);
19183 static OTP_DATA_RAW_t & OTP_DATA_RAW_CLR = (*(OTP_DATA_RAW_t *)0x40137000);
19184
19185} // _OTP_DATA_RAW_
19186
19187// For managing simulation testbenches
19188namespace _TBMAN_ {
19189
19190 // Indicates the type of platform in use
19191 // Reset value: 0x00000001
19192 BEGIN_TYPE(PLATFORM_t, uint32_t)
19193 // Indicates the platform is a simulation
19194 ADD_BITFIELD_RO(HDLSIM, 2, 1)
19195 // Indicates the platform is an FPGA
19196 ADD_BITFIELD_RO(FPGA, 1, 1)
19197 // Indicates the platform is an ASIC
19198 ADD_BITFIELD_RO(ASIC, 0, 1)
19199 END_TYPE()
19200
19201 struct TBMAN_t {
19202 PLATFORM_t PLATFORM;
19203 };
19204
19205 static TBMAN_t & TBMAN = (*(TBMAN_t *)0x40160000);
19206 static TBMAN_t & TBMAN_XOR = (*(TBMAN_t *)0x40161000);
19207 static TBMAN_t & TBMAN_SET = (*(TBMAN_t *)0x40162000);
19208 static TBMAN_t & TBMAN_CLR = (*(TBMAN_t *)0x40163000);
19209
19210} // _TBMAN_
19211
19212// DPRAM layout for USB device.
19213namespace _USB_DPRAM_ {
19214
19215 // Bytes 0-3 of the SETUP packet from the host.
19216 // Reset value: 0x00000000
19217 BEGIN_TYPE(SETUP_PACKET_LOW_t, uint32_t)
19218 ADD_BITFIELD_RW(WVALUE, 16, 16)
19219 ADD_BITFIELD_RW(BREQUEST, 8, 8)
19220 ADD_BITFIELD_RW(BMREQUESTTYPE, 0, 8)
19221 END_TYPE()
19222
19223 // Bytes 4-7 of the setup packet from the host.
19224 // Reset value: 0x00000000
19225 BEGIN_TYPE(SETUP_PACKET_HIGH_t, uint32_t)
19226 ADD_BITFIELD_RW(WLENGTH, 16, 16)
19227 ADD_BITFIELD_RW(WINDEX, 0, 16)
19228 END_TYPE()
19229
19230 // Reset value: 0x00000000
19231 BEGIN_TYPE(EP_CONTROL_t, uint32_t)
19232 // Enable this endpoint. The device will not reply to any packets for this
19233 // endpoint if this bit is not set.
19234 ADD_BITFIELD_RW(ENABLE, 31, 1)
19235 // This endpoint is double buffered.
19236 ADD_BITFIELD_RW(DOUBLE_BUFFERED, 30, 1)
19237 // Trigger an interrupt each time a buffer is done.
19238 ADD_BITFIELD_RW(INTERRUPT_PER_BUFF, 29, 1)
19239 // Trigger an interrupt each time both buffers are done. Only valid in
19240 // double buffered mode.
19241 ADD_BITFIELD_RW(INTERRUPT_PER_DOUBLE_BUFF, 28, 1)
19242 ADD_BITFIELD_RW(ENDPOINT_TYPE, 26, 2)
19243 // Trigger an interrupt if a STALL is sent. Intended for debug only.
19244 ADD_BITFIELD_RW(INTERRUPT_ON_STALL, 17, 1)
19245 // Trigger an interrupt if a NAK is sent. Intended for debug only.
19246 ADD_BITFIELD_RW(INTERRUPT_ON_NAK, 16, 1)
19247 // 64 byte aligned buffer address for this EP (bits 0-5 are ignored).
19248 // Relative to the start of the DPRAM.
19249 ADD_BITFIELD_RW(BUFFER_ADDRESS, 0, 16)
19250 END_TYPE()
19251
19252 static const uint32_t EP_CONTROL_ENDPOINT_TYPE__Control = 0;
19253 static const uint32_t EP_CONTROL_ENDPOINT_TYPE__Isochronous = 1;
19254 static const uint32_t EP_CONTROL_ENDPOINT_TYPE__Bulk = 2;
19255 static const uint32_t EP_CONTROL_ENDPOINT_TYPE__Interrupt = 3;
19256
19257 // Buffer control for both buffers of an endpoint. Fields ending in a _1 are for
19258 // buffer 1. Fields ending in a _0 are for buffer 0. Buffer 1 controls are only
19259 // valid if the endpoint is in double buffered mode.
19260 // Reset value: 0x00000000
19261 BEGIN_TYPE(EP_BUFFER_CONTROL_t, uint32_t)
19262 // Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to
19263 // indicate the data is valid. For an OUT transfer (RX from the host) this bit
19264 // should be left as a 0. The host will set it when it has filled the buffer
19265 // with data.
19266 ADD_BITFIELD_RW(FULL_1, 31, 1)
19267 // Buffer 1 is the last buffer of the transfer.
19268 ADD_BITFIELD_RW(LAST_1, 30, 1)
19269 // The data pid of buffer 1.
19270 ADD_BITFIELD_RW(PID_1, 29, 1)
19271 // The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode.
19272 // Only valid in double buffered mode for an Isochronous endpoint.
19273 // For a non Isochronous endpoint the offset is always 64 bytes.
19274 ADD_BITFIELD_RW(DOUBLE_BUFFER_ISO_OFFSET, 27, 2)
19275 // Buffer 1 is available. This bit is set to indicate the buffer can be used
19276 // by the controller. The controller clears the available bit when writing the
19277 // status back.
19278 ADD_BITFIELD_RW(AVAILABLE_1, 26, 1)
19279 // The length of the data in buffer 1.
19280 ADD_BITFIELD_RW(LENGTH_1, 16, 10)
19281 // Buffer 0 is full. For an IN transfer (TX to the host) the bit is set
19282 // to indicate the data is valid. For an OUT transfer (RX from the host)
19283 // this bit should be left as a 0. The host will set it when it has filled
19284 // the buffer with data.
19285 ADD_BITFIELD_RW(FULL_0, 15, 1)
19286 // Buffer 0 is the last buffer of the transfer.
19287 ADD_BITFIELD_RW(LAST_0, 14, 1)
19288 // The data pid of buffer 0.
19289 ADD_BITFIELD_RW(PID_0, 13, 1)
19290 // Reset the buffer selector to buffer 0.
19291 ADD_BITFIELD_RW(RESET, 12, 1)
19292 // Reply with a stall (valid for both buffers).
19293 ADD_BITFIELD_RW(STALL, 11, 1)
19294 // Buffer 0 is available. This bit is set to indicate the buffer can be used
19295 // by the controller. The controller clears the available bit when writing
19296 // the status back.
19297 ADD_BITFIELD_RW(AVAILABLE_0, 10, 1)
19298 // The length of the data in buffer 1.
19299 ADD_BITFIELD_RW(LENGTH_0, 0, 10)
19300 END_TYPE()
19301
19302 static const uint32_t EP_BUFFER_CONTROL_DOUBLE_BUFFER_ISO_OFFSET__128 = 0;
19303 static const uint32_t EP_BUFFER_CONTROL_DOUBLE_BUFFER_ISO_OFFSET__256 = 1;
19304 static const uint32_t EP_BUFFER_CONTROL_DOUBLE_BUFFER_ISO_OFFSET__512 = 2;
19305 static const uint32_t EP_BUFFER_CONTROL_DOUBLE_BUFFER_ISO_OFFSET__1024 = 3;
19306
19308 SETUP_PACKET_LOW_t SETUP_PACKET_LOW;
19309 SETUP_PACKET_HIGH_t SETUP_PACKET_HIGH;
19310 EP_CONTROL_t EP1_IN_CONTROL;
19311 EP_CONTROL_t EP1_OUT_CONTROL;
19312 EP_CONTROL_t EP2_IN_CONTROL;
19313 EP_CONTROL_t EP2_OUT_CONTROL;
19314 EP_CONTROL_t EP3_IN_CONTROL;
19315 EP_CONTROL_t EP3_OUT_CONTROL;
19316 EP_CONTROL_t EP4_IN_CONTROL;
19317 EP_CONTROL_t EP4_OUT_CONTROL;
19318 EP_CONTROL_t EP5_IN_CONTROL;
19319 EP_CONTROL_t EP5_OUT_CONTROL;
19320 EP_CONTROL_t EP6_IN_CONTROL;
19321 EP_CONTROL_t EP6_OUT_CONTROL;
19322 EP_CONTROL_t EP7_IN_CONTROL;
19323 EP_CONTROL_t EP7_OUT_CONTROL;
19324 EP_CONTROL_t EP8_IN_CONTROL;
19325 EP_CONTROL_t EP8_OUT_CONTROL;
19326 EP_CONTROL_t EP9_IN_CONTROL;
19327 EP_CONTROL_t EP9_OUT_CONTROL;
19328 EP_CONTROL_t EP10_IN_CONTROL;
19329 EP_CONTROL_t EP10_OUT_CONTROL;
19330 EP_CONTROL_t EP11_IN_CONTROL;
19331 EP_CONTROL_t EP11_OUT_CONTROL;
19332 EP_CONTROL_t EP12_IN_CONTROL;
19333 EP_CONTROL_t EP12_OUT_CONTROL;
19334 EP_CONTROL_t EP13_IN_CONTROL;
19335 EP_CONTROL_t EP13_OUT_CONTROL;
19336 EP_CONTROL_t EP14_IN_CONTROL;
19337 EP_CONTROL_t EP14_OUT_CONTROL;
19338 EP_CONTROL_t EP15_IN_CONTROL;
19339 EP_CONTROL_t EP15_OUT_CONTROL;
19340 EP_BUFFER_CONTROL_t EP0_IN_BUFFER_CONTROL;
19341 EP_BUFFER_CONTROL_t EP0_OUT_BUFFER_CONTROL;
19342 EP_BUFFER_CONTROL_t EP1_IN_BUFFER_CONTROL;
19343 EP_BUFFER_CONTROL_t EP1_OUT_BUFFER_CONTROL;
19344 EP_BUFFER_CONTROL_t EP2_IN_BUFFER_CONTROL;
19345 EP_BUFFER_CONTROL_t EP2_OUT_BUFFER_CONTROL;
19346 EP_BUFFER_CONTROL_t EP3_IN_BUFFER_CONTROL;
19347 EP_BUFFER_CONTROL_t EP3_OUT_BUFFER_CONTROL;
19348 EP_BUFFER_CONTROL_t EP4_IN_BUFFER_CONTROL;
19349 EP_BUFFER_CONTROL_t EP4_OUT_BUFFER_CONTROL;
19350 EP_BUFFER_CONTROL_t EP5_IN_BUFFER_CONTROL;
19351 EP_BUFFER_CONTROL_t EP5_OUT_BUFFER_CONTROL;
19352 EP_BUFFER_CONTROL_t EP6_IN_BUFFER_CONTROL;
19353 EP_BUFFER_CONTROL_t EP6_OUT_BUFFER_CONTROL;
19354 EP_BUFFER_CONTROL_t EP7_IN_BUFFER_CONTROL;
19355 EP_BUFFER_CONTROL_t EP7_OUT_BUFFER_CONTROL;
19356 EP_BUFFER_CONTROL_t EP8_IN_BUFFER_CONTROL;
19357 EP_BUFFER_CONTROL_t EP8_OUT_BUFFER_CONTROL;
19358 EP_BUFFER_CONTROL_t EP9_IN_BUFFER_CONTROL;
19359 EP_BUFFER_CONTROL_t EP9_OUT_BUFFER_CONTROL;
19360 EP_BUFFER_CONTROL_t EP10_IN_BUFFER_CONTROL;
19361 EP_BUFFER_CONTROL_t EP10_OUT_BUFFER_CONTROL;
19362 EP_BUFFER_CONTROL_t EP11_IN_BUFFER_CONTROL;
19363 EP_BUFFER_CONTROL_t EP11_OUT_BUFFER_CONTROL;
19364 EP_BUFFER_CONTROL_t EP12_IN_BUFFER_CONTROL;
19365 EP_BUFFER_CONTROL_t EP12_OUT_BUFFER_CONTROL;
19366 EP_BUFFER_CONTROL_t EP13_IN_BUFFER_CONTROL;
19367 EP_BUFFER_CONTROL_t EP13_OUT_BUFFER_CONTROL;
19368 EP_BUFFER_CONTROL_t EP14_IN_BUFFER_CONTROL;
19369 EP_BUFFER_CONTROL_t EP14_OUT_BUFFER_CONTROL;
19370 EP_BUFFER_CONTROL_t EP15_IN_BUFFER_CONTROL;
19371 EP_BUFFER_CONTROL_t EP15_OUT_BUFFER_CONTROL;
19372 };
19373
19374 static USB_DPRAM_t & USB_DPRAM = (*(USB_DPRAM_t *)0x50100000);
19375 static USB_DPRAM_t & USB_DPRAM_XOR = (*(USB_DPRAM_t *)0x50101000);
19376 static USB_DPRAM_t & USB_DPRAM_SET = (*(USB_DPRAM_t *)0x50102000);
19377 static USB_DPRAM_t & USB_DPRAM_CLR = (*(USB_DPRAM_t *)0x50103000);
19378
19379} // _USB_DPRAM_
19380
Definition FIFO.h:9