diff --git a/Cargo.toml b/Cargo.toml index c844e012..58b90fbc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,8 +11,10 @@ cortex-m = "0.7.1" cortex-m-rt = { version = ">=0.6.15,<0.8", optional = true } [features] +default = [] rt = ["cortex-m-rt/device"] - +rp2040 = [] +rp235x = [] [package.metadata.embassy_docs] src_base = "https://github.com/embassy-rs/rp-pac/blob/v$VERSION/src/" diff --git a/build.rs b/build.rs index 597923f5..b7ea72f5 100644 --- a/build.rs +++ b/build.rs @@ -5,10 +5,18 @@ use std::path::PathBuf; fn main() { if env::var_os("CARGO_FEATURE_RT").is_some() { let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); - File::create(out.join("device.x")) - .unwrap() - .write_all(include_bytes!("device.x")) - .unwrap(); + if env::var_os("CARGO_FEATURE_RP2040").is_some() { + File::create(out.join("device.x")) + .unwrap() + .write_all(include_bytes!("device-rp2040.x")) + .unwrap(); + } + if env::var_os("CARGO_FEATURE_RP235X").is_some() { + File::create(out.join("device.x")) + .unwrap() + .write_all(include_bytes!("device-rp235x.x")) + .unwrap(); + } println!("cargo:rustc-link-search={}", out.display()); println!("cargo:rerun-if-changed=device.x"); } diff --git a/device.x b/device-rp2040.x similarity index 100% rename from device.x rename to device-rp2040.x diff --git a/device-rp235x.x b/device-rp235x.x new file mode 100644 index 00000000..e395c6cc --- /dev/null +++ b/device-rp235x.x @@ -0,0 +1,50 @@ +PROVIDE(TIMER0_IRQ_0 = DefaultHandler); +PROVIDE(TIMER0_IRQ_1 = DefaultHandler); +PROVIDE(TIMER0_IRQ_2 = DefaultHandler); +PROVIDE(TIMER0_IRQ_3 = DefaultHandler); +PROVIDE(TIMER1_IRQ_0 = DefaultHandler); +PROVIDE(TIMER1_IRQ_1 = DefaultHandler); +PROVIDE(TIMER1_IRQ_2 = DefaultHandler); +PROVIDE(TIMER1_IRQ_3 = DefaultHandler); +PROVIDE(PWM_IRQ_WRAP_0 = DefaultHandler); +PROVIDE(PWM_IRQ_WRAP_1 = DefaultHandler); +PROVIDE(USBCTRL_IRQ = DefaultHandler); +PROVIDE(PIO0_IRQ_0 = DefaultHandler); +PROVIDE(PIO0_IRQ_1 = DefaultHandler); +PROVIDE(PIO1_IRQ_0 = DefaultHandler); +PROVIDE(PIO1_IRQ_1 = DefaultHandler); +PROVIDE(PIO2_IRQ_0 = DefaultHandler); +PROVIDE(PIO2_IRQ_1 = DefaultHandler); +PROVIDE(DMA_IRQ_0 = DefaultHandler); +PROVIDE(DMA_IRQ_1 = DefaultHandler); +PROVIDE(DMA_IRQ_2 = DefaultHandler); +PROVIDE(DMA_IRQ_3 = DefaultHandler); +PROVIDE(IO_IRQ_BANK0 = DefaultHandler); +PROVIDE(IO_IRQ_BANK0_NS = DefaultHandler); +PROVIDE(IO_IRQ_QSPI = DefaultHandler); +PROVIDE(IO_IRQ_QSPI_NS = DefaultHandler); +PROVIDE(SIO_IRQ_FIFO = DefaultHandler); +PROVIDE(SIO_IRQ_FIFO_NS = DefaultHandler); +PROVIDE(SIO_IRQ_BELL = DefaultHandler); +PROVIDE(SIO_IRQ_BELL_NS = DefaultHandler); +PROVIDE(SIO_IRQ_MTIMECMP = DefaultHandler); +PROVIDE(CLOCKS_IRQ = DefaultHandler); +PROVIDE(PLL_SYS_IRQ = DefaultHandler); +PROVIDE(PLL_USB_IRQ = DefaultHandler); +PROVIDE(SPI0_IRQ = DefaultHandler); +PROVIDE(SPI1_IRQ = DefaultHandler); +PROVIDE(UART0_IRQ = DefaultHandler); +PROVIDE(UART1_IRQ = DefaultHandler); +PROVIDE(ADC_IRQ_FIFO = DefaultHandler); +PROVIDE(I2C0_IRQ = DefaultHandler); +PROVIDE(I2C1_IRQ = DefaultHandler); +PROVIDE(TRNG_IRQ = DefaultHandler); +PROVIDE(OTP_IRQ = DefaultHandler); +PROVIDE(POWMAN_IRQ_POW = DefaultHandler); +PROVIDE(POWMAN_IRQ_TIMER = DefaultHandler); +PROVIDE(SWI_IRQ_0 = DefaultHandler); +PROVIDE(SWI_IRQ_1 = DefaultHandler); +PROVIDE(SWI_IRQ_2 = DefaultHandler); +PROVIDE(SWI_IRQ_3 = DefaultHandler); +PROVIDE(SWI_IRQ_4 = DefaultHandler); +PROVIDE(SWI_IRQ_5 = DefaultHandler); diff --git a/src/dma/vals.rs b/src/dma/vals.rs deleted file mode 100644 index 7e3ca402..00000000 --- a/src/dma/vals.rs +++ /dev/null @@ -1,113 +0,0 @@ -#[repr(u8)] -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -pub enum Calc { - #[doc = "Calculate a CRC-32 (IEEE802.3 polynomial)"] - CRC32 = 0, - #[doc = "Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data"] - CRC32R = 0x01, - #[doc = "Calculate a CRC-16-CCITT"] - CRC16 = 0x02, - #[doc = "Calculate a CRC-16-CCITT with bit reversed data"] - CRC16R = 0x03, - _RESERVED_4 = 0x04, - _RESERVED_5 = 0x05, - _RESERVED_6 = 0x06, - _RESERVED_7 = 0x07, - _RESERVED_8 = 0x08, - _RESERVED_9 = 0x09, - _RESERVED_a = 0x0a, - _RESERVED_b = 0x0b, - _RESERVED_c = 0x0c, - _RESERVED_d = 0x0d, - #[doc = "XOR reduction over all data. == 1 if the total 1 population count is odd."] - EVEN = 0x0e, - #[doc = "Calculate a simple 32-bit checksum (addition with a 32 bit accumulator)"] - SUM = 0x0f, -} -impl Calc { - #[inline(always)] - pub const fn from_bits(val: u8) -> Calc { - unsafe { core::mem::transmute(val & 0x0f) } - } - #[inline(always)] - pub const fn to_bits(self) -> u8 { - unsafe { core::mem::transmute(self) } - } -} -impl From for Calc { - #[inline(always)] - fn from(val: u8) -> Calc { - Calc::from_bits(val) - } -} -impl From for u8 { - #[inline(always)] - fn from(val: Calc) -> u8 { - Calc::to_bits(val) - } -} -#[repr(u8)] -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -pub enum DataSize { - SIZE_BYTE = 0, - SIZE_HALFWORD = 0x01, - SIZE_WORD = 0x02, - _RESERVED_3 = 0x03, -} -impl DataSize { - #[inline(always)] - pub const fn from_bits(val: u8) -> DataSize { - unsafe { core::mem::transmute(val & 0x03) } - } - #[inline(always)] - pub const fn to_bits(self) -> u8 { - unsafe { core::mem::transmute(self) } - } -} -impl From for DataSize { - #[inline(always)] - fn from(val: u8) -> DataSize { - DataSize::from_bits(val) - } -} -impl From for u8 { - #[inline(always)] - fn from(val: DataSize) -> u8 { - DataSize::to_bits(val) - } -} -#[repr(transparent)] -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] -pub struct TreqSel(pub u8); -impl TreqSel { - #[doc = "Select Timer 0 as TREQ"] - pub const TIMER0: Self = Self(0x3b); - #[doc = "Select Timer 1 as TREQ"] - pub const TIMER1: Self = Self(0x3c); - #[doc = "Select Timer 2 as TREQ (Optional)"] - pub const TIMER2: Self = Self(0x3d); - #[doc = "Select Timer 3 as TREQ (Optional)"] - pub const TIMER3: Self = Self(0x3e); - #[doc = "Permanent request, for unpaced transfers."] - pub const PERMANENT: Self = Self(0x3f); -} -impl TreqSel { - pub const fn from_bits(val: u8) -> TreqSel { - Self(val & 0x3f) - } - pub const fn to_bits(self) -> u8 { - self.0 - } -} -impl From for TreqSel { - #[inline(always)] - fn from(val: u8) -> TreqSel { - TreqSel::from_bits(val) - } -} -impl From for u8 { - #[inline(always)] - fn from(val: TreqSel) -> u8 { - TreqSel::to_bits(val) - } -} diff --git a/src/lib.rs b/src/lib.rs index a64e0a86..fde39ab5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,173 +1,12 @@ #![no_std] -#![doc = include_str!("../README.md")] #![allow(non_camel_case_types)] -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -pub enum Interrupt { - #[doc = "0 - TIMER_IRQ_0"] - TIMER_IRQ_0 = 0, - #[doc = "1 - TIMER_IRQ_1"] - TIMER_IRQ_1 = 1, - #[doc = "2 - TIMER_IRQ_2"] - TIMER_IRQ_2 = 2, - #[doc = "3 - TIMER_IRQ_3"] - TIMER_IRQ_3 = 3, - #[doc = "4 - PWM_IRQ_WRAP"] - PWM_IRQ_WRAP = 4, - #[doc = "5 - USBCTRL_IRQ"] - USBCTRL_IRQ = 5, - #[doc = "6 - XIP_IRQ"] - XIP_IRQ = 6, - #[doc = "7 - PIO0_IRQ_0"] - PIO0_IRQ_0 = 7, - #[doc = "8 - PIO0_IRQ_1"] - PIO0_IRQ_1 = 8, - #[doc = "9 - PIO1_IRQ_0"] - PIO1_IRQ_0 = 9, - #[doc = "10 - PIO1_IRQ_1"] - PIO1_IRQ_1 = 10, - #[doc = "11 - DMA_IRQ_0"] - DMA_IRQ_0 = 11, - #[doc = "12 - DMA_IRQ_1"] - DMA_IRQ_1 = 12, - #[doc = "13 - IO_IRQ_BANK0"] - IO_IRQ_BANK0 = 13, - #[doc = "14 - IO_IRQ_QSPI"] - IO_IRQ_QSPI = 14, - #[doc = "15 - SIO_IRQ_PROC0"] - SIO_IRQ_PROC0 = 15, - #[doc = "16 - SIO_IRQ_PROC1"] - SIO_IRQ_PROC1 = 16, - #[doc = "17 - CLOCKS_IRQ"] - CLOCKS_IRQ = 17, - #[doc = "18 - SPI0_IRQ"] - SPI0_IRQ = 18, - #[doc = "19 - SPI1_IRQ"] - SPI1_IRQ = 19, - #[doc = "20 - UART0_IRQ"] - UART0_IRQ = 20, - #[doc = "21 - UART1_IRQ"] - UART1_IRQ = 21, - #[doc = "22 - ADC_IRQ_FIFO"] - ADC_IRQ_FIFO = 22, - #[doc = "23 - I2C0_IRQ"] - I2C0_IRQ = 23, - #[doc = "24 - I2C1_IRQ"] - I2C1_IRQ = 24, - #[doc = "25 - RTC_IRQ"] - RTC_IRQ = 25, - #[doc = "26 - SWI_IRQ_0"] - SWI_IRQ_0 = 26, - #[doc = "27 - SWI_IRQ_1"] - SWI_IRQ_1 = 27, - #[doc = "28 - SWI_IRQ_2"] - SWI_IRQ_2 = 28, - #[doc = "29 - SWI_IRQ_3"] - SWI_IRQ_3 = 29, - #[doc = "30 - SWI_IRQ_4"] - SWI_IRQ_4 = 30, - #[doc = "31 - SWI_IRQ_5"] - SWI_IRQ_5 = 31, -} -unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt { - #[inline(always)] - fn number(self) -> u16 { - self as u16 - } -} -#[cfg(feature = "rt")] -mod _vectors; -#[doc = "QSPI flash execute-in-place block"] -pub const XIP_CTRL: xip_ctrl::XipCtrl = - unsafe { xip_ctrl::XipCtrl::from_ptr(0x1400_0000 as usize as _) }; -#[doc = "DW_apb_ssi has the following features: * APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation. * APB3 and APB4 protocol support. * Scalable APB data bus width – Supports APB data bus widths of 8, 16, and 32 bits. * Serial-master or serial-slave operation – Enables serial communication with serial-master or serial-slave peripheral devices. * Programmable Dual/Quad/Octal SPI support in Master Mode. * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation. * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes. * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes. * DMA Controller Interface – Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests. * Independent masking of interrupts – Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently. * Multi-master contention detection – Informs the processor of multiple serial-master accesses on the serial bus. * Bypass of meta-stability flip-flops for synchronous clocks – When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains. * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates. * Programmable features: - Serial interface operation – Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire. - Clock bit-rate – Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation. - Data Item size (4 to 32 bits) – Item size of each data transfer under the control of the programmer. * Configured features: - FIFO depth – 16 words deep. The FIFO width is fixed at 32 bits. - 1 slave select output. - Hardware slave-select – Dedicated hardware slave-select line. - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller. - Interrupt polarity – active high interrupt lines. - Serial clock polarity – low serial-clock polarity directly after reset. - Serial clock phase – capture on first edge of serial-clock directly after reset."] -pub const XIP_SSI: xip_ssi::XipSsi = - unsafe { xip_ssi::XipSsi::from_ptr(0x1800_0000 as usize as _) }; -pub const SYSINFO: sysinfo::Sysinfo = - unsafe { sysinfo::Sysinfo::from_ptr(0x4000_0000 as usize as _) }; -#[doc = "Register block for various chip control signals"] -pub const SYSCFG: syscfg::Syscfg = unsafe { syscfg::Syscfg::from_ptr(0x4000_4000 as usize as _) }; -pub const CLOCKS: clocks::Clocks = unsafe { clocks::Clocks::from_ptr(0x4000_8000 as usize as _) }; -pub const RESETS: resets::Resets = unsafe { resets::Resets::from_ptr(0x4000_c000 as usize as _) }; -pub const PSM: psm::Psm = unsafe { psm::Psm::from_ptr(0x4001_0000 as usize as _) }; -pub const IO_BANK0: io::Io = unsafe { io::Io::from_ptr(0x4001_4000 as usize as _) }; -pub const IO_QSPI: io::Io = unsafe { io::Io::from_ptr(0x4001_8000 as usize as _) }; -pub const PADS_BANK0: pads::Pads = unsafe { pads::Pads::from_ptr(0x4001_c000 as usize as _) }; -pub const PADS_QSPI: pads::Pads = unsafe { pads::Pads::from_ptr(0x4002_0000 as usize as _) }; -#[doc = "Controls the crystal oscillator"] -pub const XOSC: xosc::Xosc = unsafe { xosc::Xosc::from_ptr(0x4002_4000 as usize as _) }; -pub const PLL_SYS: pll::Pll = unsafe { pll::Pll::from_ptr(0x4002_8000 as usize as _) }; -pub const PLL_USB: pll::Pll = unsafe { pll::Pll::from_ptr(0x4002_c000 as usize as _) }; -#[doc = "Register block for busfabric control signals and performance counters"] -pub const BUSCTRL: busctrl::Busctrl = - unsafe { busctrl::Busctrl::from_ptr(0x4003_0000 as usize as _) }; -pub const UART0: uart::Uart = unsafe { uart::Uart::from_ptr(0x4003_4000 as usize as _) }; -pub const UART1: uart::Uart = unsafe { uart::Uart::from_ptr(0x4003_8000 as usize as _) }; -pub const SPI0: spi::Spi = unsafe { spi::Spi::from_ptr(0x4003_c000 as usize as _) }; -pub const SPI1: spi::Spi = unsafe { spi::Spi::from_ptr(0x4004_0000 as usize as _) }; -#[doc = "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"] -pub const I2C0: i2c::I2c = unsafe { i2c::I2c::from_ptr(0x4004_4000 as usize as _) }; -pub const I2C1: i2c::I2c = unsafe { i2c::I2c::from_ptr(0x4004_8000 as usize as _) }; -#[doc = "Control and data interface to SAR ADC"] -pub const ADC: adc::Adc = unsafe { adc::Adc::from_ptr(0x4004_c000 as usize as _) }; -#[doc = "Simple PWM"] -pub const PWM: pwm::Pwm = unsafe { pwm::Pwm::from_ptr(0x4005_0000 as usize as _) }; -#[doc = "Controls time and alarms time is a 64 bit value indicating the time in usec 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"] -pub const TIMER: timer::Timer = unsafe { timer::Timer::from_ptr(0x4005_4000 as usize as _) }; -pub const WATCHDOG: watchdog::Watchdog = - unsafe { watchdog::Watchdog::from_ptr(0x4005_8000 as usize as _) }; -#[doc = "Register block to control RTC"] -pub const RTC: rtc::Rtc = unsafe { rtc::Rtc::from_ptr(0x4005_c000 as usize as _) }; -pub const ROSC: rosc::Rosc = unsafe { rosc::Rosc::from_ptr(0x4006_0000 as usize as _) }; -#[doc = "control and status for on-chip voltage regulator and chip level reset subsystem"] -pub const VREG_AND_CHIP_RESET: vreg_and_chip_reset::VregAndChipReset = - unsafe { vreg_and_chip_reset::VregAndChipReset::from_ptr(0x4006_4000 as usize as _) }; -#[doc = "Testbench manager. Allows the programmer to know what platform their software is running on."] -pub const TBMAN: tbman::Tbman = unsafe { tbman::Tbman::from_ptr(0x4006_c000 as usize as _) }; -#[doc = "DMA with separate read and write masters"] -pub const DMA: dma::Dma = unsafe { dma::Dma::from_ptr(0x5000_0000 as usize as _) }; -#[doc = "DPRAM layout for USB device."] -pub const USBCTRL_DPRAM: usb_dpram::UsbDpram = - unsafe { usb_dpram::UsbDpram::from_ptr(0x5010_0000 as usize as _) }; -#[doc = "USB FS/LS controller device registers"] -pub const USBCTRL_REGS: usb::Usb = unsafe { usb::Usb::from_ptr(0x5011_0000 as usize as _) }; -#[doc = "Programmable IO block"] -pub const PIO0: pio::Pio = unsafe { pio::Pio::from_ptr(0x5020_0000 as usize as _) }; -pub const PIO1: pio::Pio = unsafe { pio::Pio::from_ptr(0x5030_0000 as usize as _) }; -#[doc = "Single-cycle IO block Provides core-local and inter-core hardware for the two processors, with single-cycle access."] -pub const SIO: sio::Sio = unsafe { sio::Sio::from_ptr(0xd000_0000 as usize as _) }; -#[doc = r" Number available in the NVIC for configuring priority"] -#[cfg(feature = "rt")] -pub const NVIC_PRIO_BITS: u8 = 2; -#[cfg(feature = "rt")] -pub use cortex_m_rt::interrupt; -#[cfg(feature = "rt")] -pub use Interrupt as interrupt; -pub mod adc; -pub mod busctrl; -pub mod clocks; -pub mod common; -pub mod dma; -pub mod i2c; -pub mod io; -pub mod pads; -pub mod pio; -pub mod pll; -pub mod psm; -pub mod pwm; -pub mod resets; -pub mod rosc; -pub mod rtc; -pub mod sio; -pub mod spi; -pub mod syscfg; -pub mod sysinfo; -pub mod tbman; -pub mod timer; -pub mod uart; -pub mod usb; -pub mod usb_dpram; -pub mod vreg_and_chip_reset; -pub mod watchdog; -pub mod xip_ctrl; -pub mod xip_ssi; -pub mod xosc; + +#[cfg(feature = "rp2040")] +pub mod rp2040; +#[cfg(feature = "rp2040")] +pub use rp2040::*; + +#[cfg(feature = "rp235x")] +pub mod rp2350; +#[cfg(feature = "rp235x")] +pub use rp2350::*; diff --git a/src/_vectors.rs b/src/rp2040/_vectors.rs similarity index 100% rename from src/_vectors.rs rename to src/rp2040/_vectors.rs diff --git a/src/adc.rs b/src/rp2040/adc.rs similarity index 100% rename from src/adc.rs rename to src/rp2040/adc.rs diff --git a/src/adc/regs.rs b/src/rp2040/adc/regs.rs similarity index 100% rename from src/adc/regs.rs rename to src/rp2040/adc/regs.rs diff --git a/src/busctrl.rs b/src/rp2040/busctrl.rs similarity index 100% rename from src/busctrl.rs rename to src/rp2040/busctrl.rs diff --git a/src/busctrl/regs.rs b/src/rp2040/busctrl/regs.rs similarity index 94% rename from src/busctrl/regs.rs rename to src/rp2040/busctrl/regs.rs index 08006b14..2c37899b 100644 --- a/src/busctrl/regs.rs +++ b/src/rp2040/busctrl/regs.rs @@ -77,18 +77,18 @@ impl Default for BusPriorityAck { BusPriorityAck(0) } } -#[doc = "Bus fabric performance counter 0"] +#[doc = "Bus fabric performance counter 1"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Perfctr(pub u32); impl Perfctr { - #[doc = "Busfabric saturating performance counter 0 Count some event signal from the busfabric arbiters. Write any value to clear. Select an event to count using PERFSEL0"] + #[doc = "Busfabric saturating performance counter 1 Count some event signal from the busfabric arbiters. Write any value to clear. Select an event to count using PERFSEL1"] #[inline(always)] pub const fn perfctr(&self) -> u32 { let val = (self.0 >> 0usize) & 0x00ff_ffff; val as u32 } - #[doc = "Busfabric saturating performance counter 0 Count some event signal from the busfabric arbiters. Write any value to clear. Select an event to count using PERFSEL0"] + #[doc = "Busfabric saturating performance counter 1 Count some event signal from the busfabric arbiters. Write any value to clear. Select an event to count using PERFSEL1"] #[inline(always)] pub fn set_perfctr(&mut self, val: u32) { self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); diff --git a/src/busctrl/vals.rs b/src/rp2040/busctrl/vals.rs similarity index 100% rename from src/busctrl/vals.rs rename to src/rp2040/busctrl/vals.rs diff --git a/src/clocks.rs b/src/rp2040/clocks.rs similarity index 85% rename from src/clocks.rs rename to src/rp2040/clocks.rs index 32eeb511..3dc733e3 100644 --- a/src/clocks.rs +++ b/src/rp2040/clocks.rs @@ -31,9 +31,9 @@ impl Clocks { assert!(n < 4usize); unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize + n * 12usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_gpout_selected(self, n: usize) -> crate::common::Reg { + pub const fn clk_gpout_selected(self, n: usize) -> crate::common::Reg { assert!(n < 4usize); unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize + n * 12usize) as _) } } @@ -47,9 +47,9 @@ impl Clocks { pub const fn clk_ref_div(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s."] + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_ref_selected(self) -> crate::common::Reg { + pub const fn clk_ref_selected(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } } #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] @@ -62,9 +62,9 @@ impl Clocks { pub const fn clk_sys_div(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s."] + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_sys_selected(self) -> crate::common::Reg { + pub const fn clk_sys_selected(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } } #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] @@ -72,9 +72,14 @@ impl Clocks { pub const fn clk_peri_ctrl(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[doc = "Clock divisor, can be changed on-the-fly"] + #[inline(always)] + pub const fn clk_peri_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_peri_selected(self) -> crate::common::Reg { + pub const fn clk_peri_selected(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } } #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] @@ -87,9 +92,9 @@ impl Clocks { pub const fn clk_usb_div(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_usb_selected(self) -> crate::common::Reg { + pub const fn clk_usb_selected(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } } #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] @@ -102,9 +107,9 @@ impl Clocks { pub const fn clk_adc_div(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_adc_selected(self) -> crate::common::Reg { + pub const fn clk_adc_selected(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } } #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] @@ -117,9 +122,9 @@ impl Clocks { pub const fn clk_rtc_div(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } } - #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot). This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[doc = "Indicates which SRC is currently selected by the glitchless mux (one-hot)."] #[inline(always)] - pub const fn clk_rtc_selected(self) -> crate::common::Reg { + pub const fn clk_rtc_selected(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } } #[inline(always)] diff --git a/src/clocks/regs.rs b/src/rp2040/clocks/regs.rs similarity index 98% rename from src/clocks/regs.rs rename to src/rp2040/clocks/regs.rs index b2cc8130..6790c6dd 100644 --- a/src/clocks/regs.rs +++ b/src/rp2040/clocks/regs.rs @@ -245,6 +245,40 @@ impl Default for ClkPeriCtrl { ClkPeriCtrl(0) } } +#[doc = "Clock divisor, can be changed on-the-fly"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkPeriDiv(pub u32); +impl ClkPeriDiv { + #[doc = "Fractional component of the divisor"] + #[inline(always)] + pub const fn frac(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "Fractional component of the divisor"] + #[inline(always)] + pub fn set_frac(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "Integer component of the divisor, 0 -> divide by 2^16"] + #[inline(always)] + pub const fn int(&self) -> u32 { + let val = (self.0 >> 8usize) & 0x00ff_ffff; + val as u32 + } + #[doc = "Integer component of the divisor, 0 -> divide by 2^16"] + #[inline(always)] + pub fn set_int(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 8usize)) | (((val as u32) & 0x00ff_ffff) << 8usize); + } +} +impl Default for ClkPeriDiv { + #[inline(always)] + fn default() -> ClkPeriDiv { + ClkPeriDiv(0) + } +} #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] @@ -1341,7 +1375,7 @@ impl Default for Fc0status { Fc0status(0) } } -#[doc = "Interrupt Force"] +#[doc = "Interrupt status after masking & forcing"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Int(pub u32); diff --git a/src/clocks/vals.rs b/src/rp2040/clocks/vals.rs similarity index 100% rename from src/clocks/vals.rs rename to src/rp2040/clocks/vals.rs diff --git a/src/common.rs b/src/rp2040/common.rs similarity index 100% rename from src/common.rs rename to src/rp2040/common.rs diff --git a/src/common/sealed.rs b/src/rp2040/common/sealed.rs similarity index 100% rename from src/common/sealed.rs rename to src/rp2040/common/sealed.rs diff --git a/src/dma.rs b/src/rp2040/dma.rs similarity index 85% rename from src/dma.rs rename to src/rp2040/dma.rs index b60413c3..1e9a4a66 100644 --- a/src/dma.rs +++ b/src/rp2040/dma.rs @@ -13,17 +13,17 @@ impl Channel { pub const fn as_ptr(&self) -> *mut () { self.ptr as _ } - #[doc = "DMA Channel 11 Read Address pointer This register updates automatically each time a read completes. The current value is the next address to be read by this channel."] + #[doc = "DMA Channel 11 Read Address pointer"] #[inline(always)] pub const fn read_addr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } } - #[doc = "DMA Channel 11 Write Address pointer This register updates automatically each time a write completes. The current value is the next address to be written by this channel."] + #[doc = "DMA Channel 11 Write Address pointer"] #[inline(always)] pub const fn write_addr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } } - #[doc = "DMA Channel 11 Transfer Count 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."] + #[doc = "DMA Channel 11 Transfer Count"] #[inline(always)] pub const fn trans_count(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } @@ -100,7 +100,7 @@ impl Channel { } #[doc = "Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer"] #[inline(always)] - pub const fn dbg_tcr(self) -> crate::common::Reg { + pub const fn dbg_tcr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(2052usize) as _) } } } @@ -145,6 +145,11 @@ impl Dma { pub const fn ints0(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(1036usize) as _) } } + #[doc = "Interrupt Status (raw)"] + #[inline(always)] + pub const fn intr1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1040usize) as _) } + } #[doc = "Interrupt Enables for IRQ 1"] #[inline(always)] pub const fn inte1(self) -> crate::common::Reg { @@ -178,7 +183,7 @@ impl Dma { pub const fn sniff_ctrl(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(1076usize) as _) } } - #[doc = "Data accumulator for sniff hardware 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."] + #[doc = "Data accumulator for sniff hardware"] #[inline(always)] pub const fn sniff_data(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(1080usize) as _) } diff --git a/src/dma/regs.rs b/src/rp2040/dma/regs.rs similarity index 94% rename from src/dma/regs.rs rename to src/rp2040/dma/regs.rs index 3306ca56..e4b4f561 100644 --- a/src/dma/regs.rs +++ b/src/rp2040/dma/regs.rs @@ -21,7 +21,7 @@ impl Default for ChanAbort { ChanAbort(0) } } -#[doc = "DMA Channel 6 Control and Status"] +#[doc = "DMA Channel 11 Control and Status"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct CtrlTrig(pub u32); @@ -390,6 +390,29 @@ impl Default for Intr { Intr(0) } } +#[doc = "Interrupt Status (raw)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr1(pub u32); +impl Intr1 { + #[doc = "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, INTS0 or INTS1. Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1. This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores. It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0."] + #[inline(always)] + pub const fn intr1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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, INTS0 or INTS1. Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1. This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores. It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0."] + #[inline(always)] + pub fn set_intr1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intr1 { + #[inline(always)] + fn default() -> Intr1 { + Intr1(0) + } +} #[doc = "Interrupt Status for IRQ 0"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] diff --git a/src/rp2040/dma/vals.rs b/src/rp2040/dma/vals.rs new file mode 100644 index 00000000..16ff1a32 --- /dev/null +++ b/src/rp2040/dma/vals.rs @@ -0,0 +1,213 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Calc { + #[doc = "Calculate a CRC-32 (IEEE802.3 polynomial)"] + CRC32 = 0, + #[doc = "Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data"] + CRC32R = 0x01, + #[doc = "Calculate a CRC-16-CCITT"] + CRC16 = 0x02, + #[doc = "Calculate a CRC-16-CCITT with bit reversed data"] + CRC16R = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + #[doc = "XOR reduction over all data. == 1 if the total 1 population count is odd."] + EVEN = 0x0e, + #[doc = "Calculate a simple 32-bit checksum (addition with a 32 bit accumulator)"] + SUM = 0x0f, +} +impl Calc { + #[inline(always)] + pub const fn from_bits(val: u8) -> Calc { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Calc { + #[inline(always)] + fn from(val: u8) -> Calc { + Calc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Calc) -> u8 { + Calc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum DataSize { + SIZE_BYTE = 0, + SIZE_HALFWORD = 0x01, + SIZE_WORD = 0x02, + _RESERVED_3 = 0x03, +} +impl DataSize { + #[inline(always)] + pub const fn from_bits(val: u8) -> DataSize { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for DataSize { + #[inline(always)] + fn from(val: u8) -> DataSize { + DataSize::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: DataSize) -> u8 { + DataSize::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum TreqSel { + #[doc = "Select PIO0's TX FIFO 0 as TREQ"] + PIO0_TX0 = 0, + #[doc = "Select PIO0's TX FIFO 1 as TREQ"] + PIO0_TX1 = 0x01, + #[doc = "Select PIO0's TX FIFO 2 as TREQ"] + PIO0_TX2 = 0x02, + #[doc = "Select PIO0's TX FIFO 3 as TREQ"] + PIO0_TX3 = 0x03, + #[doc = "Select PIO0's RX FIFO 0 as TREQ"] + PIO0_RX0 = 0x04, + #[doc = "Select PIO0's RX FIFO 1 as TREQ"] + PIO0_RX1 = 0x05, + #[doc = "Select PIO0's RX FIFO 2 as TREQ"] + PIO0_RX2 = 0x06, + #[doc = "Select PIO0's RX FIFO 3 as TREQ"] + PIO0_RX3 = 0x07, + #[doc = "Select PIO1's TX FIFO 0 as TREQ"] + PIO1_TX0 = 0x08, + #[doc = "Select PIO1's TX FIFO 1 as TREQ"] + PIO1_TX1 = 0x09, + #[doc = "Select PIO1's TX FIFO 2 as TREQ"] + PIO1_TX2 = 0x0a, + #[doc = "Select PIO1's TX FIFO 3 as TREQ"] + PIO1_TX3 = 0x0b, + #[doc = "Select PIO1's RX FIFO 0 as TREQ"] + PIO1_RX0 = 0x0c, + #[doc = "Select PIO1's RX FIFO 1 as TREQ"] + PIO1_RX1 = 0x0d, + #[doc = "Select PIO1's RX FIFO 2 as TREQ"] + PIO1_RX2 = 0x0e, + #[doc = "Select PIO1's RX FIFO 3 as TREQ"] + PIO1_RX3 = 0x0f, + #[doc = "Select SPI0's TX FIFO as TREQ"] + SPI0_TX = 0x10, + #[doc = "Select SPI0's RX FIFO as TREQ"] + SPI0_RX = 0x11, + #[doc = "Select SPI1's TX FIFO as TREQ"] + SPI1_TX = 0x12, + #[doc = "Select SPI1's RX FIFO as TREQ"] + SPI1_RX = 0x13, + #[doc = "Select UART0's TX FIFO as TREQ"] + UART0_TX = 0x14, + #[doc = "Select UART0's RX FIFO as TREQ"] + UART0_RX = 0x15, + #[doc = "Select UART1's TX FIFO as TREQ"] + UART1_TX = 0x16, + #[doc = "Select UART1's RX FIFO as TREQ"] + UART1_RX = 0x17, + #[doc = "Select PWM Counter 0's Wrap Value as TREQ"] + PWM_WRAP0 = 0x18, + #[doc = "Select PWM Counter 1's Wrap Value as TREQ"] + PWM_WRAP1 = 0x19, + #[doc = "Select PWM Counter 2's Wrap Value as TREQ"] + PWM_WRAP2 = 0x1a, + #[doc = "Select PWM Counter 3's Wrap Value as TREQ"] + PWM_WRAP3 = 0x1b, + #[doc = "Select PWM Counter 4's Wrap Value as TREQ"] + PWM_WRAP4 = 0x1c, + #[doc = "Select PWM Counter 5's Wrap Value as TREQ"] + PWM_WRAP5 = 0x1d, + #[doc = "Select PWM Counter 6's Wrap Value as TREQ"] + PWM_WRAP6 = 0x1e, + #[doc = "Select PWM Counter 7's Wrap Value as TREQ"] + PWM_WRAP7 = 0x1f, + #[doc = "Select I2C0's TX FIFO as TREQ"] + I2C0_TX = 0x20, + #[doc = "Select I2C0's RX FIFO as TREQ"] + I2C0_RX = 0x21, + #[doc = "Select I2C1's TX FIFO as TREQ"] + I2C1_TX = 0x22, + #[doc = "Select I2C1's RX FIFO as TREQ"] + I2C1_RX = 0x23, + #[doc = "Select the ADC as TREQ"] + ADC = 0x24, + #[doc = "Select the XIP Streaming FIFO as TREQ"] + XIP_STREAM = 0x25, + #[doc = "Select the XIP SSI TX FIFO as TREQ"] + XIP_SSITX = 0x26, + #[doc = "Select the XIP SSI RX FIFO as TREQ"] + XIP_SSIRX = 0x27, + _RESERVED_28 = 0x28, + _RESERVED_29 = 0x29, + _RESERVED_2a = 0x2a, + _RESERVED_2b = 0x2b, + _RESERVED_2c = 0x2c, + _RESERVED_2d = 0x2d, + _RESERVED_2e = 0x2e, + _RESERVED_2f = 0x2f, + _RESERVED_30 = 0x30, + _RESERVED_31 = 0x31, + _RESERVED_32 = 0x32, + _RESERVED_33 = 0x33, + _RESERVED_34 = 0x34, + _RESERVED_35 = 0x35, + _RESERVED_36 = 0x36, + _RESERVED_37 = 0x37, + _RESERVED_38 = 0x38, + _RESERVED_39 = 0x39, + _RESERVED_3a = 0x3a, + #[doc = "Select Timer 0 as TREQ"] + TIMER0 = 0x3b, + #[doc = "Select Timer 1 as TREQ"] + TIMER1 = 0x3c, + #[doc = "Select Timer 2 as TREQ (Optional)"] + TIMER2 = 0x3d, + #[doc = "Select Timer 3 as TREQ (Optional)"] + TIMER3 = 0x3e, + #[doc = "Permanent request, for unpaced transfers."] + PERMANENT = 0x3f, +} +impl TreqSel { + #[inline(always)] + pub const fn from_bits(val: u8) -> TreqSel { + unsafe { core::mem::transmute(val & 0x3f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for TreqSel { + #[inline(always)] + fn from(val: u8) -> TreqSel { + TreqSel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: TreqSel) -> u8 { + TreqSel::to_bits(val) + } +} diff --git a/src/i2c.rs b/src/rp2040/i2c.rs similarity index 100% rename from src/i2c.rs rename to src/rp2040/i2c.rs diff --git a/src/i2c/regs.rs b/src/rp2040/i2c/regs.rs similarity index 100% rename from src/i2c/regs.rs rename to src/rp2040/i2c/regs.rs diff --git a/src/i2c/vals.rs b/src/rp2040/i2c/vals.rs similarity index 100% rename from src/i2c/vals.rs rename to src/rp2040/i2c/vals.rs diff --git a/src/io.rs b/src/rp2040/io.rs similarity index 100% rename from src/io.rs rename to src/rp2040/io.rs diff --git a/src/io/regs.rs b/src/rp2040/io/regs.rs similarity index 99% rename from src/io/regs.rs rename to src/rp2040/io/regs.rs index 40595ff9..7415f977 100644 --- a/src/io/regs.rs +++ b/src/rp2040/io/regs.rs @@ -157,7 +157,7 @@ impl Default for GpioStatus { GpioStatus(0) } } -#[doc = "Interrupt status after masking & forcing for dormant_wake"] +#[doc = "Interrupt Enable for proc0"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Int(pub u32); diff --git a/src/io/vals.rs b/src/rp2040/io/vals.rs similarity index 100% rename from src/io/vals.rs rename to src/rp2040/io/vals.rs diff --git a/src/rp2040/mod.rs b/src/rp2040/mod.rs new file mode 100644 index 00000000..ba88aca3 --- /dev/null +++ b/src/rp2040/mod.rs @@ -0,0 +1,171 @@ +#![no_std] +#![doc = "Peripheral access API (generated using chiptool v0.1.0 (d290630 2023-06-29))"] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub enum Interrupt { + #[doc = "0 - TIMER_IRQ_0"] + TIMER_IRQ_0 = 0, + #[doc = "1 - TIMER_IRQ_1"] + TIMER_IRQ_1 = 1, + #[doc = "2 - TIMER_IRQ_2"] + TIMER_IRQ_2 = 2, + #[doc = "3 - TIMER_IRQ_3"] + TIMER_IRQ_3 = 3, + #[doc = "4 - PWM_IRQ_WRAP"] + PWM_IRQ_WRAP = 4, + #[doc = "5 - USBCTRL_IRQ"] + USBCTRL_IRQ = 5, + #[doc = "6 - XIP_IRQ"] + XIP_IRQ = 6, + #[doc = "7 - PIO0_IRQ_0"] + PIO0_IRQ_0 = 7, + #[doc = "8 - PIO0_IRQ_1"] + PIO0_IRQ_1 = 8, + #[doc = "9 - PIO1_IRQ_0"] + PIO1_IRQ_0 = 9, + #[doc = "10 - PIO1_IRQ_1"] + PIO1_IRQ_1 = 10, + #[doc = "11 - DMA_IRQ_0"] + DMA_IRQ_0 = 11, + #[doc = "12 - DMA_IRQ_1"] + DMA_IRQ_1 = 12, + #[doc = "13 - IO_IRQ_BANK0"] + IO_IRQ_BANK0 = 13, + #[doc = "14 - IO_IRQ_QSPI"] + IO_IRQ_QSPI = 14, + #[doc = "15 - SIO_IRQ_PROC0"] + SIO_IRQ_PROC0 = 15, + #[doc = "16 - SIO_IRQ_PROC1"] + SIO_IRQ_PROC1 = 16, + #[doc = "17 - CLOCKS_IRQ"] + CLOCKS_IRQ = 17, + #[doc = "18 - SPI0_IRQ"] + SPI0_IRQ = 18, + #[doc = "19 - SPI1_IRQ"] + SPI1_IRQ = 19, + #[doc = "20 - UART0_IRQ"] + UART0_IRQ = 20, + #[doc = "21 - UART1_IRQ"] + UART1_IRQ = 21, + #[doc = "22 - ADC_IRQ_FIFO"] + ADC_IRQ_FIFO = 22, + #[doc = "23 - I2C0_IRQ"] + I2C0_IRQ = 23, + #[doc = "24 - I2C1_IRQ"] + I2C1_IRQ = 24, + #[doc = "25 - RTC_IRQ"] + RTC_IRQ = 25, + #[doc = "26 - SWI_IRQ_0"] + SWI_IRQ_0 = 26, + #[doc = "27 - SWI_IRQ_1"] + SWI_IRQ_1 = 27, + #[doc = "28 - SWI_IRQ_2"] + SWI_IRQ_2 = 28, + #[doc = "29 - SWI_IRQ_3"] + SWI_IRQ_3 = 29, + #[doc = "30 - SWI_IRQ_4"] + SWI_IRQ_4 = 30, + #[doc = "31 - SWI_IRQ_5"] + SWI_IRQ_5 = 31, +} +unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt { + #[inline(always)] + fn number(self) -> u16 { + self as u16 + } +} +#[cfg(feature = "rt")] +mod _vectors; +#[doc = "QSPI flash execute-in-place block"] +pub const XIP_CTRL: xip_ctrl::XipCtrl = + unsafe { xip_ctrl::XipCtrl::from_ptr(0x1400_0000 as usize as _) }; +#[doc = "DW_apb_ssi has the following features: * APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation. * APB3 and APB4 protocol support. * Scalable APB data bus width – Supports APB data bus widths of 8, 16, and 32 bits. * Serial-master or serial-slave operation – Enables serial communication with serial-master or serial-slave peripheral devices. * Programmable Dual/Quad/Octal SPI support in Master Mode. * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation. * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes. * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes. * DMA Controller Interface – Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests. * Independent masking of interrupts – Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently. * Multi-master contention detection – Informs the processor of multiple serial-master accesses on the serial bus. * Bypass of meta-stability flip-flops for synchronous clocks – When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains. * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates. * Programmable features: - Serial interface operation – Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire. - Clock bit-rate – Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation. - Data Item size (4 to 32 bits) – Item size of each data transfer under the control of the programmer. * Configured features: - FIFO depth – 16 words deep. The FIFO width is fixed at 32 bits. - 1 slave select output. - Hardware slave-select – Dedicated hardware slave-select line. - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller. - Interrupt polarity – active high interrupt lines. - Serial clock polarity – low serial-clock polarity directly after reset. - Serial clock phase – capture on first edge of serial-clock directly after reset."] +pub const SSI: ssi::Ssi = unsafe { ssi::Ssi::from_ptr(0x1800_0000 as usize as _) }; +pub const SYSINFO: sysinfo::Sysinfo = + unsafe { sysinfo::Sysinfo::from_ptr(0x4000_0000 as usize as _) }; +#[doc = "Register block for various chip control signals"] +pub const SYSCFG: syscfg::Syscfg = unsafe { syscfg::Syscfg::from_ptr(0x4000_4000 as usize as _) }; +pub const CLOCKS: clocks::Clocks = unsafe { clocks::Clocks::from_ptr(0x4000_8000 as usize as _) }; +pub const RESETS: resets::Resets = unsafe { resets::Resets::from_ptr(0x4000_c000 as usize as _) }; +pub const PSM: psm::Psm = unsafe { psm::Psm::from_ptr(0x4001_0000 as usize as _) }; +pub const IO_BANK0: io::Io = unsafe { io::Io::from_ptr(0x4001_4000 as usize as _) }; +pub const IO_QSPI: io::Io = unsafe { io::Io::from_ptr(0x4001_8000 as usize as _) }; +pub const PADS_BANK0: pads::Pads = unsafe { pads::Pads::from_ptr(0x4001_c000 as usize as _) }; +pub const PADS_QSPI: pads::Pads = unsafe { pads::Pads::from_ptr(0x4002_0000 as usize as _) }; +#[doc = "Controls the crystal oscillator"] +pub const XOSC: xosc::Xosc = unsafe { xosc::Xosc::from_ptr(0x4002_4000 as usize as _) }; +pub const PLL_SYS: pll::Pll = unsafe { pll::Pll::from_ptr(0x4002_8000 as usize as _) }; +pub const PLL_USB: pll::Pll = unsafe { pll::Pll::from_ptr(0x4002_c000 as usize as _) }; +#[doc = "Register block for busfabric control signals and performance counters"] +pub const BUSCTRL: busctrl::Busctrl = + unsafe { busctrl::Busctrl::from_ptr(0x4003_0000 as usize as _) }; +pub const UART0: uart::Uart = unsafe { uart::Uart::from_ptr(0x4003_4000 as usize as _) }; +pub const UART1: uart::Uart = unsafe { uart::Uart::from_ptr(0x4003_8000 as usize as _) }; +pub const SPI0: spi::Spi = unsafe { spi::Spi::from_ptr(0x4003_c000 as usize as _) }; +pub const SPI1: spi::Spi = unsafe { spi::Spi::from_ptr(0x4004_0000 as usize as _) }; +#[doc = "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"] +pub const I2C0: i2c::I2c = unsafe { i2c::I2c::from_ptr(0x4004_4000 as usize as _) }; +pub const I2C1: i2c::I2c = unsafe { i2c::I2c::from_ptr(0x4004_8000 as usize as _) }; +#[doc = "Control and data interface to SAR ADC"] +pub const ADC: adc::Adc = unsafe { adc::Adc::from_ptr(0x4004_c000 as usize as _) }; +#[doc = "Simple PWM"] +pub const PWM: pwm::Pwm = unsafe { pwm::Pwm::from_ptr(0x4005_0000 as usize as _) }; +#[doc = "Controls time and alarms time is a 64 bit value indicating the time in usec 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"] +pub const TIMER: timer::Timer = unsafe { timer::Timer::from_ptr(0x4005_4000 as usize as _) }; +pub const WATCHDOG: watchdog::Watchdog = + unsafe { watchdog::Watchdog::from_ptr(0x4005_8000 as usize as _) }; +#[doc = "Register block to control RTC"] +pub const RTC: rtc::Rtc = unsafe { rtc::Rtc::from_ptr(0x4005_c000 as usize as _) }; +pub const ROSC: rosc::Rosc = unsafe { rosc::Rosc::from_ptr(0x4006_0000 as usize as _) }; +#[doc = "control and status for on-chip voltage regulator and chip level reset subsystem"] +pub const VREG_AND_CHIP_RESET: vreg_and_chip_reset::VregAndChipReset = + unsafe { vreg_and_chip_reset::VregAndChipReset::from_ptr(0x4006_4000 as usize as _) }; +#[doc = "Testbench manager. Allows the programmer to know what platform their software is running on."] +pub const TBMAN: tbman::Tbman = unsafe { tbman::Tbman::from_ptr(0x4006_c000 as usize as _) }; +#[doc = "DMA with separate read and write masters"] +pub const DMA: dma::Dma = unsafe { dma::Dma::from_ptr(0x5000_0000 as usize as _) }; +#[doc = "DPRAM layout for USB device."] +pub const USB_DPRAM: usb_dpram::UsbDpram = + unsafe { usb_dpram::UsbDpram::from_ptr(0x5010_0000 as usize as _) }; +#[doc = "USB FS/LS controller device registers"] +pub const USB: usb::Usb = unsafe { usb::Usb::from_ptr(0x5011_0000 as usize as _) }; +#[doc = "Programmable IO block"] +pub const PIO0: pio::Pio = unsafe { pio::Pio::from_ptr(0x5020_0000 as usize as _) }; +pub const PIO1: pio::Pio = unsafe { pio::Pio::from_ptr(0x5030_0000 as usize as _) }; +#[doc = "Single-cycle IO block Provides core-local and inter-core hardware for the two processors, with single-cycle access."] +pub const SIO: sio::Sio = unsafe { sio::Sio::from_ptr(0xd000_0000 as usize as _) }; +#[doc = r" Number available in the NVIC for configuring priority"] +#[cfg(feature = "rt")] +pub const NVIC_PRIO_BITS: u8 = 2; +#[cfg(feature = "rt")] +pub use cortex_m_rt::interrupt; +#[cfg(feature = "rt")] +pub use Interrupt as interrupt; +pub mod adc; +pub mod busctrl; +pub mod clocks; +pub mod common; +pub mod dma; +pub mod i2c; +pub mod io; +pub mod pads; +pub mod pio; +pub mod pll; +pub mod psm; +pub mod pwm; +pub mod resets; +pub mod rosc; +pub mod rtc; +pub mod sio; +pub mod spi; +pub mod ssi; +pub mod syscfg; +pub mod sysinfo; +pub mod tbman; +pub mod timer; +pub mod uart; +pub mod usb; +pub mod usb_dpram; +pub mod vreg_and_chip_reset; +pub mod watchdog; +pub mod xip_ctrl; +pub mod xosc; diff --git a/src/pads.rs b/src/rp2040/pads.rs similarity index 100% rename from src/pads.rs rename to src/rp2040/pads.rs diff --git a/src/pads/regs.rs b/src/rp2040/pads/regs.rs similarity index 100% rename from src/pads/regs.rs rename to src/rp2040/pads/regs.rs diff --git a/src/pads/vals.rs b/src/rp2040/pads/vals.rs similarity index 100% rename from src/pads/vals.rs rename to src/rp2040/pads/vals.rs diff --git a/src/pio.rs b/src/rp2040/pio.rs similarity index 94% rename from src/pio.rs rename to src/rp2040/pio.rs index 29068f8e..7eb55ace 100644 --- a/src/pio.rs +++ b/src/rp2040/pio.rs @@ -13,17 +13,17 @@ impl Irq { pub const fn as_ptr(&self) -> *mut () { self.ptr as _ } - #[doc = "Interrupt Enable for irq0"] + #[doc = "Interrupt Enable for irq1"] #[inline(always)] pub const fn inte(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } } - #[doc = "Interrupt Force for irq0"] + #[doc = "Interrupt Force for irq1"] #[inline(always)] pub const fn intf(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } } - #[doc = "Interrupt status after masking & forcing for irq0"] + #[doc = "Interrupt status after masking & forcing for irq1"] #[inline(always)] pub const fn ints(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } @@ -67,13 +67,13 @@ impl Pio { } #[doc = "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."] #[inline(always)] - pub const fn txf(self, n: usize) -> crate::common::Reg { + pub const fn txf(self, n: usize) -> crate::common::Reg { assert!(n < 4usize); unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize + n * 4usize) as _) } } #[doc = "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."] #[inline(always)] - pub const fn rxf(self, n: usize) -> crate::common::Reg { + pub const fn rxf(self, n: usize) -> crate::common::Reg { assert!(n < 4usize); unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize + n * 4usize) as _) } } @@ -94,12 +94,12 @@ impl Pio { } #[doc = "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."] #[inline(always)] - pub const fn dbg_padout(self) -> crate::common::Reg { + pub const fn dbg_padout(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } } #[doc = "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."] #[inline(always)] - pub const fn dbg_padoe(self) -> crate::common::Reg { + pub const fn dbg_padoe(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } } #[doc = "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."] @@ -147,27 +147,27 @@ impl StateMachine { pub const fn as_ptr(&self) -> *mut () { self.ptr as _ } - #[doc = "Clock divisor register for state machine 0 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"] + #[doc = "Clock divisor register for state machine 2 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"] #[inline(always)] pub const fn clkdiv(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } } - #[doc = "Execution/behavioural settings for state machine 0"] + #[doc = "Execution/behavioural settings for state machine 2"] #[inline(always)] pub const fn execctrl(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } } - #[doc = "Control behaviour of the input/output shift registers for state machine 0"] + #[doc = "Control behaviour of the input/output shift registers for state machine 2"] #[inline(always)] pub const fn shiftctrl(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } } - #[doc = "Current instruction address of state machine 0"] + #[doc = "Current instruction address of state machine 2"] #[inline(always)] pub const fn addr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } } - #[doc = "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."] + #[doc = "Read to see the instruction currently addressed by state machine 2's program counter Write to execute an instruction immediately (including jumps) and then resume execution."] #[inline(always)] pub const fn instr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } diff --git a/src/pio/regs.rs b/src/rp2040/pio/regs.rs similarity index 99% rename from src/pio/regs.rs rename to src/rp2040/pio/regs.rs index ca04b855..8053d723 100644 --- a/src/pio/regs.rs +++ b/src/rp2040/pio/regs.rs @@ -284,7 +284,7 @@ impl Default for Fstat { Fstat(0) } } -#[doc = "Write-only access to instruction memory location 14"] +#[doc = "Write-only access to instruction memory location 2"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct InstrMem(pub u32); @@ -467,7 +467,7 @@ impl Default for IrqForce { IrqForce(0) } } -#[doc = "Current instruction address of state machine 0"] +#[doc = "Current instruction address of state machine 2"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct SmAddr(pub u32); @@ -488,7 +488,7 @@ impl Default for SmAddr { SmAddr(0) } } -#[doc = "Clock divisor register for state machine 2 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"] +#[doc = "Clock divisor register for state machine 1 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct SmClkdiv(pub u32); @@ -522,7 +522,7 @@ impl Default for SmClkdiv { SmClkdiv(0) } } -#[doc = "Execution/behavioural settings for state machine 2"] +#[doc = "Execution/behavioural settings for state machine 0"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct SmExecctrl(pub u32); @@ -655,7 +655,7 @@ impl Default for SmExecctrl { SmExecctrl(0) } } -#[doc = "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."] +#[doc = "Read to see the instruction currently addressed by state machine 3's program counter Write to execute an instruction immediately (including jumps) and then resume execution."] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct SmInstr(pub u32); diff --git a/src/pio/vals.rs b/src/rp2040/pio/vals.rs similarity index 100% rename from src/pio/vals.rs rename to src/rp2040/pio/vals.rs diff --git a/src/pll.rs b/src/rp2040/pll.rs similarity index 100% rename from src/pll.rs rename to src/rp2040/pll.rs diff --git a/src/pll/regs.rs b/src/rp2040/pll/regs.rs similarity index 100% rename from src/pll/regs.rs rename to src/rp2040/pll/regs.rs diff --git a/src/psm.rs b/src/rp2040/psm.rs similarity index 100% rename from src/psm.rs rename to src/rp2040/psm.rs diff --git a/src/psm/regs.rs b/src/rp2040/psm/regs.rs similarity index 100% rename from src/psm/regs.rs rename to src/rp2040/psm/regs.rs diff --git a/src/pwm.rs b/src/rp2040/pwm.rs similarity index 100% rename from src/pwm.rs rename to src/rp2040/pwm.rs diff --git a/src/pwm/regs.rs b/src/rp2040/pwm/regs.rs similarity index 100% rename from src/pwm/regs.rs rename to src/rp2040/pwm/regs.rs diff --git a/src/pwm/vals.rs b/src/rp2040/pwm/vals.rs similarity index 100% rename from src/pwm/vals.rs rename to src/rp2040/pwm/vals.rs diff --git a/src/resets.rs b/src/rp2040/resets.rs similarity index 100% rename from src/resets.rs rename to src/rp2040/resets.rs diff --git a/src/resets/regs.rs b/src/rp2040/resets/regs.rs similarity index 98% rename from src/resets/regs.rs rename to src/rp2040/resets/regs.rs index 0a9c9666..22118fa1 100644 --- a/src/resets/regs.rs +++ b/src/rp2040/resets/regs.rs @@ -1,4 +1,4 @@ -#[doc = "Reset control. If a bit is set it means the peripheral is in reset. 0 means the peripheral's reset is deasserted."] +#[doc = "Reset done. If a bit is set then a reset done signal has been returned by the peripheral. This indicates that the peripheral's registers are ready to be accessed."] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Peripherals(pub u32); diff --git a/src/rosc.rs b/src/rp2040/rosc.rs similarity index 90% rename from src/rosc.rs rename to src/rp2040/rosc.rs index aee4e179..be5d2ae4 100644 --- a/src/rosc.rs +++ b/src/rp2040/rosc.rs @@ -28,9 +28,9 @@ impl Rosc { pub const fn freqb(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } } - #[doc = "Ring Oscillator pause control 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"] + #[doc = "Ring Oscillator pause control"] #[inline(always)] - pub const fn dormant(self) -> crate::common::Reg { + pub const fn dormant(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } } #[doc = "Controls the output divider"] diff --git a/src/rosc/regs.rs b/src/rp2040/rosc/regs.rs similarity index 91% rename from src/rosc/regs.rs rename to src/rp2040/rosc/regs.rs index 5d61fd98..415645d0 100644 --- a/src/rosc/regs.rs +++ b/src/rp2040/rosc/regs.rs @@ -24,13 +24,13 @@ impl Default for Count { #[derive(Copy, Clone, Eq, PartialEq)] pub struct Ctrl(pub u32); impl Ctrl { - #[doc = "Controls the number of delay stages in the ROSC ring LOW uses stages 0 to 7 MEDIUM uses stages 0 to 5 HIGH uses stages 0 to 3 TOOHIGH uses stages 0 to 1 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"] + #[doc = "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"] #[inline(always)] pub const fn freq_range(&self) -> super::vals::FreqRange { let val = (self.0 >> 0usize) & 0x0fff; super::vals::FreqRange::from_bits(val as u16) } - #[doc = "Controls the number of delay stages in the ROSC ring LOW uses stages 0 to 7 MEDIUM uses stages 0 to 5 HIGH uses stages 0 to 3 TOOHIGH uses stages 0 to 1 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"] + #[doc = "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"] #[inline(always)] pub fn set_freq_range(&mut self, val: super::vals::FreqRange) { self.0 = (self.0 & !(0x0fff << 0usize)) | (((val.to_bits() as u32) & 0x0fff) << 0usize); @@ -76,6 +76,30 @@ impl Default for Div { Div(0) } } +#[doc = "Ring Oscillator pause control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dormant(pub u32); +impl Dormant { + #[doc = "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"] + #[inline(always)] + pub const fn dormant(&self) -> super::vals::Dormant { + let val = (self.0 >> 0usize) & 0xffff_ffff; + super::vals::Dormant::from_bits(val as u32) + } + #[doc = "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"] + #[inline(always)] + pub fn set_dormant(&mut self, val: super::vals::Dormant) { + self.0 = (self.0 & !(0xffff_ffff << 0usize)) + | (((val.to_bits() as u32) & 0xffff_ffff) << 0usize); + } +} +impl Default for Dormant { + #[inline(always)] + fn default() -> Dormant { + Dormant(0) + } +} #[doc = "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"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] diff --git a/src/rosc/vals.rs b/src/rp2040/rosc/vals.rs similarity index 79% rename from src/rosc/vals.rs rename to src/rp2040/rosc/vals.rs index 3ef92549..452dbb00 100644 --- a/src/rosc/vals.rs +++ b/src/rp2040/rosc/vals.rs @@ -26,6 +26,33 @@ impl From
for u16 { } #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Dormant(pub u32); +impl Dormant { + pub const DORMANT: Self = Self(0x636f_6d61); + pub const WAKE: Self = Self(0x7761_6b65); +} +impl Dormant { + pub const fn from_bits(val: u32) -> Dormant { + Self(val & 0xffff_ffff) + } + pub const fn to_bits(self) -> u32 { + self.0 + } +} +impl From for Dormant { + #[inline(always)] + fn from(val: u32) -> Dormant { + Dormant::from_bits(val) + } +} +impl From for u32 { + #[inline(always)] + fn from(val: Dormant) -> u32 { + Dormant::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] pub struct Enable(pub u16); impl Enable { pub const DISABLE: Self = Self(0x0d1e); diff --git a/src/rtc.rs b/src/rp2040/rtc.rs similarity index 100% rename from src/rtc.rs rename to src/rp2040/rtc.rs diff --git a/src/rtc/regs.rs b/src/rp2040/rtc/regs.rs similarity index 99% rename from src/rtc/regs.rs rename to src/rp2040/rtc/regs.rs index fb3c9295..da3ac3a8 100644 --- a/src/rtc/regs.rs +++ b/src/rp2040/rtc/regs.rs @@ -75,7 +75,7 @@ impl Default for Ctrl { Ctrl(0) } } -#[doc = "Interrupt Force"] +#[doc = "Interrupt Enable"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Int(pub u32); diff --git a/src/sio.rs b/src/rp2040/sio.rs similarity index 96% rename from src/sio.rs rename to src/rp2040/sio.rs index c02782dc..8f397b30 100644 --- a/src/sio.rs +++ b/src/rp2040/sio.rs @@ -71,12 +71,12 @@ impl Fifo { } #[doc = "Write access to this core's TX FIFO"] #[inline(always)] - pub const fn wr(self) -> crate::common::Reg { + pub const fn wr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } } #[doc = "Read access to this core's RX FIFO"] #[inline(always)] - pub const fn rd(self) -> crate::common::Reg { + pub const fn rd(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } } } @@ -158,57 +158,57 @@ impl Interp { } #[doc = "Read LANE0 result, and simultaneously write lane results to both accumulators (POP)."] #[inline(always)] - pub const fn pop_lane0(self) -> crate::common::Reg { + pub const fn pop_lane0(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } } #[doc = "Read LANE1 result, and simultaneously write lane results to both accumulators (POP)."] #[inline(always)] - pub const fn pop_lane1(self) -> crate::common::Reg { + pub const fn pop_lane1(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } } #[doc = "Read FULL result, and simultaneously write lane results to both accumulators (POP)."] #[inline(always)] - pub const fn pop_full(self) -> crate::common::Reg { + pub const fn pop_full(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } } #[doc = "Read LANE0 result, without altering any internal state (PEEK)."] #[inline(always)] - pub const fn peek_lane0(self) -> crate::common::Reg { + pub const fn peek_lane0(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } } #[doc = "Read LANE1 result, without altering any internal state (PEEK)."] #[inline(always)] - pub const fn peek_lane1(self) -> crate::common::Reg { + pub const fn peek_lane1(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } } #[doc = "Read FULL result, without altering any internal state (PEEK)."] #[inline(always)] - pub const fn peek_full(self) -> crate::common::Reg { + pub const fn peek_full(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } } #[doc = "Control register for lane 0"] #[inline(always)] - pub const fn ctrl_lane0(self) -> crate::common::Reg { + pub const fn ctrl_lane0(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } } #[doc = "Control register for lane 1"] #[inline(always)] - pub const fn ctrl_lane1(self) -> crate::common::Reg { + pub const fn ctrl_lane1(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } } #[doc = "Values written here are atomically added to ACCUM0 Reading yields lane 0's raw shift and mask value (BASE0 not added)."] #[inline(always)] - pub const fn accum0_add(self) -> crate::common::Reg { + pub const fn accum0_add(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } } #[doc = "Values written here are atomically added to ACCUM1 Reading yields lane 1's raw shift and mask value (BASE1 not added)."] #[inline(always)] - pub const fn accum1_add(self) -> crate::common::Reg { + pub const fn accum1_add(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } } #[doc = "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."] #[inline(always)] - pub const fn base_1and0(self) -> crate::common::Reg { + pub const fn base_1and0(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } } } @@ -228,9 +228,9 @@ impl Sio { pub const fn as_ptr(&self) -> *mut () { self.ptr as _ } - #[doc = "Processor core identifier Value is 0 when read from processor core 0, and 1 when read from processor core 1."] + #[doc = "Processor core identifier"] #[inline(always)] - pub const fn cpuid(self) -> crate::common::Reg { + pub const fn cpuid(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } } #[doc = "Input value for GPIO pins"] @@ -255,7 +255,7 @@ impl Sio { } #[doc = "Spinlock state A bitmap containing the state of all 32 spinlocks (1=locked). Mainly intended for debugging."] #[inline(always)] - pub const fn spinlock_st(self) -> crate::common::Reg { + pub const fn spinlock_st(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } } #[inline(always)] diff --git a/src/sio/regs.rs b/src/rp2040/sio/regs.rs similarity index 100% rename from src/sio/regs.rs rename to src/rp2040/sio/regs.rs diff --git a/src/spi.rs b/src/rp2040/spi.rs similarity index 100% rename from src/spi.rs rename to src/rp2040/spi.rs diff --git a/src/spi/regs.rs b/src/rp2040/spi/regs.rs similarity index 100% rename from src/spi/regs.rs rename to src/rp2040/spi/regs.rs diff --git a/src/xip_ssi.rs b/src/rp2040/ssi.rs similarity index 98% rename from src/xip_ssi.rs rename to src/rp2040/ssi.rs index 64b0af86..f921539f 100644 --- a/src/xip_ssi.rs +++ b/src/rp2040/ssi.rs @@ -1,11 +1,11 @@ #[doc = "DW_apb_ssi has the following features: * APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation. * APB3 and APB4 protocol support. * Scalable APB data bus width – Supports APB data bus widths of 8, 16, and 32 bits. * Serial-master or serial-slave operation – Enables serial communication with serial-master or serial-slave peripheral devices. * Programmable Dual/Quad/Octal SPI support in Master Mode. * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation. * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes. * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes. * DMA Controller Interface – Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests. * Independent masking of interrupts – Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently. * Multi-master contention detection – Informs the processor of multiple serial-master accesses on the serial bus. * Bypass of meta-stability flip-flops for synchronous clocks – When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains. * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates. * Programmable features: - Serial interface operation – Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire. - Clock bit-rate – Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation. - Data Item size (4 to 32 bits) – Item size of each data transfer under the control of the programmer. * Configured features: - FIFO depth – 16 words deep. The FIFO width is fixed at 32 bits. - 1 slave select output. - Hardware slave-select – Dedicated hardware slave-select line. - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller. - Interrupt polarity – active high interrupt lines. - Serial clock polarity – low serial-clock polarity directly after reset. - Serial clock phase – capture on first edge of serial-clock directly after reset."] #[derive(Copy, Clone, Eq, PartialEq)] -pub struct XipSsi { +pub struct Ssi { ptr: *mut u8, } -unsafe impl Send for XipSsi {} -unsafe impl Sync for XipSsi {} -impl XipSsi { +unsafe impl Send for Ssi {} +unsafe impl Sync for Ssi {} +impl Ssi { #[inline(always)] pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { Self { ptr: ptr as _ } diff --git a/src/xip_ssi/regs.rs b/src/rp2040/ssi/regs.rs similarity index 100% rename from src/xip_ssi/regs.rs rename to src/rp2040/ssi/regs.rs diff --git a/src/xip_ssi/vals.rs b/src/rp2040/ssi/vals.rs similarity index 100% rename from src/xip_ssi/vals.rs rename to src/rp2040/ssi/vals.rs diff --git a/src/syscfg.rs b/src/rp2040/syscfg.rs similarity index 93% rename from src/syscfg.rs rename to src/rp2040/syscfg.rs index 20f75abe..951a62e8 100644 --- a/src/syscfg.rs +++ b/src/rp2040/syscfg.rs @@ -14,12 +14,12 @@ impl Syscfg { pub const fn as_ptr(&self) -> *mut () { self.ptr as _ } - #[doc = "Processor core 0 NMI source mask Set a bit high to enable NMI from that IRQ"] + #[doc = "Processor core 0 NMI source mask"] #[inline(always)] pub const fn proc0_nmi_mask(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } } - #[doc = "Processor core 1 NMI source mask Set a bit high to enable NMI from that IRQ"] + #[doc = "Processor core 1 NMI source mask"] #[inline(always)] pub const fn proc1_nmi_mask(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } diff --git a/src/syscfg/regs.rs b/src/rp2040/syscfg/regs.rs similarity index 100% rename from src/syscfg/regs.rs rename to src/rp2040/syscfg/regs.rs diff --git a/src/sysinfo.rs b/src/rp2040/sysinfo.rs similarity index 92% rename from src/sysinfo.rs rename to src/rp2040/sysinfo.rs index 07618cbd..23a44473 100644 --- a/src/sysinfo.rs +++ b/src/rp2040/sysinfo.rs @@ -25,8 +25,8 @@ impl Sysinfo { } #[doc = "Git hash of the chip source. Used to identify chip version."] #[inline(always)] - pub const fn gitref_rp2040(self) -> crate::common::Reg { - unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + pub const fn gitref_rp2040(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } } } pub mod regs; diff --git a/src/sysinfo/regs.rs b/src/rp2040/sysinfo/regs.rs similarity index 100% rename from src/sysinfo/regs.rs rename to src/rp2040/sysinfo/regs.rs diff --git a/src/tbman.rs b/src/rp2040/tbman.rs similarity index 100% rename from src/tbman.rs rename to src/rp2040/tbman.rs diff --git a/src/tbman/regs.rs b/src/rp2040/tbman/regs.rs similarity index 100% rename from src/tbman/regs.rs rename to src/rp2040/tbman/regs.rs diff --git a/src/timer.rs b/src/rp2040/timer.rs similarity index 98% rename from src/timer.rs rename to src/rp2040/timer.rs index 60798825..97645e5a 100644 --- a/src/timer.rs +++ b/src/rp2040/timer.rs @@ -16,22 +16,22 @@ impl Timer { } #[doc = "Write to bits 63:32 of time always write timelw before timehw"] #[inline(always)] - pub const fn timehw(self) -> crate::common::Reg { + pub const fn timehw(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } } #[doc = "Write to bits 31:0 of time writes do not get copied to time until timehw is written"] #[inline(always)] - pub const fn timelw(self) -> crate::common::Reg { + pub const fn timelw(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } } #[doc = "Read from bits 63:32 of time always read timelr before timehr"] #[inline(always)] - pub const fn timehr(self) -> crate::common::Reg { + pub const fn timehr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } } #[doc = "Read from bits 31:0 of time"] #[inline(always)] - pub const fn timelr(self) -> crate::common::Reg { + pub const fn timelr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } } #[doc = "Arm alarm 0, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM0 == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register."] @@ -47,12 +47,12 @@ impl Timer { } #[doc = "Raw read from bits 63:32 of time (no side effects)"] #[inline(always)] - pub const fn timerawh(self) -> crate::common::Reg { + pub const fn timerawh(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } } #[doc = "Raw read from bits 31:0 of time (no side effects)"] #[inline(always)] - pub const fn timerawl(self) -> crate::common::Reg { + pub const fn timerawl(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } } #[doc = "Set bits high to enable pause when the corresponding debug ports are active"] diff --git a/src/timer/regs.rs b/src/rp2040/timer/regs.rs similarity index 99% rename from src/timer/regs.rs rename to src/rp2040/timer/regs.rs index 6bbdc0b3..0250acd8 100644 --- a/src/timer/regs.rs +++ b/src/rp2040/timer/regs.rs @@ -53,7 +53,7 @@ impl Default for Dbgpause { Dbgpause(0) } } -#[doc = "Interrupt Enable"] +#[doc = "Raw Interrupts"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Int(pub u32); diff --git a/src/uart.rs b/src/rp2040/uart.rs similarity index 100% rename from src/uart.rs rename to src/rp2040/uart.rs diff --git a/src/uart/regs.rs b/src/rp2040/uart/regs.rs similarity index 100% rename from src/uart/regs.rs rename to src/rp2040/uart/regs.rs diff --git a/src/usb.rs b/src/rp2040/usb.rs similarity index 93% rename from src/usb.rs rename to src/rp2040/usb.rs index 51a5edb8..1664ac6d 100644 --- a/src/usb.rs +++ b/src/rp2040/usb.rs @@ -102,24 +102,23 @@ impl Usb { pub const fn usb_muxing(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } } - #[doc = "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."] + #[doc = "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 so switch over to the override value."] #[inline(always)] pub const fn usb_pwr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } } - #[doc = "This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit."] + #[doc = "Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation Use in conjunction with usbphy_direct_override register"] #[inline(always)] pub const fn usbphy_direct(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } } - #[doc = "Override enable for each control in usbphy_direct"] #[inline(always)] pub const fn usbphy_direct_override( self, ) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } } - #[doc = "Used to adjust trim values of USB phy pull down resistors."] + #[doc = "Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation"] #[inline(always)] pub const fn usbphy_trim(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } diff --git a/src/usb/regs.rs b/src/rp2040/usb/regs.rs similarity index 90% rename from src/usb/regs.rs rename to src/rp2040/usb/regs.rs index a29fdddf..0c3cf86b 100644 --- a/src/usb/regs.rs +++ b/src/rp2040/usb/regs.rs @@ -32,7 +32,7 @@ impl Default for AddrEndp { AddrEndp(0) } } -#[doc = "Interrupt endpoint 10. Only valid for HOST mode."] +#[doc = "Interrupt endpoint 2. Only valid for HOST mode."] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct AddrEndpX(pub u32); @@ -308,7 +308,7 @@ impl Default for EpStatusStallNak { EpStatusStallNak(0) } } -#[doc = "Interrupt Enable"] +#[doc = "Raw Interrupts"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct Int(pub u32); @@ -324,13 +324,13 @@ impl Int { pub fn set_host_conn_dis(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); } - #[doc = "Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME"] + #[doc = "Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE"] #[inline(always)] pub const fn host_resume(&self) -> bool { let val = (self.0 >> 1usize) & 0x01; val != 0 } - #[doc = "Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME"] + #[doc = "Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE"] #[inline(always)] pub fn set_host_resume(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); @@ -434,13 +434,13 @@ impl Int { pub fn set_stall(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); } - #[doc = "Source: SIE_STATUS.VBUS_DETECTED"] + #[doc = "Source: SIE_STATUS.VBUS_DETECT"] #[inline(always)] pub const fn vbus_detect(&self) -> bool { let val = (self.0 >> 11usize) & 0x01; val != 0 } - #[doc = "Source: SIE_STATUS.VBUS_DETECTED"] + #[doc = "Source: SIE_STATUS.VBUS_DETECT"] #[inline(always)] pub fn set_vbus_detect(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); @@ -478,13 +478,13 @@ impl Int { pub fn set_dev_suspend(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); } - #[doc = "Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME"] + #[doc = "Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE"] #[inline(always)] pub const fn dev_resume_from_host(&self) -> bool { let val = (self.0 >> 15usize) & 0x01; val != 0 } - #[doc = "Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME"] + #[doc = "Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE"] #[inline(always)] pub fn set_dev_resume_from_host(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); @@ -545,13 +545,13 @@ impl Default for Int { #[derive(Copy, Clone, Eq, PartialEq)] pub struct IntEpCtrl(pub u32); impl IntEpCtrl { - #[doc = "Host: Enable interrupt endpoint 1 -> 15"] + #[doc = "Host: Enable interrupt endpoint 1 => 15"] #[inline(always)] pub const fn int_ep_active(&self) -> u16 { let val = (self.0 >> 1usize) & 0x7fff; val as u16 } - #[doc = "Host: Enable interrupt endpoint 1 -> 15"] + #[doc = "Host: Enable interrupt endpoint 1 => 15"] #[inline(always)] pub fn set_int_ep_active(&mut self, val: u16) { self.0 = (self.0 & !(0x7fff << 1usize)) | (((val as u32) & 0x7fff) << 1usize); @@ -1218,7 +1218,7 @@ impl Default for UsbMuxing { UsbMuxing(0) } } -#[doc = "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."] +#[doc = "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 so switch over to the override value."] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct UsbPwr(pub u32); @@ -1284,238 +1284,230 @@ impl Default for UsbPwr { UsbPwr(0) } } -#[doc = "This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit."] +#[doc = "Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation Use in conjunction with usbphy_direct_override register"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct UsbphyDirect(pub u32); impl UsbphyDirect { - #[doc = "Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[doc = "when dp_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] #[inline(always)] pub const fn dp_pullup_hisel(&self) -> bool { let val = (self.0 >> 0usize) & 0x01; val != 0 } - #[doc = "Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[doc = "when dp_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] #[inline(always)] pub fn set_dp_pullup_hisel(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); } - #[doc = "DP pull up enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller"] #[inline(always)] pub const fn dp_pullup_en(&self) -> bool { let val = (self.0 >> 1usize) & 0x01; val != 0 } - #[doc = "DP pull up enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller"] #[inline(always)] pub fn set_dp_pullup_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); } - #[doc = "DP pull down enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPP"] #[inline(always)] pub const fn dp_pulldn_en(&self) -> bool { let val = (self.0 >> 2usize) & 0x01; val != 0 } - #[doc = "DP pull down enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPP"] #[inline(always)] pub fn set_dp_pulldn_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); } - #[doc = "Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[doc = "when dm_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] #[inline(always)] pub const fn dm_pullup_hisel(&self) -> bool { let val = (self.0 >> 4usize) & 0x01; val != 0 } - #[doc = "Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[doc = "when dm_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] #[inline(always)] pub fn set_dm_pullup_hisel(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); } - #[doc = "DM pull up enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpu on DPM"] #[inline(always)] pub const fn dm_pullup_en(&self) -> bool { let val = (self.0 >> 5usize) & 0x01; val != 0 } - #[doc = "DM pull up enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpu on DPM"] #[inline(always)] pub fn set_dm_pullup_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); } - #[doc = "DM pull down enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPM"] #[inline(always)] pub const fn dm_pulldn_en(&self) -> bool { let val = (self.0 >> 6usize) & 0x01; val != 0 } - #[doc = "DM pull down enable"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller 1 - Enable Rpd on DPM"] #[inline(always)] pub fn set_dm_pulldn_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); } - #[doc = "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"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving TX_SEMODE=1, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving"] #[inline(always)] pub const fn tx_dp_oe(&self) -> bool { let val = (self.0 >> 8usize) & 0x01; val != 0 } - #[doc = "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"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving TX_SEMODE=1, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving"] #[inline(always)] pub fn set_tx_dp_oe(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); } - #[doc = "Output enable. If TX_DIFFMODE=1, Ignored. If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored. TX_SEMODE=1, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving"] #[inline(always)] pub const fn tx_dm_oe(&self) -> bool { let val = (self.0 >> 9usize) & 0x01; val != 0 } - #[doc = "Output enable. If TX_DIFFMODE=1, Ignored. If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored. TX_SEMODE=1, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving"] #[inline(always)] pub fn set_tx_dm_oe(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); } - #[doc = "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"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP TX_SEMODE=1, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP"] #[inline(always)] pub const fn tx_dp(&self) -> bool { let val = (self.0 >> 10usize) & 0x01; val != 0 } - #[doc = "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"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP TX_SEMODE=1, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP"] #[inline(always)] pub fn set_tx_dp(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); } - #[doc = "Output data. TX_DIFFMODE=1, Ignored TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored TX_SEMODE=1, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM"] #[inline(always)] pub const fn tx_dm(&self) -> bool { let val = (self.0 >> 11usize) & 0x01; val != 0 } - #[doc = "Output data. TX_DIFFMODE=1, Ignored TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM"] + #[doc = "Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller TX_SEMODE=0, Ignored TX_SEMODE=1, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM"] #[inline(always)] pub fn set_tx_dm(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); } - #[doc = "RX power down override (if override enable is set). 1 = powered down."] #[inline(always)] pub const fn rx_pd(&self) -> bool { let val = (self.0 >> 12usize) & 0x01; val != 0 } - #[doc = "RX power down override (if override enable is set). 1 = powered down."] #[inline(always)] pub fn set_rx_pd(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); } - #[doc = "TX power down override (if override enable is set). 1 = powered down."] #[inline(always)] pub const fn tx_pd(&self) -> bool { let val = (self.0 >> 13usize) & 0x01; val != 0 } - #[doc = "TX power down override (if override enable is set). 1 = powered down."] #[inline(always)] pub fn set_tx_pd(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); } - #[doc = "TX_FSSLEW=0: Low speed slew rate TX_FSSLEW=1: Full speed slew rate"] #[inline(always)] pub const fn tx_fsslew(&self) -> bool { let val = (self.0 >> 14usize) & 0x01; val != 0 } - #[doc = "TX_FSSLEW=0: Low speed slew rate TX_FSSLEW=1: Full speed slew rate"] #[inline(always)] pub fn set_tx_fsslew(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); } - #[doc = "TX_DIFFMODE=0: Single ended mode TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored)"] #[inline(always)] pub const fn tx_diffmode(&self) -> bool { let val = (self.0 >> 15usize) & 0x01; val != 0 } - #[doc = "TX_DIFFMODE=0: Single ended mode TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored)"] #[inline(always)] pub fn set_tx_diffmode(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); } - #[doc = "Differential RX"] + #[doc = "Status bit from USB PHY RX Diff data"] #[inline(always)] pub const fn rx_dd(&self) -> bool { let val = (self.0 >> 16usize) & 0x01; val != 0 } - #[doc = "Differential RX"] + #[doc = "Status bit from USB PHY RX Diff data"] #[inline(always)] pub fn set_rx_dd(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); } - #[doc = "DPP pin state"] + #[doc = "Status bit from USB PHY DPP pin state"] #[inline(always)] pub const fn rx_dp(&self) -> bool { let val = (self.0 >> 17usize) & 0x01; val != 0 } - #[doc = "DPP pin state"] + #[doc = "Status bit from USB PHY DPP pin state"] #[inline(always)] pub fn set_rx_dp(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); } - #[doc = "DPM pin state"] + #[doc = "Status bit from USB PHY DPM pin state"] #[inline(always)] pub const fn rx_dm(&self) -> bool { let val = (self.0 >> 18usize) & 0x01; val != 0 } - #[doc = "DPM pin state"] + #[doc = "Status bit from USB PHY DPM pin state"] #[inline(always)] pub fn set_rx_dm(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); } - #[doc = "DP overcurrent"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub const fn dp_ovcn(&self) -> bool { let val = (self.0 >> 19usize) & 0x01; val != 0 } - #[doc = "DP overcurrent"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub fn set_dp_ovcn(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); } - #[doc = "DM overcurrent"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub const fn dm_ovcn(&self) -> bool { let val = (self.0 >> 20usize) & 0x01; val != 0 } - #[doc = "DM overcurrent"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub fn set_dm_ovcn(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); } - #[doc = "DP over voltage"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub const fn dp_ovv(&self) -> bool { let val = (self.0 >> 21usize) & 0x01; val != 0 } - #[doc = "DP over voltage"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub fn set_dp_ovv(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); } - #[doc = "DM over voltage"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub const fn dm_ovv(&self) -> bool { let val = (self.0 >> 22usize) & 0x01; val != 0 } - #[doc = "DM over voltage"] + #[doc = "Status bit from USB PHY"] #[inline(always)] pub fn set_dm_ovv(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); @@ -1527,7 +1519,6 @@ impl Default for UsbphyDirect { UsbphyDirect(0) } } -#[doc = "Override enable for each control in usbphy_direct"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct UsbphyDirectOverride(pub u32); @@ -1550,65 +1541,79 @@ impl UsbphyDirectOverride { pub fn set_dm_pullup_hisel_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn dp_pullup_en_override_en(&self) -> bool { let val = (self.0 >> 2usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_dp_pullup_en_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn dp_pulldn_en_override_en(&self) -> bool { let val = (self.0 >> 3usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_dp_pulldn_en_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn dm_pulldn_en_override_en(&self) -> bool { let val = (self.0 >> 4usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_dm_pulldn_en_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn tx_dp_oe_override_en(&self) -> bool { let val = (self.0 >> 5usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_tx_dp_oe_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn tx_dm_oe_override_en(&self) -> bool { let val = (self.0 >> 6usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_tx_dm_oe_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn tx_dp_override_en(&self) -> bool { let val = (self.0 >> 7usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_tx_dp_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub const fn tx_dm_override_en(&self) -> bool { let val = (self.0 >> 8usize) & 0x01; val != 0 } + #[doc = "Override default value or value driven from USB Controller to PHY"] #[inline(always)] pub fn set_tx_dm_override_en(&mut self, val: bool) { self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); @@ -1665,7 +1670,7 @@ impl Default for UsbphyDirectOverride { UsbphyDirectOverride(0) } } -#[doc = "Used to adjust trim values of USB phy pull down resistors."] +#[doc = "Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] pub struct UsbphyTrim(pub u32); diff --git a/src/usb_dpram.rs b/src/rp2040/usb_dpram.rs similarity index 100% rename from src/usb_dpram.rs rename to src/rp2040/usb_dpram.rs diff --git a/src/usb_dpram/regs.rs b/src/rp2040/usb_dpram/regs.rs similarity index 100% rename from src/usb_dpram/regs.rs rename to src/rp2040/usb_dpram/regs.rs diff --git a/src/usb_dpram/vals.rs b/src/rp2040/usb_dpram/vals.rs similarity index 100% rename from src/usb_dpram/vals.rs rename to src/rp2040/usb_dpram/vals.rs diff --git a/src/vreg_and_chip_reset.rs b/src/rp2040/vreg_and_chip_reset.rs similarity index 100% rename from src/vreg_and_chip_reset.rs rename to src/rp2040/vreg_and_chip_reset.rs diff --git a/src/vreg_and_chip_reset/regs.rs b/src/rp2040/vreg_and_chip_reset/regs.rs similarity index 100% rename from src/vreg_and_chip_reset/regs.rs rename to src/rp2040/vreg_and_chip_reset/regs.rs diff --git a/src/watchdog.rs b/src/rp2040/watchdog.rs similarity index 100% rename from src/watchdog.rs rename to src/rp2040/watchdog.rs diff --git a/src/watchdog/regs.rs b/src/rp2040/watchdog/regs.rs similarity index 100% rename from src/watchdog/regs.rs rename to src/rp2040/watchdog/regs.rs diff --git a/src/xip_ctrl.rs b/src/rp2040/xip_ctrl.rs similarity index 76% rename from src/xip_ctrl.rs rename to src/rp2040/xip_ctrl.rs index 44af88a5..a1841a4e 100644 --- a/src/xip_ctrl.rs +++ b/src/rp2040/xip_ctrl.rs @@ -29,12 +29,12 @@ impl XipCtrl { pub const fn stat(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } } - #[doc = "Cache Hit counter 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."] + #[doc = "Cache Hit counter"] #[inline(always)] pub const fn ctr_hit(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } } - #[doc = "Cache Access counter 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."] + #[doc = "Cache Access counter"] #[inline(always)] pub const fn ctr_acc(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } @@ -49,9 +49,9 @@ impl XipCtrl { pub const fn stream_ctr(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } } - #[doc = "FIFO stream data 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."] + #[doc = "FIFO stream data"] #[inline(always)] - pub const fn stream_fifo(self) -> crate::common::Reg { + pub const fn stream_fifo(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } } } diff --git a/src/xip_ctrl/regs.rs b/src/rp2040/xip_ctrl/regs.rs similarity index 100% rename from src/xip_ctrl/regs.rs rename to src/rp2040/xip_ctrl/regs.rs diff --git a/src/xosc.rs b/src/rp2040/xosc.rs similarity index 81% rename from src/xosc.rs rename to src/rp2040/xosc.rs index 1bd9266b..3f7af636 100644 --- a/src/xosc.rs +++ b/src/rp2040/xosc.rs @@ -24,9 +24,9 @@ impl Xosc { pub const fn status(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } } - #[doc = "Crystal Oscillator pause control 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"] + #[doc = "Crystal Oscillator pause control"] #[inline(always)] - pub const fn dormant(self) -> crate::common::Reg { + pub const fn dormant(self) -> crate::common::Reg { unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } } #[doc = "Controls the startup delay"] diff --git a/src/xosc/regs.rs b/src/rp2040/xosc/regs.rs similarity index 71% rename from src/xosc/regs.rs rename to src/rp2040/xosc/regs.rs index 56eba56c..b3dc77af 100644 --- a/src/xosc/regs.rs +++ b/src/rp2040/xosc/regs.rs @@ -24,24 +24,24 @@ impl Default for Count { #[derive(Copy, Clone, Eq, PartialEq)] pub struct Ctrl(pub u32); impl Ctrl { - #[doc = "Frequency range. This resets to 0xAA0 and cannot be changed."] + #[doc = "Frequency range. An invalid setting will retain the previous value. The actual value being used can be read from STATUS_FREQ_RANGE. This resets to 0xAA0 and cannot be changed."] #[inline(always)] pub const fn freq_range(&self) -> super::vals::CtrlFreqRange { let val = (self.0 >> 0usize) & 0x0fff; super::vals::CtrlFreqRange::from_bits(val as u16) } - #[doc = "Frequency range. This resets to 0xAA0 and cannot be changed."] + #[doc = "Frequency range. An invalid setting will retain the previous value. The actual value being used can be read from STATUS_FREQ_RANGE. This resets to 0xAA0 and cannot be changed."] #[inline(always)] pub fn set_freq_range(&mut self, val: super::vals::CtrlFreqRange) { self.0 = (self.0 & !(0x0fff << 0usize)) | (((val.to_bits() as u32) & 0x0fff) << 0usize); } - #[doc = "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 enable the oscillator."] + #[doc = "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 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 enable the oscillator."] #[inline(always)] pub const fn enable(&self) -> super::vals::Enable { let val = (self.0 >> 12usize) & 0x0fff; super::vals::Enable::from_bits(val as u16) } - #[doc = "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 enable the oscillator."] + #[doc = "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 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 enable the oscillator."] #[inline(always)] pub fn set_enable(&mut self, val: super::vals::Enable) { self.0 = (self.0 & !(0x0fff << 12usize)) | (((val.to_bits() as u32) & 0x0fff) << 12usize); @@ -53,6 +53,30 @@ impl Default for Ctrl { Ctrl(0) } } +#[doc = "Crystal Oscillator pause control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dormant(pub u32); +impl Dormant { + #[doc = "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"] + #[inline(always)] + pub const fn dormant(&self) -> super::vals::Dormant { + let val = (self.0 >> 0usize) & 0xffff_ffff; + super::vals::Dormant::from_bits(val as u32) + } + #[doc = "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"] + #[inline(always)] + pub fn set_dormant(&mut self, val: super::vals::Dormant) { + self.0 = (self.0 & !(0xffff_ffff << 0usize)) + | (((val.to_bits() as u32) & 0xffff_ffff) << 0usize); + } +} +impl Default for Dormant { + #[inline(always)] + fn default() -> Dormant { + Dormant(0) + } +} #[doc = "Controls the startup delay"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] diff --git a/src/xosc/vals.rs b/src/rp2040/xosc/vals.rs similarity index 77% rename from src/xosc/vals.rs rename to src/rp2040/xosc/vals.rs index e8400c32..237095e3 100644 --- a/src/xosc/vals.rs +++ b/src/rp2040/xosc/vals.rs @@ -29,6 +29,33 @@ impl From for u16 { } #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Dormant(pub u32); +impl Dormant { + pub const DORMANT: Self = Self(0x636f_6d61); + pub const WAKE: Self = Self(0x7761_6b65); +} +impl Dormant { + pub const fn from_bits(val: u32) -> Dormant { + Self(val & 0xffff_ffff) + } + pub const fn to_bits(self) -> u32 { + self.0 + } +} +impl From for Dormant { + #[inline(always)] + fn from(val: u32) -> Dormant { + Dormant::from_bits(val) + } +} +impl From for u32 { + #[inline(always)] + fn from(val: Dormant) -> u32 { + Dormant::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] pub struct Enable(pub u16); impl Enable { pub const DISABLE: Self = Self(0x0d1e); diff --git a/src/rp2350/_vectors.rs b/src/rp2350/_vectors.rs new file mode 100644 index 00000000..9b5360ff --- /dev/null +++ b/src/rp2350/_vectors.rs @@ -0,0 +1,201 @@ +extern "C" { + fn TIMER0_IRQ_0(); + fn TIMER0_IRQ_1(); + fn TIMER0_IRQ_2(); + fn TIMER0_IRQ_3(); + fn TIMER1_IRQ_0(); + fn TIMER1_IRQ_1(); + fn TIMER1_IRQ_2(); + fn TIMER1_IRQ_3(); + fn PWM_IRQ_WRAP_0(); + fn PWM_IRQ_WRAP_1(); + fn DMA_IRQ_0(); + fn DMA_IRQ_1(); + fn DMA_IRQ_2(); + fn DMA_IRQ_3(); + fn USBCTRL_IRQ(); + fn PIO0_IRQ_0(); + fn PIO0_IRQ_1(); + fn PIO1_IRQ_0(); + fn PIO1_IRQ_1(); + fn PIO2_IRQ_0(); + fn PIO2_IRQ_1(); + fn IO_IRQ_BANK0(); + fn IO_IRQ_BANK0_NS(); + fn IO_IRQ_QSPI(); + fn IO_IRQ_QSPI_NS(); + fn SIO_IRQ_FIFO(); + fn SIO_IRQ_BELL(); + fn SIO_IRQ_FIFO_NS(); + fn SIO_IRQ_BELL_NS(); + fn SIO_IRQ_MTIMECMP(); + fn CLOCKS_IRQ(); + fn SPI0_IRQ(); + fn SPI1_IRQ(); + fn UART0_IRQ(); + fn UART1_IRQ(); + fn ADC_IRQ_FIFO(); + fn I2C0_IRQ(); + fn I2C1_IRQ(); + fn OTP_IRQ(); + fn TRNG_IRQ(); + fn PLL_SYS_IRQ(); + fn PLL_USB_IRQ(); + fn POWMAN_IRQ_POW(); + fn POWMAN_IRQ_TIMER(); + fn SWI_IRQ_0(); + fn SWI_IRQ_1(); + fn SWI_IRQ_2(); + fn SWI_IRQ_3(); + fn SWI_IRQ_4(); + fn SWI_IRQ_5(); +} +pub union Vector { + _handler: unsafe extern "C" fn(), + _reserved: u32, +} +#[link_section = ".vector_table.interrupts"] +#[no_mangle] +pub static __INTERRUPTS: [Vector; 53] = [ + Vector { + _handler: TIMER0_IRQ_0, + }, + Vector { + _handler: TIMER0_IRQ_1, + }, + Vector { + _handler: TIMER0_IRQ_2, + }, + Vector { + _handler: TIMER0_IRQ_3, + }, + Vector { + _handler: TIMER1_IRQ_0, + }, + Vector { + _handler: TIMER1_IRQ_1, + }, + Vector { + _handler: TIMER1_IRQ_2, + }, + Vector { + _handler: TIMER1_IRQ_3, + }, + Vector { + _handler: PWM_IRQ_WRAP_0, + }, + Vector { + _handler: PWM_IRQ_WRAP_1, + }, + Vector { + _handler: DMA_IRQ_0, + }, + Vector { + _handler: DMA_IRQ_1, + }, + Vector { + _handler: DMA_IRQ_2, + }, + Vector { + _handler: DMA_IRQ_3, + }, + Vector { + _handler: USBCTRL_IRQ, + }, + Vector { + _handler: PIO0_IRQ_0, + }, + Vector { + _handler: PIO0_IRQ_1, + }, + Vector { + _handler: PIO1_IRQ_0, + }, + Vector { + _handler: PIO1_IRQ_1, + }, + Vector { + _handler: PIO2_IRQ_0, + }, + Vector { + _handler: PIO2_IRQ_1, + }, + Vector { + _handler: IO_IRQ_BANK0, + }, + Vector { + _handler: IO_IRQ_BANK0_NS, + }, + Vector { + _handler: IO_IRQ_QSPI, + }, + Vector { + _handler: IO_IRQ_QSPI_NS, + }, + Vector { + _handler: SIO_IRQ_FIFO, + }, + Vector { + _handler: SIO_IRQ_BELL, + }, + Vector { + _handler: SIO_IRQ_FIFO_NS, + }, + Vector { + _handler: SIO_IRQ_BELL_NS, + }, + Vector { + _handler: SIO_IRQ_MTIMECMP, + }, + Vector { + _handler: CLOCKS_IRQ, + }, + Vector { _handler: SPI0_IRQ }, + Vector { _handler: SPI1_IRQ }, + Vector { + _handler: UART0_IRQ, + }, + Vector { + _handler: UART1_IRQ, + }, + Vector { + _handler: ADC_IRQ_FIFO, + }, + Vector { _handler: I2C0_IRQ }, + Vector { _handler: I2C1_IRQ }, + Vector { _handler: OTP_IRQ }, + Vector { _handler: TRNG_IRQ }, + Vector { _reserved: 0 }, + Vector { _reserved: 0 }, + Vector { + _handler: PLL_SYS_IRQ, + }, + Vector { + _handler: PLL_USB_IRQ, + }, + Vector { + _handler: POWMAN_IRQ_POW, + }, + Vector { + _handler: POWMAN_IRQ_TIMER, + }, + Vector { _reserved: 0 }, + Vector { + _handler: SWI_IRQ_0, + }, + Vector { + _handler: SWI_IRQ_1, + }, + Vector { + _handler: SWI_IRQ_2, + }, + Vector { + _handler: SWI_IRQ_3, + }, + Vector { + _handler: SWI_IRQ_4, + }, + Vector { + _handler: SWI_IRQ_5, + }, +]; diff --git a/src/rp2350/accessctrl.rs b/src/rp2350/accessctrl.rs new file mode 100644 index 00000000..1a1861b1 --- /dev/null +++ b/src/rp2350/accessctrl.rs @@ -0,0 +1,317 @@ +#[doc = "Hardware access control registers"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Accessctrl { + ptr: *mut u8, +} +unsafe impl Send for Accessctrl {} +unsafe impl Sync for Accessctrl {} +impl Accessctrl { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn force_core_ns(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn cfgreset(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn gpio_nsmask0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn gpio_nsmask1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn rom(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn xip_main(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sram9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn dma(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn usbctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pio0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pio1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pio2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(84usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn coresight_trace( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn coresight_periph( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sysinfo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn resets(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn io_bank0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn io_bank1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pads_bank0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pads_qspi(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn busctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn adc0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn hstx(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn i2c0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn i2c1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(136usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pwm(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(140usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn spi0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(144usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn spi1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(148usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn timer0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(152usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn timer1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(156usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn uart0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(160usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn uart1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(164usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otp(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(168usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tbman(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(172usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn powman(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(176usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn trng(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(180usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sha256(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(184usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn syscfg(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(188usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn clocks(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(192usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn xosc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(196usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn rosc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(200usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pll_sys(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(204usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn pll_usb(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(208usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ticks(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(212usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn watchdog(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(216usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn rsm(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(220usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn xip_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(224usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn xip_qmi(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(228usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn xip_aux(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(232usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/accessctrl/regs.rs b/src/rp2350/accessctrl/regs.rs new file mode 100644 index 00000000..7ba666b4 --- /dev/null +++ b/src/rp2350/accessctrl/regs.rs @@ -0,0 +1,5556 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Adc0(pub u32); +impl Adc0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, ADC0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, ADC0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, ADC0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, ADC0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, ADC0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, ADC0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, ADC0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, ADC0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, ADC0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, ADC0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, ADC0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, ADC0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, ADC0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, ADC0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Adc0 { + #[inline(always)] + fn default() -> Adc0 { + Adc0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Busctrl(pub u32); +impl Busctrl { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, BUSCTRL can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, BUSCTRL can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, BUSCTRL can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, BUSCTRL can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, BUSCTRL can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, BUSCTRL can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, BUSCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, BUSCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, BUSCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, BUSCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, BUSCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, BUSCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, BUSCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, BUSCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Busctrl { + #[inline(always)] + fn default() -> Busctrl { + Busctrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Cfgreset(pub u32); +impl Cfgreset { + #[inline(always)] + pub const fn cfgreset(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_cfgreset(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Cfgreset { + #[inline(always)] + fn default() -> Cfgreset { + Cfgreset(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Clocks(pub u32); +impl Clocks { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, CLOCKS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, CLOCKS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, CLOCKS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, CLOCKS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, CLOCKS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, CLOCKS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, CLOCKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, CLOCKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, CLOCKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, CLOCKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, CLOCKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, CLOCKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, CLOCKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, CLOCKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Clocks { + #[inline(always)] + fn default() -> Clocks { + Clocks(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct CoresightPeriph(pub u32); +impl CoresightPeriph { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, CORESIGHT_PERIPH can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, CORESIGHT_PERIPH can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_PERIPH can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for CoresightPeriph { + #[inline(always)] + fn default() -> CoresightPeriph { + CoresightPeriph(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct CoresightTrace(pub u32); +impl CoresightTrace { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, CORESIGHT_TRACE can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, CORESIGHT_TRACE can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, CORESIGHT_TRACE can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for CoresightTrace { + #[inline(always)] + fn default() -> CoresightTrace { + CoresightTrace(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dma(pub u32); +impl Dma { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, DMA can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, DMA can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, DMA can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, DMA can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, DMA can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, DMA can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, DMA can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, DMA can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, DMA can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, DMA can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, DMA can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, DMA can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, DMA can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, DMA can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Dma { + #[inline(always)] + fn default() -> Dma { + Dma(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ForceCoreNs(pub u32); +impl ForceCoreNs { + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for ForceCoreNs { + #[inline(always)] + fn default() -> ForceCoreNs { + ForceCoreNs(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct GpioNsmask1(pub u32); +impl GpioNsmask1 { + #[inline(always)] + pub const fn gpio(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_gpio(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[inline(always)] + pub const fn usb_dp(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usb_dp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn usb_dm(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usb_dm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn qspi_sck(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_qspi_sck(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn qspi_csn(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_qspi_csn(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn qspi_sd(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_qspi_sd(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val as u32) & 0x0f) << 28usize); + } +} +impl Default for GpioNsmask1 { + #[inline(always)] + fn default() -> GpioNsmask1 { + GpioNsmask1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Hstx(pub u32); +impl Hstx { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, HSTX can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, HSTX can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, HSTX can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, HSTX can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, HSTX can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, HSTX can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, HSTX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, HSTX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, HSTX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, HSTX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, HSTX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, HSTX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, HSTX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, HSTX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Hstx { + #[inline(always)] + fn default() -> Hstx { + Hstx(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct I2c0(pub u32); +impl I2c0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, I2C0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, I2C0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, I2C0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, I2C0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, I2C0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, I2C0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, I2C0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, I2C0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for I2c0 { + #[inline(always)] + fn default() -> I2c0 { + I2c0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct I2c1(pub u32); +impl I2c1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, I2C1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, I2C1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, I2C1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, I2C1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, I2C1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, I2C1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, I2C1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, I2C1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, I2C1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for I2c1 { + #[inline(always)] + fn default() -> I2c1 { + I2c1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IoBank0(pub u32); +impl IoBank0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, IO_BANK0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, IO_BANK0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, IO_BANK0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, IO_BANK0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, IO_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, IO_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, IO_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, IO_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for IoBank0 { + #[inline(always)] + fn default() -> IoBank0 { + IoBank0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IoBank1(pub u32); +impl IoBank1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, IO_BANK1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, IO_BANK1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, IO_BANK1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, IO_BANK1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, IO_BANK1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, IO_BANK1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, IO_BANK1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, IO_BANK1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, IO_BANK1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for IoBank1 { + #[inline(always)] + fn default() -> IoBank1 { + IoBank1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Lock(pub u32); +impl Lock { + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn debug(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_debug(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Lock { + #[inline(always)] + fn default() -> Lock { + Lock(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Otp(pub u32); +impl Otp { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, OTP can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, OTP can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, OTP can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, OTP can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, OTP can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, OTP can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, OTP can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, OTP can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, OTP can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, OTP can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, OTP can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, OTP can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, OTP can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, OTP can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Otp { + #[inline(always)] + fn default() -> Otp { + Otp(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PadsBank0(pub u32); +impl PadsBank0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PADS_BANK0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_BANK0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PADS_BANK0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PADS_BANK0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PADS_BANK0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_BANK0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PADS_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PADS_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PADS_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PADS_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for PadsBank0 { + #[inline(always)] + fn default() -> PadsBank0 { + PadsBank0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PadsQspi(pub u32); +impl PadsQspi { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PADS_QSPI can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_QSPI can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PADS_QSPI can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PADS_QSPI can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PADS_QSPI can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_QSPI can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PADS_QSPI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_QSPI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PADS_QSPI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_QSPI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PADS_QSPI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_QSPI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PADS_QSPI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PADS_QSPI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for PadsQspi { + #[inline(always)] + fn default() -> PadsQspi { + PadsQspi(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pio0(pub u32); +impl Pio0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PIO0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PIO0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PIO0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PIO0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PIO0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PIO0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PIO0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PIO0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Pio0 { + #[inline(always)] + fn default() -> Pio0 { + Pio0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pio1(pub u32); +impl Pio1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PIO1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PIO1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PIO1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PIO1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PIO1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PIO1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PIO1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PIO1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Pio1 { + #[inline(always)] + fn default() -> Pio1 { + Pio1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pio2(pub u32); +impl Pio2 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PIO2 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO2 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PIO2 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PIO2 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PIO2 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO2 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PIO2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PIO2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PIO2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PIO2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PIO2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Pio2 { + #[inline(always)] + fn default() -> Pio2 { + Pio2(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PllSys(pub u32); +impl PllSys { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PLL_SYS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_SYS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PLL_SYS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PLL_SYS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PLL_SYS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_SYS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PLL_SYS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_SYS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PLL_SYS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_SYS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PLL_SYS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_SYS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PLL_SYS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_SYS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for PllSys { + #[inline(always)] + fn default() -> PllSys { + PllSys(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PllUsb(pub u32); +impl PllUsb { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PLL_USB can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_USB can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PLL_USB can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PLL_USB can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PLL_USB can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_USB can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PLL_USB can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_USB can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PLL_USB can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_USB can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PLL_USB can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_USB can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PLL_USB can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PLL_USB can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for PllUsb { + #[inline(always)] + fn default() -> PllUsb { + PllUsb(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Powman(pub u32); +impl Powman { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, POWMAN can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, POWMAN can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, POWMAN can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, POWMAN can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, POWMAN can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, POWMAN can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, POWMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, POWMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, POWMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, POWMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, POWMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, POWMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, POWMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, POWMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Powman { + #[inline(always)] + fn default() -> Powman { + Powman(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwm(pub u32); +impl Pwm { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, PWM can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, PWM can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, PWM can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, PWM can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, PWM can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, PWM can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, PWM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, PWM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, PWM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, PWM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, PWM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, PWM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, PWM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, PWM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Pwm { + #[inline(always)] + fn default() -> Pwm { + Pwm(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Resets(pub u32); +impl Resets { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, RESETS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, RESETS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, RESETS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, RESETS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, RESETS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, RESETS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, RESETS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, RESETS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, RESETS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, RESETS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, RESETS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, RESETS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, RESETS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, RESETS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Resets { + #[inline(always)] + fn default() -> Resets { + Resets(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Rom(pub u32); +impl Rom { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, ROM can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROM can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, ROM can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, ROM can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, ROM can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROM can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, ROM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, ROM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, ROM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, ROM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Rom { + #[inline(always)] + fn default() -> Rom { + Rom(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Rosc(pub u32); +impl Rosc { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, ROSC can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROSC can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, ROSC can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, ROSC can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, ROSC can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROSC can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, ROSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, ROSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, ROSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, ROSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, ROSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Rosc { + #[inline(always)] + fn default() -> Rosc { + Rosc(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Rsm(pub u32); +impl Rsm { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, RSM can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, RSM can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, RSM can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, RSM can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, RSM can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, RSM can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, RSM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, RSM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, RSM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, RSM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, RSM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, RSM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, RSM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, RSM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Rsm { + #[inline(always)] + fn default() -> Rsm { + Rsm(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sha256(pub u32); +impl Sha256 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SHA256 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SHA256 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SHA256 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SHA256 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SHA256 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SHA256 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SHA256 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SHA256 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SHA256 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SHA256 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SHA256 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SHA256 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SHA256 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SHA256 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sha256 { + #[inline(always)] + fn default() -> Sha256 { + Sha256(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Spi0(pub u32); +impl Spi0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SPI0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SPI0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SPI0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SPI0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SPI0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SPI0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SPI0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SPI0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Spi0 { + #[inline(always)] + fn default() -> Spi0 { + Spi0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Spi1(pub u32); +impl Spi1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SPI1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SPI1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SPI1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SPI1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SPI1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SPI1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SPI1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SPI1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SPI1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Spi1 { + #[inline(always)] + fn default() -> Spi1 { + Spi1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram0(pub u32); +impl Sram0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram0 { + #[inline(always)] + fn default() -> Sram0 { + Sram0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram1(pub u32); +impl Sram1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram1 { + #[inline(always)] + fn default() -> Sram1 { + Sram1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram2(pub u32); +impl Sram2 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM2 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM2 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM2 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM2 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM2 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM2 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram2 { + #[inline(always)] + fn default() -> Sram2 { + Sram2(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram3(pub u32); +impl Sram3 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM3 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM3 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM3 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM3 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM3 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM3 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM3 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM3 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM3 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM3 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM3 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM3 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM3 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM3 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram3 { + #[inline(always)] + fn default() -> Sram3 { + Sram3(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram4(pub u32); +impl Sram4 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM4 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM4 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM4 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM4 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM4 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM4 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM4 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM4 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM4 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM4 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM4 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM4 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM4 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM4 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram4 { + #[inline(always)] + fn default() -> Sram4 { + Sram4(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram5(pub u32); +impl Sram5 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM5 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM5 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM5 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM5 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM5 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM5 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM5 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM5 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM5 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM5 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM5 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM5 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM5 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM5 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram5 { + #[inline(always)] + fn default() -> Sram5 { + Sram5(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram6(pub u32); +impl Sram6 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM6 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM6 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM6 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM6 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM6 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM6 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM6 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM6 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM6 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM6 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM6 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM6 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM6 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM6 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram6 { + #[inline(always)] + fn default() -> Sram6 { + Sram6(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram7(pub u32); +impl Sram7 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM7 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM7 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM7 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM7 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM7 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM7 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM7 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM7 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM7 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM7 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM7 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM7 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM7 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM7 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram7 { + #[inline(always)] + fn default() -> Sram7 { + Sram7(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram8(pub u32); +impl Sram8 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM8 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM8 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM8 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM8 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM8 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM8 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM8 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM8 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM8 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM8 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM8 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM8 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM8 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM8 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram8 { + #[inline(always)] + fn default() -> Sram8 { + Sram8(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sram9(pub u32); +impl Sram9 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SRAM9 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM9 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SRAM9 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SRAM9 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SRAM9 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM9 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SRAM9 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM9 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SRAM9 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM9 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SRAM9 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM9 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SRAM9 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SRAM9 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sram9 { + #[inline(always)] + fn default() -> Sram9 { + Sram9(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Syscfg(pub u32); +impl Syscfg { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SYSCFG can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSCFG can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SYSCFG can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SYSCFG can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SYSCFG can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSCFG can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SYSCFG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSCFG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SYSCFG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSCFG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SYSCFG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSCFG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SYSCFG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSCFG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Syscfg { + #[inline(always)] + fn default() -> Syscfg { + Syscfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sysinfo(pub u32); +impl Sysinfo { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, SYSINFO can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSINFO can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, SYSINFO can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, SYSINFO can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, SYSINFO can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSINFO can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, SYSINFO can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSINFO can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, SYSINFO can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSINFO can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, SYSINFO can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSINFO can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, SYSINFO can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, SYSINFO can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Sysinfo { + #[inline(always)] + fn default() -> Sysinfo { + Sysinfo(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Tbman(pub u32); +impl Tbman { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, TBMAN can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, TBMAN can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, TBMAN can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, TBMAN can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, TBMAN can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, TBMAN can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, TBMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, TBMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, TBMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, TBMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, TBMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, TBMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, TBMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, TBMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Tbman { + #[inline(always)] + fn default() -> Tbman { + Tbman(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ticks(pub u32); +impl Ticks { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, TICKS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, TICKS can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, TICKS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, TICKS can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, TICKS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, TICKS can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, TICKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, TICKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, TICKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, TICKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, TICKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, TICKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, TICKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, TICKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Ticks { + #[inline(always)] + fn default() -> Ticks { + Ticks(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer0(pub u32); +impl Timer0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, TIMER0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, TIMER0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, TIMER0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, TIMER0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, TIMER0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, TIMER0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, TIMER0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, TIMER0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Timer0 { + #[inline(always)] + fn default() -> Timer0 { + Timer0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer1(pub u32); +impl Timer1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, TIMER1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, TIMER1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, TIMER1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, TIMER1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, TIMER1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, TIMER1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, TIMER1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, TIMER1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, TIMER1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Timer1 { + #[inline(always)] + fn default() -> Timer1 { + Timer1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Trng(pub u32); +impl Trng { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, TRNG can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, TRNG can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, TRNG can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, TRNG can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, TRNG can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, TRNG can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, TRNG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, TRNG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, TRNG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, TRNG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, TRNG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, TRNG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, TRNG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, TRNG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Trng { + #[inline(always)] + fn default() -> Trng { + Trng(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uart0(pub u32); +impl Uart0 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, UART0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART0 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, UART0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, UART0 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, UART0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART0 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, UART0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, UART0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, UART0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, UART0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Uart0 { + #[inline(always)] + fn default() -> Uart0 { + Uart0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uart1(pub u32); +impl Uart1 { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, UART1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART1 can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, UART1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, UART1 can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, UART1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART1 can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, UART1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, UART1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, UART1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, UART1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, UART1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Uart1 { + #[inline(always)] + fn default() -> Uart1 { + Uart1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Usbctrl(pub u32); +impl Usbctrl { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, USBCTRL can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, USBCTRL can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, USBCTRL can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, USBCTRL can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, USBCTRL can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, USBCTRL can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, USBCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, USBCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, USBCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, USBCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, USBCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, USBCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, USBCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, USBCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Usbctrl { + #[inline(always)] + fn default() -> Usbctrl { + Usbctrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Watchdog(pub u32); +impl Watchdog { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, WATCHDOG can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, WATCHDOG can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, WATCHDOG can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, WATCHDOG can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, WATCHDOG can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, WATCHDOG can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, WATCHDOG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, WATCHDOG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, WATCHDOG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, WATCHDOG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, WATCHDOG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, WATCHDOG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, WATCHDOG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, WATCHDOG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Watchdog { + #[inline(always)] + fn default() -> Watchdog { + Watchdog(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XipAux(pub u32); +impl XipAux { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, XIP_AUX can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_AUX can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, XIP_AUX can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, XIP_AUX can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, XIP_AUX can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_AUX can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, XIP_AUX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_AUX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, XIP_AUX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_AUX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, XIP_AUX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_AUX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, XIP_AUX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_AUX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for XipAux { + #[inline(always)] + fn default() -> XipAux { + XipAux(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XipCtrl(pub u32); +impl XipCtrl { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, XIP_CTRL can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_CTRL can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, XIP_CTRL can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, XIP_CTRL can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, XIP_CTRL can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_CTRL can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, XIP_CTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_CTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, XIP_CTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_CTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, XIP_CTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_CTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, XIP_CTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_CTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for XipCtrl { + #[inline(always)] + fn default() -> XipCtrl { + XipCtrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XipMain(pub u32); +impl XipMain { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, XIP_MAIN can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_MAIN can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, XIP_MAIN can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, XIP_MAIN can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, XIP_MAIN can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_MAIN can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, XIP_MAIN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_MAIN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, XIP_MAIN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_MAIN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, XIP_MAIN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_MAIN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, XIP_MAIN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_MAIN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for XipMain { + #[inline(always)] + fn default() -> XipMain { + XipMain(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XipQmi(pub u32); +impl XipQmi { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, XIP_QMI can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_QMI can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, XIP_QMI can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, XIP_QMI can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, XIP_QMI can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_QMI can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, XIP_QMI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_QMI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, XIP_QMI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_QMI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, XIP_QMI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_QMI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, XIP_QMI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, XIP_QMI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for XipQmi { + #[inline(always)] + fn default() -> XipQmi { + XipQmi(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Xosc(pub u32); +impl Xosc { + #[doc = "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."] + #[inline(always)] + pub const fn nsu(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nsu(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, XOSC can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub const fn nsp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, XOSC can be accessed from a Non-secure, Privileged context."] + #[inline(always)] + pub fn set_nsp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, and SP is also set, XOSC can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub const fn su(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, and SP is also set, XOSC can be accessed from a Secure, Unprivileged context."] + #[inline(always)] + pub fn set_su(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, XOSC can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub const fn sp(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, XOSC can be accessed from a Secure, Privileged context."] + #[inline(always)] + pub fn set_sp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "If 1, XOSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "If 1, XOSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, XOSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn core1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, XOSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "If 1, XOSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "If 1, XOSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, XOSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub const fn dbg(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, XOSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register."] + #[inline(always)] + pub fn set_dbg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for Xosc { + #[inline(always)] + fn default() -> Xosc { + Xosc(0) + } +} diff --git a/src/rp2350/adc.rs b/src/rp2350/adc.rs new file mode 100644 index 00000000..1027f21b --- /dev/null +++ b/src/rp2350/adc.rs @@ -0,0 +1,63 @@ +#[doc = "Control and data interface to SAR ADC"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Adc { + ptr: *mut u8, +} +unsafe impl Send for Adc {} +unsafe impl Sync for Adc {} +impl Adc { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "ADC Control and Status"] + #[inline(always)] + pub const fn cs(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Result of most recent ADC conversion"] + #[inline(always)] + pub const fn result(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "FIFO control and status"] + #[inline(always)] + pub const fn fcs(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Conversion result FIFO"] + #[inline(always)] + pub const fn fifo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/adc/regs.rs b/src/rp2350/adc/regs.rs new file mode 100644 index 00000000..0cf02134 --- /dev/null +++ b/src/rp2350/adc/regs.rs @@ -0,0 +1,339 @@ +#[doc = "ADC Control and Status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Cs(pub u32); +impl Cs { + #[doc = "Power on ADC and enable its clock. 1 - enabled. 0 - disabled."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Power on ADC and enable its clock. 1 - enabled. 0 - disabled."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Power on temperature sensor. 1 - enabled. 0 - disabled."] + #[inline(always)] + pub const fn ts_en(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Power on temperature sensor. 1 - enabled. 0 - disabled."] + #[inline(always)] + pub fn set_ts_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Start a single conversion. Self-clearing. Ignored if start_many is asserted."] + #[inline(always)] + pub const fn start_once(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Start a single conversion. Self-clearing. Ignored if start_many is asserted."] + #[inline(always)] + pub fn set_start_once(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes."] + #[inline(always)] + pub const fn start_many(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes."] + #[inline(always)] + pub fn set_start_many(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress."] + #[inline(always)] + pub const fn ready(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. 0 whilst conversion in progress."] + #[inline(always)] + pub fn set_ready(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "The most recent ADC conversion encountered an error; result is undefined or noisy."] + #[inline(always)] + pub const fn err(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "The most recent ADC conversion encountered an error; result is undefined or noisy."] + #[inline(always)] + pub fn set_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Some past ADC conversion encountered an error. Write 1 to clear."] + #[inline(always)] + pub const fn err_sticky(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Some past ADC conversion encountered an error. Write 1 to clear."] + #[inline(always)] + pub fn set_err_sticky(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn ainsel(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x0f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_ainsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 12usize)) | (((val as u32) & 0x0f) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rrobin(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x01ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rrobin(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 16usize)) | (((val as u32) & 0x01ff) << 16usize); + } +} +impl Default for Cs { + #[inline(always)] + fn default() -> Cs { + Cs(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Div(pub u32); +impl Div { + #[doc = "Fractional part of clock divisor. First-order delta-sigma."] + #[inline(always)] + pub const fn frac(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "Fractional part of clock divisor. First-order delta-sigma."] + #[inline(always)] + pub fn set_frac(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "Integer part of clock divisor."] + #[inline(always)] + pub const fn int(&self) -> u16 { + let val = (self.0 >> 8usize) & 0xffff; + val as u16 + } + #[doc = "Integer part of clock divisor."] + #[inline(always)] + pub fn set_int(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 8usize)) | (((val as u32) & 0xffff) << 8usize); + } +} +impl Default for Div { + #[inline(always)] + fn default() -> Div { + Div(0) + } +} +#[doc = "FIFO control and status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fcs(pub u32); +impl Fcs { + #[doc = "If 1: write result to the FIFO after each conversion."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "If 1: write result to the FIFO after each conversion."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers."] + #[inline(always)] + pub const fn shift(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers."] + #[inline(always)] + pub fn set_shift(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1: conversion error bit appears in the FIFO alongside the result"] + #[inline(always)] + pub const fn err(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1: conversion error bit appears in the FIFO alongside the result"] + #[inline(always)] + pub fn set_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1: assert DMA requests when FIFO contains data"] + #[inline(always)] + pub const fn dreq_en(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1: assert DMA requests when FIFO contains data"] + #[inline(always)] + pub fn set_dreq_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn empty(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_empty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn full(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_full(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "1 if the FIFO has been underflowed. Write 1 to clear."] + #[inline(always)] + pub const fn under(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "1 if the FIFO has been underflowed. Write 1 to clear."] + #[inline(always)] + pub fn set_under(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "1 if the FIFO has been overflowed. Write 1 to clear."] + #[inline(always)] + pub const fn over(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "1 if the FIFO has been overflowed. Write 1 to clear."] + #[inline(always)] + pub fn set_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "The number of conversion results currently waiting in the FIFO"] + #[inline(always)] + pub const fn level(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "The number of conversion results currently waiting in the FIFO"] + #[inline(always)] + pub fn set_level(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } + #[doc = "DREQ/IRQ asserted when level >= threshold"] + #[inline(always)] + pub const fn thresh(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x0f; + val as u8 + } + #[doc = "DREQ/IRQ asserted when level >= threshold"] + #[inline(always)] + pub fn set_thresh(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize); + } +} +impl Default for Fcs { + #[inline(always)] + fn default() -> Fcs { + Fcs(0) + } +} +#[doc = "Conversion result FIFO"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fifo(pub u32); +impl Fifo { + #[inline(always)] + pub const fn val(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[inline(always)] + pub fn set_val(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted."] + #[inline(always)] + pub const fn err(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted."] + #[inline(always)] + pub fn set_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for Fifo { + #[inline(always)] + fn default() -> Fifo { + Fifo(0) + } +} +#[doc = "Interrupt Enable"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Int(pub u32); +impl Int { + #[doc = "Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."] + #[inline(always)] + pub const fn fifo(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Triggered when the sample FIFO reaches a certain level. This level can be programmed via the FCS_THRESH field."] + #[inline(always)] + pub fn set_fifo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Int { + #[inline(always)] + fn default() -> Int { + Int(0) + } +} +#[doc = "Result of most recent ADC conversion"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Result(pub u32); +impl Result { + #[inline(always)] + pub const fn result(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[inline(always)] + pub fn set_result(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } +} +impl Default for Result { + #[inline(always)] + fn default() -> Result { + Result(0) + } +} diff --git a/src/rp2350/bootram.rs b/src/rp2350/bootram.rs new file mode 100644 index 00000000..814cd79e --- /dev/null +++ b/src/rp2350/bootram.rs @@ -0,0 +1,73 @@ +#[doc = "Additional registers mapped adjacent to the bootram, for use by the bootrom."] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootram { + ptr: *mut u8, +} +unsafe impl Send for Bootram {} +unsafe impl Sync for Bootram {} +impl Bootram { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "This registers always ORs writes into its current contents. Once a bit is set, it can only be cleared by a reset."] + #[inline(always)] + pub const fn write_once0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2048usize) as _) } + } + #[doc = "This registers always ORs writes into its current contents. Once a bit is set, it can only be cleared by a reset."] + #[inline(always)] + pub const fn write_once1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2052usize) as _) } + } + #[doc = "Bootlock status register. 1=unclaimed, 0=claimed. These locks function identically to the SIO spinlocks, but are reserved for bootrom use."] + #[inline(always)] + pub const fn bootlock_stat(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2056usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2060usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2064usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2068usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2072usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2076usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2080usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2084usize) as _) } + } + #[doc = "Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero."] + #[inline(always)] + pub const fn bootlock7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2088usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/bootram/regs.rs b/src/rp2350/bootram/regs.rs new file mode 100644 index 00000000..590f7eb7 --- /dev/null +++ b/src/rp2350/bootram/regs.rs @@ -0,0 +1,21 @@ +#[doc = "Bootlock status register. 1=unclaimed, 0=claimed. These locks function identically to the SIO spinlocks, but are reserved for bootrom use."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootlockStat(pub u32); +impl BootlockStat { + #[inline(always)] + pub const fn bootlock_stat(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_bootlock_stat(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for BootlockStat { + #[inline(always)] + fn default() -> BootlockStat { + BootlockStat(0) + } +} diff --git a/src/rp2350/busctrl.rs b/src/rp2350/busctrl.rs new file mode 100644 index 00000000..851d4575 --- /dev/null +++ b/src/rp2350/busctrl.rs @@ -0,0 +1,48 @@ +#[doc = "Register block for busfabric control signals and performance counters"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Busctrl { + ptr: *mut u8, +} +unsafe impl Send for Busctrl {} +unsafe impl Sync for Busctrl {} +impl Busctrl { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Set the priority of each master for bus arbitration."] + #[inline(always)] + pub const fn bus_priority(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Bus priority acknowledge"] + #[inline(always)] + pub const fn bus_priority_ack( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn perfctr_en(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Bus fabric performance counter 0"] + #[inline(always)] + pub const fn perfctr(self, n: usize) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize + n * 8usize) as _) } + } + #[doc = "Bus fabric performance event select for PERFCTR0"] + #[inline(always)] + pub const fn perfsel(self, n: usize) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize + n * 8usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/busctrl/regs.rs b/src/rp2350/busctrl/regs.rs new file mode 100644 index 00000000..bc2801bd --- /dev/null +++ b/src/rp2350/busctrl/regs.rs @@ -0,0 +1,146 @@ +#[doc = "Set the priority of each master for bus arbitration."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BusPriority(pub u32); +impl BusPriority { + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub const fn dma_r(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub fn set_dma_r(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub const fn dma_w(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "0 - low priority, 1 - high priority"] + #[inline(always)] + pub fn set_dma_w(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for BusPriority { + #[inline(always)] + fn default() -> BusPriority { + BusPriority(0) + } +} +#[doc = "Bus priority acknowledge"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BusPriorityAck(pub u32); +impl BusPriorityAck { + #[doc = "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."] + #[inline(always)] + pub const fn bus_priority_ack(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_bus_priority_ack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for BusPriorityAck { + #[inline(always)] + fn default() -> BusPriorityAck { + BusPriorityAck(0) + } +} +#[doc = "Bus fabric performance counter 1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Perfctr(pub u32); +impl Perfctr { + #[doc = "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"] + #[inline(always)] + pub const fn perfctr(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[doc = "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"] + #[inline(always)] + pub fn set_perfctr(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Perfctr { + #[inline(always)] + fn default() -> Perfctr { + Perfctr(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PerfctrEn(pub u32); +impl PerfctrEn { + #[inline(always)] + pub const fn perfctr_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_perfctr_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for PerfctrEn { + #[inline(always)] + fn default() -> PerfctrEn { + PerfctrEn(0) + } +} +#[doc = "Bus fabric performance event select for PERFCTR0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Perfsel(pub u32); +impl Perfsel { + #[doc = "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."] + #[inline(always)] + pub const fn perfsel(&self) -> super::vals::Perfsel { + let val = (self.0 >> 0usize) & 0x7f; + super::vals::Perfsel::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_perfsel(&mut self, val: super::vals::Perfsel) { + self.0 = (self.0 & !(0x7f << 0usize)) | (((val.to_bits() as u32) & 0x7f) << 0usize); + } +} +impl Default for Perfsel { + #[inline(always)] + fn default() -> Perfsel { + Perfsel(0) + } +} diff --git a/src/rp2350/busctrl/vals.rs b/src/rp2350/busctrl/vals.rs new file mode 100644 index 00000000..ea550a97 --- /dev/null +++ b/src/rp2350/busctrl/vals.rs @@ -0,0 +1,154 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Perfsel { + SIOB_PROC1_STALL_UPSTREAM = 0, + SIOB_PROC1_STALL_DOWNSTREAM = 0x01, + SIOB_PROC1_ACCESS_CONTESTED = 0x02, + SIOB_PROC1_ACCESS = 0x03, + SIOB_PROC0_STALL_UPSTREAM = 0x04, + SIOB_PROC0_STALL_DOWNSTREAM = 0x05, + SIOB_PROC0_ACCESS_CONTESTED = 0x06, + SIOB_PROC0_ACCESS = 0x07, + APB_STALL_UPSTREAM = 0x08, + APB_STALL_DOWNSTREAM = 0x09, + APB_ACCESS_CONTESTED = 0x0a, + APB_ACCESS = 0x0b, + FASTPERI_STALL_UPSTREAM = 0x0c, + FASTPERI_STALL_DOWNSTREAM = 0x0d, + FASTPERI_ACCESS_CONTESTED = 0x0e, + FASTPERI_ACCESS = 0x0f, + SRAM9_STALL_UPSTREAM = 0x10, + SRAM9_STALL_DOWNSTREAM = 0x11, + SRAM9_ACCESS_CONTESTED = 0x12, + SRAM9_ACCESS = 0x13, + SRAM8_STALL_UPSTREAM = 0x14, + SRAM8_STALL_DOWNSTREAM = 0x15, + SRAM8_ACCESS_CONTESTED = 0x16, + SRAM8_ACCESS = 0x17, + SRAM7_STALL_UPSTREAM = 0x18, + SRAM7_STALL_DOWNSTREAM = 0x19, + SRAM7_ACCESS_CONTESTED = 0x1a, + SRAM7_ACCESS = 0x1b, + SRAM6_STALL_UPSTREAM = 0x1c, + SRAM6_STALL_DOWNSTREAM = 0x1d, + SRAM6_ACCESS_CONTESTED = 0x1e, + SRAM6_ACCESS = 0x1f, + SRAM5_STALL_UPSTREAM = 0x20, + SRAM5_STALL_DOWNSTREAM = 0x21, + SRAM5_ACCESS_CONTESTED = 0x22, + SRAM5_ACCESS = 0x23, + SRAM4_STALL_UPSTREAM = 0x24, + SRAM4_STALL_DOWNSTREAM = 0x25, + SRAM4_ACCESS_CONTESTED = 0x26, + SRAM4_ACCESS = 0x27, + SRAM3_STALL_UPSTREAM = 0x28, + SRAM3_STALL_DOWNSTREAM = 0x29, + SRAM3_ACCESS_CONTESTED = 0x2a, + SRAM3_ACCESS = 0x2b, + SRAM2_STALL_UPSTREAM = 0x2c, + SRAM2_STALL_DOWNSTREAM = 0x2d, + SRAM2_ACCESS_CONTESTED = 0x2e, + SRAM2_ACCESS = 0x2f, + SRAM1_STALL_UPSTREAM = 0x30, + SRAM1_STALL_DOWNSTREAM = 0x31, + SRAM1_ACCESS_CONTESTED = 0x32, + SRAM1_ACCESS = 0x33, + SRAM0_STALL_UPSTREAM = 0x34, + SRAM0_STALL_DOWNSTREAM = 0x35, + SRAM0_ACCESS_CONTESTED = 0x36, + SRAM0_ACCESS = 0x37, + XIP_MAIN1_STALL_UPSTREAM = 0x38, + XIP_MAIN1_STALL_DOWNSTREAM = 0x39, + XIP_MAIN1_ACCESS_CONTESTED = 0x3a, + XIP_MAIN1_ACCESS = 0x3b, + XIP_MAIN0_STALL_UPSTREAM = 0x3c, + XIP_MAIN0_STALL_DOWNSTREAM = 0x3d, + XIP_MAIN0_ACCESS_CONTESTED = 0x3e, + XIP_MAIN0_ACCESS = 0x3f, + ROM_STALL_UPSTREAM = 0x40, + ROM_STALL_DOWNSTREAM = 0x41, + ROM_ACCESS_CONTESTED = 0x42, + ROM_ACCESS = 0x43, + _RESERVED_44 = 0x44, + _RESERVED_45 = 0x45, + _RESERVED_46 = 0x46, + _RESERVED_47 = 0x47, + _RESERVED_48 = 0x48, + _RESERVED_49 = 0x49, + _RESERVED_4a = 0x4a, + _RESERVED_4b = 0x4b, + _RESERVED_4c = 0x4c, + _RESERVED_4d = 0x4d, + _RESERVED_4e = 0x4e, + _RESERVED_4f = 0x4f, + _RESERVED_50 = 0x50, + _RESERVED_51 = 0x51, + _RESERVED_52 = 0x52, + _RESERVED_53 = 0x53, + _RESERVED_54 = 0x54, + _RESERVED_55 = 0x55, + _RESERVED_56 = 0x56, + _RESERVED_57 = 0x57, + _RESERVED_58 = 0x58, + _RESERVED_59 = 0x59, + _RESERVED_5a = 0x5a, + _RESERVED_5b = 0x5b, + _RESERVED_5c = 0x5c, + _RESERVED_5d = 0x5d, + _RESERVED_5e = 0x5e, + _RESERVED_5f = 0x5f, + _RESERVED_60 = 0x60, + _RESERVED_61 = 0x61, + _RESERVED_62 = 0x62, + _RESERVED_63 = 0x63, + _RESERVED_64 = 0x64, + _RESERVED_65 = 0x65, + _RESERVED_66 = 0x66, + _RESERVED_67 = 0x67, + _RESERVED_68 = 0x68, + _RESERVED_69 = 0x69, + _RESERVED_6a = 0x6a, + _RESERVED_6b = 0x6b, + _RESERVED_6c = 0x6c, + _RESERVED_6d = 0x6d, + _RESERVED_6e = 0x6e, + _RESERVED_6f = 0x6f, + _RESERVED_70 = 0x70, + _RESERVED_71 = 0x71, + _RESERVED_72 = 0x72, + _RESERVED_73 = 0x73, + _RESERVED_74 = 0x74, + _RESERVED_75 = 0x75, + _RESERVED_76 = 0x76, + _RESERVED_77 = 0x77, + _RESERVED_78 = 0x78, + _RESERVED_79 = 0x79, + _RESERVED_7a = 0x7a, + _RESERVED_7b = 0x7b, + _RESERVED_7c = 0x7c, + _RESERVED_7d = 0x7d, + _RESERVED_7e = 0x7e, + _RESERVED_7f = 0x7f, +} +impl Perfsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Perfsel { + unsafe { core::mem::transmute(val & 0x7f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Perfsel { + #[inline(always)] + fn from(val: u8) -> Perfsel { + Perfsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Perfsel) -> u8 { + Perfsel::to_bits(val) + } +} diff --git a/src/rp2350/clocks.rs b/src/rp2350/clocks.rs new file mode 100644 index 00000000..7a6b4841 --- /dev/null +++ b/src/rp2350/clocks.rs @@ -0,0 +1,260 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Clocks { + ptr: *mut u8, +} +unsafe impl Send for Clocks {} +unsafe impl Sync for Clocks {} +impl Clocks { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_gpout_ctrl( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize + n * 12usize) as _) } + } + #[inline(always)] + pub const fn clk_gpout_div( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize + n * 12usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_gpout_selected( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize + n * 12usize) as _) } + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_ref_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[inline(always)] + pub const fn clk_ref_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_ref_selected( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_sys_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[inline(always)] + pub const fn clk_sys_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_sys_selected( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_peri_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[inline(always)] + pub const fn clk_peri_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_peri_selected( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_hstx_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(84usize) as _) } + } + #[inline(always)] + pub const fn clk_hstx_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_hstx_selected( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_usb_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[inline(always)] + pub const fn clk_usb_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_usb_selected( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } + } + #[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] + #[inline(always)] + pub const fn clk_adc_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[inline(always)] + pub const fn clk_adc_div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } + } + #[doc = "Indicates which src is currently selected (one-hot)"] + #[inline(always)] + pub const fn clk_adc_selected( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } + } + #[inline(always)] + pub const fn dftclk_xosc_ctrl( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } + } + #[inline(always)] + pub const fn dftclk_rosc_ctrl( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } + } + #[inline(always)] + pub const fn dftclk_lposc_ctrl( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } + } + #[inline(always)] + pub const fn clk_sys_resus_ctrl( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } + } + #[inline(always)] + pub const fn clk_sys_resus_status( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(136usize) as _) } + } + #[doc = "Reference clock frequency in kHz"] + #[inline(always)] + pub const fn fc0_ref_khz(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(140usize) as _) } + } + #[doc = "Minimum pass frequency in kHz. This is optional. Set to 0 if you are not using the pass/fail flags"] + #[inline(always)] + pub const fn fc0_min_khz(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(144usize) as _) } + } + #[doc = "Maximum pass frequency in kHz. This is optional. Set to 0x1ffffff if you are not using the pass/fail flags"] + #[inline(always)] + pub const fn fc0_max_khz(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(148usize) as _) } + } + #[doc = "Delays the start of frequency counting to allow the mux to settle Delay is measured in multiples of the reference clock period"] + #[inline(always)] + pub const fn fc0_delay(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(152usize) as _) } + } + #[doc = "The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval The default gives a test interval of 250us"] + #[inline(always)] + pub const fn fc0_interval(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(156usize) as _) } + } + #[doc = "Clock sent to frequency counter, set to 0 when not required Writing to this register initiates the frequency count"] + #[inline(always)] + pub const fn fc0_src(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(160usize) as _) } + } + #[doc = "Frequency counter status"] + #[inline(always)] + pub const fn fc0_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(164usize) as _) } + } + #[doc = "Result of frequency measurement, only valid when status_done=1"] + #[inline(always)] + pub const fn fc0_result(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(168usize) as _) } + } + #[doc = "enable clock in wake mode"] + #[inline(always)] + pub const fn wake_en0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(172usize) as _) } + } + #[doc = "enable clock in wake mode"] + #[inline(always)] + pub const fn wake_en1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(176usize) as _) } + } + #[doc = "enable clock in sleep mode"] + #[inline(always)] + pub const fn sleep_en0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(180usize) as _) } + } + #[doc = "enable clock in sleep mode"] + #[inline(always)] + pub const fn sleep_en1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(184usize) as _) } + } + #[doc = "indicates the state of the clock enable"] + #[inline(always)] + pub const fn enabled0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(188usize) as _) } + } + #[doc = "indicates the state of the clock enable"] + #[inline(always)] + pub const fn enabled1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(192usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(196usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(200usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(204usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(208usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/clocks/regs.rs b/src/rp2350/clocks/regs.rs new file mode 100644 index 00000000..83df4a8d --- /dev/null +++ b/src/rp2350/clocks/regs.rs @@ -0,0 +1,3040 @@ +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkAdcCtrl(pub u32); +impl ClkAdcCtrl { + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkAdcCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x07; + super::vals::ClkAdcCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkAdcCtrlAuxsrc) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val.to_bits() as u32) & 0x07) << 5usize); + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub const fn kill(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub fn set_kill(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub const fn phase(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub fn set_phase(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub const fn nudge(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub fn set_nudge(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for ClkAdcCtrl { + #[inline(always)] + fn default() -> ClkAdcCtrl { + ClkAdcCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkAdcDiv(pub u32); +impl ClkAdcDiv { + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } +} +impl Default for ClkAdcDiv { + #[inline(always)] + fn default() -> ClkAdcDiv { + ClkAdcDiv(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkAdcSelected(pub u32); +impl ClkAdcSelected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_adc_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_adc_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkAdcSelected { + #[inline(always)] + fn default() -> ClkAdcSelected { + ClkAdcSelected(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkGpout0selected(pub u32); +impl ClkGpout0selected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_gpout0_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_gpout0_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkGpout0selected { + #[inline(always)] + fn default() -> ClkGpout0selected { + ClkGpout0selected(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkGpout1selected(pub u32); +impl ClkGpout1selected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_gpout1_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_gpout1_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkGpout1selected { + #[inline(always)] + fn default() -> ClkGpout1selected { + ClkGpout1selected(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkGpout2selected(pub u32); +impl ClkGpout2selected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_gpout2_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_gpout2_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkGpout2selected { + #[inline(always)] + fn default() -> ClkGpout2selected { + ClkGpout2selected(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkGpout3selected(pub u32); +impl ClkGpout3selected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_gpout3_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_gpout3_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkGpout3selected { + #[inline(always)] + fn default() -> ClkGpout3selected { + ClkGpout3selected(0) + } +} +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkGpoutCtrl(pub u32); +impl ClkGpoutCtrl { + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkGpoutCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x0f; + super::vals::ClkGpoutCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkGpoutCtrlAuxsrc) { + self.0 = (self.0 & !(0x0f << 5usize)) | (((val.to_bits() as u32) & 0x0f) << 5usize); + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub const fn kill(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub fn set_kill(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "Enables duty cycle correction for odd divisors, can be changed on-the-fly"] + #[inline(always)] + pub const fn dc50(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Enables duty cycle correction for odd divisors, can be changed on-the-fly"] + #[inline(always)] + pub fn set_dc50(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub const fn phase(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub fn set_phase(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub const fn nudge(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub fn set_nudge(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for ClkGpoutCtrl { + #[inline(always)] + fn default() -> ClkGpoutCtrl { + ClkGpoutCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkGpoutDiv(pub u32); +impl ClkGpoutDiv { + #[doc = "Fractional component of the divisor, can be changed on-the-fly"] + #[inline(always)] + pub const fn frac(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Fractional component of the divisor, can be changed on-the-fly"] + #[inline(always)] + pub fn set_frac(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for ClkGpoutDiv { + #[inline(always)] + fn default() -> ClkGpoutDiv { + ClkGpoutDiv(0) + } +} +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkHstxCtrl(pub u32); +impl ClkHstxCtrl { + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkHstxCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x07; + super::vals::ClkHstxCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkHstxCtrlAuxsrc) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val.to_bits() as u32) & 0x07) << 5usize); + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub const fn kill(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub fn set_kill(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub const fn phase(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub fn set_phase(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub const fn nudge(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub fn set_nudge(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for ClkHstxCtrl { + #[inline(always)] + fn default() -> ClkHstxCtrl { + ClkHstxCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkHstxDiv(pub u32); +impl ClkHstxDiv { + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } +} +impl Default for ClkHstxDiv { + #[inline(always)] + fn default() -> ClkHstxDiv { + ClkHstxDiv(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkHstxSelected(pub u32); +impl ClkHstxSelected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_hstx_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_hstx_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkHstxSelected { + #[inline(always)] + fn default() -> ClkHstxSelected { + ClkHstxSelected(0) + } +} +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkPeriCtrl(pub u32); +impl ClkPeriCtrl { + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkPeriCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x07; + super::vals::ClkPeriCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkPeriCtrlAuxsrc) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val.to_bits() as u32) & 0x07) << 5usize); + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub const fn kill(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub fn set_kill(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for ClkPeriCtrl { + #[inline(always)] + fn default() -> ClkPeriCtrl { + ClkPeriCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkPeriDiv(pub u32); +impl ClkPeriDiv { + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } +} +impl Default for ClkPeriDiv { + #[inline(always)] + fn default() -> ClkPeriDiv { + ClkPeriDiv(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkPeriSelected(pub u32); +impl ClkPeriSelected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_peri_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_peri_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkPeriSelected { + #[inline(always)] + fn default() -> ClkPeriSelected { + ClkPeriSelected(0) + } +} +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkRefCtrl(pub u32); +impl ClkRefCtrl { + #[doc = "Selects the clock source glitchlessly, can be changed on-the-fly"] + #[inline(always)] + pub const fn src(&self) -> super::vals::ClkRefCtrlSrc { + let val = (self.0 >> 0usize) & 0x03; + super::vals::ClkRefCtrlSrc::from_bits(val as u8) + } + #[doc = "Selects the clock source glitchlessly, can be changed on-the-fly"] + #[inline(always)] + pub fn set_src(&mut self, val: super::vals::ClkRefCtrlSrc) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkRefCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x03; + super::vals::ClkRefCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkRefCtrlAuxsrc) { + self.0 = (self.0 & !(0x03 << 5usize)) | (((val.to_bits() as u32) & 0x03) << 5usize); + } +} +impl Default for ClkRefCtrl { + #[inline(always)] + fn default() -> ClkRefCtrl { + ClkRefCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkRefDiv(pub u32); +impl ClkRefDiv { + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for ClkRefDiv { + #[inline(always)] + fn default() -> ClkRefDiv { + ClkRefDiv(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkRefSelected(pub u32); +impl ClkRefSelected { + #[doc = "The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s."] + #[inline(always)] + pub const fn clk_ref_selected(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s."] + #[inline(always)] + pub fn set_clk_ref_selected(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for ClkRefSelected { + #[inline(always)] + fn default() -> ClkRefSelected { + ClkRefSelected(0) + } +} +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkSysCtrl(pub u32); +impl ClkSysCtrl { + #[doc = "Selects the clock source glitchlessly, can be changed on-the-fly"] + #[inline(always)] + pub const fn src(&self) -> super::vals::ClkSysCtrlSrc { + let val = (self.0 >> 0usize) & 0x01; + super::vals::ClkSysCtrlSrc::from_bits(val as u8) + } + #[doc = "Selects the clock source glitchlessly, can be changed on-the-fly"] + #[inline(always)] + pub fn set_src(&mut self, val: super::vals::ClkSysCtrlSrc) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize); + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkSysCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x07; + super::vals::ClkSysCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkSysCtrlAuxsrc) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val.to_bits() as u32) & 0x07) << 5usize); + } +} +impl Default for ClkSysCtrl { + #[inline(always)] + fn default() -> ClkSysCtrl { + ClkSysCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkSysDiv(pub u32); +impl ClkSysDiv { + #[doc = "Fractional component of the divisor, can be changed on-the-fly"] + #[inline(always)] + pub const fn frac(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Fractional component of the divisor, can be changed on-the-fly"] + #[inline(always)] + pub fn set_frac(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for ClkSysDiv { + #[inline(always)] + fn default() -> ClkSysDiv { + ClkSysDiv(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkSysResusCtrl(pub u32); +impl ClkSysResusCtrl { + #[doc = "This is expressed as a number of clk_ref cycles and must be >= 2x clk_ref_freq/min_clk_tst_freq"] + #[inline(always)] + pub const fn timeout(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "This is expressed as a number of clk_ref cycles and must be >= 2x clk_ref_freq/min_clk_tst_freq"] + #[inline(always)] + pub fn set_timeout(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "Enable resus"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Enable resus"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Force a resus, for test purposes only"] + #[inline(always)] + pub const fn frce(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Force a resus, for test purposes only"] + #[inline(always)] + pub fn set_frce(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "For clearing the resus after the fault that triggered it has been corrected"] + #[inline(always)] + pub const fn clear(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "For clearing the resus after the fault that triggered it has been corrected"] + #[inline(always)] + pub fn set_clear(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for ClkSysResusCtrl { + #[inline(always)] + fn default() -> ClkSysResusCtrl { + ClkSysResusCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkSysResusStatus(pub u32); +impl ClkSysResusStatus { + #[doc = "Clock has been resuscitated, correct the error then send ctrl_clear=1"] + #[inline(always)] + pub const fn resussed(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Clock has been resuscitated, correct the error then send ctrl_clear=1"] + #[inline(always)] + pub fn set_resussed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkSysResusStatus { + #[inline(always)] + fn default() -> ClkSysResusStatus { + ClkSysResusStatus(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkSysSelected(pub u32); +impl ClkSysSelected { + #[doc = "The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s."] + #[inline(always)] + pub const fn clk_sys_selected(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s."] + #[inline(always)] + pub fn set_clk_sys_selected(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } +} +impl Default for ClkSysSelected { + #[inline(always)] + fn default() -> ClkSysSelected { + ClkSysSelected(0) + } +} +#[doc = "Clock control, can be changed on-the-fly (except for auxsrc)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkUsbCtrl(pub u32); +impl ClkUsbCtrl { + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub const fn auxsrc(&self) -> super::vals::ClkUsbCtrlAuxsrc { + let val = (self.0 >> 5usize) & 0x07; + super::vals::ClkUsbCtrlAuxsrc::from_bits(val as u8) + } + #[doc = "Selects the auxiliary clock source, will glitch when switching"] + #[inline(always)] + pub fn set_auxsrc(&mut self, val: super::vals::ClkUsbCtrlAuxsrc) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val.to_bits() as u32) & 0x07) << 5usize); + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub const fn kill(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Asynchronously kills the clock generator, enable must be set low before deasserting kill"] + #[inline(always)] + pub fn set_kill(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Starts and stops the clock generator cleanly"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub const fn phase(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[doc = "This delays the enable signal by up to 3 cycles of the input clock This must be set before the clock is enabled to have any effect"] + #[inline(always)] + pub fn set_phase(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub const fn nudge(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "An edge on this signal shifts the phase of the output by 1 cycle of the input clock This can be done at any time"] + #[inline(always)] + pub fn set_nudge(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "clock generator is enabled"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for ClkUsbCtrl { + #[inline(always)] + fn default() -> ClkUsbCtrl { + ClkUsbCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkUsbDiv(pub u32); +impl ClkUsbDiv { + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub const fn int(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly"] + #[inline(always)] + pub fn set_int(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } +} +impl Default for ClkUsbDiv { + #[inline(always)] + fn default() -> ClkUsbDiv { + ClkUsbDiv(0) + } +} +#[doc = "Indicates which src is currently selected (one-hot)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ClkUsbSelected(pub u32); +impl ClkUsbSelected { + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub const fn clk_usb_selected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1."] + #[inline(always)] + pub fn set_clk_usb_selected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for ClkUsbSelected { + #[inline(always)] + fn default() -> ClkUsbSelected { + ClkUsbSelected(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DftclkLposcCtrl(pub u32); +impl DftclkLposcCtrl { + #[inline(always)] + pub const fn src(&self) -> super::vals::DftclkLposcCtrlSrc { + let val = (self.0 >> 0usize) & 0x03; + super::vals::DftclkLposcCtrlSrc::from_bits(val as u8) + } + #[inline(always)] + pub fn set_src(&mut self, val: super::vals::DftclkLposcCtrlSrc) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } +} +impl Default for DftclkLposcCtrl { + #[inline(always)] + fn default() -> DftclkLposcCtrl { + DftclkLposcCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DftclkRoscCtrl(pub u32); +impl DftclkRoscCtrl { + #[inline(always)] + pub const fn src(&self) -> super::vals::DftclkRoscCtrlSrc { + let val = (self.0 >> 0usize) & 0x03; + super::vals::DftclkRoscCtrlSrc::from_bits(val as u8) + } + #[inline(always)] + pub fn set_src(&mut self, val: super::vals::DftclkRoscCtrlSrc) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } +} +impl Default for DftclkRoscCtrl { + #[inline(always)] + fn default() -> DftclkRoscCtrl { + DftclkRoscCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DftclkXoscCtrl(pub u32); +impl DftclkXoscCtrl { + #[inline(always)] + pub const fn src(&self) -> super::vals::DftclkXoscCtrlSrc { + let val = (self.0 >> 0usize) & 0x03; + super::vals::DftclkXoscCtrlSrc::from_bits(val as u8) + } + #[inline(always)] + pub fn set_src(&mut self, val: super::vals::DftclkXoscCtrlSrc) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } +} +impl Default for DftclkXoscCtrl { + #[inline(always)] + fn default() -> DftclkXoscCtrl { + DftclkXoscCtrl(0) + } +} +#[doc = "indicates the state of the clock enable"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Enabled0(pub u32); +impl Enabled0 { + #[inline(always)] + pub const fn clk_sys_clocks(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn clk_sys_accessctrl(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn clk_adc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn clk_sys_adc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn clk_sys_bootram(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clk_sys_busctrl(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_busctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn clk_sys_busfabric(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn clk_sys_dma(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn clk_sys_glitch_detector(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_glitch_detector(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn clk_hstx(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn clk_sys_hstx(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn clk_sys_i2c0(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_i2c0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn clk_sys_i2c1(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_i2c1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn clk_sys_io(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_io(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn clk_sys_jtag(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_jtag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn clk_ref_otp(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn clk_sys_otp(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn clk_sys_pads(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pads(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn clk_sys_pio0(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn clk_sys_pio1(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn clk_sys_pio2(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn clk_sys_pll_sys(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pll_sys(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn clk_sys_pll_usb(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pll_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn clk_ref_powman(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn clk_sys_powman(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn clk_sys_pwm(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pwm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn clk_sys_resets(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn clk_sys_rom(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn clk_sys_rosc(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn clk_sys_psm(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_psm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn clk_sys_sha256(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sha256(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn clk_sys_sio(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for Enabled0 { + #[inline(always)] + fn default() -> Enabled0 { + Enabled0(0) + } +} +#[doc = "indicates the state of the clock enable"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Enabled1(pub u32); +impl Enabled1 { + #[inline(always)] + pub const fn clk_peri_spi0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn clk_sys_spi0(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn clk_peri_spi1(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn clk_sys_spi1(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn clk_sys_sram0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clk_sys_sram1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn clk_sys_sram2(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn clk_sys_sram3(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn clk_sys_sram4(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn clk_sys_sram5(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn clk_sys_sram6(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn clk_sys_sram7(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn clk_sys_sram8(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn clk_sys_sram9(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn clk_sys_syscfg(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_syscfg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn clk_sys_sysinfo(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sysinfo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn clk_sys_tbman(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_tbman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn clk_ref_ticks(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_ticks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn clk_sys_ticks(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_ticks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn clk_sys_timer0(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_timer0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn clk_sys_timer1(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_timer1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn clk_sys_trng(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_trng(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn clk_peri_uart0(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn clk_sys_uart0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn clk_peri_uart1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn clk_sys_uart1(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn clk_sys_usbctrl(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_usbctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn clk_usb(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn clk_sys_watchdog(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_watchdog(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn clk_sys_xip(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn clk_sys_xosc(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } +} +impl Default for Enabled1 { + #[inline(always)] + fn default() -> Enabled1 { + Enabled1(0) + } +} +#[doc = "Delays the start of frequency counting to allow the mux to settle Delay is measured in multiples of the reference clock period"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0delay(pub u32); +impl Fc0delay { + #[inline(always)] + pub const fn fc0_delay(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[inline(always)] + pub fn set_fc0_delay(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } +} +impl Default for Fc0delay { + #[inline(always)] + fn default() -> Fc0delay { + Fc0delay(0) + } +} +#[doc = "The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval The default gives a test interval of 250us"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0interval(pub u32); +impl Fc0interval { + #[inline(always)] + pub const fn fc0_interval(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_fc0_interval(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for Fc0interval { + #[inline(always)] + fn default() -> Fc0interval { + Fc0interval(0) + } +} +#[doc = "Maximum pass frequency in kHz. This is optional. Set to 0x1ffffff if you are not using the pass/fail flags"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0maxKhz(pub u32); +impl Fc0maxKhz { + #[inline(always)] + pub const fn fc0_max_khz(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x01ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_fc0_max_khz(&mut self, val: u32) { + self.0 = (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); + } +} +impl Default for Fc0maxKhz { + #[inline(always)] + fn default() -> Fc0maxKhz { + Fc0maxKhz(0) + } +} +#[doc = "Minimum pass frequency in kHz. This is optional. Set to 0 if you are not using the pass/fail flags"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0minKhz(pub u32); +impl Fc0minKhz { + #[inline(always)] + pub const fn fc0_min_khz(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x01ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_fc0_min_khz(&mut self, val: u32) { + self.0 = (self.0 & !(0x01ff_ffff << 0usize)) | (((val as u32) & 0x01ff_ffff) << 0usize); + } +} +impl Default for Fc0minKhz { + #[inline(always)] + fn default() -> Fc0minKhz { + Fc0minKhz(0) + } +} +#[doc = "Reference clock frequency in kHz"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0refKhz(pub u32); +impl Fc0refKhz { + #[inline(always)] + pub const fn fc0_ref_khz(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x000f_ffff; + val as u32 + } + #[inline(always)] + pub fn set_fc0_ref_khz(&mut self, val: u32) { + self.0 = (self.0 & !(0x000f_ffff << 0usize)) | (((val as u32) & 0x000f_ffff) << 0usize); + } +} +impl Default for Fc0refKhz { + #[inline(always)] + fn default() -> Fc0refKhz { + Fc0refKhz(0) + } +} +#[doc = "Result of frequency measurement, only valid when status_done=1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0result(pub u32); +impl Fc0result { + #[inline(always)] + pub const fn frac(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[inline(always)] + pub fn set_frac(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[inline(always)] + pub const fn khz(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x01ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_khz(&mut self, val: u32) { + self.0 = (self.0 & !(0x01ff_ffff << 5usize)) | (((val as u32) & 0x01ff_ffff) << 5usize); + } +} +impl Default for Fc0result { + #[inline(always)] + fn default() -> Fc0result { + Fc0result(0) + } +} +#[doc = "Clock sent to frequency counter, set to 0 when not required Writing to this register initiates the frequency count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0src(pub u32); +impl Fc0src { + #[inline(always)] + pub const fn fc0_src(&self) -> super::vals::Fc0src { + let val = (self.0 >> 0usize) & 0xff; + super::vals::Fc0src::from_bits(val as u8) + } + #[inline(always)] + pub fn set_fc0_src(&mut self, val: super::vals::Fc0src) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val.to_bits() as u32) & 0xff) << 0usize); + } +} +impl Default for Fc0src { + #[inline(always)] + fn default() -> Fc0src { + Fc0src(0) + } +} +#[doc = "Frequency counter status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fc0status(pub u32); +impl Fc0status { + #[doc = "Test passed"] + #[inline(always)] + pub const fn pass(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Test passed"] + #[inline(always)] + pub fn set_pass(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Test complete"] + #[inline(always)] + pub const fn done(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Test complete"] + #[inline(always)] + pub fn set_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Test running"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Test running"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Waiting for test clock to start"] + #[inline(always)] + pub const fn waiting(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Waiting for test clock to start"] + #[inline(always)] + pub fn set_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "Test failed"] + #[inline(always)] + pub const fn fail(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Test failed"] + #[inline(always)] + pub fn set_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Test clock slower than expected, only valid when status_done=1"] + #[inline(always)] + pub const fn slow(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "Test clock slower than expected, only valid when status_done=1"] + #[inline(always)] + pub fn set_slow(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "Test clock faster than expected, only valid when status_done=1"] + #[inline(always)] + pub const fn fast(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "Test clock faster than expected, only valid when status_done=1"] + #[inline(always)] + pub fn set_fast(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Test clock stopped during test"] + #[inline(always)] + pub const fn died(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Test clock stopped during test"] + #[inline(always)] + pub fn set_died(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for Fc0status { + #[inline(always)] + fn default() -> Fc0status { + Fc0status(0) + } +} +#[doc = "Interrupt Force"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Int(pub u32); +impl Int { + #[inline(always)] + pub const fn clk_sys_resus(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_resus(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Int { + #[inline(always)] + fn default() -> Int { + Int(0) + } +} +#[doc = "enable clock in sleep mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SleepEn0(pub u32); +impl SleepEn0 { + #[inline(always)] + pub const fn clk_sys_clocks(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn clk_sys_accessctrl(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn clk_adc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn clk_sys_adc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn clk_sys_bootram(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clk_sys_busctrl(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_busctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn clk_sys_busfabric(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn clk_sys_dma(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn clk_sys_glitch_detector(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_glitch_detector(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn clk_hstx(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn clk_sys_hstx(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn clk_sys_i2c0(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_i2c0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn clk_sys_i2c1(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_i2c1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn clk_sys_io(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_io(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn clk_sys_jtag(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_jtag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn clk_ref_otp(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn clk_sys_otp(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn clk_sys_pads(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pads(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn clk_sys_pio0(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn clk_sys_pio1(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn clk_sys_pio2(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn clk_sys_pll_sys(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pll_sys(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn clk_sys_pll_usb(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pll_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn clk_ref_powman(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn clk_sys_powman(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn clk_sys_pwm(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pwm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn clk_sys_resets(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn clk_sys_rom(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn clk_sys_rosc(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn clk_sys_psm(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_psm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn clk_sys_sha256(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sha256(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn clk_sys_sio(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for SleepEn0 { + #[inline(always)] + fn default() -> SleepEn0 { + SleepEn0(0) + } +} +#[doc = "enable clock in sleep mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SleepEn1(pub u32); +impl SleepEn1 { + #[inline(always)] + pub const fn clk_peri_spi0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn clk_sys_spi0(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn clk_peri_spi1(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn clk_sys_spi1(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn clk_sys_sram0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clk_sys_sram1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn clk_sys_sram2(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn clk_sys_sram3(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn clk_sys_sram4(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn clk_sys_sram5(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn clk_sys_sram6(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn clk_sys_sram7(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn clk_sys_sram8(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn clk_sys_sram9(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn clk_sys_syscfg(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_syscfg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn clk_sys_sysinfo(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sysinfo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn clk_sys_tbman(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_tbman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn clk_ref_ticks(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_ticks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn clk_sys_ticks(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_ticks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn clk_sys_timer0(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_timer0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn clk_sys_timer1(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_timer1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn clk_sys_trng(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_trng(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn clk_peri_uart0(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn clk_sys_uart0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn clk_peri_uart1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn clk_sys_uart1(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn clk_sys_usbctrl(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_usbctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn clk_usb(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn clk_sys_watchdog(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_watchdog(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn clk_sys_xip(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn clk_sys_xosc(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } +} +impl Default for SleepEn1 { + #[inline(always)] + fn default() -> SleepEn1 { + SleepEn1(0) + } +} +#[doc = "enable clock in wake mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct WakeEn0(pub u32); +impl WakeEn0 { + #[inline(always)] + pub const fn clk_sys_clocks(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn clk_sys_accessctrl(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn clk_adc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn clk_sys_adc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn clk_sys_bootram(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clk_sys_busctrl(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_busctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn clk_sys_busfabric(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn clk_sys_dma(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn clk_sys_glitch_detector(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_glitch_detector(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn clk_hstx(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn clk_sys_hstx(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn clk_sys_i2c0(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_i2c0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn clk_sys_i2c1(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_i2c1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn clk_sys_io(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_io(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn clk_sys_jtag(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_jtag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn clk_ref_otp(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn clk_sys_otp(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn clk_sys_pads(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pads(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn clk_sys_pio0(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn clk_sys_pio1(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn clk_sys_pio2(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn clk_sys_pll_sys(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pll_sys(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn clk_sys_pll_usb(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pll_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn clk_ref_powman(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn clk_sys_powman(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn clk_sys_pwm(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_pwm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn clk_sys_resets(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn clk_sys_rom(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn clk_sys_rosc(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn clk_sys_psm(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_psm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn clk_sys_sha256(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sha256(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn clk_sys_sio(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for WakeEn0 { + #[inline(always)] + fn default() -> WakeEn0 { + WakeEn0(0) + } +} +#[doc = "enable clock in wake mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct WakeEn1(pub u32); +impl WakeEn1 { + #[inline(always)] + pub const fn clk_peri_spi0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn clk_sys_spi0(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn clk_peri_spi1(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn clk_sys_spi1(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn clk_sys_sram0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clk_sys_sram1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn clk_sys_sram2(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn clk_sys_sram3(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn clk_sys_sram4(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn clk_sys_sram5(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn clk_sys_sram6(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn clk_sys_sram7(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn clk_sys_sram8(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn clk_sys_sram9(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn clk_sys_syscfg(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_syscfg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn clk_sys_sysinfo(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_sysinfo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn clk_sys_tbman(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_tbman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn clk_ref_ticks(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_ref_ticks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn clk_sys_ticks(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_ticks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn clk_sys_timer0(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_timer0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn clk_sys_timer1(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_timer1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn clk_sys_trng(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_trng(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn clk_peri_uart0(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn clk_sys_uart0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn clk_peri_uart1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_peri_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn clk_sys_uart1(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn clk_sys_usbctrl(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_usbctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn clk_usb(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn clk_sys_watchdog(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_watchdog(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn clk_sys_xip(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn clk_sys_xosc(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clk_sys_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } +} +impl Default for WakeEn1 { + #[inline(always)] + fn default() -> WakeEn1 { + WakeEn1(0) + } +} diff --git a/src/rp2350/clocks/vals.rs b/src/rp2350/clocks/vals.rs new file mode 100644 index 00000000..de6752eb --- /dev/null +++ b/src/rp2350/clocks/vals.rs @@ -0,0 +1,672 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkAdcCtrlAuxsrc { + CLKSRC_PLL_USB = 0, + CLKSRC_PLL_SYS = 0x01, + ROSC_CLKSRC_PH = 0x02, + XOSC_CLKSRC = 0x03, + CLKSRC_GPIN0 = 0x04, + CLKSRC_GPIN1 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, +} +impl ClkAdcCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkAdcCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkAdcCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkAdcCtrlAuxsrc { + ClkAdcCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkAdcCtrlAuxsrc) -> u8 { + ClkAdcCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkGpoutCtrlAuxsrc { + CLKSRC_PLL_SYS = 0, + CLKSRC_GPIN0 = 0x01, + CLKSRC_GPIN1 = 0x02, + CLKSRC_PLL_USB = 0x03, + CLKSRC_PLL_USB_PRIMARY_REF_OPCG = 0x04, + ROSC_CLKSRC = 0x05, + XOSC_CLKSRC = 0x06, + LPOSC_CLKSRC = 0x07, + CLK_SYS = 0x08, + CLK_USB = 0x09, + CLK_ADC = 0x0a, + CLK_REF = 0x0b, + CLK_PERI = 0x0c, + CLK_HSTX = 0x0d, + OTP_CLK2FC = 0x0e, + _RESERVED_f = 0x0f, +} +impl ClkGpoutCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkGpoutCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkGpoutCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkGpoutCtrlAuxsrc { + ClkGpoutCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkGpoutCtrlAuxsrc) -> u8 { + ClkGpoutCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkHstxCtrlAuxsrc { + CLK_SYS = 0, + CLKSRC_PLL_SYS = 0x01, + CLKSRC_PLL_USB = 0x02, + CLKSRC_GPIN0 = 0x03, + CLKSRC_GPIN1 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, +} +impl ClkHstxCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkHstxCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkHstxCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkHstxCtrlAuxsrc { + ClkHstxCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkHstxCtrlAuxsrc) -> u8 { + ClkHstxCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkPeriCtrlAuxsrc { + CLK_SYS = 0, + CLKSRC_PLL_SYS = 0x01, + CLKSRC_PLL_USB = 0x02, + ROSC_CLKSRC_PH = 0x03, + XOSC_CLKSRC = 0x04, + CLKSRC_GPIN0 = 0x05, + CLKSRC_GPIN1 = 0x06, + _RESERVED_7 = 0x07, +} +impl ClkPeriCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkPeriCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkPeriCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkPeriCtrlAuxsrc { + ClkPeriCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkPeriCtrlAuxsrc) -> u8 { + ClkPeriCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkRefCtrlAuxsrc { + CLKSRC_PLL_USB = 0, + CLKSRC_GPIN0 = 0x01, + CLKSRC_GPIN1 = 0x02, + CLKSRC_PLL_USB_PRIMARY_REF_OPCG = 0x03, +} +impl ClkRefCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkRefCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkRefCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkRefCtrlAuxsrc { + ClkRefCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkRefCtrlAuxsrc) -> u8 { + ClkRefCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkRefCtrlSrc { + ROSC_CLKSRC_PH = 0, + CLKSRC_CLK_REF_AUX = 0x01, + XOSC_CLKSRC = 0x02, + LPOSC_CLKSRC = 0x03, +} +impl ClkRefCtrlSrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkRefCtrlSrc { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkRefCtrlSrc { + #[inline(always)] + fn from(val: u8) -> ClkRefCtrlSrc { + ClkRefCtrlSrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkRefCtrlSrc) -> u8 { + ClkRefCtrlSrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkSysCtrlAuxsrc { + CLKSRC_PLL_SYS = 0, + CLKSRC_PLL_USB = 0x01, + ROSC_CLKSRC = 0x02, + XOSC_CLKSRC = 0x03, + CLKSRC_GPIN0 = 0x04, + CLKSRC_GPIN1 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, +} +impl ClkSysCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkSysCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkSysCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkSysCtrlAuxsrc { + ClkSysCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkSysCtrlAuxsrc) -> u8 { + ClkSysCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkSysCtrlSrc { + CLK_REF = 0, + CLKSRC_CLK_SYS_AUX = 0x01, +} +impl ClkSysCtrlSrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkSysCtrlSrc { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkSysCtrlSrc { + #[inline(always)] + fn from(val: u8) -> ClkSysCtrlSrc { + ClkSysCtrlSrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkSysCtrlSrc) -> u8 { + ClkSysCtrlSrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkUsbCtrlAuxsrc { + CLKSRC_PLL_USB = 0, + CLKSRC_PLL_SYS = 0x01, + ROSC_CLKSRC_PH = 0x02, + XOSC_CLKSRC = 0x03, + CLKSRC_GPIN0 = 0x04, + CLKSRC_GPIN1 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, +} +impl ClkUsbCtrlAuxsrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkUsbCtrlAuxsrc { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkUsbCtrlAuxsrc { + #[inline(always)] + fn from(val: u8) -> ClkUsbCtrlAuxsrc { + ClkUsbCtrlAuxsrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkUsbCtrlAuxsrc) -> u8 { + ClkUsbCtrlAuxsrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum DftclkLposcCtrlSrc { + NULL = 0, + CLKSRC_PLL_USB_PRIMARY_LPOSC = 0x01, + CLKSRC_GPIN1 = 0x02, + _RESERVED_3 = 0x03, +} +impl DftclkLposcCtrlSrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> DftclkLposcCtrlSrc { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for DftclkLposcCtrlSrc { + #[inline(always)] + fn from(val: u8) -> DftclkLposcCtrlSrc { + DftclkLposcCtrlSrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: DftclkLposcCtrlSrc) -> u8 { + DftclkLposcCtrlSrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum DftclkRoscCtrlSrc { + NULL = 0, + CLKSRC_PLL_SYS_PRIMARY_ROSC = 0x01, + CLKSRC_GPIN1 = 0x02, + _RESERVED_3 = 0x03, +} +impl DftclkRoscCtrlSrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> DftclkRoscCtrlSrc { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for DftclkRoscCtrlSrc { + #[inline(always)] + fn from(val: u8) -> DftclkRoscCtrlSrc { + DftclkRoscCtrlSrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: DftclkRoscCtrlSrc) -> u8 { + DftclkRoscCtrlSrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum DftclkXoscCtrlSrc { + NULL = 0, + CLKSRC_PLL_USB_PRIMARY = 0x01, + CLKSRC_GPIN0 = 0x02, + _RESERVED_3 = 0x03, +} +impl DftclkXoscCtrlSrc { + #[inline(always)] + pub const fn from_bits(val: u8) -> DftclkXoscCtrlSrc { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for DftclkXoscCtrlSrc { + #[inline(always)] + fn from(val: u8) -> DftclkXoscCtrlSrc { + DftclkXoscCtrlSrc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: DftclkXoscCtrlSrc) -> u8 { + DftclkXoscCtrlSrc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Fc0src { + NULL = 0, + PLL_SYS_CLKSRC_PRIMARY = 0x01, + PLL_USB_CLKSRC_PRIMARY = 0x02, + ROSC_CLKSRC = 0x03, + ROSC_CLKSRC_PH = 0x04, + XOSC_CLKSRC = 0x05, + CLKSRC_GPIN0 = 0x06, + CLKSRC_GPIN1 = 0x07, + CLK_REF = 0x08, + CLK_SYS = 0x09, + CLK_PERI = 0x0a, + CLK_USB = 0x0b, + CLK_ADC = 0x0c, + CLK_HSTX = 0x0d, + LPOSC_CLKSRC = 0x0e, + OTP_CLK2FC = 0x0f, + PLL_USB_CLKSRC_PRIMARY_DFT = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + _RESERVED_1f = 0x1f, + _RESERVED_20 = 0x20, + _RESERVED_21 = 0x21, + _RESERVED_22 = 0x22, + _RESERVED_23 = 0x23, + _RESERVED_24 = 0x24, + _RESERVED_25 = 0x25, + _RESERVED_26 = 0x26, + _RESERVED_27 = 0x27, + _RESERVED_28 = 0x28, + _RESERVED_29 = 0x29, + _RESERVED_2a = 0x2a, + _RESERVED_2b = 0x2b, + _RESERVED_2c = 0x2c, + _RESERVED_2d = 0x2d, + _RESERVED_2e = 0x2e, + _RESERVED_2f = 0x2f, + _RESERVED_30 = 0x30, + _RESERVED_31 = 0x31, + _RESERVED_32 = 0x32, + _RESERVED_33 = 0x33, + _RESERVED_34 = 0x34, + _RESERVED_35 = 0x35, + _RESERVED_36 = 0x36, + _RESERVED_37 = 0x37, + _RESERVED_38 = 0x38, + _RESERVED_39 = 0x39, + _RESERVED_3a = 0x3a, + _RESERVED_3b = 0x3b, + _RESERVED_3c = 0x3c, + _RESERVED_3d = 0x3d, + _RESERVED_3e = 0x3e, + _RESERVED_3f = 0x3f, + _RESERVED_40 = 0x40, + _RESERVED_41 = 0x41, + _RESERVED_42 = 0x42, + _RESERVED_43 = 0x43, + _RESERVED_44 = 0x44, + _RESERVED_45 = 0x45, + _RESERVED_46 = 0x46, + _RESERVED_47 = 0x47, + _RESERVED_48 = 0x48, + _RESERVED_49 = 0x49, + _RESERVED_4a = 0x4a, + _RESERVED_4b = 0x4b, + _RESERVED_4c = 0x4c, + _RESERVED_4d = 0x4d, + _RESERVED_4e = 0x4e, + _RESERVED_4f = 0x4f, + _RESERVED_50 = 0x50, + _RESERVED_51 = 0x51, + _RESERVED_52 = 0x52, + _RESERVED_53 = 0x53, + _RESERVED_54 = 0x54, + _RESERVED_55 = 0x55, + _RESERVED_56 = 0x56, + _RESERVED_57 = 0x57, + _RESERVED_58 = 0x58, + _RESERVED_59 = 0x59, + _RESERVED_5a = 0x5a, + _RESERVED_5b = 0x5b, + _RESERVED_5c = 0x5c, + _RESERVED_5d = 0x5d, + _RESERVED_5e = 0x5e, + _RESERVED_5f = 0x5f, + _RESERVED_60 = 0x60, + _RESERVED_61 = 0x61, + _RESERVED_62 = 0x62, + _RESERVED_63 = 0x63, + _RESERVED_64 = 0x64, + _RESERVED_65 = 0x65, + _RESERVED_66 = 0x66, + _RESERVED_67 = 0x67, + _RESERVED_68 = 0x68, + _RESERVED_69 = 0x69, + _RESERVED_6a = 0x6a, + _RESERVED_6b = 0x6b, + _RESERVED_6c = 0x6c, + _RESERVED_6d = 0x6d, + _RESERVED_6e = 0x6e, + _RESERVED_6f = 0x6f, + _RESERVED_70 = 0x70, + _RESERVED_71 = 0x71, + _RESERVED_72 = 0x72, + _RESERVED_73 = 0x73, + _RESERVED_74 = 0x74, + _RESERVED_75 = 0x75, + _RESERVED_76 = 0x76, + _RESERVED_77 = 0x77, + _RESERVED_78 = 0x78, + _RESERVED_79 = 0x79, + _RESERVED_7a = 0x7a, + _RESERVED_7b = 0x7b, + _RESERVED_7c = 0x7c, + _RESERVED_7d = 0x7d, + _RESERVED_7e = 0x7e, + _RESERVED_7f = 0x7f, + _RESERVED_80 = 0x80, + _RESERVED_81 = 0x81, + _RESERVED_82 = 0x82, + _RESERVED_83 = 0x83, + _RESERVED_84 = 0x84, + _RESERVED_85 = 0x85, + _RESERVED_86 = 0x86, + _RESERVED_87 = 0x87, + _RESERVED_88 = 0x88, + _RESERVED_89 = 0x89, + _RESERVED_8a = 0x8a, + _RESERVED_8b = 0x8b, + _RESERVED_8c = 0x8c, + _RESERVED_8d = 0x8d, + _RESERVED_8e = 0x8e, + _RESERVED_8f = 0x8f, + _RESERVED_90 = 0x90, + _RESERVED_91 = 0x91, + _RESERVED_92 = 0x92, + _RESERVED_93 = 0x93, + _RESERVED_94 = 0x94, + _RESERVED_95 = 0x95, + _RESERVED_96 = 0x96, + _RESERVED_97 = 0x97, + _RESERVED_98 = 0x98, + _RESERVED_99 = 0x99, + _RESERVED_9a = 0x9a, + _RESERVED_9b = 0x9b, + _RESERVED_9c = 0x9c, + _RESERVED_9d = 0x9d, + _RESERVED_9e = 0x9e, + _RESERVED_9f = 0x9f, + _RESERVED_a0 = 0xa0, + _RESERVED_a1 = 0xa1, + _RESERVED_a2 = 0xa2, + _RESERVED_a3 = 0xa3, + _RESERVED_a4 = 0xa4, + _RESERVED_a5 = 0xa5, + _RESERVED_a6 = 0xa6, + _RESERVED_a7 = 0xa7, + _RESERVED_a8 = 0xa8, + _RESERVED_a9 = 0xa9, + _RESERVED_aa = 0xaa, + _RESERVED_ab = 0xab, + _RESERVED_ac = 0xac, + _RESERVED_ad = 0xad, + _RESERVED_ae = 0xae, + _RESERVED_af = 0xaf, + _RESERVED_b0 = 0xb0, + _RESERVED_b1 = 0xb1, + _RESERVED_b2 = 0xb2, + _RESERVED_b3 = 0xb3, + _RESERVED_b4 = 0xb4, + _RESERVED_b5 = 0xb5, + _RESERVED_b6 = 0xb6, + _RESERVED_b7 = 0xb7, + _RESERVED_b8 = 0xb8, + _RESERVED_b9 = 0xb9, + _RESERVED_ba = 0xba, + _RESERVED_bb = 0xbb, + _RESERVED_bc = 0xbc, + _RESERVED_bd = 0xbd, + _RESERVED_be = 0xbe, + _RESERVED_bf = 0xbf, + _RESERVED_c0 = 0xc0, + _RESERVED_c1 = 0xc1, + _RESERVED_c2 = 0xc2, + _RESERVED_c3 = 0xc3, + _RESERVED_c4 = 0xc4, + _RESERVED_c5 = 0xc5, + _RESERVED_c6 = 0xc6, + _RESERVED_c7 = 0xc7, + _RESERVED_c8 = 0xc8, + _RESERVED_c9 = 0xc9, + _RESERVED_ca = 0xca, + _RESERVED_cb = 0xcb, + _RESERVED_cc = 0xcc, + _RESERVED_cd = 0xcd, + _RESERVED_ce = 0xce, + _RESERVED_cf = 0xcf, + _RESERVED_d0 = 0xd0, + _RESERVED_d1 = 0xd1, + _RESERVED_d2 = 0xd2, + _RESERVED_d3 = 0xd3, + _RESERVED_d4 = 0xd4, + _RESERVED_d5 = 0xd5, + _RESERVED_d6 = 0xd6, + _RESERVED_d7 = 0xd7, + _RESERVED_d8 = 0xd8, + _RESERVED_d9 = 0xd9, + _RESERVED_da = 0xda, + _RESERVED_db = 0xdb, + _RESERVED_dc = 0xdc, + _RESERVED_dd = 0xdd, + _RESERVED_de = 0xde, + _RESERVED_df = 0xdf, + _RESERVED_e0 = 0xe0, + _RESERVED_e1 = 0xe1, + _RESERVED_e2 = 0xe2, + _RESERVED_e3 = 0xe3, + _RESERVED_e4 = 0xe4, + _RESERVED_e5 = 0xe5, + _RESERVED_e6 = 0xe6, + _RESERVED_e7 = 0xe7, + _RESERVED_e8 = 0xe8, + _RESERVED_e9 = 0xe9, + _RESERVED_ea = 0xea, + _RESERVED_eb = 0xeb, + _RESERVED_ec = 0xec, + _RESERVED_ed = 0xed, + _RESERVED_ee = 0xee, + _RESERVED_ef = 0xef, + _RESERVED_f0 = 0xf0, + _RESERVED_f1 = 0xf1, + _RESERVED_f2 = 0xf2, + _RESERVED_f3 = 0xf3, + _RESERVED_f4 = 0xf4, + _RESERVED_f5 = 0xf5, + _RESERVED_f6 = 0xf6, + _RESERVED_f7 = 0xf7, + _RESERVED_f8 = 0xf8, + _RESERVED_f9 = 0xf9, + _RESERVED_fa = 0xfa, + _RESERVED_fb = 0xfb, + _RESERVED_fc = 0xfc, + _RESERVED_fd = 0xfd, + _RESERVED_fe = 0xfe, + _RESERVED_ff = 0xff, +} +impl Fc0src { + #[inline(always)] + pub const fn from_bits(val: u8) -> Fc0src { + unsafe { core::mem::transmute(val & 0xff) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Fc0src { + #[inline(always)] + fn from(val: u8) -> Fc0src { + Fc0src::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Fc0src) -> u8 { + Fc0src::to_bits(val) + } +} diff --git a/src/rp2350/common.rs b/src/rp2350/common.rs new file mode 100644 index 00000000..d978ddba --- /dev/null +++ b/src/rp2350/common.rs @@ -0,0 +1,68 @@ +use core::marker::PhantomData; +#[derive(Copy, Clone, PartialEq, Eq)] +pub struct RW; +#[derive(Copy, Clone, PartialEq, Eq)] +pub struct R; +#[derive(Copy, Clone, PartialEq, Eq)] +pub struct W; +mod sealed; +pub trait Access: sealed::Access + Copy {} +impl Access for R {} +impl Access for W {} +impl Access for RW {} +pub trait Read: Access {} +impl Read for RW {} +impl Read for R {} +pub trait Write: Access {} +impl Write for RW {} +impl Write for W {} +#[derive(Copy, Clone, PartialEq, Eq)] +pub struct Reg { + ptr: *mut u8, + phantom: PhantomData<*mut (T, A)>, +} +unsafe impl Send for Reg {} +unsafe impl Sync for Reg {} +impl Reg { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut T) -> Self { + Self { + ptr: ptr as _, + phantom: PhantomData, + } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut T { + self.ptr as _ + } +} +impl Reg { + #[inline(always)] + pub fn read(&self) -> T { + unsafe { (self.ptr as *mut T).read_volatile() } + } +} +impl Reg { + #[inline(always)] + pub fn write_value(&self, val: T) { + unsafe { (self.ptr as *mut T).write_volatile(val) } + } +} +impl Reg { + #[inline(always)] + pub fn write(&self, f: impl FnOnce(&mut T) -> R) -> R { + let mut val = Default::default(); + let res = f(&mut val); + self.write_value(val); + res + } +} +impl Reg { + #[inline(always)] + pub fn modify(&self, f: impl FnOnce(&mut T) -> R) -> R { + let mut val = self.read(); + let res = f(&mut val); + self.write_value(val); + res + } +} diff --git a/src/rp2350/common/sealed.rs b/src/rp2350/common/sealed.rs new file mode 100644 index 00000000..ca8ba207 --- /dev/null +++ b/src/rp2350/common/sealed.rs @@ -0,0 +1,5 @@ +use super::*; +pub trait Access {} +impl Access for R {} +impl Access for W {} +impl Access for RW {} diff --git a/src/rp2350/coresight_trace.rs b/src/rp2350/coresight_trace.rs new file mode 100644 index 00000000..fa01ad9c --- /dev/null +++ b/src/rp2350/coresight_trace.rs @@ -0,0 +1,28 @@ +#[doc = "Coresight block - RP specific registers"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct CoresightTrace { + ptr: *mut u8, +} +unsafe impl Send for CoresightTrace {} +unsafe impl Sync for CoresightTrace {} +impl CoresightTrace { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Control and status register"] + #[inline(always)] + pub const fn ctrl_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "FIFO for trace data captured from the TPIU"] + #[inline(always)] + pub const fn trace_capture_fifo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/coresight_trace/regs.rs b/src/rp2350/coresight_trace/regs.rs new file mode 100644 index 00000000..b10bea3c --- /dev/null +++ b/src/rp2350/coresight_trace/regs.rs @@ -0,0 +1,34 @@ +#[doc = "Control and status register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct CtrlStatus(pub u32); +impl CtrlStatus { + #[doc = "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."] + #[inline(always)] + pub const fn trace_capture_fifo_flush(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_trace_capture_fifo_flush(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn trace_capture_fifo_overflow(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_trace_capture_fifo_overflow(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for CtrlStatus { + #[inline(always)] + fn default() -> CtrlStatus { + CtrlStatus(0) + } +} diff --git a/src/rp2350/dma.rs b/src/rp2350/dma.rs new file mode 100644 index 00000000..1cbad01d --- /dev/null +++ b/src/rp2350/dma.rs @@ -0,0 +1,438 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Channel { + ptr: *mut u8, +} +unsafe impl Send for Channel {} +unsafe impl Sync for Channel {} +impl Channel { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "DMA Channel 1 Read Address pointer"] + #[inline(always)] + pub const fn read_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "DMA Channel 1 Write Address pointer"] + #[inline(always)] + pub const fn write_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "DMA Channel 1 Transfer Count"] + #[inline(always)] + pub const fn trans_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "DMA Channel 1 Control and Status"] + #[inline(always)] + pub const fn ctrl_trig(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Alias for channel 1 CTRL register"] + #[inline(always)] + pub const fn al1_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Alias for channel 1 READ_ADDR register"] + #[inline(always)] + pub const fn al1_read_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Alias for channel 1 WRITE_ADDR register"] + #[inline(always)] + pub const fn al1_write_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Alias for channel 1 TRANS_COUNT register This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel."] + #[inline(always)] + pub const fn al1_trans_count_trig(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Alias for channel 1 CTRL register"] + #[inline(always)] + pub const fn al2_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Alias for channel 1 TRANS_COUNT register"] + #[inline(always)] + pub const fn al2_trans_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Alias for channel 1 READ_ADDR register"] + #[inline(always)] + pub const fn al2_read_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Alias for channel 1 WRITE_ADDR register This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel."] + #[inline(always)] + pub const fn al2_write_addr_trig(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "Alias for channel 1 CTRL register"] + #[inline(always)] + pub const fn al3_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "Alias for channel 1 WRITE_ADDR register"] + #[inline(always)] + pub const fn al3_write_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "Alias for channel 1 TRANS_COUNT register"] + #[inline(always)] + pub const fn al3_trans_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "Alias for channel 1 READ_ADDR register This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel."] + #[inline(always)] + pub const fn al3_read_addr_trig(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn dbg_ctdreq(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2048usize) as _) } + } + #[doc = "Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer"] + #[inline(always)] + pub const fn dbg_tcr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2052usize) as _) } + } +} +#[doc = "DMA with separate read and write masters"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dma { + ptr: *mut u8, +} +unsafe impl Send for Dma {} +unsafe impl Sync for Dma {} +impl Dma { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[inline(always)] + pub const fn ch(self, n: usize) -> Channel { + assert!(n < 16usize); + unsafe { Channel::from_ptr(self.ptr.add(0usize + n * 64usize) as _) } + } + #[doc = "Interrupt Status (raw)"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1024usize) as _) } + } + #[doc = "Interrupt Enables for IRQ 0"] + #[inline(always)] + pub const fn inte0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1028usize) as _) } + } + #[doc = "Force Interrupts"] + #[inline(always)] + pub const fn intf0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1032usize) as _) } + } + #[doc = "Interrupt Status for IRQ 0"] + #[inline(always)] + pub const fn ints0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1036usize) as _) } + } + #[doc = "Interrupt Status (raw)"] + #[inline(always)] + pub const fn intr1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1040usize) as _) } + } + #[doc = "Interrupt Enables for IRQ 1"] + #[inline(always)] + pub const fn inte1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1044usize) as _) } + } + #[doc = "Force Interrupts"] + #[inline(always)] + pub const fn intf1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1048usize) as _) } + } + #[doc = "Interrupt Status for IRQ 1"] + #[inline(always)] + pub const fn ints1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1052usize) as _) } + } + #[doc = "Interrupt Status (raw)"] + #[inline(always)] + pub const fn intr2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1056usize) as _) } + } + #[doc = "Interrupt Enables for IRQ 2"] + #[inline(always)] + pub const fn inte2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1060usize) as _) } + } + #[doc = "Force Interrupts"] + #[inline(always)] + pub const fn intf2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1064usize) as _) } + } + #[doc = "Interrupt Status for IRQ 2"] + #[inline(always)] + pub const fn ints2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1068usize) as _) } + } + #[doc = "Interrupt Status (raw)"] + #[inline(always)] + pub const fn intr3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1072usize) as _) } + } + #[doc = "Interrupt Enables for IRQ 3"] + #[inline(always)] + pub const fn inte3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1076usize) as _) } + } + #[doc = "Force Interrupts"] + #[inline(always)] + pub const fn intf3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1080usize) as _) } + } + #[doc = "Interrupt Status for IRQ 3"] + #[inline(always)] + pub const fn ints3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1084usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn timer(self, n: usize) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1088usize + n * 4usize) as _) } + } + #[doc = "Trigger one or more channels simultaneously"] + #[inline(always)] + pub const fn multi_chan_trigger( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1104usize) as _) } + } + #[doc = "Sniffer Control"] + #[inline(always)] + pub const fn sniff_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1108usize) as _) } + } + #[doc = "Data accumulator for sniff hardware"] + #[inline(always)] + pub const fn sniff_data(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1112usize) as _) } + } + #[doc = "Debug RAF, WAF, TDF levels"] + #[inline(always)] + pub const fn fifo_levels(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1120usize) as _) } + } + #[doc = "Abort an in-progress transfer sequence on one or more channels"] + #[inline(always)] + pub const fn chan_abort(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1124usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn n_channels(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1128usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn seccfg_ch0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1152usize) as _) } + } + #[doc = "Security configuration for channel 1. 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."] + #[inline(always)] + pub const fn seccfg_ch1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1156usize) as _) } + } + #[doc = "Security configuration for channel 2. 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."] + #[inline(always)] + pub const fn seccfg_ch2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1160usize) as _) } + } + #[doc = "Security configuration for channel 3. 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."] + #[inline(always)] + pub const fn seccfg_ch3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1164usize) as _) } + } + #[doc = "Security configuration for channel 4. 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."] + #[inline(always)] + pub const fn seccfg_ch4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1168usize) as _) } + } + #[doc = "Security configuration for channel 5. 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."] + #[inline(always)] + pub const fn seccfg_ch5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1172usize) as _) } + } + #[doc = "Security configuration for channel 6. 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."] + #[inline(always)] + pub const fn seccfg_ch6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1176usize) as _) } + } + #[doc = "Security configuration for channel 7. 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."] + #[inline(always)] + pub const fn seccfg_ch7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1180usize) as _) } + } + #[doc = "Security configuration for channel 8. 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."] + #[inline(always)] + pub const fn seccfg_ch8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1184usize) as _) } + } + #[doc = "Security configuration for channel 9. 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."] + #[inline(always)] + pub const fn seccfg_ch9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1188usize) as _) } + } + #[doc = "Security configuration for channel 10. 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."] + #[inline(always)] + pub const fn seccfg_ch10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1192usize) as _) } + } + #[doc = "Security configuration for channel 11. 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."] + #[inline(always)] + pub const fn seccfg_ch11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1196usize) as _) } + } + #[doc = "Security configuration for channel 12. 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."] + #[inline(always)] + pub const fn seccfg_ch12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1200usize) as _) } + } + #[doc = "Security configuration for channel 13. 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."] + #[inline(always)] + pub const fn seccfg_ch13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1204usize) as _) } + } + #[doc = "Security configuration for channel 14. 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."] + #[inline(always)] + pub const fn seccfg_ch14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1208usize) as _) } + } + #[doc = "Security configuration for channel 15. 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."] + #[inline(always)] + pub const fn seccfg_ch15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1212usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn seccfg_irq0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1216usize) as _) } + } + #[doc = "Security configuration for IRQ 1. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags."] + #[inline(always)] + pub const fn seccfg_irq1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1220usize) as _) } + } + #[doc = "Security configuration for IRQ 2. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags."] + #[inline(always)] + pub const fn seccfg_irq2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1224usize) as _) } + } + #[doc = "Security configuration for IRQ 3. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags."] + #[inline(always)] + pub const fn seccfg_irq3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1228usize) as _) } + } + #[doc = "Miscellaneous security configuration"] + #[inline(always)] + pub const fn seccfg_misc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1232usize) as _) } + } + #[doc = "Control register for DMA MPU. Accessible only from a Privileged context."] + #[inline(always)] + pub const fn mpu_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1280usize) as _) } + } + #[doc = "Base address register for MPU region 0. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1284usize) as _) } + } + #[doc = "Limit address register for MPU region 0. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1288usize) as _) } + } + #[doc = "Base address register for MPU region 1. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1292usize) as _) } + } + #[doc = "Limit address register for MPU region 1. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1296usize) as _) } + } + #[doc = "Base address register for MPU region 2. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1300usize) as _) } + } + #[doc = "Limit address register for MPU region 2. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1304usize) as _) } + } + #[doc = "Base address register for MPU region 3. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1308usize) as _) } + } + #[doc = "Limit address register for MPU region 3. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1312usize) as _) } + } + #[doc = "Base address register for MPU region 4. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1316usize) as _) } + } + #[doc = "Limit address register for MPU region 4. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1320usize) as _) } + } + #[doc = "Base address register for MPU region 5. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1324usize) as _) } + } + #[doc = "Limit address register for MPU region 5. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1328usize) as _) } + } + #[doc = "Base address register for MPU region 6. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1332usize) as _) } + } + #[doc = "Limit address register for MPU region 6. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1336usize) as _) } + } + #[doc = "Base address register for MPU region 7. Writable only from a Secure, Privileged context."] + #[inline(always)] + pub const fn mpu_bar7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1340usize) as _) } + } + #[doc = "Limit address register for MPU region 7. Writable only from a Secure, Privileged context, with the exception of the P bit."] + #[inline(always)] + pub const fn mpu_lar7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(1344usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/dma/regs.rs b/src/rp2350/dma/regs.rs new file mode 100644 index 00000000..aa139d00 --- /dev/null +++ b/src/rp2350/dma/regs.rs @@ -0,0 +1,3020 @@ +#[doc = "DMA Channel 0 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch0transCount(pub u32); +impl Ch0transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch0transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch0transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch0transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch0transCount { + #[inline(always)] + fn default() -> Ch0transCount { + Ch0transCount(0) + } +} +#[doc = "DMA Channel 10 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch10transCount(pub u32); +impl Ch10transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch10transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch10transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch10transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch10transCount { + #[inline(always)] + fn default() -> Ch10transCount { + Ch10transCount(0) + } +} +#[doc = "DMA Channel 11 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch11transCount(pub u32); +impl Ch11transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch11transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch11transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch11transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch11transCount { + #[inline(always)] + fn default() -> Ch11transCount { + Ch11transCount(0) + } +} +#[doc = "DMA Channel 12 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch12transCount(pub u32); +impl Ch12transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch12transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch12transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch12transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch12transCount { + #[inline(always)] + fn default() -> Ch12transCount { + Ch12transCount(0) + } +} +#[doc = "DMA Channel 13 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch13transCount(pub u32); +impl Ch13transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch13transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch13transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch13transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch13transCount { + #[inline(always)] + fn default() -> Ch13transCount { + Ch13transCount(0) + } +} +#[doc = "DMA Channel 14 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch14transCount(pub u32); +impl Ch14transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch14transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch14transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch14transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch14transCount { + #[inline(always)] + fn default() -> Ch14transCount { + Ch14transCount(0) + } +} +#[doc = "DMA Channel 15 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch15transCount(pub u32); +impl Ch15transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch15transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch15transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch15transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch15transCount { + #[inline(always)] + fn default() -> Ch15transCount { + Ch15transCount(0) + } +} +#[doc = "DMA Channel 1 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch1transCount(pub u32); +impl Ch1transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch1transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch1transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch1transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch1transCount { + #[inline(always)] + fn default() -> Ch1transCount { + Ch1transCount(0) + } +} +#[doc = "DMA Channel 2 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch2transCount(pub u32); +impl Ch2transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch2transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch2transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch2transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch2transCount { + #[inline(always)] + fn default() -> Ch2transCount { + Ch2transCount(0) + } +} +#[doc = "DMA Channel 3 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch3transCount(pub u32); +impl Ch3transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch3transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch3transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch3transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch3transCount { + #[inline(always)] + fn default() -> Ch3transCount { + Ch3transCount(0) + } +} +#[doc = "DMA Channel 4 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch4transCount(pub u32); +impl Ch4transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch4transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch4transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch4transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch4transCount { + #[inline(always)] + fn default() -> Ch4transCount { + Ch4transCount(0) + } +} +#[doc = "DMA Channel 5 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch5transCount(pub u32); +impl Ch5transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch5transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch5transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch5transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch5transCount { + #[inline(always)] + fn default() -> Ch5transCount { + Ch5transCount(0) + } +} +#[doc = "DMA Channel 6 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch6transCount(pub u32); +impl Ch6transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch6transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch6transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch6transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch6transCount { + #[inline(always)] + fn default() -> Ch6transCount { + Ch6transCount(0) + } +} +#[doc = "DMA Channel 7 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch7transCount(pub u32); +impl Ch7transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch7transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch7transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch7transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch7transCount { + #[inline(always)] + fn default() -> Ch7transCount { + Ch7transCount(0) + } +} +#[doc = "DMA Channel 8 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch8transCount(pub u32); +impl Ch8transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch8transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch8transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch8transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch8transCount { + #[inline(always)] + fn default() -> Ch8transCount { + Ch8transCount(0) + } +} +#[doc = "DMA Channel 9 Transfer Count"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ch9transCount(pub u32); +impl Ch9transCount { + #[doc = "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."] + #[inline(always)] + pub const fn count(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_count(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 0usize)) | (((val as u32) & 0x0fff_ffff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Ch9transCountMode { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Ch9transCountMode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Ch9transCountMode) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for Ch9transCount { + #[inline(always)] + fn default() -> Ch9transCount { + Ch9transCount(0) + } +} +#[doc = "Abort an in-progress transfer sequence on one or more channels"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChanAbort(pub u32); +impl ChanAbort { + #[doc = "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."] + #[inline(always)] + pub const fn chan_abort(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_chan_abort(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for ChanAbort { + #[inline(always)] + fn default() -> ChanAbort { + ChanAbort(0) + } +} +#[doc = "DMA Channel 13 Control and Status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct CtrlTrig(pub u32); +impl CtrlTrig { + #[doc = "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)"] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn high_priority(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_high_priority(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn data_size(&self) -> super::vals::DataSize { + let val = (self.0 >> 2usize) & 0x03; + super::vals::DataSize::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_data_size(&mut self, val: super::vals::DataSize) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn incr_read(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_incr_read(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn incr_read_rev(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_incr_read_rev(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn incr_write(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_incr_write(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn incr_write_rev(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_incr_write_rev(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ring_size(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ring_size(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ring_sel(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ring_sel(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn chain_to(&self) -> u8 { + let val = (self.0 >> 13usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_chain_to(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 13usize)) | (((val as u32) & 0x0f) << 13usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn treq_sel(&self) -> super::vals::TreqSel { + let val = (self.0 >> 17usize) & 0x3f; + super::vals::TreqSel::from_bits(val as u8) + } + #[doc = "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"] + #[inline(always)] + pub fn set_treq_sel(&mut self, val: super::vals::TreqSel) { + self.0 = (self.0 & !(0x3f << 17usize)) | (((val.to_bits() as u32) & 0x3f) << 17usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn irq_quiet(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_irq_quiet(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn bswap(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_bswap(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sniff_en(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sniff_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn busy(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_busy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn write_error(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_write_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn read_error(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_read_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ahb_error(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ahb_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for CtrlTrig { + #[inline(always)] + fn default() -> CtrlTrig { + CtrlTrig(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DbgCtdreq(pub u32); +impl DbgCtdreq { + #[inline(always)] + pub const fn dbg_ctdreq(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[inline(always)] + pub fn set_dbg_ctdreq(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } +} +impl Default for DbgCtdreq { + #[inline(always)] + fn default() -> DbgCtdreq { + DbgCtdreq(0) + } +} +#[doc = "Debug RAF, WAF, TDF levels"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FifoLevels(pub u32); +impl FifoLevels { + #[doc = "Current Transfer-Data-FIFO fill level"] + #[inline(always)] + pub const fn tdf_lvl(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "Current Transfer-Data-FIFO fill level"] + #[inline(always)] + pub fn set_tdf_lvl(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "Current Write-Address-FIFO fill level"] + #[inline(always)] + pub const fn waf_lvl(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Current Write-Address-FIFO fill level"] + #[inline(always)] + pub fn set_waf_lvl(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Current Read-Address-FIFO fill level"] + #[inline(always)] + pub const fn raf_lvl(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Current Read-Address-FIFO fill level"] + #[inline(always)] + pub fn set_raf_lvl(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for FifoLevels { + #[inline(always)] + fn default() -> FifoLevels { + FifoLevels(0) + } +} +#[doc = "Interrupt Enables for IRQ 0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte0(pub u32); +impl Inte0 { + #[doc = "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."] + #[inline(always)] + pub const fn inte0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_inte0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Inte0 { + #[inline(always)] + fn default() -> Inte0 { + Inte0(0) + } +} +#[doc = "Interrupt Enables for IRQ 1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte1(pub u32); +impl Inte1 { + #[doc = "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."] + #[inline(always)] + pub const fn inte1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_inte1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Inte1 { + #[inline(always)] + fn default() -> Inte1 { + Inte1(0) + } +} +#[doc = "Interrupt Enables for IRQ 2"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte2(pub u32); +impl Inte2 { + #[doc = "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."] + #[inline(always)] + pub const fn inte2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_inte2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Inte2 { + #[inline(always)] + fn default() -> Inte2 { + Inte2(0) + } +} +#[doc = "Interrupt Enables for IRQ 3"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte3(pub u32); +impl Inte3 { + #[doc = "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."] + #[inline(always)] + pub const fn inte3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_inte3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Inte3 { + #[inline(always)] + fn default() -> Inte3 { + Inte3(0) + } +} +#[doc = "Force Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf0(pub u32); +impl Intf0 { + #[doc = "Write 1s to force the corresponding bits in INTS0. The interrupt remains asserted until INTF0 is cleared."] + #[inline(always)] + pub const fn intf0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Write 1s to force the corresponding bits in INTS0. The interrupt remains asserted until INTF0 is cleared."] + #[inline(always)] + pub fn set_intf0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intf0 { + #[inline(always)] + fn default() -> Intf0 { + Intf0(0) + } +} +#[doc = "Force Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf1(pub u32); +impl Intf1 { + #[doc = "Write 1s to force the corresponding bits in INTS1. The interrupt remains asserted until INTF1 is cleared."] + #[inline(always)] + pub const fn intf1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Write 1s to force the corresponding bits in INTS1. The interrupt remains asserted until INTF1 is cleared."] + #[inline(always)] + pub fn set_intf1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intf1 { + #[inline(always)] + fn default() -> Intf1 { + Intf1(0) + } +} +#[doc = "Force Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf2(pub u32); +impl Intf2 { + #[doc = "Write 1s to force the corresponding bits in INTS2. The interrupt remains asserted until INTF2 is cleared."] + #[inline(always)] + pub const fn intf2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Write 1s to force the corresponding bits in INTS2. The interrupt remains asserted until INTF2 is cleared."] + #[inline(always)] + pub fn set_intf2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intf2 { + #[inline(always)] + fn default() -> Intf2 { + Intf2(0) + } +} +#[doc = "Force Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf3(pub u32); +impl Intf3 { + #[doc = "Write 1s to force the corresponding bits in INTS3. The interrupt remains asserted until INTF3 is cleared."] + #[inline(always)] + pub const fn intf3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Write 1s to force the corresponding bits in INTS3. The interrupt remains asserted until INTF3 is cleared."] + #[inline(always)] + pub fn set_intf3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intf3 { + #[inline(always)] + fn default() -> Intf3 { + Intf3(0) + } +} +#[doc = "Interrupt Status (raw)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr(pub u32); +impl Intr { + #[doc = "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."] + #[inline(always)] + pub const fn intr(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_intr(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intr { + #[inline(always)] + fn default() -> Intr { + Intr(0) + } +} +#[doc = "Interrupt Status (raw)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr1(pub u32); +impl Intr1 { + #[doc = "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."] + #[inline(always)] + pub const fn intr1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_intr1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intr1 { + #[inline(always)] + fn default() -> Intr1 { + Intr1(0) + } +} +#[doc = "Interrupt Status (raw)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr2(pub u32); +impl Intr2 { + #[doc = "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."] + #[inline(always)] + pub const fn intr2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_intr2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intr2 { + #[inline(always)] + fn default() -> Intr2 { + Intr2(0) + } +} +#[doc = "Interrupt Status (raw)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr3(pub u32); +impl Intr3 { + #[doc = "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."] + #[inline(always)] + pub const fn intr3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_intr3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Intr3 { + #[inline(always)] + fn default() -> Intr3 { + Intr3(0) + } +} +#[doc = "Interrupt Status for IRQ 0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints0(pub u32); +impl Ints0 { + #[doc = "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."] + #[inline(always)] + pub const fn ints0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ints0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Ints0 { + #[inline(always)] + fn default() -> Ints0 { + Ints0(0) + } +} +#[doc = "Interrupt Status for IRQ 1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints1(pub u32); +impl Ints1 { + #[doc = "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."] + #[inline(always)] + pub const fn ints1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ints1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Ints1 { + #[inline(always)] + fn default() -> Ints1 { + Ints1(0) + } +} +#[doc = "Interrupt Status for IRQ 2"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints2(pub u32); +impl Ints2 { + #[doc = "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."] + #[inline(always)] + pub const fn ints2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ints2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Ints2 { + #[inline(always)] + fn default() -> Ints2 { + Ints2(0) + } +} +#[doc = "Interrupt Status for IRQ 3"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints3(pub u32); +impl Ints3 { + #[doc = "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."] + #[inline(always)] + pub const fn ints3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ints3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Ints3 { + #[inline(always)] + fn default() -> Ints3 { + Ints3(0) + } +} +#[doc = "Base address register for MPU region 0. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar0(pub u32); +impl MpuBar0 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar0 { + #[inline(always)] + fn default() -> MpuBar0 { + MpuBar0(0) + } +} +#[doc = "Base address register for MPU region 1. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar1(pub u32); +impl MpuBar1 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar1 { + #[inline(always)] + fn default() -> MpuBar1 { + MpuBar1(0) + } +} +#[doc = "Base address register for MPU region 2. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar2(pub u32); +impl MpuBar2 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar2 { + #[inline(always)] + fn default() -> MpuBar2 { + MpuBar2(0) + } +} +#[doc = "Base address register for MPU region 3. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar3(pub u32); +impl MpuBar3 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar3 { + #[inline(always)] + fn default() -> MpuBar3 { + MpuBar3(0) + } +} +#[doc = "Base address register for MPU region 4. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar4(pub u32); +impl MpuBar4 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar4 { + #[inline(always)] + fn default() -> MpuBar4 { + MpuBar4(0) + } +} +#[doc = "Base address register for MPU region 5. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar5(pub u32); +impl MpuBar5 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar5 { + #[inline(always)] + fn default() -> MpuBar5 { + MpuBar5(0) + } +} +#[doc = "Base address register for MPU region 6. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar6(pub u32); +impl MpuBar6 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar6 { + #[inline(always)] + fn default() -> MpuBar6 { + MpuBar6(0) + } +} +#[doc = "Base address register for MPU region 7. Writable only from a Secure, Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuBar7(pub u32); +impl MpuBar7 { + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuBar7 { + #[inline(always)] + fn default() -> MpuBar7 { + MpuBar7(0) + } +} +#[doc = "Control register for DMA MPU. Accessible only from a Privileged context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuCtrl(pub u32); +impl MpuCtrl { + #[doc = "Determine whether an address not covered by an active MPU region is Privileged (1) or Unprivileged (0)"] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Determine whether an address not covered by an active MPU region is Privileged (1) or Unprivileged (0)"] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determine whether an address not covered by an active MPU region is Secure (1) or Non-secure (0)"] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determine whether an address not covered by an active MPU region is Secure (1) or Non-secure (0)"] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ns_hide_addr(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ns_hide_addr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for MpuCtrl { + #[inline(always)] + fn default() -> MpuCtrl { + MpuCtrl(0) + } +} +#[doc = "Limit address register for MPU region 0. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar0(pub u32); +impl MpuLar0 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar0 { + #[inline(always)] + fn default() -> MpuLar0 { + MpuLar0(0) + } +} +#[doc = "Limit address register for MPU region 1. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar1(pub u32); +impl MpuLar1 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar1 { + #[inline(always)] + fn default() -> MpuLar1 { + MpuLar1(0) + } +} +#[doc = "Limit address register for MPU region 2. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar2(pub u32); +impl MpuLar2 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar2 { + #[inline(always)] + fn default() -> MpuLar2 { + MpuLar2(0) + } +} +#[doc = "Limit address register for MPU region 3. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar3(pub u32); +impl MpuLar3 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar3 { + #[inline(always)] + fn default() -> MpuLar3 { + MpuLar3(0) + } +} +#[doc = "Limit address register for MPU region 4. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar4(pub u32); +impl MpuLar4 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar4 { + #[inline(always)] + fn default() -> MpuLar4 { + MpuLar4(0) + } +} +#[doc = "Limit address register for MPU region 5. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar5(pub u32); +impl MpuLar5 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar5 { + #[inline(always)] + fn default() -> MpuLar5 { + MpuLar5(0) + } +} +#[doc = "Limit address register for MPU region 6. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar6(pub u32); +impl MpuLar6 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar6 { + #[inline(always)] + fn default() -> MpuLar6 { + MpuLar6(0) + } +} +#[doc = "Limit address register for MPU region 7. Writable only from a Secure, Privileged context, with the exception of the P bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MpuLar7(pub u32); +impl MpuLar7 { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn addr(&self) -> u32 { + let val = (self.0 >> 5usize) & 0x07ff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x07ff_ffff << 5usize)) | (((val as u32) & 0x07ff_ffff) << 5usize); + } +} +impl Default for MpuLar7 { + #[inline(always)] + fn default() -> MpuLar7 { + MpuLar7(0) + } +} +#[doc = "Trigger one or more channels simultaneously"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MultiChanTrigger(pub u32); +impl MultiChanTrigger { + #[doc = "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."] + #[inline(always)] + pub const fn multi_chan_trigger(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_multi_chan_trigger(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for MultiChanTrigger { + #[inline(always)] + fn default() -> MultiChanTrigger { + MultiChanTrigger(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Nchannels(pub u32); +impl Nchannels { + #[inline(always)] + pub const fn n_channels(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[inline(always)] + pub fn set_n_channels(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } +} +impl Default for Nchannels { + #[inline(always)] + fn default() -> Nchannels { + Nchannels(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh0(pub u32); +impl SeccfgCh0 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh0 { + #[inline(always)] + fn default() -> SeccfgCh0 { + SeccfgCh0(0) + } +} +#[doc = "Security configuration for channel 1. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh1(pub u32); +impl SeccfgCh1 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh1 { + #[inline(always)] + fn default() -> SeccfgCh1 { + SeccfgCh1(0) + } +} +#[doc = "Security configuration for channel 10. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh10(pub u32); +impl SeccfgCh10 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh10 { + #[inline(always)] + fn default() -> SeccfgCh10 { + SeccfgCh10(0) + } +} +#[doc = "Security configuration for channel 11. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh11(pub u32); +impl SeccfgCh11 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh11 { + #[inline(always)] + fn default() -> SeccfgCh11 { + SeccfgCh11(0) + } +} +#[doc = "Security configuration for channel 12. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh12(pub u32); +impl SeccfgCh12 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh12 { + #[inline(always)] + fn default() -> SeccfgCh12 { + SeccfgCh12(0) + } +} +#[doc = "Security configuration for channel 13. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh13(pub u32); +impl SeccfgCh13 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh13 { + #[inline(always)] + fn default() -> SeccfgCh13 { + SeccfgCh13(0) + } +} +#[doc = "Security configuration for channel 14. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh14(pub u32); +impl SeccfgCh14 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh14 { + #[inline(always)] + fn default() -> SeccfgCh14 { + SeccfgCh14(0) + } +} +#[doc = "Security configuration for channel 15. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh15(pub u32); +impl SeccfgCh15 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh15 { + #[inline(always)] + fn default() -> SeccfgCh15 { + SeccfgCh15(0) + } +} +#[doc = "Security configuration for channel 2. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh2(pub u32); +impl SeccfgCh2 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh2 { + #[inline(always)] + fn default() -> SeccfgCh2 { + SeccfgCh2(0) + } +} +#[doc = "Security configuration for channel 3. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh3(pub u32); +impl SeccfgCh3 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh3 { + #[inline(always)] + fn default() -> SeccfgCh3 { + SeccfgCh3(0) + } +} +#[doc = "Security configuration for channel 4. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh4(pub u32); +impl SeccfgCh4 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh4 { + #[inline(always)] + fn default() -> SeccfgCh4 { + SeccfgCh4(0) + } +} +#[doc = "Security configuration for channel 5. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh5(pub u32); +impl SeccfgCh5 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh5 { + #[inline(always)] + fn default() -> SeccfgCh5 { + SeccfgCh5(0) + } +} +#[doc = "Security configuration for channel 6. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh6(pub u32); +impl SeccfgCh6 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh6 { + #[inline(always)] + fn default() -> SeccfgCh6 { + SeccfgCh6(0) + } +} +#[doc = "Security configuration for channel 7. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh7(pub u32); +impl SeccfgCh7 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh7 { + #[inline(always)] + fn default() -> SeccfgCh7 { + SeccfgCh7(0) + } +} +#[doc = "Security configuration for channel 8. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh8(pub u32); +impl SeccfgCh8 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh8 { + #[inline(always)] + fn default() -> SeccfgCh8 { + SeccfgCh8(0) + } +} +#[doc = "Security configuration for channel 9. 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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgCh9(pub u32); +impl SeccfgCh9 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for SeccfgCh9 { + #[inline(always)] + fn default() -> SeccfgCh9 { + SeccfgCh9(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgIrq0(pub u32); +impl SeccfgIrq0 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for SeccfgIrq0 { + #[inline(always)] + fn default() -> SeccfgIrq0 { + SeccfgIrq0(0) + } +} +#[doc = "Security configuration for IRQ 1. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgIrq1(pub u32); +impl SeccfgIrq1 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for SeccfgIrq1 { + #[inline(always)] + fn default() -> SeccfgIrq1 { + SeccfgIrq1(0) + } +} +#[doc = "Security configuration for IRQ 2. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgIrq2(pub u32); +impl SeccfgIrq2 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for SeccfgIrq2 { + #[inline(always)] + fn default() -> SeccfgIrq2 { + SeccfgIrq2(0) + } +} +#[doc = "Security configuration for IRQ 3. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgIrq3(pub u32); +impl SeccfgIrq3 { + #[doc = "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."] + #[inline(always)] + pub const fn p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for SeccfgIrq3 { + #[inline(always)] + fn default() -> SeccfgIrq3 { + SeccfgIrq3(0) + } +} +#[doc = "Miscellaneous security configuration"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeccfgMisc(pub u32); +impl SeccfgMisc { + #[doc = "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."] + #[inline(always)] + pub const fn sniff_p(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sniff_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sniff_s(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sniff_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn timer0_p(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_timer0_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, the TIMER0 register is only accessible from a Secure context, and timer DREQ 0 is only visible to Secure channels."] + #[inline(always)] + pub const fn timer0_s(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, the TIMER0 register is only accessible from a Secure context, and timer DREQ 0 is only visible to Secure channels."] + #[inline(always)] + pub fn set_timer0_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn timer1_p(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_timer1_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "If 1, the TIMER1 register is only accessible from a Secure context, and timer DREQ 1 is only visible to Secure channels."] + #[inline(always)] + pub const fn timer1_s(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "If 1, the TIMER1 register is only accessible from a Secure context, and timer DREQ 1 is only visible to Secure channels."] + #[inline(always)] + pub fn set_timer1_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn timer2_p(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_timer2_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "If 1, the TIMER2 register is only accessible from a Secure context, and timer DREQ 2 is only visible to Secure channels."] + #[inline(always)] + pub const fn timer2_s(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "If 1, the TIMER2 register is only accessible from a Secure context, and timer DREQ 2 is only visible to Secure channels."] + #[inline(always)] + pub fn set_timer2_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn timer3_p(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_timer3_p(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "If 1, the TIMER3 register is only accessible from a Secure context, and timer DREQ 3 is only visible to Secure channels."] + #[inline(always)] + pub const fn timer3_s(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "If 1, the TIMER3 register is only accessible from a Secure context, and timer DREQ 3 is only visible to Secure channels."] + #[inline(always)] + pub fn set_timer3_s(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } +} +impl Default for SeccfgMisc { + #[inline(always)] + fn default() -> SeccfgMisc { + SeccfgMisc(0) + } +} +#[doc = "Sniffer Control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SniffCtrl(pub u32); +impl SniffCtrl { + #[doc = "Enable sniffer"] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Enable sniffer"] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "DMA channel for Sniffer to observe"] + #[inline(always)] + pub const fn dmach(&self) -> u8 { + let val = (self.0 >> 1usize) & 0x0f; + val as u8 + } + #[doc = "DMA channel for Sniffer to observe"] + #[inline(always)] + pub fn set_dmach(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 1usize)) | (((val as u32) & 0x0f) << 1usize); + } + #[inline(always)] + pub const fn calc(&self) -> super::vals::Calc { + let val = (self.0 >> 5usize) & 0x0f; + super::vals::Calc::from_bits(val as u8) + } + #[inline(always)] + pub fn set_calc(&mut self, val: super::vals::Calc) { + self.0 = (self.0 & !(0x0f << 5usize)) | (((val.to_bits() as u32) & 0x0f) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn bswap(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_bswap(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn out_rev(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_out_rev(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn out_inv(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_out_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for SniffCtrl { + #[inline(always)] + fn default() -> SniffCtrl { + SniffCtrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer(pub u32); +impl Timer { + #[doc = "Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer."] + #[inline(always)] + pub const fn y(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer."] + #[inline(always)] + pub fn set_y(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer."] + #[inline(always)] + pub const fn x(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[doc = "Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer."] + #[inline(always)] + pub fn set_x(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for Timer { + #[inline(always)] + fn default() -> Timer { + Timer(0) + } +} diff --git a/src/rp2350/dma/vals.rs b/src/rp2350/dma/vals.rs new file mode 100644 index 00000000..f655aa23 --- /dev/null +++ b/src/rp2350/dma/vals.rs @@ -0,0 +1,900 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Calc { + #[doc = "Calculate a CRC-32 (IEEE802.3 polynomial)"] + CRC32 = 0, + #[doc = "Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data"] + CRC32R = 0x01, + #[doc = "Calculate a CRC-16-CCITT"] + CRC16 = 0x02, + #[doc = "Calculate a CRC-16-CCITT with bit reversed data"] + CRC16R = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + #[doc = "XOR reduction over all data. == 1 if the total 1 population count is odd."] + EVEN = 0x0e, + #[doc = "Calculate a simple 32-bit checksum (addition with a 32 bit accumulator)"] + SUM = 0x0f, +} +impl Calc { + #[inline(always)] + pub const fn from_bits(val: u8) -> Calc { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Calc { + #[inline(always)] + fn from(val: u8) -> Calc { + Calc::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Calc) -> u8 { + Calc::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch0transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch0transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch0transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch0transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch0transCountMode { + Ch0transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch0transCountMode) -> u8 { + Ch0transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch10transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch10transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch10transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch10transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch10transCountMode { + Ch10transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch10transCountMode) -> u8 { + Ch10transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch11transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch11transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch11transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch11transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch11transCountMode { + Ch11transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch11transCountMode) -> u8 { + Ch11transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch12transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch12transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch12transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch12transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch12transCountMode { + Ch12transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch12transCountMode) -> u8 { + Ch12transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch13transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch13transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch13transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch13transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch13transCountMode { + Ch13transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch13transCountMode) -> u8 { + Ch13transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch14transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch14transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch14transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch14transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch14transCountMode { + Ch14transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch14transCountMode) -> u8 { + Ch14transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch15transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch15transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch15transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch15transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch15transCountMode { + Ch15transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch15transCountMode) -> u8 { + Ch15transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch1transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch1transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch1transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch1transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch1transCountMode { + Ch1transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch1transCountMode) -> u8 { + Ch1transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch2transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch2transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch2transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch2transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch2transCountMode { + Ch2transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch2transCountMode) -> u8 { + Ch2transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch3transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch3transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch3transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch3transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch3transCountMode { + Ch3transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch3transCountMode) -> u8 { + Ch3transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch4transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch4transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch4transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch4transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch4transCountMode { + Ch4transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch4transCountMode) -> u8 { + Ch4transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch5transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch5transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch5transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch5transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch5transCountMode { + Ch5transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch5transCountMode) -> u8 { + Ch5transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch6transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch6transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch6transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch6transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch6transCountMode { + Ch6transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch6transCountMode) -> u8 { + Ch6transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch7transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch7transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch7transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch7transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch7transCountMode { + Ch7transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch7transCountMode) -> u8 { + Ch7transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch8transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch8transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch8transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch8transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch8transCountMode { + Ch8transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch8transCountMode) -> u8 { + Ch8transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch9transCountMode { + NORMAL = 0, + TRIGGER_SELF = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + ENDLESS = 0x0f, +} +impl Ch9transCountMode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch9transCountMode { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch9transCountMode { + #[inline(always)] + fn from(val: u8) -> Ch9transCountMode { + Ch9transCountMode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch9transCountMode) -> u8 { + Ch9transCountMode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum DataSize { + SIZE_BYTE = 0, + SIZE_HALFWORD = 0x01, + SIZE_WORD = 0x02, + _RESERVED_3 = 0x03, +} +impl DataSize { + #[inline(always)] + pub const fn from_bits(val: u8) -> DataSize { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for DataSize { + #[inline(always)] + fn from(val: u8) -> DataSize { + DataSize::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: DataSize) -> u8 { + DataSize::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum TreqSel { + #[doc = "Select PIO0's TX FIFO 0 as TREQ"] + PIO0_TX0 = 0, + #[doc = "Select PIO0's TX FIFO 1 as TREQ"] + PIO0_TX1 = 0x01, + #[doc = "Select PIO0's TX FIFO 2 as TREQ"] + PIO0_TX2 = 0x02, + #[doc = "Select PIO0's TX FIFO 3 as TREQ"] + PIO0_TX3 = 0x03, + #[doc = "Select PIO0's RX FIFO 0 as TREQ"] + PIO0_RX0 = 0x04, + #[doc = "Select PIO0's RX FIFO 1 as TREQ"] + PIO0_RX1 = 0x05, + #[doc = "Select PIO0's RX FIFO 2 as TREQ"] + PIO0_RX2 = 0x06, + #[doc = "Select PIO0's RX FIFO 3 as TREQ"] + PIO0_RX3 = 0x07, + #[doc = "Select PIO1's TX FIFO 0 as TREQ"] + PIO1_TX0 = 0x08, + #[doc = "Select PIO1's TX FIFO 1 as TREQ"] + PIO1_TX1 = 0x09, + #[doc = "Select PIO1's TX FIFO 2 as TREQ"] + PIO1_TX2 = 0x0a, + #[doc = "Select PIO1's TX FIFO 3 as TREQ"] + PIO1_TX3 = 0x0b, + #[doc = "Select PIO1's RX FIFO 0 as TREQ"] + PIO1_RX0 = 0x0c, + #[doc = "Select PIO1's RX FIFO 1 as TREQ"] + PIO1_RX1 = 0x0d, + #[doc = "Select PIO1's RX FIFO 2 as TREQ"] + PIO1_RX2 = 0x0e, + #[doc = "Select PIO1's RX FIFO 3 as TREQ"] + PIO1_RX3 = 0x0f, + #[doc = "Select PIO2's TX FIFO 0 as TREQ"] + PIO2_TX0 = 0x10, + #[doc = "Select PIO2's TX FIFO 1 as TREQ"] + PIO2_TX1 = 0x11, + #[doc = "Select PIO2's TX FIFO 2 as TREQ"] + PIO2_TX2 = 0x12, + #[doc = "Select PIO2's TX FIFO 3 as TREQ"] + PIO2_TX3 = 0x13, + #[doc = "Select PIO2's RX FIFO 0 as TREQ"] + PIO2_RX0 = 0x14, + #[doc = "Select PIO2's RX FIFO 1 as TREQ"] + PIO2_RX1 = 0x15, + #[doc = "Select PIO2's RX FIFO 2 as TREQ"] + PIO2_RX2 = 0x16, + #[doc = "Select PIO2's RX FIFO 3 as TREQ"] + PIO2_RX3 = 0x17, + #[doc = "Select SPI0's TX FIFO as TREQ"] + SPI0_TX = 0x18, + #[doc = "Select SPI0's RX FIFO as TREQ"] + SPI0_RX = 0x19, + #[doc = "Select SPI1's TX FIFO as TREQ"] + SPI1_TX = 0x1a, + #[doc = "Select SPI1's RX FIFO as TREQ"] + SPI1_RX = 0x1b, + #[doc = "Select UART0's TX FIFO as TREQ"] + UART0_TX = 0x1c, + #[doc = "Select UART0's RX FIFO as TREQ"] + UART0_RX = 0x1d, + #[doc = "Select UART1's TX FIFO as TREQ"] + UART1_TX = 0x1e, + #[doc = "Select UART1's RX FIFO as TREQ"] + UART1_RX = 0x1f, + #[doc = "Select PWM Counter 0's Wrap Value as TREQ"] + PWM_WRAP0 = 0x20, + #[doc = "Select PWM Counter 1's Wrap Value as TREQ"] + PWM_WRAP1 = 0x21, + #[doc = "Select PWM Counter 2's Wrap Value as TREQ"] + PWM_WRAP2 = 0x22, + #[doc = "Select PWM Counter 3's Wrap Value as TREQ"] + PWM_WRAP3 = 0x23, + #[doc = "Select PWM Counter 4's Wrap Value as TREQ"] + PWM_WRAP4 = 0x24, + #[doc = "Select PWM Counter 5's Wrap Value as TREQ"] + PWM_WRAP5 = 0x25, + #[doc = "Select PWM Counter 6's Wrap Value as TREQ"] + PWM_WRAP6 = 0x26, + #[doc = "Select PWM Counter 7's Wrap Value as TREQ"] + PWM_WRAP7 = 0x27, + #[doc = "Select PWM Counter 8's Wrap Value as TREQ"] + PWM_WRAP8 = 0x28, + #[doc = "Select PWM Counter 9's Wrap Value as TREQ"] + PWM_WRAP9 = 0x29, + #[doc = "Select PWM Counter 0's Wrap Value as TREQ"] + PWM_WRAP10 = 0x2a, + #[doc = "Select PWM Counter 1's Wrap Value as TREQ"] + PWM_WRAP11 = 0x2b, + #[doc = "Select I2C0's TX FIFO as TREQ"] + I2C0_TX = 0x2c, + #[doc = "Select I2C0's RX FIFO as TREQ"] + I2C0_RX = 0x2d, + #[doc = "Select I2C1's TX FIFO as TREQ"] + I2C1_TX = 0x2e, + #[doc = "Select I2C1's RX FIFO as TREQ"] + I2C1_RX = 0x2f, + #[doc = "Select the ADC as TREQ"] + ADC = 0x30, + #[doc = "Select the XIP Streaming FIFO as TREQ"] + XIP_STREAM = 0x31, + #[doc = "Select XIP_QMITX as TREQ"] + XIP_QMITX = 0x32, + #[doc = "Select XIP_QMIRX as TREQ"] + XIP_QMIRX = 0x33, + #[doc = "Select HSTX as TREQ"] + HSTX = 0x34, + #[doc = "Select CORESIGHT as TREQ"] + CORESIGHT = 0x35, + #[doc = "Select SHA256 as TREQ"] + SHA256 = 0x36, + _RESERVED_37 = 0x37, + _RESERVED_38 = 0x38, + _RESERVED_39 = 0x39, + _RESERVED_3a = 0x3a, + #[doc = "Select Timer 0 as TREQ"] + TIMER0 = 0x3b, + #[doc = "Select Timer 1 as TREQ"] + TIMER1 = 0x3c, + #[doc = "Select Timer 2 as TREQ (Optional)"] + TIMER2 = 0x3d, + #[doc = "Select Timer 3 as TREQ (Optional)"] + TIMER3 = 0x3e, + #[doc = "Permanent request, for unpaced transfers."] + PERMANENT = 0x3f, +} +impl TreqSel { + #[inline(always)] + pub const fn from_bits(val: u8) -> TreqSel { + unsafe { core::mem::transmute(val & 0x3f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for TreqSel { + #[inline(always)] + fn from(val: u8) -> TreqSel { + TreqSel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: TreqSel) -> u8 { + TreqSel::to_bits(val) + } +} diff --git a/src/rp2350/eppb.rs b/src/rp2350/eppb.rs new file mode 100644 index 00000000..cfca571c --- /dev/null +++ b/src/rp2350/eppb.rs @@ -0,0 +1,33 @@ +#[doc = "Cortex-M33 EPPB vendor register block for RP2350"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Eppb { + ptr: *mut u8, +} +unsafe impl Send for Eppb {} +unsafe impl Sync for Eppb {} +impl Eppb { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "NMI mask for IRQs 0 through 31. This register is core-local, and is reset by a processor warm reset."] + #[inline(always)] + pub const fn nmi_mask0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "NMI mask for IRQs 0 though 51. This register is core-local, and is reset by a processor warm reset."] + #[inline(always)] + pub const fn nmi_mask1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Nonstandard sleep control register"] + #[inline(always)] + pub const fn sleepctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/eppb/regs.rs b/src/rp2350/eppb/regs.rs new file mode 100644 index 00000000..de383233 --- /dev/null +++ b/src/rp2350/eppb/regs.rs @@ -0,0 +1,66 @@ +#[doc = "NMI mask for IRQs 0 though 51. This register is core-local, and is reset by a processor warm reset."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct NmiMask1(pub u32); +impl NmiMask1 { + #[inline(always)] + pub const fn nmi_mask1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x000f_ffff; + val as u32 + } + #[inline(always)] + pub fn set_nmi_mask1(&mut self, val: u32) { + self.0 = (self.0 & !(0x000f_ffff << 0usize)) | (((val as u32) & 0x000f_ffff) << 0usize); + } +} +impl Default for NmiMask1 { + #[inline(always)] + fn default() -> NmiMask1 { + NmiMask1(0) + } +} +#[doc = "Nonstandard sleep control register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sleepctrl(pub u32); +impl Sleepctrl { + #[doc = "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."] + #[inline(always)] + pub const fn light_sleep(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_light_sleep(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn wicenreq(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_wicenreq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Status signal from the processor's interrupt controller. Changes to WICENREQ are eventually reflected in WICENACK."] + #[inline(always)] + pub const fn wicenack(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Status signal from the processor's interrupt controller. Changes to WICENREQ are eventually reflected in WICENACK."] + #[inline(always)] + pub fn set_wicenack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for Sleepctrl { + #[inline(always)] + fn default() -> Sleepctrl { + Sleepctrl(0) + } +} diff --git a/src/rp2350/glitch_detector.rs b/src/rp2350/glitch_detector.rs new file mode 100644 index 00000000..7508e406 --- /dev/null +++ b/src/rp2350/glitch_detector.rs @@ -0,0 +1,47 @@ +#[doc = "Glitch detector controls"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct GlitchDetector { + ptr: *mut u8, +} +unsafe impl Send for GlitchDetector {} +unsafe impl Sync for GlitchDetector {} +impl GlitchDetector { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn arm(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn disarm(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Adjust the sensitivity of glitch detectors to values other than their OTP-provided defaults. This register is Secure read/write only."] + #[inline(always)] + pub const fn sensitivity(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[inline(always)] + pub const fn lock(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn trig_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn trig_force(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/glitch_detector/regs.rs b/src/rp2350/glitch_detector/regs.rs new file mode 100644 index 00000000..3b1abedc --- /dev/null +++ b/src/rp2350/glitch_detector/regs.rs @@ -0,0 +1,243 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Arm(pub u32); +impl Arm { + #[inline(always)] + pub const fn arm(&self) -> super::vals::Arm { + let val = (self.0 >> 0usize) & 0xffff; + super::vals::Arm::from_bits(val as u16) + } + #[inline(always)] + pub fn set_arm(&mut self, val: super::vals::Arm) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val.to_bits() as u32) & 0xffff) << 0usize); + } +} +impl Default for Arm { + #[inline(always)] + fn default() -> Arm { + Arm(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Disarm(pub u32); +impl Disarm { + #[doc = "Forcibly disarm the glitch detectors, if they are armed by OTP. Ignored if ARM is YES. This register is Secure read/write only."] + #[inline(always)] + pub const fn disarm(&self) -> super::vals::Disarm { + let val = (self.0 >> 0usize) & 0xffff; + super::vals::Disarm::from_bits(val as u16) + } + #[doc = "Forcibly disarm the glitch detectors, if they are armed by OTP. Ignored if ARM is YES. This register is Secure read/write only."] + #[inline(always)] + pub fn set_disarm(&mut self, val: super::vals::Disarm) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val.to_bits() as u32) & 0xffff) << 0usize); + } +} +impl Default for Disarm { + #[inline(always)] + fn default() -> Disarm { + Disarm(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Lock(pub u32); +impl Lock { + #[doc = "Write any nonzero value to disable writes to ARM, DISARM, SENSITIVITY and LOCK. This register is Secure read/write only."] + #[inline(always)] + pub const fn lock(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "Write any nonzero value to disable writes to ARM, DISARM, SENSITIVITY and LOCK. This register is Secure read/write only."] + #[inline(always)] + pub fn set_lock(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Lock { + #[inline(always)] + fn default() -> Lock { + Lock(0) + } +} +#[doc = "Adjust the sensitivity of glitch detectors to values other than their OTP-provided defaults. This register is Secure read/write only."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sensitivity(pub u32); +impl Sensitivity { + #[doc = "Set sensitivity for detector 0. Higher values are more sensitive."] + #[inline(always)] + pub const fn det0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "Set sensitivity for detector 0. Higher values are more sensitive."] + #[inline(always)] + pub fn set_det0(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[doc = "Set sensitivity for detector 1. Higher values are more sensitive."] + #[inline(always)] + pub const fn det1(&self) -> u8 { + let val = (self.0 >> 2usize) & 0x03; + val as u8 + } + #[doc = "Set sensitivity for detector 1. Higher values are more sensitive."] + #[inline(always)] + pub fn set_det1(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); + } + #[doc = "Set sensitivity for detector 2. Higher values are more sensitive."] + #[inline(always)] + pub const fn det2(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x03; + val as u8 + } + #[doc = "Set sensitivity for detector 2. Higher values are more sensitive."] + #[inline(always)] + pub fn set_det2(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val as u32) & 0x03) << 4usize); + } + #[doc = "Set sensitivity for detector 3. Higher values are more sensitive."] + #[inline(always)] + pub const fn det3(&self) -> u8 { + let val = (self.0 >> 6usize) & 0x03; + val as u8 + } + #[doc = "Set sensitivity for detector 3. Higher values are more sensitive."] + #[inline(always)] + pub fn set_det3(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 6usize)) | (((val as u32) & 0x03) << 6usize); + } + #[doc = "Must be the inverse of DET0, else the default value is used."] + #[inline(always)] + pub const fn det0_inv(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x03; + val as u8 + } + #[doc = "Must be the inverse of DET0, else the default value is used."] + #[inline(always)] + pub fn set_det0_inv(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); + } + #[doc = "Must be the inverse of DET1, else the default value is used."] + #[inline(always)] + pub const fn det1_inv(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x03; + val as u8 + } + #[doc = "Must be the inverse of DET1, else the default value is used."] + #[inline(always)] + pub fn set_det1_inv(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); + } + #[doc = "Must be the inverse of DET2, else the default value is used."] + #[inline(always)] + pub const fn det2_inv(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x03; + val as u8 + } + #[doc = "Must be the inverse of DET2, else the default value is used."] + #[inline(always)] + pub fn set_det2_inv(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 12usize)) | (((val as u32) & 0x03) << 12usize); + } + #[doc = "Must be the inverse of DET3, else the default value is used."] + #[inline(always)] + pub const fn det3_inv(&self) -> u8 { + let val = (self.0 >> 14usize) & 0x03; + val as u8 + } + #[doc = "Must be the inverse of DET3, else the default value is used."] + #[inline(always)] + pub fn set_det3_inv(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize); + } + #[inline(always)] + pub const fn default(&self) -> super::vals::Default { + let val = (self.0 >> 24usize) & 0xff; + super::vals::Default::from_bits(val as u8) + } + #[inline(always)] + pub fn set_default(&mut self, val: super::vals::Default) { + self.0 = (self.0 & !(0xff << 24usize)) | (((val.to_bits() as u32) & 0xff) << 24usize); + } +} +impl Default for Sensitivity { + #[inline(always)] + fn default() -> Sensitivity { + Sensitivity(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrigForce(pub u32); +impl TrigForce { + #[inline(always)] + pub const fn trig_force(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_trig_force(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for TrigForce { + #[inline(always)] + fn default() -> TrigForce { + TrigForce(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrigStatus(pub u32); +impl TrigStatus { + #[inline(always)] + pub const fn det0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_det0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn det1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_det1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn det2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_det2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn det3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_det3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for TrigStatus { + #[inline(always)] + fn default() -> TrigStatus { + TrigStatus(0) + } +} diff --git a/src/rp2350/glitch_detector/vals.rs b/src/rp2350/glitch_detector/vals.rs new file mode 100644 index 00000000..244acffc --- /dev/null +++ b/src/rp2350/glitch_detector/vals.rs @@ -0,0 +1,87 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Arm(pub u16); +impl Arm { + #[doc = "Force the glitch detectors to be armed. (Any value other than ARM_NO counts as YES)"] + pub const YES: Self = Self(0); + #[doc = "Do not force the glitch detectors to be armed"] + pub const NO: Self = Self(0x5bad); +} +impl Arm { + pub const fn from_bits(val: u16) -> Arm { + Self(val & 0xffff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Arm { + #[inline(always)] + fn from(val: u16) -> Arm { + Arm::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Arm) -> u16 { + Arm::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Default(pub u8); +impl Default { + #[doc = "Use the default sensitivity configured in OTP for all detectors. (Any value other than DEFAULT_NO counts as YES)"] + pub const YES: Self = Self(0); + #[doc = "Do not use the default sensitivity configured in OTP. Instead use the value from this register."] + pub const NO: Self = Self(0xde); +} +impl Default { + pub const fn from_bits(val: u8) -> Default { + Self(val & 0xff) + } + pub const fn to_bits(self) -> u8 { + self.0 + } +} +impl From for Default { + #[inline(always)] + fn from(val: u8) -> Default { + Default::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Default) -> u8 { + Default::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Disarm(pub u16); +impl Disarm { + #[doc = "Do not disarm the glitch detectors. (Any value other than DISARM_YES counts as NO)"] + pub const NO: Self = Self(0); + #[doc = "Disarm the glitch detectors"] + pub const YES: Self = Self(0xdcaf); +} +impl Disarm { + pub const fn from_bits(val: u16) -> Disarm { + Self(val & 0xffff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Disarm { + #[inline(always)] + fn from(val: u16) -> Disarm { + Disarm::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Disarm) -> u16 { + Disarm::to_bits(val) + } +} diff --git a/src/rp2350/hstx_ctrl.rs b/src/rp2350/hstx_ctrl.rs new file mode 100644 index 00000000..f24d2caf --- /dev/null +++ b/src/rp2350/hstx_ctrl.rs @@ -0,0 +1,72 @@ +#[doc = "Control interface to HSTX. For FIFO write access and status, see the HSTX_FIFO register block."] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct HstxCtrl { + ptr: *mut u8, +} +unsafe impl Send for HstxCtrl {} +unsafe impl Sync for HstxCtrl {} +impl HstxCtrl { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[inline(always)] + pub const fn csr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Data control register for output bit 0"] + #[inline(always)] + pub const fn bit0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Data control register for output bit 1"] + #[inline(always)] + pub const fn bit1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Data control register for output bit 2"] + #[inline(always)] + pub const fn bit2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Data control register for output bit 3"] + #[inline(always)] + pub const fn bit3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Data control register for output bit 4"] + #[inline(always)] + pub const fn bit4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Data control register for output bit 5"] + #[inline(always)] + pub const fn bit5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Data control register for output bit 6"] + #[inline(always)] + pub const fn bit6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Data control register for output bit 7"] + #[inline(always)] + pub const fn bit7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Configure the optional shifter inside the command expander"] + #[inline(always)] + pub const fn expand_shift(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Configure the optional TMDS encoder inside the command expander"] + #[inline(always)] + pub const fn expand_tmds(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/hstx_ctrl/regs.rs b/src/rp2350/hstx_ctrl/regs.rs new file mode 100644 index 00000000..19e4a0bb --- /dev/null +++ b/src/rp2350/hstx_ctrl/regs.rs @@ -0,0 +1,681 @@ +#[doc = "Data control register for output bit 0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit0(pub u32); +impl Bit0 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit0 { + #[inline(always)] + fn default() -> Bit0 { + Bit0(0) + } +} +#[doc = "Data control register for output bit 1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit1(pub u32); +impl Bit1 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit1 { + #[inline(always)] + fn default() -> Bit1 { + Bit1(0) + } +} +#[doc = "Data control register for output bit 2"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit2(pub u32); +impl Bit2 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit2 { + #[inline(always)] + fn default() -> Bit2 { + Bit2(0) + } +} +#[doc = "Data control register for output bit 3"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit3(pub u32); +impl Bit3 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit3 { + #[inline(always)] + fn default() -> Bit3 { + Bit3(0) + } +} +#[doc = "Data control register for output bit 4"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit4(pub u32); +impl Bit4 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit4 { + #[inline(always)] + fn default() -> Bit4 { + Bit4(0) + } +} +#[doc = "Data control register for output bit 5"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit5(pub u32); +impl Bit5 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit5 { + #[inline(always)] + fn default() -> Bit5 { + Bit5(0) + } +} +#[doc = "Data control register for output bit 6"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit6(pub u32); +impl Bit6 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit6 { + #[inline(always)] + fn default() -> Bit6 { + Bit6(0) + } +} +#[doc = "Data control register for output bit 7"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bit7(pub u32); +impl Bit7 { + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_p(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the first half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_p(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub const fn sel_n(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Shift register data bit select for the second half of the HSTX clock cycle"] + #[inline(always)] + pub fn set_sel_n(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub const fn inv(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Invert this data output (logical NOT)"] + #[inline(always)] + pub fn set_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub const fn clk(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock."] + #[inline(always)] + pub fn set_clk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Bit7 { + #[inline(always)] + fn default() -> Bit7 { + Bit7(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Csr(pub u32); +impl Csr { + #[doc = "When EN is 1, the HSTX will shift out data as it appears in the FIFO. As long as there is data, the HSTX shift register will shift once per clock cycle, and the frequency of popping from the FIFO is determined by the ratio of SHIFT and SHIFT_THRESH. When EN is 0, the FIFO is not popped. The shift counter and clock generator are also reset to their initial state for as long as EN is low. Note the initial phase of the clock generator can be configured by the CLKPHASE field. Once the HSTX is enabled again, and data is pushed to the FIFO, the generated clock's first rising edge will be one half-period after the first data is launched."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "When EN is 1, the HSTX will shift out data as it appears in the FIFO. As long as there is data, the HSTX shift register will shift once per clock cycle, and the frequency of popping from the FIFO is determined by the ratio of SHIFT and SHIFT_THRESH. When EN is 0, the FIFO is not popped. The shift counter and clock generator are also reset to their initial state for as long as EN is low. Note the initial phase of the clock generator can be configured by the CLKPHASE field. Once the HSTX is enabled again, and data is pushed to the FIFO, the generated clock's first rising edge will be one half-period after the first data is launched."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Enable the command expander. When 0, raw FIFO data is passed directly to the output shift register. When 1, the command expander can perform simple operations such as run length decoding on data between the FIFO and the shift register. Do not change CXPD_EN whilst EN is set. It's safe to set CXPD_EN simultaneously with setting EN."] + #[inline(always)] + pub const fn expand_en(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Enable the command expander. When 0, raw FIFO data is passed directly to the output shift register. When 1, the command expander can perform simple operations such as run length decoding on data between the FIFO and the shift register. Do not change CXPD_EN whilst EN is set. It's safe to set CXPD_EN simultaneously with setting EN."] + #[inline(always)] + pub fn set_expand_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Enable the PIO-to-HSTX 1:1 connection. The HSTX must be clocked *directly* from the system clock (not just from some other clock source of the same frequency) for this synchronous interface to function correctly. When COUPLED_MODE is set, BITx_SEL_P and SEL_N indices 24 through 31 will select bits from the 8-bit PIO-to-HSTX path, rather than shifter bits. Indices of 0 through 23 will still index the shift register as normal. The PIO outputs connected to the PIO-to-HSTX bus are those same outputs that would appear on the HSTX-capable pins if those pins' FUNCSELs were set to PIO instead of HSTX. For example, if HSTX is on GPIOs 12 through 19, then PIO outputs 12 through 19 are connected to the HSTX when coupled mode is engaged."] + #[inline(always)] + pub const fn coupled_mode(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Enable the PIO-to-HSTX 1:1 connection. The HSTX must be clocked *directly* from the system clock (not just from some other clock source of the same frequency) for this synchronous interface to function correctly. When COUPLED_MODE is set, BITx_SEL_P and SEL_N indices 24 through 31 will select bits from the 8-bit PIO-to-HSTX path, rather than shifter bits. Indices of 0 through 23 will still index the shift register as normal. The PIO outputs connected to the PIO-to-HSTX bus are those same outputs that would appear on the HSTX-capable pins if those pins' FUNCSELs were set to PIO instead of HSTX. For example, if HSTX is on GPIOs 12 through 19, then PIO outputs 12 through 19 are connected to the HSTX when coupled mode is engaged."] + #[inline(always)] + pub fn set_coupled_mode(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Select which PIO to use for coupled mode operation."] + #[inline(always)] + pub const fn coupled_sel(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x03; + val as u8 + } + #[doc = "Select which PIO to use for coupled mode operation."] + #[inline(always)] + pub fn set_coupled_sel(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 5usize)) | (((val as u32) & 0x03) << 5usize); + } + #[doc = "How many bits to right-rotate the shift register by each cycle. The use of a rotate rather than a shift allows left shifts to be emulated, by subtracting the left-shift amount from 32. It also allows data to be repeated, when the product of SHIFT and N_SHIFTS is greater than 32."] + #[inline(always)] + pub const fn shift(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "How many bits to right-rotate the shift register by each cycle. The use of a rotate rather than a shift allows left shifts to be emulated, by subtracting the left-shift amount from 32. It also allows data to be repeated, when the product of SHIFT and N_SHIFTS is greater than 32."] + #[inline(always)] + pub fn set_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Number of times to shift the shift register before refilling it from the FIFO. (A count of how many times it has been shifted, *not* the total shift distance.) A register value of 0 means shift 32 times."] + #[inline(always)] + pub const fn n_shifts(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x1f; + val as u8 + } + #[doc = "Number of times to shift the shift register before refilling it from the FIFO. (A count of how many times it has been shifted, *not* the total shift distance.) A register value of 0 means shift 32 times."] + #[inline(always)] + pub fn set_n_shifts(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 16usize)) | (((val as u32) & 0x1f) << 16usize); + } + #[doc = "Set the initial phase of the generated clock. A CLKPHASE of 0 means the clock is initially low, and the first rising edge occurs after one half period of the generated clock (i.e. CLKDIV/2 cycles of clk_hstx). Incrementing CLKPHASE by 1 will advance the initial clock phase by one half clk_hstx period. For example, if CLKDIV=2 and CLKPHASE=1: * The clock will be initially low * The first rising edge will be 0.5 clk_hstx cycles after asserting first data * The first falling edge will be 1.5 clk_hstx cycles after asserting first data This configuration would be suitable for serialising at a bit rate of clk_hstx with a centre-aligned DDR clock. When the HSTX is halted by clearing CSR_EN, the clock generator will return to its initial phase as configured by the CLKPHASE field. Note CLKPHASE must be strictly less than double the value of CLKDIV (one full period), else its operation is undefined."] + #[inline(always)] + pub const fn clkphase(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x0f; + val as u8 + } + #[doc = "Set the initial phase of the generated clock. A CLKPHASE of 0 means the clock is initially low, and the first rising edge occurs after one half period of the generated clock (i.e. CLKDIV/2 cycles of clk_hstx). Incrementing CLKPHASE by 1 will advance the initial clock phase by one half clk_hstx period. For example, if CLKDIV=2 and CLKPHASE=1: * The clock will be initially low * The first rising edge will be 0.5 clk_hstx cycles after asserting first data * The first falling edge will be 1.5 clk_hstx cycles after asserting first data This configuration would be suitable for serialising at a bit rate of clk_hstx with a centre-aligned DDR clock. When the HSTX is halted by clearing CSR_EN, the clock generator will return to its initial phase as configured by the CLKPHASE field. Note CLKPHASE must be strictly less than double the value of CLKDIV (one full period), else its operation is undefined."] + #[inline(always)] + pub fn set_clkphase(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize); + } + #[doc = "Clock period of the generated clock, measured in HSTX clock cycles. Can be odd or even. The generated clock advances only on cycles where the shift register shifts. For example, a clkdiv of 5 would generate a complete output clock period for every 5 HSTX clocks (or every 10 half-clocks). A CLKDIV value of 0 is mapped to a period of 16 HSTX clock cycles."] + #[inline(always)] + pub const fn clkdiv(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x0f; + val as u8 + } + #[doc = "Clock period of the generated clock, measured in HSTX clock cycles. Can be odd or even. The generated clock advances only on cycles where the shift register shifts. For example, a clkdiv of 5 would generate a complete output clock period for every 5 HSTX clocks (or every 10 half-clocks). A CLKDIV value of 0 is mapped to a period of 16 HSTX clock cycles."] + #[inline(always)] + pub fn set_clkdiv(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val as u32) & 0x0f) << 28usize); + } +} +impl Default for Csr { + #[inline(always)] + fn default() -> Csr { + Csr(0) + } +} +#[doc = "Configure the optional shifter inside the command expander"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ExpandShift(pub u32); +impl ExpandShift { + #[doc = "How many bits to right-rotate the shift register by each time data is pushed to the output shifter, when the current command is a raw data command."] + #[inline(always)] + pub const fn raw_shift(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "How many bits to right-rotate the shift register by each time data is pushed to the output shifter, when the current command is a raw data command."] + #[inline(always)] + pub fn set_raw_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Number of times to consume from the shift register before refilling it from the FIFO, when the current command is a raw data command. A register value of 0 means shift 32 times."] + #[inline(always)] + pub const fn raw_n_shifts(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Number of times to consume from the shift register before refilling it from the FIFO, when the current command is a raw data command. A register value of 0 means shift 32 times."] + #[inline(always)] + pub fn set_raw_n_shifts(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "How many bits to right-rotate the shift register by each time data is pushed to the output shifter, when the current command is an encoded data command (e.g. TMDS)."] + #[inline(always)] + pub const fn enc_shift(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x1f; + val as u8 + } + #[doc = "How many bits to right-rotate the shift register by each time data is pushed to the output shifter, when the current command is an encoded data command (e.g. TMDS)."] + #[inline(always)] + pub fn set_enc_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 16usize)) | (((val as u32) & 0x1f) << 16usize); + } + #[doc = "Number of times to consume from the shift register before refilling it from the FIFO, when the current command is an encoded data command (e.g. TMDS). A register value of 0 means shift 32 times."] + #[inline(always)] + pub const fn enc_n_shifts(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x1f; + val as u8 + } + #[doc = "Number of times to consume from the shift register before refilling it from the FIFO, when the current command is an encoded data command (e.g. TMDS). A register value of 0 means shift 32 times."] + #[inline(always)] + pub fn set_enc_n_shifts(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 24usize)) | (((val as u32) & 0x1f) << 24usize); + } +} +impl Default for ExpandShift { + #[inline(always)] + fn default() -> ExpandShift { + ExpandShift(0) + } +} +#[doc = "Configure the optional TMDS encoder inside the command expander"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ExpandTmds(pub u32); +impl ExpandTmds { + #[doc = "Right-rotate applied to the current shifter data before the lane 0 TMDS encoder."] + #[inline(always)] + pub const fn l0_rot(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to the current shifter data before the lane 0 TMDS encoder."] + #[inline(always)] + pub fn set_l0_rot(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "Number of valid data bits for the lane 0 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits."] + #[inline(always)] + pub const fn l0_nbits(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x07; + val as u8 + } + #[doc = "Number of valid data bits for the lane 0 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits."] + #[inline(always)] + pub fn set_l0_nbits(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val as u32) & 0x07) << 5usize); + } + #[doc = "Right-rotate applied to the current shifter data before the lane 1 TMDS encoder."] + #[inline(always)] + pub const fn l1_rot(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to the current shifter data before the lane 1 TMDS encoder."] + #[inline(always)] + pub fn set_l1_rot(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } + #[doc = "Number of valid data bits for the lane 1 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits."] + #[inline(always)] + pub const fn l1_nbits(&self) -> u8 { + let val = (self.0 >> 13usize) & 0x07; + val as u8 + } + #[doc = "Number of valid data bits for the lane 1 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits."] + #[inline(always)] + pub fn set_l1_nbits(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 13usize)) | (((val as u32) & 0x07) << 13usize); + } + #[doc = "Right-rotate applied to the current shifter data before the lane 2 TMDS encoder."] + #[inline(always)] + pub const fn l2_rot(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to the current shifter data before the lane 2 TMDS encoder."] + #[inline(always)] + pub fn set_l2_rot(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 16usize)) | (((val as u32) & 0x1f) << 16usize); + } + #[doc = "Number of valid data bits for the lane 2 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits."] + #[inline(always)] + pub const fn l2_nbits(&self) -> u8 { + let val = (self.0 >> 21usize) & 0x07; + val as u8 + } + #[doc = "Number of valid data bits for the lane 2 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits."] + #[inline(always)] + pub fn set_l2_nbits(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 21usize)) | (((val as u32) & 0x07) << 21usize); + } +} +impl Default for ExpandTmds { + #[inline(always)] + fn default() -> ExpandTmds { + ExpandTmds(0) + } +} diff --git a/src/rp2350/hstx_fifo.rs b/src/rp2350/hstx_fifo.rs new file mode 100644 index 00000000..c7108751 --- /dev/null +++ b/src/rp2350/hstx_fifo.rs @@ -0,0 +1,28 @@ +#[doc = "FIFO status and write access for HSTX"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct HstxFifo { + ptr: *mut u8, +} +unsafe impl Send for HstxFifo {} +unsafe impl Sync for HstxFifo {} +impl HstxFifo { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "FIFO status"] + #[inline(always)] + pub const fn stat(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Write access to FIFO"] + #[inline(always)] + pub const fn fifo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/hstx_fifo/regs.rs b/src/rp2350/hstx_fifo/regs.rs new file mode 100644 index 00000000..fe6ede8d --- /dev/null +++ b/src/rp2350/hstx_fifo/regs.rs @@ -0,0 +1,50 @@ +#[doc = "FIFO status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Stat(pub u32); +impl Stat { + #[inline(always)] + pub const fn level(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_level(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[inline(always)] + pub const fn full(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_full(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn empty(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_empty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "FIFO was written when full. Write 1 to clear."] + #[inline(always)] + pub const fn wof(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "FIFO was written when full. Write 1 to clear."] + #[inline(always)] + pub fn set_wof(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Stat { + #[inline(always)] + fn default() -> Stat { + Stat(0) + } +} diff --git a/src/rp2350/i2c.rs b/src/rp2350/i2c.rs new file mode 100644 index 00000000..c752f5d1 --- /dev/null +++ b/src/rp2350/i2c.rs @@ -0,0 +1,253 @@ +#[doc = "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"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct I2c { + ptr: *mut u8, +} +unsafe impl Send for I2c {} +unsafe impl Sync for I2c {} +impl I2c { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_con(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_tar(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "I2C Slave Address Register"] + #[inline(always)] + pub const fn ic_sar(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_data_cmd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Standard Speed I2C Clock SCL High Count Register"] + #[inline(always)] + pub const fn ic_ss_scl_hcnt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Standard Speed I2C Clock SCL Low Count Register"] + #[inline(always)] + pub const fn ic_ss_scl_lcnt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register"] + #[inline(always)] + pub const fn ic_fs_scl_hcnt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register"] + #[inline(always)] + pub const fn ic_fs_scl_lcnt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_intr_stat(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_intr_mask(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_raw_intr_stat( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "I2C Receive FIFO Threshold Register"] + #[inline(always)] + pub const fn ic_rx_tl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "I2C Transmit FIFO Threshold Register"] + #[inline(always)] + pub const fn ic_tx_tl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "Clear Combined and Individual Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "Clear RX_UNDER Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_rx_under( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "Clear RX_OVER Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_rx_over(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "Clear TX_OVER Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_tx_over(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "Clear RD_REQ Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_rd_req(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "Clear TX_ABRT Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_tx_abrt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(84usize) as _) } + } + #[doc = "Clear RX_DONE Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_rx_done(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } + } + #[doc = "Clear ACTIVITY Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_activity( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[doc = "Clear STOP_DET Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_stop_det( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[doc = "Clear START_DET Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_start_det( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } + } + #[doc = "Clear GEN_CALL Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_gen_call( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } + } + #[doc = "I2C Enable Register"] + #[inline(always)] + pub const fn ic_enable(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn ic_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_txflr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_rxflr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_sda_hold(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_tx_abrt_source( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_slv_data_nack_only( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_dma_cr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(136usize) as _) } + } + #[doc = "DMA Transmit Data Level Register"] + #[inline(always)] + pub const fn ic_dma_tdlr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(140usize) as _) } + } + #[doc = "I2C Receive Data Level Register"] + #[inline(always)] + pub const fn ic_dma_rdlr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(144usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_sda_setup(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(148usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_ack_general_call( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(152usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_enable_status( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(156usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_fs_spklen(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(160usize) as _) } + } + #[doc = "Clear RESTART_DET Interrupt Register"] + #[inline(always)] + pub const fn ic_clr_restart_det( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(168usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn ic_comp_param_1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(244usize) as _) } + } + #[doc = "I2C Component Version Register"] + #[inline(always)] + pub const fn ic_comp_version(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(248usize) as _) } + } + #[doc = "I2C Component Type Register"] + #[inline(always)] + pub const fn ic_comp_type(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(252usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/i2c/regs.rs b/src/rp2350/i2c/regs.rs new file mode 100644 index 00000000..523318fe --- /dev/null +++ b/src/rp2350/i2c/regs.rs @@ -0,0 +1,1877 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcAckGeneralCall(pub u32); +impl IcAckGeneralCall { + #[doc = "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)."] + #[inline(always)] + pub const fn ack_gen_call(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_ack_gen_call(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcAckGeneralCall { + #[inline(always)] + fn default() -> IcAckGeneralCall { + IcAckGeneralCall(0) + } +} +#[doc = "Clear ACTIVITY Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrActivity(pub u32); +impl IcClrActivity { + #[doc = "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"] + #[inline(always)] + pub const fn clr_activity(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_clr_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrActivity { + #[inline(always)] + fn default() -> IcClrActivity { + IcClrActivity(0) + } +} +#[doc = "Clear GEN_CALL Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrGenCall(pub u32); +impl IcClrGenCall { + #[doc = "Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_gen_call(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_gen_call(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrGenCall { + #[inline(always)] + fn default() -> IcClrGenCall { + IcClrGenCall(0) + } +} +#[doc = "Clear Combined and Individual Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrIntr(pub u32); +impl IcClrIntr { + #[doc = "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"] + #[inline(always)] + pub const fn clr_intr(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_clr_intr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrIntr { + #[inline(always)] + fn default() -> IcClrIntr { + IcClrIntr(0) + } +} +#[doc = "Clear RD_REQ Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrRdReq(pub u32); +impl IcClrRdReq { + #[doc = "Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_rd_req(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_rd_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrRdReq { + #[inline(always)] + fn default() -> IcClrRdReq { + IcClrRdReq(0) + } +} +#[doc = "Clear RESTART_DET Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrRestartDet(pub u32); +impl IcClrRestartDet { + #[doc = "Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_restart_det(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_restart_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrRestartDet { + #[inline(always)] + fn default() -> IcClrRestartDet { + IcClrRestartDet(0) + } +} +#[doc = "Clear RX_DONE Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrRxDone(pub u32); +impl IcClrRxDone { + #[doc = "Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_rx_done(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_rx_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrRxDone { + #[inline(always)] + fn default() -> IcClrRxDone { + IcClrRxDone(0) + } +} +#[doc = "Clear RX_OVER Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrRxOver(pub u32); +impl IcClrRxOver { + #[doc = "Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_rx_over(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_rx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrRxOver { + #[inline(always)] + fn default() -> IcClrRxOver { + IcClrRxOver(0) + } +} +#[doc = "Clear RX_UNDER Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrRxUnder(pub u32); +impl IcClrRxUnder { + #[doc = "Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_rx_under(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_rx_under(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrRxUnder { + #[inline(always)] + fn default() -> IcClrRxUnder { + IcClrRxUnder(0) + } +} +#[doc = "Clear START_DET Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrStartDet(pub u32); +impl IcClrStartDet { + #[doc = "Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_start_det(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_start_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrStartDet { + #[inline(always)] + fn default() -> IcClrStartDet { + IcClrStartDet(0) + } +} +#[doc = "Clear STOP_DET Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrStopDet(pub u32); +impl IcClrStopDet { + #[doc = "Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_stop_det(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_stop_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrStopDet { + #[inline(always)] + fn default() -> IcClrStopDet { + IcClrStopDet(0) + } +} +#[doc = "Clear TX_ABRT Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrTxAbrt(pub u32); +impl IcClrTxAbrt { + #[doc = "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"] + #[inline(always)] + pub const fn clr_tx_abrt(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_clr_tx_abrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrTxAbrt { + #[inline(always)] + fn default() -> IcClrTxAbrt { + IcClrTxAbrt(0) + } +} +#[doc = "Clear TX_OVER Interrupt Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcClrTxOver(pub u32); +impl IcClrTxOver { + #[doc = "Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn clr_tx_over(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_clr_tx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcClrTxOver { + #[inline(always)] + fn default() -> IcClrTxOver { + IcClrTxOver(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcCompParam1(pub u32); +impl IcCompParam1 { + #[doc = "APB data bus width is 32 bits"] + #[inline(always)] + pub const fn apb_data_width(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "APB data bus width is 32 bits"] + #[inline(always)] + pub fn set_apb_data_width(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[doc = "MAX SPEED MODE = FAST MODE"] + #[inline(always)] + pub const fn max_speed_mode(&self) -> u8 { + let val = (self.0 >> 2usize) & 0x03; + val as u8 + } + #[doc = "MAX SPEED MODE = FAST MODE"] + #[inline(always)] + pub fn set_max_speed_mode(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); + } + #[doc = "Programmable count values for each mode."] + #[inline(always)] + pub const fn hc_count_values(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Programmable count values for each mode."] + #[inline(always)] + pub fn set_hc_count_values(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "COMBINED Interrupt outputs"] + #[inline(always)] + pub const fn intr_io(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "COMBINED Interrupt outputs"] + #[inline(always)] + pub fn set_intr_io(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "DMA handshaking signals are enabled"] + #[inline(always)] + pub const fn has_dma(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "DMA handshaking signals are enabled"] + #[inline(always)] + pub fn set_has_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Encoded parameters not visible"] + #[inline(always)] + pub const fn add_encoded_params(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Encoded parameters not visible"] + #[inline(always)] + pub fn set_add_encoded_params(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "RX Buffer Depth = 16"] + #[inline(always)] + pub const fn rx_buffer_depth(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "RX Buffer Depth = 16"] + #[inline(always)] + pub fn set_rx_buffer_depth(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "TX Buffer Depth = 16"] + #[inline(always)] + pub const fn tx_buffer_depth(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "TX Buffer Depth = 16"] + #[inline(always)] + pub fn set_tx_buffer_depth(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for IcCompParam1 { + #[inline(always)] + fn default() -> IcCompParam1 { + IcCompParam1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcCon(pub u32); +impl IcCon { + #[doc = "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'."] + #[inline(always)] + pub const fn master_mode(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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'."] + #[inline(always)] + pub fn set_master_mode(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn speed(&self) -> super::vals::Speed { + let val = (self.0 >> 1usize) & 0x03; + super::vals::Speed::from_bits(val as u8) + } + #[doc = "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"] + #[inline(always)] + pub fn set_speed(&mut self, val: super::vals::Speed) { + self.0 = (self.0 & !(0x03 << 1usize)) | (((val.to_bits() as u32) & 0x03) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_10bitaddr_slave(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_10bitaddr_slave(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn ic_10bitaddr_master(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_ic_10bitaddr_master(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn ic_restart_en(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_ic_restart_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ic_slave_disable(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_slave_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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)."] + #[inline(always)] + pub const fn stop_det_ifaddressed(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_stop_det_ifaddressed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register. Reset value: 0x0."] + #[inline(always)] + pub const fn tx_empty_ctrl(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register. Reset value: 0x0."] + #[inline(always)] + pub fn set_tx_empty_ctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rx_fifo_full_hld_ctrl(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rx_fifo_full_hld_ctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Master issues the STOP_DET interrupt irrespective of whether master is active or not"] + #[inline(always)] + pub const fn stop_det_if_master_active(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Master issues the STOP_DET interrupt irrespective of whether master is active or not"] + #[inline(always)] + pub fn set_stop_det_if_master_active(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for IcCon { + #[inline(always)] + fn default() -> IcCon { + IcCon(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcDataCmd(pub u32); +impl IcDataCmd { + #[doc = "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"] + #[inline(always)] + pub const fn dat(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_dat(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn cmd(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_cmd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn stop(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_stop(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn restart(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_restart(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn first_data_byte(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_first_data_byte(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for IcDataCmd { + #[inline(always)] + fn default() -> IcDataCmd { + IcDataCmd(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcDmaCr(pub u32); +impl IcDmaCr { + #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0"] + #[inline(always)] + pub const fn rdmae(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0"] + #[inline(always)] + pub fn set_rdmae(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0"] + #[inline(always)] + pub const fn tdmae(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0"] + #[inline(always)] + pub fn set_tdmae(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for IcDmaCr { + #[inline(always)] + fn default() -> IcDmaCr { + IcDmaCr(0) + } +} +#[doc = "I2C Receive Data Level Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcDmaRdlr(pub u32); +impl IcDmaRdlr { + #[doc = "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"] + #[inline(always)] + pub const fn dmardl(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_dmardl(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for IcDmaRdlr { + #[inline(always)] + fn default() -> IcDmaRdlr { + IcDmaRdlr(0) + } +} +#[doc = "DMA Transmit Data Level Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcDmaTdlr(pub u32); +impl IcDmaTdlr { + #[doc = "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"] + #[inline(always)] + pub const fn dmatdl(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_dmatdl(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for IcDmaTdlr { + #[inline(always)] + fn default() -> IcDmaTdlr { + IcDmaTdlr(0) + } +} +#[doc = "I2C Enable Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcEnable(pub u32); +impl IcEnable { + #[doc = "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"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abort(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abort(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tx_cmd_block(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tx_cmd_block(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for IcEnable { + #[inline(always)] + fn default() -> IcEnable { + IcEnable(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcEnableStatus(pub u32); +impl IcEnableStatus { + #[doc = "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"] + #[inline(always)] + pub const fn ic_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_ic_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn slv_disabled_while_busy(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_slv_disabled_while_busy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn slv_rx_data_lost(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_slv_rx_data_lost(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for IcEnableStatus { + #[inline(always)] + fn default() -> IcEnableStatus { + IcEnableStatus(0) + } +} +#[doc = "Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcFsSclHcnt(pub u32); +impl IcFsSclHcnt { + #[doc = "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."] + #[inline(always)] + pub const fn ic_fs_scl_hcnt(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_fs_scl_hcnt(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for IcFsSclHcnt { + #[inline(always)] + fn default() -> IcFsSclHcnt { + IcFsSclHcnt(0) + } +} +#[doc = "Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcFsSclLcnt(pub u32); +impl IcFsSclLcnt { + #[doc = "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."] + #[inline(always)] + pub const fn ic_fs_scl_lcnt(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_fs_scl_lcnt(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for IcFsSclLcnt { + #[inline(always)] + fn default() -> IcFsSclLcnt { + IcFsSclLcnt(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcFsSpklen(pub u32); +impl IcFsSpklen { + #[doc = "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'."] + #[inline(always)] + pub const fn ic_fs_spklen(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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'."] + #[inline(always)] + pub fn set_ic_fs_spklen(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for IcFsSpklen { + #[inline(always)] + fn default() -> IcFsSpklen { + IcFsSpklen(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcIntrMask(pub u32); +impl IcIntrMask { + #[doc = "This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_rx_under(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_rx_under(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_rx_over(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_rx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_rx_full(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_rx_full(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_tx_over(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_tx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_tx_empty(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_tx_empty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_rd_req(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_rd_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_tx_abrt(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_tx_abrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_rx_done(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_rx_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn m_activity(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_m_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn m_stop_det(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_m_stop_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "This bit masks the R_START_DET interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn m_start_det(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_START_DET interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_m_start_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub const fn m_gen_call(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register. Reset value: 0x1"] + #[inline(always)] + pub fn set_m_gen_call(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub const fn m_restart_det(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register. Reset value: 0x0"] + #[inline(always)] + pub fn set_m_restart_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for IcIntrMask { + #[inline(always)] + fn default() -> IcIntrMask { + IcIntrMask(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcIntrStat(pub u32); +impl IcIntrStat { + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_rx_under(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_rx_under(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_rx_over(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_rx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_rx_full(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_rx_full(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_tx_over(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_tx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_tx_empty(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_tx_empty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_rd_req(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_rd_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_tx_abrt(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_tx_abrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_rx_done(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_rx_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_activity(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_stop_det(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_stop_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_start_det(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_start_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_gen_call(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_gen_call(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit. Reset value: 0x0"] + #[inline(always)] + pub const fn r_restart_det(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit. Reset value: 0x0"] + #[inline(always)] + pub fn set_r_restart_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for IcIntrStat { + #[inline(always)] + fn default() -> IcIntrStat { + IcIntrStat(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcRawIntrStat(pub u32); +impl IcRawIntrStat { + #[doc = "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"] + #[inline(always)] + pub const fn rx_under(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rx_under(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn rx_over(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn rx_full(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rx_full(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tx_over(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tx_over(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn tx_empty(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_tx_empty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn rd_req(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rd_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tx_abrt(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tx_abrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn rx_done(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rx_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn activity(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn stop_det(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_stop_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn start_det(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_start_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn gen_call(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_gen_call(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn restart_det(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_restart_det(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for IcRawIntrStat { + #[inline(always)] + fn default() -> IcRawIntrStat { + IcRawIntrStat(0) + } +} +#[doc = "I2C Receive FIFO Threshold Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcRxTl(pub u32); +impl IcRxTl { + #[doc = "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."] + #[inline(always)] + pub const fn rx_tl(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rx_tl(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for IcRxTl { + #[inline(always)] + fn default() -> IcRxTl { + IcRxTl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcRxflr(pub u32); +impl IcRxflr { + #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Reset value: 0x0"] + #[inline(always)] + pub const fn rxflr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. Reset value: 0x0"] + #[inline(always)] + pub fn set_rxflr(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } +} +impl Default for IcRxflr { + #[inline(always)] + fn default() -> IcRxflr { + IcRxflr(0) + } +} +#[doc = "I2C Slave Address Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcSar(pub u32); +impl IcSar { + #[doc = "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 <> for a complete list of these reserved values."] + #[inline(always)] + pub const fn ic_sar(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x03ff; + val as u16 + } + #[doc = "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 <> for a complete list of these reserved values."] + #[inline(always)] + pub fn set_ic_sar(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); + } +} +impl Default for IcSar { + #[inline(always)] + fn default() -> IcSar { + IcSar(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcSdaHold(pub u32); +impl IcSdaHold { + #[doc = "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\\]."] + #[inline(always)] + pub const fn ic_sda_tx_hold(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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\\]."] + #[inline(always)] + pub fn set_ic_sda_tx_hold(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "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\\]."] + #[inline(always)] + pub const fn ic_sda_rx_hold(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "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\\]."] + #[inline(always)] + pub fn set_ic_sda_rx_hold(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for IcSdaHold { + #[inline(always)] + fn default() -> IcSdaHold { + IcSdaHold(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcSdaSetup(pub u32); +impl IcSdaSetup { + #[doc = "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."] + #[inline(always)] + pub const fn sda_setup(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sda_setup(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for IcSdaSetup { + #[inline(always)] + fn default() -> IcSdaSetup { + IcSdaSetup(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcSlvDataNackOnly(pub u32); +impl IcSlvDataNackOnly { + #[doc = "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"] + #[inline(always)] + pub const fn nack(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_nack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for IcSlvDataNackOnly { + #[inline(always)] + fn default() -> IcSlvDataNackOnly { + IcSlvDataNackOnly(0) + } +} +#[doc = "Standard Speed I2C Clock SCL High Count Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcSsSclHcnt(pub u32); +impl IcSsSclHcnt { + #[doc = "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."] + #[inline(always)] + pub const fn ic_ss_scl_hcnt(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_ss_scl_hcnt(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for IcSsSclHcnt { + #[inline(always)] + fn default() -> IcSsSclHcnt { + IcSsSclHcnt(0) + } +} +#[doc = "Standard Speed I2C Clock SCL Low Count Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcSsSclLcnt(pub u32); +impl IcSsSclLcnt { + #[doc = "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."] + #[inline(always)] + pub const fn ic_ss_scl_lcnt(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_ss_scl_lcnt(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for IcSsSclLcnt { + #[inline(always)] + fn default() -> IcSsSclLcnt { + IcSsSclLcnt(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcStatus(pub u32); +impl IcStatus { + #[doc = "I2C Activity Status. Reset value: 0x0"] + #[inline(always)] + pub const fn activity(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "I2C Activity Status. Reset value: 0x0"] + #[inline(always)] + pub fn set_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tfnf(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tfnf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tfe(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tfe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn rfne(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rfne(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn rff(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_rff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn mst_activity(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_mst_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn slv_activity(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_slv_activity(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } +} +impl Default for IcStatus { + #[inline(always)] + fn default() -> IcStatus { + IcStatus(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcTar(pub u32); +impl IcTar { + #[doc = "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."] + #[inline(always)] + pub const fn ic_tar(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x03ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ic_tar(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn gc_or_start(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_gc_or_start(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn special(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_special(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for IcTar { + #[inline(always)] + fn default() -> IcTar { + IcTar(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcTxAbrtSource(pub u32); +impl IcTxAbrtSource { + #[doc = "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"] + #[inline(always)] + pub const fn abrt_7b_addr_noack(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_7b_addr_noack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_10addr1_noack(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_10addr1_noack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_10addr2_noack(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_10addr2_noack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_txdata_noack(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_txdata_noack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_gcall_noack(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_gcall_noack(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_gcall_read(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_gcall_read(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_hs_ackdet(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_hs_ackdet(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_sbyte_ackdet(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_sbyte_ackdet(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_hs_norstrt(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_hs_norstrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_sbyte_norstrt(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_sbyte_norstrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_10b_rd_norstrt(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_10b_rd_norstrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_master_dis(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_master_dis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn arb_lost(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_arb_lost(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_slvflush_txfifo(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_slvflush_txfifo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_slv_arblost(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_slv_arblost(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_slvrd_intx(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_slvrd_intx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn abrt_user_abrt(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_abrt_user_abrt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tx_flush_cnt(&self) -> u16 { + let val = (self.0 >> 23usize) & 0x01ff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tx_flush_cnt(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 23usize)) | (((val as u32) & 0x01ff) << 23usize); + } +} +impl Default for IcTxAbrtSource { + #[inline(always)] + fn default() -> IcTxAbrtSource { + IcTxAbrtSource(0) + } +} +#[doc = "I2C Transmit FIFO Threshold Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcTxTl(pub u32); +impl IcTxTl { + #[doc = "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."] + #[inline(always)] + pub const fn tx_tl(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_tx_tl(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for IcTxTl { + #[inline(always)] + fn default() -> IcTxTl { + IcTxTl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IcTxflr(pub u32); +impl IcTxflr { + #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Reset value: 0x0"] + #[inline(always)] + pub const fn txflr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. Reset value: 0x0"] + #[inline(always)] + pub fn set_txflr(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } +} +impl Default for IcTxflr { + #[inline(always)] + fn default() -> IcTxflr { + IcTxflr(0) + } +} diff --git a/src/rp2350/i2c/vals.rs b/src/rp2350/i2c/vals.rs new file mode 100644 index 00000000..41e0860e --- /dev/null +++ b/src/rp2350/i2c/vals.rs @@ -0,0 +1,33 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Speed { + _RESERVED_0 = 0, + #[doc = "Standard Speed mode of operation"] + STANDARD = 0x01, + #[doc = "Fast or Fast Plus mode of operation"] + FAST = 0x02, + #[doc = "High Speed mode of operation"] + HIGH = 0x03, +} +impl Speed { + #[inline(always)] + pub const fn from_bits(val: u8) -> Speed { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Speed { + #[inline(always)] + fn from(val: u8) -> Speed { + Speed::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Speed) -> u8 { + Speed::to_bits(val) + } +} diff --git a/src/rp2350/io.rs b/src/rp2350/io.rs new file mode 100644 index 00000000..ad3be7d7 --- /dev/null +++ b/src/rp2350/io.rs @@ -0,0 +1,168 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Gpio { + ptr: *mut u8, +} +unsafe impl Send for Gpio {} +unsafe impl Sync for Gpio {} +impl Gpio { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[inline(always)] + pub const fn status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } +} +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Int { + ptr: *mut u8, +} +unsafe impl Send for Int {} +unsafe impl Sync for Int {} +impl Int { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Interrupt Enable for proc1"] + #[inline(always)] + pub const fn inte(self, n: usize) -> crate::common::Reg { + assert!(n < 6usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize + n * 4usize) as _) } + } + #[doc = "Interrupt Force for proc1"] + #[inline(always)] + pub const fn intf(self, n: usize) -> crate::common::Reg { + assert!(n < 6usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize + n * 4usize) as _) } + } + #[doc = "Interrupt status after masking & forcing for proc1"] + #[inline(always)] + pub const fn ints(self, n: usize) -> crate::common::Reg { + assert!(n < 6usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize + n * 4usize) as _) } + } +} +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Io { + ptr: *mut u8, +} +unsafe impl Send for Io {} +unsafe impl Sync for Io {} +impl Io { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[inline(always)] + pub const fn gpio(self, n: usize) -> Gpio { + assert!(n < 48usize); + unsafe { Gpio::from_ptr(self.ptr.add(0usize + n * 8usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc0_secure0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(512usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc0_secure1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(516usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc0_nonsecure0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(520usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc0_nonsecure1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(524usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc1_secure0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(528usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc1_secure1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(532usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc1_nonsecure0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(536usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_proc1_nonsecure1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(540usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_dormant_wake_secure0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(544usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_dormant_wake_secure1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(548usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_dormant_wake_nonsecure0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(552usize) as _) } + } + #[inline(always)] + pub const fn irqsummary_dormant_wake_nonsecure1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(556usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self, n: usize) -> crate::common::Reg { + assert!(n < 6usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(560usize + n * 4usize) as _) } + } + #[inline(always)] + pub const fn int_proc(self, n: usize) -> Int { + assert!(n < 2usize); + unsafe { Int::from_ptr(self.ptr.add(584usize + n * 72usize) as _) } + } + #[inline(always)] + pub const fn int_dormant_wake(self) -> Int { + unsafe { Int::from_ptr(self.ptr.add(728usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/io/regs.rs b/src/rp2350/io/regs.rs new file mode 100644 index 00000000..c67ddcf6 --- /dev/null +++ b/src/rp2350/io/regs.rs @@ -0,0 +1,2901 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct GpioCtrl(pub u32); +impl GpioCtrl { + #[doc = "0-31 -> selects pin function according to the gpio table 31 == NULL"] + #[inline(always)] + pub const fn funcsel(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "0-31 -> selects pin function according to the gpio table 31 == NULL"] + #[inline(always)] + pub fn set_funcsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[inline(always)] + pub const fn outover(&self) -> super::vals::Outover { + let val = (self.0 >> 12usize) & 0x03; + super::vals::Outover::from_bits(val as u8) + } + #[inline(always)] + pub fn set_outover(&mut self, val: super::vals::Outover) { + self.0 = (self.0 & !(0x03 << 12usize)) | (((val.to_bits() as u32) & 0x03) << 12usize); + } + #[inline(always)] + pub const fn oeover(&self) -> super::vals::Oeover { + let val = (self.0 >> 14usize) & 0x03; + super::vals::Oeover::from_bits(val as u8) + } + #[inline(always)] + pub fn set_oeover(&mut self, val: super::vals::Oeover) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val.to_bits() as u32) & 0x03) << 14usize); + } + #[inline(always)] + pub const fn inover(&self) -> super::vals::Inover { + let val = (self.0 >> 16usize) & 0x03; + super::vals::Inover::from_bits(val as u8) + } + #[inline(always)] + pub fn set_inover(&mut self, val: super::vals::Inover) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val.to_bits() as u32) & 0x03) << 16usize); + } + #[inline(always)] + pub const fn irqover(&self) -> super::vals::Irqover { + let val = (self.0 >> 28usize) & 0x03; + super::vals::Irqover::from_bits(val as u8) + } + #[inline(always)] + pub fn set_irqover(&mut self, val: super::vals::Irqover) { + self.0 = (self.0 & !(0x03 << 28usize)) | (((val.to_bits() as u32) & 0x03) << 28usize); + } +} +impl Default for GpioCtrl { + #[inline(always)] + fn default() -> GpioCtrl { + GpioCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct GpioStatus(pub u32); +impl GpioStatus { + #[doc = "output signal to pad after register override is applied"] + #[inline(always)] + pub const fn outtopad(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "output signal to pad after register override is applied"] + #[inline(always)] + pub fn set_outtopad(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "output enable to pad after register override is applied"] + #[inline(always)] + pub const fn oetopad(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "output enable to pad after register override is applied"] + #[inline(always)] + pub fn set_oetopad(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "input signal from pad, before filtering and override are applied"] + #[inline(always)] + pub const fn infrompad(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "input signal from pad, before filtering and override are applied"] + #[inline(always)] + pub fn set_infrompad(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "interrupt to processors, after override is applied"] + #[inline(always)] + pub const fn irqtoproc(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "interrupt to processors, after override is applied"] + #[inline(always)] + pub fn set_irqtoproc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } +} +impl Default for GpioStatus { + #[inline(always)] + fn default() -> GpioStatus { + GpioStatus(0) + } +} +#[doc = "Interrupt Enable for proc1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Int(pub u32); +impl Int { + #[inline(always)] + pub const fn level_low(&self, n: usize) -> bool { + assert!(n < 8usize); + let offs = 0usize + n * 4usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_level_low(&mut self, n: usize, val: bool) { + assert!(n < 8usize); + let offs = 0usize + n * 4usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn level_high(&self, n: usize) -> bool { + assert!(n < 8usize); + let offs = 1usize + n * 4usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_level_high(&mut self, n: usize, val: bool) { + assert!(n < 8usize); + let offs = 1usize + n * 4usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn edge_low(&self, n: usize) -> bool { + assert!(n < 8usize); + let offs = 2usize + n * 4usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_edge_low(&mut self, n: usize, val: bool) { + assert!(n < 8usize); + let offs = 2usize + n * 4usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn edge_high(&self, n: usize) -> bool { + assert!(n < 8usize); + let offs = 3usize + n * 4usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_edge_high(&mut self, n: usize, val: bool) { + assert!(n < 8usize); + let offs = 3usize + n * 4usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for Int { + #[inline(always)] + fn default() -> Int { + Int(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryDormantWakeNonsecure0(pub u32); +impl IrqsummaryDormantWakeNonsecure0 { + #[inline(always)] + pub const fn gpio0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio12(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio12(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio13(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio13(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio14(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio14(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio15(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio15(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn gpio16(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio16(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn gpio17(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio17(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn gpio18(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio18(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn gpio19(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio19(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn gpio20(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio20(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn gpio21(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio21(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn gpio22(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio22(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn gpio23(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio23(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn gpio24(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio24(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn gpio25(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio25(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn gpio26(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio26(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn gpio27(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio27(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn gpio28(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio28(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn gpio29(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio29(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn gpio30(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio30(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn gpio31(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio31(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for IrqsummaryDormantWakeNonsecure0 { + #[inline(always)] + fn default() -> IrqsummaryDormantWakeNonsecure0 { + IrqsummaryDormantWakeNonsecure0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryDormantWakeNonsecure1(pub u32); +impl IrqsummaryDormantWakeNonsecure1 { + #[inline(always)] + pub const fn gpio32(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio32(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio33(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio33(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio34(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio34(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio35(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio35(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio36(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio36(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio37(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio37(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio38(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio38(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio39(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio39(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio40(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio40(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio41(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio41(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio42(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio42(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio43(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio43(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio44(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio44(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio45(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio45(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio46(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio46(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio47(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio47(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for IrqsummaryDormantWakeNonsecure1 { + #[inline(always)] + fn default() -> IrqsummaryDormantWakeNonsecure1 { + IrqsummaryDormantWakeNonsecure1(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryDormantWakeSecure0(pub u32); +impl IrqsummaryDormantWakeSecure0 { + #[inline(always)] + pub const fn gpio0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio12(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio12(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio13(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio13(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio14(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio14(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio15(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio15(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn gpio16(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio16(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn gpio17(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio17(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn gpio18(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio18(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn gpio19(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio19(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn gpio20(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio20(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn gpio21(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio21(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn gpio22(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio22(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn gpio23(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio23(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn gpio24(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio24(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn gpio25(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio25(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn gpio26(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio26(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn gpio27(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio27(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn gpio28(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio28(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn gpio29(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio29(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn gpio30(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio30(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn gpio31(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio31(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for IrqsummaryDormantWakeSecure0 { + #[inline(always)] + fn default() -> IrqsummaryDormantWakeSecure0 { + IrqsummaryDormantWakeSecure0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryDormantWakeSecure1(pub u32); +impl IrqsummaryDormantWakeSecure1 { + #[inline(always)] + pub const fn gpio32(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio32(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio33(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio33(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio34(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio34(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio35(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio35(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio36(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio36(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio37(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio37(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio38(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio38(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio39(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio39(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio40(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio40(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio41(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio41(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio42(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio42(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio43(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio43(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio44(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio44(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio45(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio45(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio46(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio46(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio47(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio47(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for IrqsummaryDormantWakeSecure1 { + #[inline(always)] + fn default() -> IrqsummaryDormantWakeSecure1 { + IrqsummaryDormantWakeSecure1(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc0nonsecure0(pub u32); +impl IrqsummaryProc0nonsecure0 { + #[inline(always)] + pub const fn gpio0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio12(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio12(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio13(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio13(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio14(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio14(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio15(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio15(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn gpio16(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio16(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn gpio17(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio17(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn gpio18(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio18(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn gpio19(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio19(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn gpio20(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio20(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn gpio21(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio21(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn gpio22(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio22(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn gpio23(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio23(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn gpio24(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio24(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn gpio25(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio25(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn gpio26(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio26(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn gpio27(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio27(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn gpio28(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio28(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn gpio29(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio29(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn gpio30(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio30(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn gpio31(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio31(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for IrqsummaryProc0nonsecure0 { + #[inline(always)] + fn default() -> IrqsummaryProc0nonsecure0 { + IrqsummaryProc0nonsecure0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc0nonsecure1(pub u32); +impl IrqsummaryProc0nonsecure1 { + #[inline(always)] + pub const fn gpio32(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio32(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio33(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio33(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio34(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio34(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio35(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio35(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio36(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio36(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio37(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio37(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio38(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio38(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio39(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio39(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio40(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio40(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio41(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio41(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio42(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio42(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio43(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio43(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio44(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio44(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio45(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio45(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio46(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio46(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio47(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio47(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for IrqsummaryProc0nonsecure1 { + #[inline(always)] + fn default() -> IrqsummaryProc0nonsecure1 { + IrqsummaryProc0nonsecure1(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc0secure0(pub u32); +impl IrqsummaryProc0secure0 { + #[inline(always)] + pub const fn gpio0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio12(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio12(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio13(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio13(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio14(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio14(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio15(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio15(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn gpio16(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio16(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn gpio17(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio17(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn gpio18(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio18(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn gpio19(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio19(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn gpio20(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio20(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn gpio21(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio21(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn gpio22(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio22(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn gpio23(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio23(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn gpio24(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio24(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn gpio25(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio25(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn gpio26(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio26(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn gpio27(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio27(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn gpio28(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio28(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn gpio29(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio29(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn gpio30(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio30(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn gpio31(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio31(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for IrqsummaryProc0secure0 { + #[inline(always)] + fn default() -> IrqsummaryProc0secure0 { + IrqsummaryProc0secure0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc0secure1(pub u32); +impl IrqsummaryProc0secure1 { + #[inline(always)] + pub const fn gpio32(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio32(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio33(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio33(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio34(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio34(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio35(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio35(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio36(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio36(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio37(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio37(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio38(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio38(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio39(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio39(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio40(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio40(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio41(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio41(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio42(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio42(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio43(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio43(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio44(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio44(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio45(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio45(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio46(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio46(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio47(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio47(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for IrqsummaryProc0secure1 { + #[inline(always)] + fn default() -> IrqsummaryProc0secure1 { + IrqsummaryProc0secure1(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc1nonsecure0(pub u32); +impl IrqsummaryProc1nonsecure0 { + #[inline(always)] + pub const fn gpio0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio12(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio12(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio13(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio13(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio14(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio14(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio15(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio15(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn gpio16(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio16(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn gpio17(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio17(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn gpio18(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio18(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn gpio19(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio19(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn gpio20(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio20(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn gpio21(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio21(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn gpio22(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio22(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn gpio23(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio23(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn gpio24(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio24(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn gpio25(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio25(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn gpio26(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio26(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn gpio27(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio27(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn gpio28(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio28(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn gpio29(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio29(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn gpio30(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio30(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn gpio31(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio31(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for IrqsummaryProc1nonsecure0 { + #[inline(always)] + fn default() -> IrqsummaryProc1nonsecure0 { + IrqsummaryProc1nonsecure0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc1nonsecure1(pub u32); +impl IrqsummaryProc1nonsecure1 { + #[inline(always)] + pub const fn gpio32(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio32(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio33(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio33(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio34(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio34(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio35(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio35(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio36(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio36(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio37(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio37(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio38(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio38(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio39(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio39(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio40(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio40(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio41(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio41(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio42(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio42(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio43(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio43(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio44(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio44(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio45(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio45(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio46(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio46(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio47(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio47(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for IrqsummaryProc1nonsecure1 { + #[inline(always)] + fn default() -> IrqsummaryProc1nonsecure1 { + IrqsummaryProc1nonsecure1(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc1secure0(pub u32); +impl IrqsummaryProc1secure0 { + #[inline(always)] + pub const fn gpio0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio12(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio12(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio13(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio13(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio14(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio14(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio15(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio15(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn gpio16(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio16(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn gpio17(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio17(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn gpio18(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio18(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn gpio19(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio19(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn gpio20(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio20(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn gpio21(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio21(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn gpio22(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio22(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn gpio23(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio23(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn gpio24(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio24(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn gpio25(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio25(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn gpio26(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio26(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn gpio27(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio27(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn gpio28(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio28(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn gpio29(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio29(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn gpio30(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio30(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn gpio31(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio31(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for IrqsummaryProc1secure0 { + #[inline(always)] + fn default() -> IrqsummaryProc1secure0 { + IrqsummaryProc1secure0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqsummaryProc1secure1(pub u32); +impl IrqsummaryProc1secure1 { + #[inline(always)] + pub const fn gpio32(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio32(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn gpio33(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio33(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn gpio34(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio34(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn gpio35(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio35(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gpio36(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio36(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn gpio37(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio37(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn gpio38(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio38(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn gpio39(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio39(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn gpio40(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio40(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn gpio41(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio41(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn gpio42(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio42(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn gpio43(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio43(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn gpio44(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio44(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn gpio45(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio45(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn gpio46(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio46(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn gpio47(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpio47(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for IrqsummaryProc1secure1 { + #[inline(always)] + fn default() -> IrqsummaryProc1secure1 { + IrqsummaryProc1secure1(0) + } +} diff --git a/src/rp2350/io/vals.rs b/src/rp2350/io/vals.rs new file mode 100644 index 00000000..49b2970e --- /dev/null +++ b/src/rp2350/io/vals.rs @@ -0,0 +1,2920 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio0ctrlFuncsel { + JTAG_TCK = 0, + SPI0_RX = 0x01, + UART0_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_0 = 0x04, + SIOB_PROC_0 = 0x05, + PIO0_0 = 0x06, + PIO1_0 = 0x07, + PIO2_0 = 0x08, + XIP_SS_N_1 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio0ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio0ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio0ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio0ctrlFuncsel { + Gpio0ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio0ctrlFuncsel) -> u8 { + Gpio0ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio10ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SCLK = 0x01, + UART1_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_5 = 0x04, + SIOB_PROC_10 = 0x05, + PIO0_10 = 0x06, + PIO1_10 = 0x07, + PIO2_10 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART1_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio10ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio10ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio10ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio10ctrlFuncsel { + Gpio10ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio10ctrlFuncsel) -> u8 { + Gpio10ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio11ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_TX = 0x01, + UART1_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_5 = 0x04, + SIOB_PROC_11 = 0x05, + PIO0_11 = 0x06, + PIO1_11 = 0x07, + PIO2_11 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART1_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio11ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio11ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio11ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio11ctrlFuncsel { + Gpio11ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio11ctrlFuncsel) -> u8 { + Gpio11ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio12ctrlFuncsel { + HSTX_0 = 0, + SPI1_RX = 0x01, + UART0_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_6 = 0x04, + SIOB_PROC_12 = 0x05, + PIO0_12 = 0x06, + PIO1_12 = 0x07, + PIO2_12 = 0x08, + CLOCKS_GPIN_0 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio12ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio12ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio12ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio12ctrlFuncsel { + Gpio12ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio12ctrlFuncsel) -> u8 { + Gpio12ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio13ctrlFuncsel { + HSTX_1 = 0, + SPI1_SS_N = 0x01, + UART0_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_6 = 0x04, + SIOB_PROC_13 = 0x05, + PIO0_13 = 0x06, + PIO1_13 = 0x07, + PIO2_13 = 0x08, + CLOCKS_GPOUT_0 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio13ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio13ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio13ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio13ctrlFuncsel { + Gpio13ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio13ctrlFuncsel) -> u8 { + Gpio13ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio14ctrlFuncsel { + HSTX_2 = 0, + SPI1_SCLK = 0x01, + UART0_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_7 = 0x04, + SIOB_PROC_14 = 0x05, + PIO0_14 = 0x06, + PIO1_14 = 0x07, + PIO2_14 = 0x08, + CLOCKS_GPIN_1 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART0_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio14ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio14ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio14ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio14ctrlFuncsel { + Gpio14ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio14ctrlFuncsel) -> u8 { + Gpio14ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio15ctrlFuncsel { + HSTX_3 = 0, + SPI1_TX = 0x01, + UART0_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_7 = 0x04, + SIOB_PROC_15 = 0x05, + PIO0_15 = 0x06, + PIO1_15 = 0x07, + PIO2_15 = 0x08, + CLOCKS_GPOUT_1 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART0_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio15ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio15ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio15ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio15ctrlFuncsel { + Gpio15ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio15ctrlFuncsel) -> u8 { + Gpio15ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio16ctrlFuncsel { + HSTX_4 = 0, + SPI0_RX = 0x01, + UART0_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_0 = 0x04, + SIOB_PROC_16 = 0x05, + PIO0_16 = 0x06, + PIO1_16 = 0x07, + PIO2_16 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio16ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio16ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio16ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio16ctrlFuncsel { + Gpio16ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio16ctrlFuncsel) -> u8 { + Gpio16ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio17ctrlFuncsel { + HSTX_5 = 0, + SPI0_SS_N = 0x01, + UART0_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_0 = 0x04, + SIOB_PROC_17 = 0x05, + PIO0_17 = 0x06, + PIO1_17 = 0x07, + PIO2_17 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio17ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio17ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio17ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio17ctrlFuncsel { + Gpio17ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio17ctrlFuncsel) -> u8 { + Gpio17ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio18ctrlFuncsel { + HSTX_6 = 0, + SPI0_SCLK = 0x01, + UART0_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_1 = 0x04, + SIOB_PROC_18 = 0x05, + PIO0_18 = 0x06, + PIO1_18 = 0x07, + PIO2_18 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART0_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio18ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio18ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio18ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio18ctrlFuncsel { + Gpio18ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio18ctrlFuncsel) -> u8 { + Gpio18ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio19ctrlFuncsel { + HSTX_7 = 0, + SPI0_TX = 0x01, + UART0_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_1 = 0x04, + SIOB_PROC_19 = 0x05, + PIO0_19 = 0x06, + PIO1_19 = 0x07, + PIO2_19 = 0x08, + XIP_SS_N_1 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART0_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio19ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio19ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio19ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio19ctrlFuncsel { + Gpio19ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio19ctrlFuncsel) -> u8 { + Gpio19ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio1ctrlFuncsel { + JTAG_TMS = 0, + SPI0_SS_N = 0x01, + UART0_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_0 = 0x04, + SIOB_PROC_1 = 0x05, + PIO0_1 = 0x06, + PIO1_1 = 0x07, + PIO2_1 = 0x08, + CORESIGHT_TRACECLK = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio1ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio1ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio1ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio1ctrlFuncsel { + Gpio1ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio1ctrlFuncsel) -> u8 { + Gpio1ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio20ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_RX = 0x01, + UART1_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_2 = 0x04, + SIOB_PROC_20 = 0x05, + PIO0_20 = 0x06, + PIO1_20 = 0x07, + PIO2_20 = 0x08, + CLOCKS_GPIN_0 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio20ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio20ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio20ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio20ctrlFuncsel { + Gpio20ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio20ctrlFuncsel) -> u8 { + Gpio20ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio21ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SS_N = 0x01, + UART1_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_2 = 0x04, + SIOB_PROC_21 = 0x05, + PIO0_21 = 0x06, + PIO1_21 = 0x07, + PIO2_21 = 0x08, + CLOCKS_GPOUT_0 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio21ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio21ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio21ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio21ctrlFuncsel { + Gpio21ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio21ctrlFuncsel) -> u8 { + Gpio21ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio22ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SCLK = 0x01, + UART1_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_3 = 0x04, + SIOB_PROC_22 = 0x05, + PIO0_22 = 0x06, + PIO1_22 = 0x07, + PIO2_22 = 0x08, + CLOCKS_GPIN_1 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART1_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio22ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio22ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio22ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio22ctrlFuncsel { + Gpio22ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio22ctrlFuncsel) -> u8 { + Gpio22ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio23ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_TX = 0x01, + UART1_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_3 = 0x04, + SIOB_PROC_23 = 0x05, + PIO0_23 = 0x06, + PIO1_23 = 0x07, + PIO2_23 = 0x08, + CLOCKS_GPOUT_1 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART1_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio23ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio23ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio23ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio23ctrlFuncsel { + Gpio23ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio23ctrlFuncsel) -> u8 { + Gpio23ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio24ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_RX = 0x01, + UART1_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_4 = 0x04, + SIOB_PROC_24 = 0x05, + PIO0_24 = 0x06, + PIO1_24 = 0x07, + PIO2_24 = 0x08, + CLOCKS_GPOUT_2 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio24ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio24ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio24ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio24ctrlFuncsel { + Gpio24ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio24ctrlFuncsel) -> u8 { + Gpio24ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio25ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SS_N = 0x01, + UART1_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_4 = 0x04, + SIOB_PROC_25 = 0x05, + PIO0_25 = 0x06, + PIO1_25 = 0x07, + PIO2_25 = 0x08, + CLOCKS_GPOUT_3 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio25ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio25ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio25ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio25ctrlFuncsel { + Gpio25ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio25ctrlFuncsel) -> u8 { + Gpio25ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio26ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SCLK = 0x01, + UART1_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_5 = 0x04, + SIOB_PROC_26 = 0x05, + PIO0_26 = 0x06, + PIO1_26 = 0x07, + PIO2_26 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART1_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio26ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio26ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio26ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio26ctrlFuncsel { + Gpio26ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio26ctrlFuncsel) -> u8 { + Gpio26ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio27ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_TX = 0x01, + UART1_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_5 = 0x04, + SIOB_PROC_27 = 0x05, + PIO0_27 = 0x06, + PIO1_27 = 0x07, + PIO2_27 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART1_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio27ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio27ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio27ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio27ctrlFuncsel { + Gpio27ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio27ctrlFuncsel) -> u8 { + Gpio27ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio28ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_RX = 0x01, + UART0_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_6 = 0x04, + SIOB_PROC_28 = 0x05, + PIO0_28 = 0x06, + PIO1_28 = 0x07, + PIO2_28 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio28ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio28ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio28ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio28ctrlFuncsel { + Gpio28ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio28ctrlFuncsel) -> u8 { + Gpio28ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio29ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SS_N = 0x01, + UART0_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_6 = 0x04, + SIOB_PROC_29 = 0x05, + PIO0_29 = 0x06, + PIO1_29 = 0x07, + PIO2_29 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio29ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio29ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio29ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio29ctrlFuncsel { + Gpio29ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio29ctrlFuncsel) -> u8 { + Gpio29ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio2ctrlFuncsel { + JTAG_TDI = 0, + SPI0_SCLK = 0x01, + UART0_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_1 = 0x04, + SIOB_PROC_2 = 0x05, + PIO0_2 = 0x06, + PIO1_2 = 0x07, + PIO2_2 = 0x08, + CORESIGHT_TRACEDATA_0 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART0_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio2ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio2ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio2ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio2ctrlFuncsel { + Gpio2ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio2ctrlFuncsel) -> u8 { + Gpio2ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio30ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SCLK = 0x01, + UART0_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_7 = 0x04, + SIOB_PROC_30 = 0x05, + PIO0_30 = 0x06, + PIO1_30 = 0x07, + PIO2_30 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART0_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio30ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio30ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio30ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio30ctrlFuncsel { + Gpio30ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio30ctrlFuncsel) -> u8 { + Gpio30ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio31ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_TX = 0x01, + UART0_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_7 = 0x04, + SIOB_PROC_31 = 0x05, + PIO0_31 = 0x06, + PIO1_31 = 0x07, + PIO2_31 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART0_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio31ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio31ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio31ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio31ctrlFuncsel { + Gpio31ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio31ctrlFuncsel) -> u8 { + Gpio31ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio32ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_RX = 0x01, + UART0_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_8 = 0x04, + SIOB_PROC_32 = 0x05, + PIO0_32 = 0x06, + PIO1_32 = 0x07, + PIO2_32 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio32ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio32ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio32ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio32ctrlFuncsel { + Gpio32ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio32ctrlFuncsel) -> u8 { + Gpio32ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio33ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SS_N = 0x01, + UART0_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_8 = 0x04, + SIOB_PROC_33 = 0x05, + PIO0_33 = 0x06, + PIO1_33 = 0x07, + PIO2_33 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio33ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio33ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio33ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio33ctrlFuncsel { + Gpio33ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio33ctrlFuncsel) -> u8 { + Gpio33ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio34ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SCLK = 0x01, + UART0_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_9 = 0x04, + SIOB_PROC_34 = 0x05, + PIO0_34 = 0x06, + PIO1_34 = 0x07, + PIO2_34 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART0_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio34ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio34ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio34ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio34ctrlFuncsel { + Gpio34ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio34ctrlFuncsel) -> u8 { + Gpio34ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio35ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_TX = 0x01, + UART0_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_9 = 0x04, + SIOB_PROC_35 = 0x05, + PIO0_35 = 0x06, + PIO1_35 = 0x07, + PIO2_35 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART0_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio35ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio35ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio35ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio35ctrlFuncsel { + Gpio35ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio35ctrlFuncsel) -> u8 { + Gpio35ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio36ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_RX = 0x01, + UART1_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_10 = 0x04, + SIOB_PROC_36 = 0x05, + PIO0_36 = 0x06, + PIO1_36 = 0x07, + PIO2_36 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio36ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio36ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio36ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio36ctrlFuncsel { + Gpio36ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio36ctrlFuncsel) -> u8 { + Gpio36ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio37ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SS_N = 0x01, + UART1_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_10 = 0x04, + SIOB_PROC_37 = 0x05, + PIO0_37 = 0x06, + PIO1_37 = 0x07, + PIO2_37 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio37ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio37ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio37ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio37ctrlFuncsel { + Gpio37ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio37ctrlFuncsel) -> u8 { + Gpio37ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio38ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SCLK = 0x01, + UART1_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_11 = 0x04, + SIOB_PROC_38 = 0x05, + PIO0_38 = 0x06, + PIO1_38 = 0x07, + PIO2_38 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART1_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio38ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio38ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio38ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio38ctrlFuncsel { + Gpio38ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio38ctrlFuncsel) -> u8 { + Gpio38ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio39ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_TX = 0x01, + UART1_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_11 = 0x04, + SIOB_PROC_39 = 0x05, + PIO0_39 = 0x06, + PIO1_39 = 0x07, + PIO2_39 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART1_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio39ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio39ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio39ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio39ctrlFuncsel { + Gpio39ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio39ctrlFuncsel) -> u8 { + Gpio39ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio3ctrlFuncsel { + JTAG_TDO = 0, + SPI0_TX = 0x01, + UART0_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_1 = 0x04, + SIOB_PROC_3 = 0x05, + PIO0_3 = 0x06, + PIO1_3 = 0x07, + PIO2_3 = 0x08, + CORESIGHT_TRACEDATA_1 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART0_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio3ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio3ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio3ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio3ctrlFuncsel { + Gpio3ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio3ctrlFuncsel) -> u8 { + Gpio3ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio40ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_RX = 0x01, + UART1_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_8 = 0x04, + SIOB_PROC_40 = 0x05, + PIO0_40 = 0x06, + PIO1_40 = 0x07, + PIO2_40 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio40ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio40ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio40ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio40ctrlFuncsel { + Gpio40ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio40ctrlFuncsel) -> u8 { + Gpio40ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio41ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SS_N = 0x01, + UART1_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_8 = 0x04, + SIOB_PROC_41 = 0x05, + PIO0_41 = 0x06, + PIO1_41 = 0x07, + PIO2_41 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio41ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio41ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio41ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio41ctrlFuncsel { + Gpio41ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio41ctrlFuncsel) -> u8 { + Gpio41ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio42ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SCLK = 0x01, + UART1_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_9 = 0x04, + SIOB_PROC_42 = 0x05, + PIO0_42 = 0x06, + PIO1_42 = 0x07, + PIO2_42 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART1_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio42ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio42ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio42ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio42ctrlFuncsel { + Gpio42ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio42ctrlFuncsel) -> u8 { + Gpio42ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio43ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_TX = 0x01, + UART1_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_9 = 0x04, + SIOB_PROC_43 = 0x05, + PIO0_43 = 0x06, + PIO1_43 = 0x07, + PIO2_43 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART1_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio43ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio43ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio43ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio43ctrlFuncsel { + Gpio43ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio43ctrlFuncsel) -> u8 { + Gpio43ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio44ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_RX = 0x01, + UART0_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_10 = 0x04, + SIOB_PROC_44 = 0x05, + PIO0_44 = 0x06, + PIO1_44 = 0x07, + PIO2_44 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio44ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio44ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio44ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio44ctrlFuncsel { + Gpio44ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio44ctrlFuncsel) -> u8 { + Gpio44ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio45ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SS_N = 0x01, + UART0_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_10 = 0x04, + SIOB_PROC_45 = 0x05, + PIO0_45 = 0x06, + PIO1_45 = 0x07, + PIO2_45 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio45ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio45ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio45ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio45ctrlFuncsel { + Gpio45ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio45ctrlFuncsel) -> u8 { + Gpio45ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio46ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SCLK = 0x01, + UART0_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_11 = 0x04, + SIOB_PROC_46 = 0x05, + PIO0_46 = 0x06, + PIO1_46 = 0x07, + PIO2_46 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART0_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio46ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio46ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio46ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio46ctrlFuncsel { + Gpio46ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio46ctrlFuncsel) -> u8 { + Gpio46ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio47ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_TX = 0x01, + UART0_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_11 = 0x04, + SIOB_PROC_47 = 0x05, + PIO0_47 = 0x06, + PIO1_47 = 0x07, + PIO2_47 = 0x08, + XIP_SS_N_1 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + UART0_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio47ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio47ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio47ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio47ctrlFuncsel { + Gpio47ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio47ctrlFuncsel) -> u8 { + Gpio47ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio4ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_RX = 0x01, + UART1_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_2 = 0x04, + SIOB_PROC_4 = 0x05, + PIO0_4 = 0x06, + PIO1_4 = 0x07, + PIO2_4 = 0x08, + CORESIGHT_TRACEDATA_2 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio4ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio4ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio4ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio4ctrlFuncsel { + Gpio4ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio4ctrlFuncsel) -> u8 { + Gpio4ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio5ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SS_N = 0x01, + UART1_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_2 = 0x04, + SIOB_PROC_5 = 0x05, + PIO0_5 = 0x06, + PIO1_5 = 0x07, + PIO2_5 = 0x08, + CORESIGHT_TRACEDATA_3 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio5ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio5ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio5ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio5ctrlFuncsel { + Gpio5ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio5ctrlFuncsel) -> u8 { + Gpio5ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio6ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_SCLK = 0x01, + UART1_CTS = 0x02, + I2C1_SDA = 0x03, + PWM_A_3 = 0x04, + SIOB_PROC_6 = 0x05, + PIO0_6 = 0x06, + PIO1_6 = 0x07, + PIO2_6 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + UART1_TX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio6ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio6ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio6ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio6ctrlFuncsel { + Gpio6ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio6ctrlFuncsel) -> u8 { + Gpio6ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio7ctrlFuncsel { + _RESERVED_0 = 0, + SPI0_TX = 0x01, + UART1_RTS = 0x02, + I2C1_SCL = 0x03, + PWM_B_3 = 0x04, + SIOB_PROC_7 = 0x05, + PIO0_7 = 0x06, + PIO1_7 = 0x07, + PIO2_7 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_VBUS_DETECT = 0x0a, + UART1_RX = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio7ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio7ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio7ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio7ctrlFuncsel { + Gpio7ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio7ctrlFuncsel) -> u8 { + Gpio7ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio8ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_RX = 0x01, + UART1_TX = 0x02, + I2C0_SDA = 0x03, + PWM_A_4 = 0x04, + SIOB_PROC_8 = 0x05, + PIO0_8 = 0x06, + PIO1_8 = 0x07, + PIO2_8 = 0x08, + XIP_SS_N_1 = 0x09, + USB_MUXING_VBUS_EN = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio8ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio8ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio8ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio8ctrlFuncsel { + Gpio8ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio8ctrlFuncsel) -> u8 { + Gpio8ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Gpio9ctrlFuncsel { + _RESERVED_0 = 0, + SPI1_SS_N = 0x01, + UART1_RX = 0x02, + I2C0_SCL = 0x03, + PWM_B_4 = 0x04, + SIOB_PROC_9 = 0x05, + PIO0_9 = 0x06, + PIO1_9 = 0x07, + PIO2_9 = 0x08, + _RESERVED_9 = 0x09, + USB_MUXING_OVERCURR_DETECT = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, + _RESERVED_10 = 0x10, + _RESERVED_11 = 0x11, + _RESERVED_12 = 0x12, + _RESERVED_13 = 0x13, + _RESERVED_14 = 0x14, + _RESERVED_15 = 0x15, + _RESERVED_16 = 0x16, + _RESERVED_17 = 0x17, + _RESERVED_18 = 0x18, + _RESERVED_19 = 0x19, + _RESERVED_1a = 0x1a, + _RESERVED_1b = 0x1b, + _RESERVED_1c = 0x1c, + _RESERVED_1d = 0x1d, + _RESERVED_1e = 0x1e, + NULL = 0x1f, +} +impl Gpio9ctrlFuncsel { + #[inline(always)] + pub const fn from_bits(val: u8) -> Gpio9ctrlFuncsel { + unsafe { core::mem::transmute(val & 0x1f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Gpio9ctrlFuncsel { + #[inline(always)] + fn from(val: u8) -> Gpio9ctrlFuncsel { + Gpio9ctrlFuncsel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Gpio9ctrlFuncsel) -> u8 { + Gpio9ctrlFuncsel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Inover { + #[doc = "don't invert the peri input"] + NORMAL = 0, + #[doc = "invert the peri input"] + INVERT = 0x01, + #[doc = "drive peri input low"] + LOW = 0x02, + #[doc = "drive peri input high"] + HIGH = 0x03, +} +impl Inover { + #[inline(always)] + pub const fn from_bits(val: u8) -> Inover { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Inover { + #[inline(always)] + fn from(val: u8) -> Inover { + Inover::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Inover) -> u8 { + Inover::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Irqover { + #[doc = "don't invert the interrupt"] + NORMAL = 0, + #[doc = "invert the interrupt"] + INVERT = 0x01, + #[doc = "drive interrupt low"] + LOW = 0x02, + #[doc = "drive interrupt high"] + HIGH = 0x03, +} +impl Irqover { + #[inline(always)] + pub const fn from_bits(val: u8) -> Irqover { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Irqover { + #[inline(always)] + fn from(val: u8) -> Irqover { + Irqover::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Irqover) -> u8 { + Irqover::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Oeover { + #[doc = "drive output enable from peripheral signal selected by funcsel"] + NORMAL = 0, + #[doc = "drive output enable from inverse of peripheral signal selected by funcsel"] + INVERT = 0x01, + #[doc = "disable output"] + DISABLE = 0x02, + #[doc = "enable output"] + ENABLE = 0x03, +} +impl Oeover { + #[inline(always)] + pub const fn from_bits(val: u8) -> Oeover { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Oeover { + #[inline(always)] + fn from(val: u8) -> Oeover { + Oeover::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Oeover) -> u8 { + Oeover::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Outover { + #[doc = "drive output from peripheral signal selected by funcsel"] + NORMAL = 0, + #[doc = "drive output from inverse of peripheral signal selected by funcsel"] + INVERT = 0x01, + #[doc = "drive output low"] + LOW = 0x02, + #[doc = "drive output high"] + HIGH = 0x03, +} +impl Outover { + #[inline(always)] + pub const fn from_bits(val: u8) -> Outover { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Outover { + #[inline(always)] + fn from(val: u8) -> Outover { + Outover::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Outover) -> u8 { + Outover::to_bits(val) + } +} diff --git a/src/rp2350/mod.rs b/src/rp2350/mod.rs new file mode 100644 index 00000000..5d0b2a14 --- /dev/null +++ b/src/rp2350/mod.rs @@ -0,0 +1,256 @@ +#![no_std] +#![doc = "Peripheral access API (generated using chiptool v0.1.0 (d290630 2023-06-29))"] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub enum Interrupt { + #[doc = "0 - TIMER0_IRQ_0"] + TIMER0_IRQ_0 = 0, + #[doc = "1 - TIMER0_IRQ_1"] + TIMER0_IRQ_1 = 1, + #[doc = "2 - TIMER0_IRQ_2"] + TIMER0_IRQ_2 = 2, + #[doc = "3 - TIMER0_IRQ_3"] + TIMER0_IRQ_3 = 3, + #[doc = "4 - TIMER1_IRQ_0"] + TIMER1_IRQ_0 = 4, + #[doc = "5 - TIMER1_IRQ_1"] + TIMER1_IRQ_1 = 5, + #[doc = "6 - TIMER1_IRQ_2"] + TIMER1_IRQ_2 = 6, + #[doc = "7 - TIMER1_IRQ_3"] + TIMER1_IRQ_3 = 7, + #[doc = "8 - PWM_IRQ_WRAP_0"] + PWM_IRQ_WRAP_0 = 8, + #[doc = "9 - PWM_IRQ_WRAP_1"] + PWM_IRQ_WRAP_1 = 9, + #[doc = "10 - DMA_IRQ_0"] + DMA_IRQ_0 = 10, + #[doc = "11 - DMA_IRQ_1"] + DMA_IRQ_1 = 11, + #[doc = "12 - DMA_IRQ_2"] + DMA_IRQ_2 = 12, + #[doc = "13 - DMA_IRQ_3"] + DMA_IRQ_3 = 13, + #[doc = "14 - USBCTRL_IRQ"] + USBCTRL_IRQ = 14, + #[doc = "15 - PIO0_IRQ_0"] + PIO0_IRQ_0 = 15, + #[doc = "16 - PIO0_IRQ_1"] + PIO0_IRQ_1 = 16, + #[doc = "17 - PIO1_IRQ_0"] + PIO1_IRQ_0 = 17, + #[doc = "18 - PIO1_IRQ_1"] + PIO1_IRQ_1 = 18, + #[doc = "19 - PIO2_IRQ_0"] + PIO2_IRQ_0 = 19, + #[doc = "20 - PIO2_IRQ_1"] + PIO2_IRQ_1 = 20, + #[doc = "21 - IO_IRQ_BANK0"] + IO_IRQ_BANK0 = 21, + #[doc = "22 - IO_IRQ_BANK0_NS"] + IO_IRQ_BANK0_NS = 22, + #[doc = "23 - IO_IRQ_QSPI"] + IO_IRQ_QSPI = 23, + #[doc = "24 - IO_IRQ_QSPI_NS"] + IO_IRQ_QSPI_NS = 24, + #[doc = "25 - SIO_IRQ_FIFO"] + SIO_IRQ_FIFO = 25, + #[doc = "26 - SIO_IRQ_BELL"] + SIO_IRQ_BELL = 26, + #[doc = "27 - SIO_IRQ_FIFO_NS"] + SIO_IRQ_FIFO_NS = 27, + #[doc = "28 - SIO_IRQ_BELL_NS"] + SIO_IRQ_BELL_NS = 28, + #[doc = "29 - SIO_IRQ_MTIMECMP"] + SIO_IRQ_MTIMECMP = 29, + #[doc = "30 - CLOCKS_IRQ"] + CLOCKS_IRQ = 30, + #[doc = "31 - SPI0_IRQ"] + SPI0_IRQ = 31, + #[doc = "32 - SPI1_IRQ"] + SPI1_IRQ = 32, + #[doc = "33 - UART0_IRQ"] + UART0_IRQ = 33, + #[doc = "34 - UART1_IRQ"] + UART1_IRQ = 34, + #[doc = "35 - ADC_IRQ_FIFO"] + ADC_IRQ_FIFO = 35, + #[doc = "36 - I2C0_IRQ"] + I2C0_IRQ = 36, + #[doc = "37 - I2C1_IRQ"] + I2C1_IRQ = 37, + #[doc = "38 - OTP_IRQ"] + OTP_IRQ = 38, + #[doc = "39 - TRNG_IRQ"] + TRNG_IRQ = 39, + #[doc = "42 - PLL_SYS_IRQ"] + PLL_SYS_IRQ = 42, + #[doc = "43 - PLL_USB_IRQ"] + PLL_USB_IRQ = 43, + #[doc = "44 - POWMAN_IRQ_POW"] + POWMAN_IRQ_POW = 44, + #[doc = "45 - POWMAN_IRQ_TIMER"] + POWMAN_IRQ_TIMER = 45, + #[doc = "47 - SWI_IRQ_0"] + SWI_IRQ_0 = 47, + #[doc = "48 - SWI_IRQ_1"] + SWI_IRQ_1 = 48, + #[doc = "49 - SWI_IRQ_2"] + SWI_IRQ_2 = 49, + #[doc = "50 - SWI_IRQ_3"] + SWI_IRQ_3 = 50, + #[doc = "51 - SWI_IRQ_4"] + SWI_IRQ_4 = 51, + #[doc = "52 - SWI_IRQ_5"] + SWI_IRQ_5 = 52, +} +unsafe impl cortex_m::interrupt::InterruptNumber for Interrupt { + #[inline(always)] + fn number(self) -> u16 { + self as u16 + } +} +#[cfg(feature = "rt")] +mod _vectors; +pub const SYSINFO: sysinfo::Sysinfo = + unsafe { sysinfo::Sysinfo::from_ptr(0x4000_0000 as usize as _) }; +#[doc = "Register block for various chip control signals"] +pub const SYSCFG: syscfg::Syscfg = unsafe { syscfg::Syscfg::from_ptr(0x4000_8000 as usize as _) }; +pub const CLOCKS: clocks::Clocks = unsafe { clocks::Clocks::from_ptr(0x4001_0000 as usize as _) }; +pub const PSM: psm::Psm = unsafe { psm::Psm::from_ptr(0x4001_8000 as usize as _) }; +pub const RESETS: resets::Resets = unsafe { resets::Resets::from_ptr(0x4002_0000 as usize as _) }; +pub const IO_BANK0: io::Io = unsafe { io::Io::from_ptr(0x4002_8000 as usize as _) }; +pub const IO_QSPI: io::Io = unsafe { io::Io::from_ptr(0x4003_0000 as usize as _) }; +pub const PADS_BANK0: pads::Pads = unsafe { pads::Pads::from_ptr(0x4003_8000 as usize as _) }; +pub const PADS_QSPI: pads::Pads = unsafe { pads::Pads::from_ptr(0x4004_0000 as usize as _) }; +#[doc = "Controls the crystal oscillator"] +pub const XOSC: xosc::Xosc = unsafe { xosc::Xosc::from_ptr(0x4004_8000 as usize as _) }; +pub const PLL_SYS: pll::Pll = unsafe { pll::Pll::from_ptr(0x4005_0000 as usize as _) }; +pub const PLL_USB: pll::Pll = unsafe { pll::Pll::from_ptr(0x4005_8000 as usize as _) }; +#[doc = "Hardware access control registers"] +pub const ACCESSCTRL: accessctrl::Accessctrl = + unsafe { accessctrl::Accessctrl::from_ptr(0x4006_0000 as usize as _) }; +#[doc = "Register block for busfabric control signals and performance counters"] +pub const BUSCTRL: busctrl::Busctrl = + unsafe { busctrl::Busctrl::from_ptr(0x4006_8000 as usize as _) }; +pub const UART0: uart::Uart = unsafe { uart::Uart::from_ptr(0x4007_0000 as usize as _) }; +pub const UART1: uart::Uart = unsafe { uart::Uart::from_ptr(0x4007_8000 as usize as _) }; +pub const SPI0: spi::Spi = unsafe { spi::Spi::from_ptr(0x4008_0000 as usize as _) }; +pub const SPI1: spi::Spi = unsafe { spi::Spi::from_ptr(0x4008_8000 as usize as _) }; +#[doc = "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"] +pub const I2C0: i2c::I2c = unsafe { i2c::I2c::from_ptr(0x4009_0000 as usize as _) }; +pub const I2C1: i2c::I2c = unsafe { i2c::I2c::from_ptr(0x4009_8000 as usize as _) }; +#[doc = "Control and data interface to SAR ADC"] +pub const ADC: adc::Adc = unsafe { adc::Adc::from_ptr(0x400a_0000 as usize as _) }; +#[doc = "Simple PWM"] +pub const PWM: pwm::Pwm = unsafe { pwm::Pwm::from_ptr(0x400a_8000 as usize as _) }; +#[doc = "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"] +pub const TIMER0: timer::Timer = unsafe { timer::Timer::from_ptr(0x400b_0000 as usize as _) }; +pub const TIMER1: timer::Timer = unsafe { timer::Timer::from_ptr(0x400b_8000 as usize as _) }; +#[doc = "Control interface to HSTX. For FIFO write access and status, see the HSTX_FIFO register block."] +pub const HSTX_CTRL: hstx_ctrl::HstxCtrl = + unsafe { hstx_ctrl::HstxCtrl::from_ptr(0x400c_0000 as usize as _) }; +#[doc = "QSPI flash execute-in-place block"] +pub const XIP_CTRL: xip_ctrl::XipCtrl = + unsafe { xip_ctrl::XipCtrl::from_ptr(0x400c_8000 as usize as _) }; +#[doc = "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."] +pub const QMI: qmi::Qmi = unsafe { qmi::Qmi::from_ptr(0x400d_0000 as usize as _) }; +pub const WATCHDOG: watchdog::Watchdog = + unsafe { watchdog::Watchdog::from_ptr(0x400d_8000 as usize as _) }; +#[doc = "Additional registers mapped adjacent to the bootram, for use by the bootrom."] +pub const BOOTRAM: bootram::Bootram = + unsafe { bootram::Bootram::from_ptr(0x400e_0000 as usize as _) }; +pub const ROSC: rosc::Rosc = unsafe { rosc::Rosc::from_ptr(0x400e_8000 as usize as _) }; +#[doc = "ARM TrustZone RNG register block"] +pub const TRNG: trng::Trng = unsafe { trng::Trng::from_ptr(0x400f_0000 as usize as _) }; +#[doc = "SHA-256 hash function implementation"] +pub const SHA256: sha256::Sha256 = unsafe { sha256::Sha256::from_ptr(0x400f_8000 as usize as _) }; +#[doc = "Controls vreg, bor, lposc, chip resets & xosc startup, powman and provides scratch register for general use and for bootcode use"] +pub const POWMAN: powman::Powman = unsafe { powman::Powman::from_ptr(0x4010_0000 as usize as _) }; +pub const TICKS: ticks::Ticks = unsafe { ticks::Ticks::from_ptr(0x4010_8000 as usize as _) }; +#[doc = "SNPS OTP control IF (SBPI and RPi wrapper control)"] +pub const OTP: otp::Otp = unsafe { otp::Otp::from_ptr(0x4012_0000 as usize as _) }; +#[doc = "Predefined OTP data layout for RP2350"] +pub const OTP_DATA: otp_data::OtpData = + unsafe { otp_data::OtpData::from_ptr(0x4013_0000 as usize as _) }; +#[doc = "Predefined OTP data layout for RP2350"] +pub const OTP_DATA_RAW: otp_data_raw::OtpDataRaw = + unsafe { otp_data_raw::OtpDataRaw::from_ptr(0x4013_4000 as usize as _) }; +#[doc = "Glitch detector controls"] +pub const GLITCH_DETECTOR: glitch_detector::GlitchDetector = + unsafe { glitch_detector::GlitchDetector::from_ptr(0x4015_8000 as usize as _) }; +#[doc = "For managing simulation testbenches"] +pub const TBMAN: tbman::Tbman = unsafe { tbman::Tbman::from_ptr(0x4016_0000 as usize as _) }; +#[doc = "DMA with separate read and write masters"] +pub const DMA: dma::Dma = unsafe { dma::Dma::from_ptr(0x5000_0000 as usize as _) }; +#[doc = "DPRAM layout for USB device."] +pub const USB_DPRAM: usb_dpram::UsbDpram = + unsafe { usb_dpram::UsbDpram::from_ptr(0x5010_0000 as usize as _) }; +#[doc = "USB FS/LS controller device registers"] +pub const USB: usb::Usb = unsafe { usb::Usb::from_ptr(0x5011_0000 as usize as _) }; +#[doc = "Programmable IO block"] +pub const PIO0: pio::Pio = unsafe { pio::Pio::from_ptr(0x5020_0000 as usize as _) }; +pub const PIO1: pio::Pio = unsafe { pio::Pio::from_ptr(0x5030_0000 as usize as _) }; +pub const PIO2: pio::Pio = unsafe { pio::Pio::from_ptr(0x5040_0000 as usize as _) }; +#[doc = "Auxiliary DMA access to XIP FIFOs, via fast AHB bus access"] +pub const XIP_AUX: xip_aux::XipAux = + unsafe { xip_aux::XipAux::from_ptr(0x5050_0000 as usize as _) }; +#[doc = "FIFO status and write access for HSTX"] +pub const HSTX_FIFO: hstx_fifo::HstxFifo = + unsafe { hstx_fifo::HstxFifo::from_ptr(0x5060_0000 as usize as _) }; +#[doc = "Coresight block - RP specific registers"] +pub const CORESIGHT_TRACE: coresight_trace::CoresightTrace = + unsafe { coresight_trace::CoresightTrace::from_ptr(0x5070_0000 as usize as _) }; +#[doc = "Single-cycle IO block Provides core-local and inter-core hardware for the two processors, with single-cycle access."] +pub const SIO: sio::Sio = unsafe { sio::Sio::from_ptr(0xd000_0000 as usize as _) }; +pub const SIO_NS: sio::Sio = unsafe { sio::Sio::from_ptr(0xd002_0000 as usize as _) }; +#[doc = "Cortex-M33 EPPB vendor register block for RP2350"] +pub const EPPB: eppb::Eppb = unsafe { eppb::Eppb::from_ptr(0xe008_0000 as usize as _) }; +#[doc = r" Number available in the NVIC for configuring priority"] +#[cfg(feature = "rt")] +pub const NVIC_PRIO_BITS: u8 = 4; +#[cfg(feature = "rt")] +pub use cortex_m_rt::interrupt; +#[cfg(feature = "rt")] +pub use Interrupt as interrupt; +pub mod accessctrl; +pub mod adc; +pub mod bootram; +pub mod busctrl; +pub mod clocks; +pub mod common; +pub mod coresight_trace; +pub mod dma; +pub mod eppb; +pub mod glitch_detector; +pub mod hstx_ctrl; +pub mod hstx_fifo; +pub mod i2c; +pub mod io; +pub mod otp; +pub mod otp_data; +pub mod otp_data_raw; +pub mod pads; +pub mod pio; +pub mod pll; +pub mod powman; +pub mod psm; +pub mod pwm; +pub mod qmi; +pub mod resets; +pub mod rosc; +pub mod sha256; +pub mod sio; +pub mod spi; +pub mod syscfg; +pub mod sysinfo; +pub mod tbman; +pub mod ticks; +pub mod timer; +pub mod trng; +pub mod uart; +pub mod usb; +pub mod usb_dpram; +pub mod watchdog; +pub mod xip_aux; +pub mod xip_ctrl; +pub mod xosc; diff --git a/src/rp2350/otp.rs b/src/rp2350/otp.rs new file mode 100644 index 00000000..d82ec108 --- /dev/null +++ b/src/rp2350/otp.rs @@ -0,0 +1,480 @@ +#[doc = "SNPS OTP control IF (SBPI and RPi wrapper control)"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Otp { + ptr: *mut u8, +} +unsafe impl Send for Otp {} +unsafe impl Sync for Otp {} +impl Otp { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Software lock register for page 0. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Software lock register for page 1. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Software lock register for page 2. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Software lock register for page 3. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Software lock register for page 4. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Software lock register for page 5. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Software lock register for page 6. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Software lock register for page 7. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Software lock register for page 8. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Software lock register for page 9. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Software lock register for page 10. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Software lock register for page 11. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "Software lock register for page 12. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "Software lock register for page 13. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "Software lock register for page 14. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "Software lock register for page 15. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "Software lock register for page 16. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock16(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "Software lock register for page 17. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock17(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "Software lock register for page 18. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock18(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "Software lock register for page 19. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock19(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "Software lock register for page 20. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock20(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "Software lock register for page 21. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock21(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(84usize) as _) } + } + #[doc = "Software lock register for page 22. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock22(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } + } + #[doc = "Software lock register for page 23. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock23(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[doc = "Software lock register for page 24. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock24(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[doc = "Software lock register for page 25. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock25(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } + } + #[doc = "Software lock register for page 26. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock26(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } + } + #[doc = "Software lock register for page 27. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock27(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[doc = "Software lock register for page 28. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock28(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } + } + #[doc = "Software lock register for page 29. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock29(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } + } + #[doc = "Software lock register for page 30. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock30(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } + } + #[doc = "Software lock register for page 31. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock31(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } + } + #[doc = "Software lock register for page 32. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock32(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } + } + #[doc = "Software lock register for page 33. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock33(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } + } + #[doc = "Software lock register for page 34. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock34(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(136usize) as _) } + } + #[doc = "Software lock register for page 35. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock35(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(140usize) as _) } + } + #[doc = "Software lock register for page 36. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock36(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(144usize) as _) } + } + #[doc = "Software lock register for page 37. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock37(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(148usize) as _) } + } + #[doc = "Software lock register for page 38. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock38(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(152usize) as _) } + } + #[doc = "Software lock register for page 39. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock39(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(156usize) as _) } + } + #[doc = "Software lock register for page 40. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock40(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(160usize) as _) } + } + #[doc = "Software lock register for page 41. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock41(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(164usize) as _) } + } + #[doc = "Software lock register for page 42. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock42(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(168usize) as _) } + } + #[doc = "Software lock register for page 43. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock43(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(172usize) as _) } + } + #[doc = "Software lock register for page 44. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock44(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(176usize) as _) } + } + #[doc = "Software lock register for page 45. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock45(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(180usize) as _) } + } + #[doc = "Software lock register for page 46. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock46(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(184usize) as _) } + } + #[doc = "Software lock register for page 47. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock47(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(188usize) as _) } + } + #[doc = "Software lock register for page 48. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock48(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(192usize) as _) } + } + #[doc = "Software lock register for page 49. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock49(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(196usize) as _) } + } + #[doc = "Software lock register for page 50. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock50(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(200usize) as _) } + } + #[doc = "Software lock register for page 51. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock51(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(204usize) as _) } + } + #[doc = "Software lock register for page 52. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock52(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(208usize) as _) } + } + #[doc = "Software lock register for page 53. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock53(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(212usize) as _) } + } + #[doc = "Software lock register for page 54. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock54(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(216usize) as _) } + } + #[doc = "Software lock register for page 55. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock55(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(220usize) as _) } + } + #[doc = "Software lock register for page 56. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock56(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(224usize) as _) } + } + #[doc = "Software lock register for page 57. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock57(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(228usize) as _) } + } + #[doc = "Software lock register for page 58. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock58(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(232usize) as _) } + } + #[doc = "Software lock register for page 59. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock59(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(236usize) as _) } + } + #[doc = "Software lock register for page 60. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock60(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(240usize) as _) } + } + #[doc = "Software lock register for page 61. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock61(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(244usize) as _) } + } + #[doc = "Software lock register for page 62. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock62(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(248usize) as _) } + } + #[doc = "Software lock register for page 63. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] + #[inline(always)] + pub const fn sw_lock63(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(252usize) as _) } + } + #[doc = "Dispatch instructions to the SBPI interface, used for programming the OTP fuses."] + #[inline(always)] + pub const fn sbpi_instr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize) as _) } + } + #[doc = "SBPI write payload bytes 3..0"] + #[inline(always)] + pub const fn sbpi_wdata_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(260usize) as _) } + } + #[doc = "SBPI write payload bytes 7..4"] + #[inline(always)] + pub const fn sbpi_wdata_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(264usize) as _) } + } + #[doc = "SBPI write payload bytes 11..8"] + #[inline(always)] + pub const fn sbpi_wdata_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(268usize) as _) } + } + #[doc = "SBPI write payload bytes 15..12"] + #[inline(always)] + pub const fn sbpi_wdata_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(272usize) as _) } + } + #[doc = "Read payload bytes 3..0. Once read, the data in the register will automatically clear to 0."] + #[inline(always)] + pub const fn sbpi_rdata_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(276usize) as _) } + } + #[doc = "Read payload bytes 7..4. Once read, the data in the register will automatically clear to 0."] + #[inline(always)] + pub const fn sbpi_rdata_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(280usize) as _) } + } + #[doc = "Read payload bytes 11..8. Once read, the data in the register will automatically clear to 0."] + #[inline(always)] + pub const fn sbpi_rdata_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(284usize) as _) } + } + #[doc = "Read payload bytes 15..12. Once read, the data in the register will automatically clear to 0."] + #[inline(always)] + pub const fn sbpi_rdata_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(288usize) as _) } + } + #[inline(always)] + pub const fn sbpi_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(292usize) as _) } + } + #[doc = "Controls for APB data read interface (USER interface)"] + #[inline(always)] + pub const fn usr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(296usize) as _) } + } + #[doc = "Debug for OTP power-on state machine"] + #[inline(always)] + pub const fn dbg(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(300usize) as _) } + } + #[doc = "During BIST, count address locations that have at least one leaky bit"] + #[inline(always)] + pub const fn bist(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(308usize) as _) } + } + #[doc = "Word 0 (bits 31..0) of the key. Write only, read returns 0x0"] + #[inline(always)] + pub const fn crt_key_w0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(312usize) as _) } + } + #[doc = "Word 1 (bits 63..32) of the key. Write only, read returns 0x0"] + #[inline(always)] + pub const fn crt_key_w1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(316usize) as _) } + } + #[doc = "Word 2 (bits 95..64) of the key. Write only, read returns 0x0"] + #[inline(always)] + pub const fn crt_key_w2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(320usize) as _) } + } + #[doc = "Word 3 (bits 127..96) of the key. Write only, read returns 0x0"] + #[inline(always)] + pub const fn crt_key_w3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(324usize) as _) } + } + #[doc = "Quickly check values of critical flags read during boot up"] + #[inline(always)] + pub const fn critical(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(328usize) as _) } + } + #[doc = "Which keys were valid (enrolled) at boot time"] + #[inline(always)] + pub const fn key_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(332usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn debugen(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(336usize) as _) } + } + #[doc = "Write 1s to lock corresponding bits in DEBUGEN. This register is reset by the processor cold reset."] + #[inline(always)] + pub const fn debugen_lock(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(340usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn archsel(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(344usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn archsel_status( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(348usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn bootdis(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(352usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(356usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(360usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(364usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(368usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/otp/regs.rs b/src/rp2350/otp/regs.rs new file mode 100644 index 00000000..321411cb --- /dev/null +++ b/src/rp2350/otp/regs.rs @@ -0,0 +1,3077 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Archsel(pub u32); +impl Archsel { + #[doc = "Select architecture for core 0."] + #[inline(always)] + pub const fn core0(&self) -> super::vals::ArchselCore0 { + let val = (self.0 >> 0usize) & 0x01; + super::vals::ArchselCore0::from_bits(val as u8) + } + #[doc = "Select architecture for core 0."] + #[inline(always)] + pub fn set_core0(&mut self, val: super::vals::ArchselCore0) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize); + } + #[doc = "Select architecture for core 1."] + #[inline(always)] + pub const fn core1(&self) -> super::vals::ArchselCore1 { + let val = (self.0 >> 1usize) & 0x01; + super::vals::ArchselCore1::from_bits(val as u8) + } + #[doc = "Select architecture for core 1."] + #[inline(always)] + pub fn set_core1(&mut self, val: super::vals::ArchselCore1) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val.to_bits() as u32) & 0x01) << 1usize); + } +} +impl Default for Archsel { + #[inline(always)] + fn default() -> Archsel { + Archsel(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ArchselStatus(pub u32); +impl ArchselStatus { + #[doc = "Current architecture for core 0. Updated on processor warm reset."] + #[inline(always)] + pub const fn core0(&self) -> super::vals::ArchselStatusCore0 { + let val = (self.0 >> 0usize) & 0x01; + super::vals::ArchselStatusCore0::from_bits(val as u8) + } + #[doc = "Current architecture for core 0. Updated on processor warm reset."] + #[inline(always)] + pub fn set_core0(&mut self, val: super::vals::ArchselStatusCore0) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize); + } + #[doc = "Current architecture for core 0. Updated on processor warm reset."] + #[inline(always)] + pub const fn core1(&self) -> super::vals::ArchselStatusCore1 { + let val = (self.0 >> 1usize) & 0x01; + super::vals::ArchselStatusCore1::from_bits(val as u8) + } + #[doc = "Current architecture for core 0. Updated on processor warm reset."] + #[inline(always)] + pub fn set_core1(&mut self, val: super::vals::ArchselStatusCore1) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val.to_bits() as u32) & 0x01) << 1usize); + } +} +impl Default for ArchselStatus { + #[inline(always)] + fn default() -> ArchselStatus { + ArchselStatus(0) + } +} +#[doc = "During BIST, count address locations that have at least one leaky bit"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bist(pub u32); +impl Bist { + #[doc = "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."] + #[inline(always)] + pub const fn cnt(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x1fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_cnt(&mut self, val: u16) { + self.0 = (self.0 & !(0x1fff << 0usize)) | (((val as u32) & 0x1fff) << 0usize); + } + #[doc = "The cnt_fail flag will be set if the number of leaky locations exceeds this number"] + #[inline(always)] + pub const fn cnt_max(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x0fff; + val as u16 + } + #[doc = "The cnt_fail flag will be set if the number of leaky locations exceeds this number"] + #[inline(always)] + pub fn set_cnt_max(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 16usize)) | (((val as u32) & 0x0fff) << 16usize); + } + #[doc = "Enable the counter before the BIST function is initiated"] + #[inline(always)] + pub const fn cnt_ena(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Enable the counter before the BIST function is initiated"] + #[inline(always)] + pub fn set_cnt_ena(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[doc = "Clear counter before use"] + #[inline(always)] + pub const fn cnt_clr(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "Clear counter before use"] + #[inline(always)] + pub fn set_cnt_clr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "Flag if the count of address locations with at least one leaky bit exceeds cnt_max"] + #[inline(always)] + pub const fn cnt_fail(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "Flag if the count of address locations with at least one leaky bit exceeds cnt_max"] + #[inline(always)] + pub fn set_cnt_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } +} +impl Default for Bist { + #[inline(always)] + fn default() -> Bist { + Bist(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootdis(pub u32); +impl Bootdis { + #[doc = "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."] + #[inline(always)] + pub const fn now(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_now(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn next(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_next(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Bootdis { + #[inline(always)] + fn default() -> Bootdis { + Bootdis(0) + } +} +#[doc = "Quickly check values of critical flags read during boot up"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Critical(pub u32); +impl Critical { + #[inline(always)] + pub const fn secure_boot_enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_secure_boot_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn secure_debug_disable(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_secure_debug_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn debug_disable(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_debug_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn default_archsel(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_default_archsel(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn glitch_detector_enable(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_glitch_detector_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn glitch_detector_sens(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_glitch_detector_sens(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 5usize)) | (((val as u32) & 0x03) << 5usize); + } + #[inline(always)] + pub const fn arm_disable(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_arm_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn riscv_disable(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_riscv_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } +} +impl Default for Critical { + #[inline(always)] + fn default() -> Critical { + Critical(0) + } +} +#[doc = "Debug for OTP power-on state machine"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dbg(pub u32); +impl Dbg { + #[doc = "PSM done status flag"] + #[inline(always)] + pub const fn psm_done(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "PSM done status flag"] + #[inline(always)] + pub fn set_psm_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "PSM boot done status flag"] + #[inline(always)] + pub const fn boot_done(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "PSM boot done status flag"] + #[inline(always)] + pub fn set_boot_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Ring oscillator was seen up and running"] + #[inline(always)] + pub const fn rosc_up_seen(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Ring oscillator was seen up and running"] + #[inline(always)] + pub fn set_rosc_up_seen(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Ring oscillator is up and running"] + #[inline(always)] + pub const fn rosc_up(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Ring oscillator is up and running"] + #[inline(always)] + pub fn set_rosc_up(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Monitor the PSM FSM's state"] + #[inline(always)] + pub const fn psm_state(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "Monitor the PSM FSM's state"] + #[inline(always)] + pub fn set_psm_state(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } + #[doc = "The chip is in RMA mode"] + #[inline(always)] + pub const fn customer_rma_flag(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "The chip is in RMA mode"] + #[inline(always)] + pub fn set_customer_rma_flag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for Dbg { + #[inline(always)] + fn default() -> Dbg { + Dbg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Debugen(pub u32); +impl Debugen { + #[doc = "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)."] + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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)."] + #[inline(always)] + pub const fn proc0_secure(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_proc0_secure(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn proc1_secure(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_proc1_secure(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn misc(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_misc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } +} +impl Default for Debugen { + #[inline(always)] + fn default() -> Debugen { + Debugen(0) + } +} +#[doc = "Write 1s to lock corresponding bits in DEBUGEN. This register is reset by the processor cold reset."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DebugenLock(pub u32); +impl DebugenLock { + #[doc = "Write 1 to lock the PROC0 bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to lock the PROC0 bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Write 1 to lock the PROC0_SECURE bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub const fn proc0_secure(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to lock the PROC0_SECURE bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub fn set_proc0_secure(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Write 1 to lock the PROC1 bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to lock the PROC1 bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Write 1 to lock the PROC1_SECURE bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub const fn proc1_secure(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to lock the PROC1_SECURE bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub fn set_proc1_secure(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Write 1 to lock the MISC bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub const fn misc(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to lock the MISC bit of DEBUGEN. Can't be cleared once set."] + #[inline(always)] + pub fn set_misc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } +} +impl Default for DebugenLock { + #[inline(always)] + fn default() -> DebugenLock { + DebugenLock(0) + } +} +#[doc = "Interrupt Enable"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte(pub u32); +impl Inte { + #[inline(always)] + pub const fn sbpi_flag_n(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_flag_n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn sbpi_wr_fail(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_wr_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn apb_dctrl_fail(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_dctrl_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn apb_rd_sec_fail(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_sec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn apb_rd_nsec_fail(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_nsec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Inte { + #[inline(always)] + fn default() -> Inte { + Inte(0) + } +} +#[doc = "Interrupt Force"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf(pub u32); +impl Intf { + #[inline(always)] + pub const fn sbpi_flag_n(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_flag_n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn sbpi_wr_fail(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_wr_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn apb_dctrl_fail(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_dctrl_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn apb_rd_sec_fail(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_sec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn apb_rd_nsec_fail(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_nsec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Intf { + #[inline(always)] + fn default() -> Intf { + Intf(0) + } +} +#[doc = "Raw Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr(pub u32); +impl Intr { + #[inline(always)] + pub const fn sbpi_flag_n(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_flag_n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn sbpi_wr_fail(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_wr_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn apb_dctrl_fail(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_dctrl_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn apb_rd_sec_fail(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_sec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn apb_rd_nsec_fail(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_nsec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Intr { + #[inline(always)] + fn default() -> Intr { + Intr(0) + } +} +#[doc = "Interrupt status after masking & forcing"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints(pub u32); +impl Ints { + #[inline(always)] + pub const fn sbpi_flag_n(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_flag_n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn sbpi_wr_fail(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sbpi_wr_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn apb_dctrl_fail(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_dctrl_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn apb_rd_sec_fail(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_sec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn apb_rd_nsec_fail(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_apb_rd_nsec_fail(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Ints { + #[inline(always)] + fn default() -> Ints { + Ints(0) + } +} +#[doc = "Which keys were valid (enrolled) at boot time"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct KeyValid(pub u32); +impl KeyValid { + #[inline(always)] + pub const fn key_valid(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_key_valid(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for KeyValid { + #[inline(always)] + fn default() -> KeyValid { + KeyValid(0) + } +} +#[doc = "Dispatch instructions to the SBPI interface, used for programming the OTP fuses."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SbpiInstr(pub u32); +impl SbpiInstr { + #[doc = "wdata to be used only when payload_size_m1=0"] + #[inline(always)] + pub const fn short_wdata(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "wdata to be used only when payload_size_m1=0"] + #[inline(always)] + pub fn set_short_wdata(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[inline(always)] + pub const fn cmd(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_cmd(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Instruction target, it can be PMC (0x3a) or DAP (0x02)"] + #[inline(always)] + pub const fn target(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Instruction target, it can be PMC (0x3a) or DAP (0x02)"] + #[inline(always)] + pub fn set_target(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } + #[doc = "Instruction payload size in bytes minus 1"] + #[inline(always)] + pub const fn payload_size_m1(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x0f; + val as u8 + } + #[doc = "Instruction payload size in bytes minus 1"] + #[inline(always)] + pub fn set_payload_size_m1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize); + } + #[doc = "Instruction has payload (data to be written or to be read)"] + #[inline(always)] + pub const fn has_payload(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Instruction has payload (data to be written or to be read)"] + #[inline(always)] + pub fn set_has_payload(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[doc = "Payload type is write"] + #[inline(always)] + pub const fn is_wr(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "Payload type is write"] + #[inline(always)] + pub fn set_is_wr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "Execute instruction"] + #[inline(always)] + pub const fn exec(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "Execute instruction"] + #[inline(always)] + pub fn set_exec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } +} +impl Default for SbpiInstr { + #[inline(always)] + fn default() -> SbpiInstr { + SbpiInstr(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SbpiStatus(pub u32); +impl SbpiStatus { + #[doc = "Read command has returned data"] + #[inline(always)] + pub const fn rdata_vld(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Read command has returned data"] + #[inline(always)] + pub fn set_rdata_vld(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Last instruction done"] + #[inline(always)] + pub const fn instr_done(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Last instruction done"] + #[inline(always)] + pub fn set_instr_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Last instruction missed (dropped), as the previous has not finished running"] + #[inline(always)] + pub const fn instr_miss(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Last instruction missed (dropped), as the previous has not finished running"] + #[inline(always)] + pub fn set_instr_miss(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "SBPI flag"] + #[inline(always)] + pub const fn flag(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "SBPI flag"] + #[inline(always)] + pub fn set_flag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "SBPI MISO (master in - slave out): response from SBPI"] + #[inline(always)] + pub const fn miso(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "SBPI MISO (master in - slave out): response from SBPI"] + #[inline(always)] + pub fn set_miso(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for SbpiStatus { + #[inline(always)] + fn default() -> SbpiStatus { + SbpiStatus(0) + } +} +#[doc = "Software lock register for page 0. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock0(pub u32); +impl SwLock0 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock0sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock0sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock0sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock0nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock0nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock0nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock0 { + #[inline(always)] + fn default() -> SwLock0 { + SwLock0(0) + } +} +#[doc = "Software lock register for page 1. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock1(pub u32); +impl SwLock1 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock1sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock1sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock1sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock1nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock1nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock1nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock1 { + #[inline(always)] + fn default() -> SwLock1 { + SwLock1(0) + } +} +#[doc = "Software lock register for page 10. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock10(pub u32); +impl SwLock10 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock10sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock10sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock10sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock10nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock10nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock10nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock10 { + #[inline(always)] + fn default() -> SwLock10 { + SwLock10(0) + } +} +#[doc = "Software lock register for page 11. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock11(pub u32); +impl SwLock11 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock11sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock11sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock11sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock11nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock11nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock11nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock11 { + #[inline(always)] + fn default() -> SwLock11 { + SwLock11(0) + } +} +#[doc = "Software lock register for page 12. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock12(pub u32); +impl SwLock12 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock12sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock12sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock12sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock12nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock12nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock12nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock12 { + #[inline(always)] + fn default() -> SwLock12 { + SwLock12(0) + } +} +#[doc = "Software lock register for page 13. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock13(pub u32); +impl SwLock13 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock13sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock13sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock13sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock13nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock13nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock13nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock13 { + #[inline(always)] + fn default() -> SwLock13 { + SwLock13(0) + } +} +#[doc = "Software lock register for page 14. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock14(pub u32); +impl SwLock14 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock14sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock14sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock14sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock14nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock14nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock14nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock14 { + #[inline(always)] + fn default() -> SwLock14 { + SwLock14(0) + } +} +#[doc = "Software lock register for page 15. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock15(pub u32); +impl SwLock15 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock15sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock15sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock15sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock15nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock15nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock15nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock15 { + #[inline(always)] + fn default() -> SwLock15 { + SwLock15(0) + } +} +#[doc = "Software lock register for page 16. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock16(pub u32); +impl SwLock16 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock16sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock16sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock16sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock16nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock16nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock16nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock16 { + #[inline(always)] + fn default() -> SwLock16 { + SwLock16(0) + } +} +#[doc = "Software lock register for page 17. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock17(pub u32); +impl SwLock17 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock17sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock17sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock17sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock17nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock17nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock17nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock17 { + #[inline(always)] + fn default() -> SwLock17 { + SwLock17(0) + } +} +#[doc = "Software lock register for page 18. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock18(pub u32); +impl SwLock18 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock18sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock18sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock18sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock18nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock18nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock18nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock18 { + #[inline(always)] + fn default() -> SwLock18 { + SwLock18(0) + } +} +#[doc = "Software lock register for page 19. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock19(pub u32); +impl SwLock19 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock19sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock19sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock19sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock19nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock19nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock19nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock19 { + #[inline(always)] + fn default() -> SwLock19 { + SwLock19(0) + } +} +#[doc = "Software lock register for page 2. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock2(pub u32); +impl SwLock2 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock2sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock2sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock2sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock2nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock2nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock2nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock2 { + #[inline(always)] + fn default() -> SwLock2 { + SwLock2(0) + } +} +#[doc = "Software lock register for page 20. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock20(pub u32); +impl SwLock20 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock20sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock20sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock20sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock20nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock20nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock20nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock20 { + #[inline(always)] + fn default() -> SwLock20 { + SwLock20(0) + } +} +#[doc = "Software lock register for page 21. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock21(pub u32); +impl SwLock21 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock21sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock21sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock21sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock21nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock21nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock21nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock21 { + #[inline(always)] + fn default() -> SwLock21 { + SwLock21(0) + } +} +#[doc = "Software lock register for page 22. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock22(pub u32); +impl SwLock22 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock22sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock22sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock22sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock22nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock22nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock22nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock22 { + #[inline(always)] + fn default() -> SwLock22 { + SwLock22(0) + } +} +#[doc = "Software lock register for page 23. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock23(pub u32); +impl SwLock23 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock23sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock23sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock23sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock23nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock23nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock23nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock23 { + #[inline(always)] + fn default() -> SwLock23 { + SwLock23(0) + } +} +#[doc = "Software lock register for page 24. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock24(pub u32); +impl SwLock24 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock24sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock24sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock24sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock24nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock24nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock24nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock24 { + #[inline(always)] + fn default() -> SwLock24 { + SwLock24(0) + } +} +#[doc = "Software lock register for page 25. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock25(pub u32); +impl SwLock25 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock25sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock25sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock25sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock25nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock25nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock25nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock25 { + #[inline(always)] + fn default() -> SwLock25 { + SwLock25(0) + } +} +#[doc = "Software lock register for page 26. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock26(pub u32); +impl SwLock26 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock26sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock26sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock26sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock26nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock26nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock26nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock26 { + #[inline(always)] + fn default() -> SwLock26 { + SwLock26(0) + } +} +#[doc = "Software lock register for page 27. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock27(pub u32); +impl SwLock27 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock27sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock27sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock27sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock27nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock27nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock27nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock27 { + #[inline(always)] + fn default() -> SwLock27 { + SwLock27(0) + } +} +#[doc = "Software lock register for page 28. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock28(pub u32); +impl SwLock28 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock28sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock28sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock28sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock28nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock28nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock28nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock28 { + #[inline(always)] + fn default() -> SwLock28 { + SwLock28(0) + } +} +#[doc = "Software lock register for page 29. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock29(pub u32); +impl SwLock29 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock29sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock29sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock29sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock29nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock29nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock29nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock29 { + #[inline(always)] + fn default() -> SwLock29 { + SwLock29(0) + } +} +#[doc = "Software lock register for page 3. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock3(pub u32); +impl SwLock3 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock3sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock3sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock3sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock3nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock3nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock3nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock3 { + #[inline(always)] + fn default() -> SwLock3 { + SwLock3(0) + } +} +#[doc = "Software lock register for page 30. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock30(pub u32); +impl SwLock30 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock30sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock30sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock30sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock30nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock30nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock30nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock30 { + #[inline(always)] + fn default() -> SwLock30 { + SwLock30(0) + } +} +#[doc = "Software lock register for page 31. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock31(pub u32); +impl SwLock31 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock31sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock31sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock31sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock31nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock31nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock31nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock31 { + #[inline(always)] + fn default() -> SwLock31 { + SwLock31(0) + } +} +#[doc = "Software lock register for page 32. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock32(pub u32); +impl SwLock32 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock32sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock32sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock32sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock32nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock32nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock32nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock32 { + #[inline(always)] + fn default() -> SwLock32 { + SwLock32(0) + } +} +#[doc = "Software lock register for page 33. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock33(pub u32); +impl SwLock33 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock33sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock33sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock33sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock33nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock33nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock33nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock33 { + #[inline(always)] + fn default() -> SwLock33 { + SwLock33(0) + } +} +#[doc = "Software lock register for page 34. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock34(pub u32); +impl SwLock34 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock34sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock34sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock34sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock34nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock34nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock34nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock34 { + #[inline(always)] + fn default() -> SwLock34 { + SwLock34(0) + } +} +#[doc = "Software lock register for page 35. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock35(pub u32); +impl SwLock35 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock35sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock35sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock35sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock35nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock35nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock35nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock35 { + #[inline(always)] + fn default() -> SwLock35 { + SwLock35(0) + } +} +#[doc = "Software lock register for page 36. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock36(pub u32); +impl SwLock36 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock36sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock36sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock36sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock36nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock36nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock36nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock36 { + #[inline(always)] + fn default() -> SwLock36 { + SwLock36(0) + } +} +#[doc = "Software lock register for page 37. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock37(pub u32); +impl SwLock37 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock37sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock37sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock37sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock37nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock37nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock37nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock37 { + #[inline(always)] + fn default() -> SwLock37 { + SwLock37(0) + } +} +#[doc = "Software lock register for page 38. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock38(pub u32); +impl SwLock38 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock38sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock38sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock38sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock38nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock38nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock38nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock38 { + #[inline(always)] + fn default() -> SwLock38 { + SwLock38(0) + } +} +#[doc = "Software lock register for page 39. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock39(pub u32); +impl SwLock39 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock39sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock39sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock39sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock39nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock39nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock39nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock39 { + #[inline(always)] + fn default() -> SwLock39 { + SwLock39(0) + } +} +#[doc = "Software lock register for page 4. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock4(pub u32); +impl SwLock4 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock4sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock4sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock4sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock4nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock4nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock4nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock4 { + #[inline(always)] + fn default() -> SwLock4 { + SwLock4(0) + } +} +#[doc = "Software lock register for page 40. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock40(pub u32); +impl SwLock40 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock40sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock40sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock40sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock40nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock40nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock40nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock40 { + #[inline(always)] + fn default() -> SwLock40 { + SwLock40(0) + } +} +#[doc = "Software lock register for page 41. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock41(pub u32); +impl SwLock41 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock41sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock41sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock41sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock41nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock41nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock41nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock41 { + #[inline(always)] + fn default() -> SwLock41 { + SwLock41(0) + } +} +#[doc = "Software lock register for page 42. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock42(pub u32); +impl SwLock42 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock42sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock42sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock42sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock42nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock42nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock42nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock42 { + #[inline(always)] + fn default() -> SwLock42 { + SwLock42(0) + } +} +#[doc = "Software lock register for page 43. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock43(pub u32); +impl SwLock43 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock43sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock43sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock43sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock43nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock43nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock43nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock43 { + #[inline(always)] + fn default() -> SwLock43 { + SwLock43(0) + } +} +#[doc = "Software lock register for page 44. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock44(pub u32); +impl SwLock44 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock44sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock44sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock44sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock44nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock44nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock44nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock44 { + #[inline(always)] + fn default() -> SwLock44 { + SwLock44(0) + } +} +#[doc = "Software lock register for page 45. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock45(pub u32); +impl SwLock45 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock45sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock45sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock45sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock45nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock45nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock45nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock45 { + #[inline(always)] + fn default() -> SwLock45 { + SwLock45(0) + } +} +#[doc = "Software lock register for page 46. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock46(pub u32); +impl SwLock46 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock46sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock46sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock46sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock46nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock46nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock46nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock46 { + #[inline(always)] + fn default() -> SwLock46 { + SwLock46(0) + } +} +#[doc = "Software lock register for page 47. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock47(pub u32); +impl SwLock47 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock47sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock47sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock47sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock47nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock47nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock47nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock47 { + #[inline(always)] + fn default() -> SwLock47 { + SwLock47(0) + } +} +#[doc = "Software lock register for page 48. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock48(pub u32); +impl SwLock48 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock48sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock48sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock48sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock48nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock48nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock48nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock48 { + #[inline(always)] + fn default() -> SwLock48 { + SwLock48(0) + } +} +#[doc = "Software lock register for page 49. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock49(pub u32); +impl SwLock49 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock49sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock49sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock49sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock49nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock49nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock49nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock49 { + #[inline(always)] + fn default() -> SwLock49 { + SwLock49(0) + } +} +#[doc = "Software lock register for page 5. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock5(pub u32); +impl SwLock5 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock5sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock5sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock5sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock5nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock5nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock5nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock5 { + #[inline(always)] + fn default() -> SwLock5 { + SwLock5(0) + } +} +#[doc = "Software lock register for page 50. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock50(pub u32); +impl SwLock50 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock50sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock50sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock50sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock50nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock50nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock50nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock50 { + #[inline(always)] + fn default() -> SwLock50 { + SwLock50(0) + } +} +#[doc = "Software lock register for page 51. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock51(pub u32); +impl SwLock51 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock51sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock51sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock51sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock51nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock51nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock51nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock51 { + #[inline(always)] + fn default() -> SwLock51 { + SwLock51(0) + } +} +#[doc = "Software lock register for page 52. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock52(pub u32); +impl SwLock52 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock52sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock52sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock52sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock52nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock52nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock52nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock52 { + #[inline(always)] + fn default() -> SwLock52 { + SwLock52(0) + } +} +#[doc = "Software lock register for page 53. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock53(pub u32); +impl SwLock53 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock53sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock53sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock53sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock53nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock53nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock53nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock53 { + #[inline(always)] + fn default() -> SwLock53 { + SwLock53(0) + } +} +#[doc = "Software lock register for page 54. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock54(pub u32); +impl SwLock54 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock54sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock54sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock54sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock54nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock54nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock54nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock54 { + #[inline(always)] + fn default() -> SwLock54 { + SwLock54(0) + } +} +#[doc = "Software lock register for page 55. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock55(pub u32); +impl SwLock55 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock55sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock55sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock55sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock55nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock55nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock55nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock55 { + #[inline(always)] + fn default() -> SwLock55 { + SwLock55(0) + } +} +#[doc = "Software lock register for page 56. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock56(pub u32); +impl SwLock56 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock56sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock56sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock56sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock56nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock56nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock56nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock56 { + #[inline(always)] + fn default() -> SwLock56 { + SwLock56(0) + } +} +#[doc = "Software lock register for page 57. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock57(pub u32); +impl SwLock57 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock57sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock57sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock57sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock57nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock57nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock57nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock57 { + #[inline(always)] + fn default() -> SwLock57 { + SwLock57(0) + } +} +#[doc = "Software lock register for page 58. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock58(pub u32); +impl SwLock58 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock58sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock58sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock58sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock58nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock58nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock58nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock58 { + #[inline(always)] + fn default() -> SwLock58 { + SwLock58(0) + } +} +#[doc = "Software lock register for page 59. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock59(pub u32); +impl SwLock59 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock59sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock59sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock59sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock59nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock59nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock59nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock59 { + #[inline(always)] + fn default() -> SwLock59 { + SwLock59(0) + } +} +#[doc = "Software lock register for page 6. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock6(pub u32); +impl SwLock6 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock6sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock6sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock6sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock6nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock6nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock6nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock6 { + #[inline(always)] + fn default() -> SwLock6 { + SwLock6(0) + } +} +#[doc = "Software lock register for page 60. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock60(pub u32); +impl SwLock60 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock60sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock60sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock60sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock60nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock60nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock60nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock60 { + #[inline(always)] + fn default() -> SwLock60 { + SwLock60(0) + } +} +#[doc = "Software lock register for page 61. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock61(pub u32); +impl SwLock61 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock61sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock61sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock61sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock61nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock61nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock61nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock61 { + #[inline(always)] + fn default() -> SwLock61 { + SwLock61(0) + } +} +#[doc = "Software lock register for page 62. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock62(pub u32); +impl SwLock62 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock62sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock62sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock62sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock62nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock62nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock62nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock62 { + #[inline(always)] + fn default() -> SwLock62 { + SwLock62(0) + } +} +#[doc = "Software lock register for page 63. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock63(pub u32); +impl SwLock63 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock63sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock63sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock63sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock63nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock63nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock63nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock63 { + #[inline(always)] + fn default() -> SwLock63 { + SwLock63(0) + } +} +#[doc = "Software lock register for page 7. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock7(pub u32); +impl SwLock7 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock7sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock7sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock7sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock7nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock7nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock7nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock7 { + #[inline(always)] + fn default() -> SwLock7 { + SwLock7(0) + } +} +#[doc = "Software lock register for page 8. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock8(pub u32); +impl SwLock8 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock8sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock8sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock8sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock8nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock8nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock8nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock8 { + #[inline(always)] + fn default() -> SwLock8 { + SwLock8(0) + } +} +#[doc = "Software lock register for page 9. Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SwLock9(pub u32); +impl SwLock9 { + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub const fn sec(&self) -> super::vals::SwLock9sec { + let val = (self.0 >> 0usize) & 0x03; + super::vals::SwLock9sec::from_bits(val as u8) + } + #[doc = "Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code."] + #[inline(always)] + pub fn set_sec(&mut self, val: super::vals::SwLock9sec) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub const fn nsec(&self) -> super::vals::SwLock9nsec { + let val = (self.0 >> 2usize) & 0x03; + super::vals::SwLock9nsec::from_bits(val as u8) + } + #[doc = "Non-secure lock status. Writes are OR'd with the current value."] + #[inline(always)] + pub fn set_nsec(&mut self, val: super::vals::SwLock9nsec) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } +} +impl Default for SwLock9 { + #[inline(always)] + fn default() -> SwLock9 { + SwLock9(0) + } +} +#[doc = "Controls for APB data read interface (USER interface)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Usr(pub u32); +impl Usr { + #[doc = "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."] + #[inline(always)] + pub const fn dctrl(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Power-down; 1 disables current reference. Must be 0 to read data from the OTP."] + #[inline(always)] + pub const fn pd(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Power-down; 1 disables current reference. Must be 0 to read data from the OTP."] + #[inline(always)] + pub fn set_pd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Usr { + #[inline(always)] + fn default() -> Usr { + Usr(0) + } +} diff --git a/src/rp2350/otp/vals.rs b/src/rp2350/otp/vals.rs new file mode 100644 index 00000000..315ba766 --- /dev/null +++ b/src/rp2350/otp/vals.rs @@ -0,0 +1,3960 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ArchselCore0 { + #[doc = "Switch core 0 to Arm (Cortex-M33)"] + ARM = 0, + #[doc = "Switch core 0 to RISC-V (Hazard3)"] + RISCV = 0x01, +} +impl ArchselCore0 { + #[inline(always)] + pub const fn from_bits(val: u8) -> ArchselCore0 { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ArchselCore0 { + #[inline(always)] + fn from(val: u8) -> ArchselCore0 { + ArchselCore0::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ArchselCore0) -> u8 { + ArchselCore0::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ArchselCore1 { + #[doc = "Switch core 1 to Arm (Cortex-M33)"] + ARM = 0, + #[doc = "Switch core 1 to RISC-V (Hazard3)"] + RISCV = 0x01, +} +impl ArchselCore1 { + #[inline(always)] + pub const fn from_bits(val: u8) -> ArchselCore1 { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ArchselCore1 { + #[inline(always)] + fn from(val: u8) -> ArchselCore1 { + ArchselCore1::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ArchselCore1) -> u8 { + ArchselCore1::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ArchselStatusCore0 { + #[doc = "Core 0 is currently Arm (Cortex-M33)"] + ARM = 0, + #[doc = "Core 0 is currently RISC-V (Hazard3)"] + RISCV = 0x01, +} +impl ArchselStatusCore0 { + #[inline(always)] + pub const fn from_bits(val: u8) -> ArchselStatusCore0 { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ArchselStatusCore0 { + #[inline(always)] + fn from(val: u8) -> ArchselStatusCore0 { + ArchselStatusCore0::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ArchselStatusCore0) -> u8 { + ArchselStatusCore0::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ArchselStatusCore1 { + #[doc = "Core 1 is currently Arm (Cortex-M33)"] + ARM = 0, + #[doc = "Core 1 is currently RISC-V (Hazard3)"] + RISCV = 0x01, +} +impl ArchselStatusCore1 { + #[inline(always)] + pub const fn from_bits(val: u8) -> ArchselStatusCore1 { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ArchselStatusCore1 { + #[inline(always)] + fn from(val: u8) -> ArchselStatusCore1 { + ArchselStatusCore1::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ArchselStatusCore1) -> u8 { + ArchselStatusCore1::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock0nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock0nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock0nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock0nsec { + #[inline(always)] + fn from(val: u8) -> SwLock0nsec { + SwLock0nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock0nsec) -> u8 { + SwLock0nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock0sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock0sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock0sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock0sec { + #[inline(always)] + fn from(val: u8) -> SwLock0sec { + SwLock0sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock0sec) -> u8 { + SwLock0sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock10nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock10nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock10nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock10nsec { + #[inline(always)] + fn from(val: u8) -> SwLock10nsec { + SwLock10nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock10nsec) -> u8 { + SwLock10nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock10sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock10sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock10sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock10sec { + #[inline(always)] + fn from(val: u8) -> SwLock10sec { + SwLock10sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock10sec) -> u8 { + SwLock10sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock11nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock11nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock11nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock11nsec { + #[inline(always)] + fn from(val: u8) -> SwLock11nsec { + SwLock11nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock11nsec) -> u8 { + SwLock11nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock11sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock11sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock11sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock11sec { + #[inline(always)] + fn from(val: u8) -> SwLock11sec { + SwLock11sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock11sec) -> u8 { + SwLock11sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock12nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock12nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock12nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock12nsec { + #[inline(always)] + fn from(val: u8) -> SwLock12nsec { + SwLock12nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock12nsec) -> u8 { + SwLock12nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock12sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock12sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock12sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock12sec { + #[inline(always)] + fn from(val: u8) -> SwLock12sec { + SwLock12sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock12sec) -> u8 { + SwLock12sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock13nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock13nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock13nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock13nsec { + #[inline(always)] + fn from(val: u8) -> SwLock13nsec { + SwLock13nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock13nsec) -> u8 { + SwLock13nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock13sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock13sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock13sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock13sec { + #[inline(always)] + fn from(val: u8) -> SwLock13sec { + SwLock13sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock13sec) -> u8 { + SwLock13sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock14nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock14nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock14nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock14nsec { + #[inline(always)] + fn from(val: u8) -> SwLock14nsec { + SwLock14nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock14nsec) -> u8 { + SwLock14nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock14sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock14sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock14sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock14sec { + #[inline(always)] + fn from(val: u8) -> SwLock14sec { + SwLock14sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock14sec) -> u8 { + SwLock14sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock15nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock15nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock15nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock15nsec { + #[inline(always)] + fn from(val: u8) -> SwLock15nsec { + SwLock15nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock15nsec) -> u8 { + SwLock15nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock15sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock15sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock15sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock15sec { + #[inline(always)] + fn from(val: u8) -> SwLock15sec { + SwLock15sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock15sec) -> u8 { + SwLock15sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock16nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock16nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock16nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock16nsec { + #[inline(always)] + fn from(val: u8) -> SwLock16nsec { + SwLock16nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock16nsec) -> u8 { + SwLock16nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock16sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock16sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock16sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock16sec { + #[inline(always)] + fn from(val: u8) -> SwLock16sec { + SwLock16sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock16sec) -> u8 { + SwLock16sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock17nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock17nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock17nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock17nsec { + #[inline(always)] + fn from(val: u8) -> SwLock17nsec { + SwLock17nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock17nsec) -> u8 { + SwLock17nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock17sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock17sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock17sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock17sec { + #[inline(always)] + fn from(val: u8) -> SwLock17sec { + SwLock17sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock17sec) -> u8 { + SwLock17sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock18nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock18nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock18nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock18nsec { + #[inline(always)] + fn from(val: u8) -> SwLock18nsec { + SwLock18nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock18nsec) -> u8 { + SwLock18nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock18sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock18sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock18sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock18sec { + #[inline(always)] + fn from(val: u8) -> SwLock18sec { + SwLock18sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock18sec) -> u8 { + SwLock18sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock19nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock19nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock19nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock19nsec { + #[inline(always)] + fn from(val: u8) -> SwLock19nsec { + SwLock19nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock19nsec) -> u8 { + SwLock19nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock19sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock19sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock19sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock19sec { + #[inline(always)] + fn from(val: u8) -> SwLock19sec { + SwLock19sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock19sec) -> u8 { + SwLock19sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock1nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock1nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock1nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock1nsec { + #[inline(always)] + fn from(val: u8) -> SwLock1nsec { + SwLock1nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock1nsec) -> u8 { + SwLock1nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock1sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock1sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock1sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock1sec { + #[inline(always)] + fn from(val: u8) -> SwLock1sec { + SwLock1sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock1sec) -> u8 { + SwLock1sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock20nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock20nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock20nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock20nsec { + #[inline(always)] + fn from(val: u8) -> SwLock20nsec { + SwLock20nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock20nsec) -> u8 { + SwLock20nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock20sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock20sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock20sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock20sec { + #[inline(always)] + fn from(val: u8) -> SwLock20sec { + SwLock20sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock20sec) -> u8 { + SwLock20sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock21nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock21nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock21nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock21nsec { + #[inline(always)] + fn from(val: u8) -> SwLock21nsec { + SwLock21nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock21nsec) -> u8 { + SwLock21nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock21sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock21sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock21sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock21sec { + #[inline(always)] + fn from(val: u8) -> SwLock21sec { + SwLock21sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock21sec) -> u8 { + SwLock21sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock22nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock22nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock22nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock22nsec { + #[inline(always)] + fn from(val: u8) -> SwLock22nsec { + SwLock22nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock22nsec) -> u8 { + SwLock22nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock22sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock22sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock22sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock22sec { + #[inline(always)] + fn from(val: u8) -> SwLock22sec { + SwLock22sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock22sec) -> u8 { + SwLock22sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock23nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock23nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock23nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock23nsec { + #[inline(always)] + fn from(val: u8) -> SwLock23nsec { + SwLock23nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock23nsec) -> u8 { + SwLock23nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock23sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock23sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock23sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock23sec { + #[inline(always)] + fn from(val: u8) -> SwLock23sec { + SwLock23sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock23sec) -> u8 { + SwLock23sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock24nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock24nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock24nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock24nsec { + #[inline(always)] + fn from(val: u8) -> SwLock24nsec { + SwLock24nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock24nsec) -> u8 { + SwLock24nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock24sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock24sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock24sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock24sec { + #[inline(always)] + fn from(val: u8) -> SwLock24sec { + SwLock24sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock24sec) -> u8 { + SwLock24sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock25nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock25nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock25nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock25nsec { + #[inline(always)] + fn from(val: u8) -> SwLock25nsec { + SwLock25nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock25nsec) -> u8 { + SwLock25nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock25sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock25sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock25sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock25sec { + #[inline(always)] + fn from(val: u8) -> SwLock25sec { + SwLock25sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock25sec) -> u8 { + SwLock25sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock26nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock26nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock26nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock26nsec { + #[inline(always)] + fn from(val: u8) -> SwLock26nsec { + SwLock26nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock26nsec) -> u8 { + SwLock26nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock26sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock26sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock26sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock26sec { + #[inline(always)] + fn from(val: u8) -> SwLock26sec { + SwLock26sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock26sec) -> u8 { + SwLock26sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock27nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock27nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock27nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock27nsec { + #[inline(always)] + fn from(val: u8) -> SwLock27nsec { + SwLock27nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock27nsec) -> u8 { + SwLock27nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock27sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock27sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock27sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock27sec { + #[inline(always)] + fn from(val: u8) -> SwLock27sec { + SwLock27sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock27sec) -> u8 { + SwLock27sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock28nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock28nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock28nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock28nsec { + #[inline(always)] + fn from(val: u8) -> SwLock28nsec { + SwLock28nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock28nsec) -> u8 { + SwLock28nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock28sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock28sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock28sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock28sec { + #[inline(always)] + fn from(val: u8) -> SwLock28sec { + SwLock28sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock28sec) -> u8 { + SwLock28sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock29nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock29nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock29nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock29nsec { + #[inline(always)] + fn from(val: u8) -> SwLock29nsec { + SwLock29nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock29nsec) -> u8 { + SwLock29nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock29sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock29sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock29sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock29sec { + #[inline(always)] + fn from(val: u8) -> SwLock29sec { + SwLock29sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock29sec) -> u8 { + SwLock29sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock2nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock2nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock2nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock2nsec { + #[inline(always)] + fn from(val: u8) -> SwLock2nsec { + SwLock2nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock2nsec) -> u8 { + SwLock2nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock2sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock2sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock2sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock2sec { + #[inline(always)] + fn from(val: u8) -> SwLock2sec { + SwLock2sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock2sec) -> u8 { + SwLock2sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock30nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock30nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock30nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock30nsec { + #[inline(always)] + fn from(val: u8) -> SwLock30nsec { + SwLock30nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock30nsec) -> u8 { + SwLock30nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock30sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock30sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock30sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock30sec { + #[inline(always)] + fn from(val: u8) -> SwLock30sec { + SwLock30sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock30sec) -> u8 { + SwLock30sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock31nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock31nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock31nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock31nsec { + #[inline(always)] + fn from(val: u8) -> SwLock31nsec { + SwLock31nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock31nsec) -> u8 { + SwLock31nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock31sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock31sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock31sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock31sec { + #[inline(always)] + fn from(val: u8) -> SwLock31sec { + SwLock31sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock31sec) -> u8 { + SwLock31sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock32nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock32nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock32nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock32nsec { + #[inline(always)] + fn from(val: u8) -> SwLock32nsec { + SwLock32nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock32nsec) -> u8 { + SwLock32nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock32sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock32sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock32sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock32sec { + #[inline(always)] + fn from(val: u8) -> SwLock32sec { + SwLock32sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock32sec) -> u8 { + SwLock32sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock33nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock33nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock33nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock33nsec { + #[inline(always)] + fn from(val: u8) -> SwLock33nsec { + SwLock33nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock33nsec) -> u8 { + SwLock33nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock33sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock33sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock33sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock33sec { + #[inline(always)] + fn from(val: u8) -> SwLock33sec { + SwLock33sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock33sec) -> u8 { + SwLock33sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock34nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock34nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock34nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock34nsec { + #[inline(always)] + fn from(val: u8) -> SwLock34nsec { + SwLock34nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock34nsec) -> u8 { + SwLock34nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock34sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock34sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock34sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock34sec { + #[inline(always)] + fn from(val: u8) -> SwLock34sec { + SwLock34sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock34sec) -> u8 { + SwLock34sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock35nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock35nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock35nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock35nsec { + #[inline(always)] + fn from(val: u8) -> SwLock35nsec { + SwLock35nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock35nsec) -> u8 { + SwLock35nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock35sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock35sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock35sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock35sec { + #[inline(always)] + fn from(val: u8) -> SwLock35sec { + SwLock35sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock35sec) -> u8 { + SwLock35sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock36nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock36nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock36nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock36nsec { + #[inline(always)] + fn from(val: u8) -> SwLock36nsec { + SwLock36nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock36nsec) -> u8 { + SwLock36nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock36sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock36sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock36sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock36sec { + #[inline(always)] + fn from(val: u8) -> SwLock36sec { + SwLock36sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock36sec) -> u8 { + SwLock36sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock37nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock37nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock37nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock37nsec { + #[inline(always)] + fn from(val: u8) -> SwLock37nsec { + SwLock37nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock37nsec) -> u8 { + SwLock37nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock37sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock37sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock37sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock37sec { + #[inline(always)] + fn from(val: u8) -> SwLock37sec { + SwLock37sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock37sec) -> u8 { + SwLock37sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock38nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock38nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock38nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock38nsec { + #[inline(always)] + fn from(val: u8) -> SwLock38nsec { + SwLock38nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock38nsec) -> u8 { + SwLock38nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock38sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock38sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock38sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock38sec { + #[inline(always)] + fn from(val: u8) -> SwLock38sec { + SwLock38sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock38sec) -> u8 { + SwLock38sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock39nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock39nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock39nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock39nsec { + #[inline(always)] + fn from(val: u8) -> SwLock39nsec { + SwLock39nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock39nsec) -> u8 { + SwLock39nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock39sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock39sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock39sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock39sec { + #[inline(always)] + fn from(val: u8) -> SwLock39sec { + SwLock39sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock39sec) -> u8 { + SwLock39sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock3nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock3nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock3nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock3nsec { + #[inline(always)] + fn from(val: u8) -> SwLock3nsec { + SwLock3nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock3nsec) -> u8 { + SwLock3nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock3sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock3sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock3sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock3sec { + #[inline(always)] + fn from(val: u8) -> SwLock3sec { + SwLock3sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock3sec) -> u8 { + SwLock3sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock40nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock40nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock40nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock40nsec { + #[inline(always)] + fn from(val: u8) -> SwLock40nsec { + SwLock40nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock40nsec) -> u8 { + SwLock40nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock40sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock40sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock40sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock40sec { + #[inline(always)] + fn from(val: u8) -> SwLock40sec { + SwLock40sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock40sec) -> u8 { + SwLock40sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock41nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock41nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock41nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock41nsec { + #[inline(always)] + fn from(val: u8) -> SwLock41nsec { + SwLock41nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock41nsec) -> u8 { + SwLock41nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock41sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock41sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock41sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock41sec { + #[inline(always)] + fn from(val: u8) -> SwLock41sec { + SwLock41sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock41sec) -> u8 { + SwLock41sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock42nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock42nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock42nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock42nsec { + #[inline(always)] + fn from(val: u8) -> SwLock42nsec { + SwLock42nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock42nsec) -> u8 { + SwLock42nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock42sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock42sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock42sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock42sec { + #[inline(always)] + fn from(val: u8) -> SwLock42sec { + SwLock42sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock42sec) -> u8 { + SwLock42sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock43nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock43nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock43nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock43nsec { + #[inline(always)] + fn from(val: u8) -> SwLock43nsec { + SwLock43nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock43nsec) -> u8 { + SwLock43nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock43sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock43sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock43sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock43sec { + #[inline(always)] + fn from(val: u8) -> SwLock43sec { + SwLock43sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock43sec) -> u8 { + SwLock43sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock44nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock44nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock44nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock44nsec { + #[inline(always)] + fn from(val: u8) -> SwLock44nsec { + SwLock44nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock44nsec) -> u8 { + SwLock44nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock44sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock44sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock44sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock44sec { + #[inline(always)] + fn from(val: u8) -> SwLock44sec { + SwLock44sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock44sec) -> u8 { + SwLock44sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock45nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock45nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock45nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock45nsec { + #[inline(always)] + fn from(val: u8) -> SwLock45nsec { + SwLock45nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock45nsec) -> u8 { + SwLock45nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock45sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock45sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock45sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock45sec { + #[inline(always)] + fn from(val: u8) -> SwLock45sec { + SwLock45sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock45sec) -> u8 { + SwLock45sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock46nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock46nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock46nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock46nsec { + #[inline(always)] + fn from(val: u8) -> SwLock46nsec { + SwLock46nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock46nsec) -> u8 { + SwLock46nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock46sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock46sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock46sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock46sec { + #[inline(always)] + fn from(val: u8) -> SwLock46sec { + SwLock46sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock46sec) -> u8 { + SwLock46sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock47nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock47nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock47nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock47nsec { + #[inline(always)] + fn from(val: u8) -> SwLock47nsec { + SwLock47nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock47nsec) -> u8 { + SwLock47nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock47sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock47sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock47sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock47sec { + #[inline(always)] + fn from(val: u8) -> SwLock47sec { + SwLock47sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock47sec) -> u8 { + SwLock47sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock48nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock48nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock48nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock48nsec { + #[inline(always)] + fn from(val: u8) -> SwLock48nsec { + SwLock48nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock48nsec) -> u8 { + SwLock48nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock48sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock48sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock48sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock48sec { + #[inline(always)] + fn from(val: u8) -> SwLock48sec { + SwLock48sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock48sec) -> u8 { + SwLock48sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock49nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock49nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock49nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock49nsec { + #[inline(always)] + fn from(val: u8) -> SwLock49nsec { + SwLock49nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock49nsec) -> u8 { + SwLock49nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock49sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock49sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock49sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock49sec { + #[inline(always)] + fn from(val: u8) -> SwLock49sec { + SwLock49sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock49sec) -> u8 { + SwLock49sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock4nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock4nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock4nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock4nsec { + #[inline(always)] + fn from(val: u8) -> SwLock4nsec { + SwLock4nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock4nsec) -> u8 { + SwLock4nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock4sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock4sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock4sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock4sec { + #[inline(always)] + fn from(val: u8) -> SwLock4sec { + SwLock4sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock4sec) -> u8 { + SwLock4sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock50nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock50nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock50nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock50nsec { + #[inline(always)] + fn from(val: u8) -> SwLock50nsec { + SwLock50nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock50nsec) -> u8 { + SwLock50nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock50sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock50sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock50sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock50sec { + #[inline(always)] + fn from(val: u8) -> SwLock50sec { + SwLock50sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock50sec) -> u8 { + SwLock50sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock51nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock51nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock51nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock51nsec { + #[inline(always)] + fn from(val: u8) -> SwLock51nsec { + SwLock51nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock51nsec) -> u8 { + SwLock51nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock51sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock51sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock51sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock51sec { + #[inline(always)] + fn from(val: u8) -> SwLock51sec { + SwLock51sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock51sec) -> u8 { + SwLock51sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock52nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock52nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock52nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock52nsec { + #[inline(always)] + fn from(val: u8) -> SwLock52nsec { + SwLock52nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock52nsec) -> u8 { + SwLock52nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock52sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock52sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock52sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock52sec { + #[inline(always)] + fn from(val: u8) -> SwLock52sec { + SwLock52sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock52sec) -> u8 { + SwLock52sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock53nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock53nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock53nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock53nsec { + #[inline(always)] + fn from(val: u8) -> SwLock53nsec { + SwLock53nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock53nsec) -> u8 { + SwLock53nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock53sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock53sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock53sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock53sec { + #[inline(always)] + fn from(val: u8) -> SwLock53sec { + SwLock53sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock53sec) -> u8 { + SwLock53sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock54nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock54nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock54nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock54nsec { + #[inline(always)] + fn from(val: u8) -> SwLock54nsec { + SwLock54nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock54nsec) -> u8 { + SwLock54nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock54sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock54sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock54sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock54sec { + #[inline(always)] + fn from(val: u8) -> SwLock54sec { + SwLock54sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock54sec) -> u8 { + SwLock54sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock55nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock55nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock55nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock55nsec { + #[inline(always)] + fn from(val: u8) -> SwLock55nsec { + SwLock55nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock55nsec) -> u8 { + SwLock55nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock55sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock55sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock55sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock55sec { + #[inline(always)] + fn from(val: u8) -> SwLock55sec { + SwLock55sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock55sec) -> u8 { + SwLock55sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock56nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock56nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock56nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock56nsec { + #[inline(always)] + fn from(val: u8) -> SwLock56nsec { + SwLock56nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock56nsec) -> u8 { + SwLock56nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock56sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock56sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock56sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock56sec { + #[inline(always)] + fn from(val: u8) -> SwLock56sec { + SwLock56sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock56sec) -> u8 { + SwLock56sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock57nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock57nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock57nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock57nsec { + #[inline(always)] + fn from(val: u8) -> SwLock57nsec { + SwLock57nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock57nsec) -> u8 { + SwLock57nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock57sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock57sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock57sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock57sec { + #[inline(always)] + fn from(val: u8) -> SwLock57sec { + SwLock57sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock57sec) -> u8 { + SwLock57sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock58nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock58nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock58nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock58nsec { + #[inline(always)] + fn from(val: u8) -> SwLock58nsec { + SwLock58nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock58nsec) -> u8 { + SwLock58nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock58sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock58sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock58sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock58sec { + #[inline(always)] + fn from(val: u8) -> SwLock58sec { + SwLock58sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock58sec) -> u8 { + SwLock58sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock59nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock59nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock59nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock59nsec { + #[inline(always)] + fn from(val: u8) -> SwLock59nsec { + SwLock59nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock59nsec) -> u8 { + SwLock59nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock59sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock59sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock59sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock59sec { + #[inline(always)] + fn from(val: u8) -> SwLock59sec { + SwLock59sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock59sec) -> u8 { + SwLock59sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock5nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock5nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock5nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock5nsec { + #[inline(always)] + fn from(val: u8) -> SwLock5nsec { + SwLock5nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock5nsec) -> u8 { + SwLock5nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock5sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock5sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock5sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock5sec { + #[inline(always)] + fn from(val: u8) -> SwLock5sec { + SwLock5sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock5sec) -> u8 { + SwLock5sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock60nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock60nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock60nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock60nsec { + #[inline(always)] + fn from(val: u8) -> SwLock60nsec { + SwLock60nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock60nsec) -> u8 { + SwLock60nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock60sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock60sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock60sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock60sec { + #[inline(always)] + fn from(val: u8) -> SwLock60sec { + SwLock60sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock60sec) -> u8 { + SwLock60sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock61nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock61nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock61nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock61nsec { + #[inline(always)] + fn from(val: u8) -> SwLock61nsec { + SwLock61nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock61nsec) -> u8 { + SwLock61nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock61sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock61sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock61sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock61sec { + #[inline(always)] + fn from(val: u8) -> SwLock61sec { + SwLock61sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock61sec) -> u8 { + SwLock61sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock62nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock62nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock62nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock62nsec { + #[inline(always)] + fn from(val: u8) -> SwLock62nsec { + SwLock62nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock62nsec) -> u8 { + SwLock62nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock62sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock62sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock62sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock62sec { + #[inline(always)] + fn from(val: u8) -> SwLock62sec { + SwLock62sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock62sec) -> u8 { + SwLock62sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock63nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock63nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock63nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock63nsec { + #[inline(always)] + fn from(val: u8) -> SwLock63nsec { + SwLock63nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock63nsec) -> u8 { + SwLock63nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock63sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock63sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock63sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock63sec { + #[inline(always)] + fn from(val: u8) -> SwLock63sec { + SwLock63sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock63sec) -> u8 { + SwLock63sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock6nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock6nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock6nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock6nsec { + #[inline(always)] + fn from(val: u8) -> SwLock6nsec { + SwLock6nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock6nsec) -> u8 { + SwLock6nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock6sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock6sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock6sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock6sec { + #[inline(always)] + fn from(val: u8) -> SwLock6sec { + SwLock6sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock6sec) -> u8 { + SwLock6sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock7nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock7nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock7nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock7nsec { + #[inline(always)] + fn from(val: u8) -> SwLock7nsec { + SwLock7nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock7nsec) -> u8 { + SwLock7nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock7sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock7sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock7sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock7sec { + #[inline(always)] + fn from(val: u8) -> SwLock7sec { + SwLock7sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock7sec) -> u8 { + SwLock7sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock8nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock8nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock8nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock8nsec { + #[inline(always)] + fn from(val: u8) -> SwLock8nsec { + SwLock8nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock8nsec) -> u8 { + SwLock8nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock8sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock8sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock8sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock8sec { + #[inline(always)] + fn from(val: u8) -> SwLock8sec { + SwLock8sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock8sec) -> u8 { + SwLock8sec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock9nsec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock9nsec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock9nsec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock9nsec { + #[inline(always)] + fn from(val: u8) -> SwLock9nsec { + SwLock9nsec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock9nsec) -> u8 { + SwLock9nsec::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum SwLock9sec { + READ_WRITE = 0, + READ_ONLY = 0x01, + _RESERVED_2 = 0x02, + INACCESSIBLE = 0x03, +} +impl SwLock9sec { + #[inline(always)] + pub const fn from_bits(val: u8) -> SwLock9sec { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for SwLock9sec { + #[inline(always)] + fn from(val: u8) -> SwLock9sec { + SwLock9sec::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: SwLock9sec) -> u8 { + SwLock9sec::to_bits(val) + } +} diff --git a/src/rp2350/otp_data.rs b/src/rp2350/otp_data.rs new file mode 100644 index 00000000..33d55839 --- /dev/null +++ b/src/rp2350/otp_data.rs @@ -0,0 +1,724 @@ +#[doc = "Predefined OTP data layout for RP2350"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpData { + ptr: *mut u8, +} +unsafe impl Send for OtpData {} +unsafe impl Sync for OtpData {} +impl OtpData { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn chipid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Bits 31:16 of public device ID (ECC)"] + #[inline(always)] + pub const fn chipid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(2usize) as _) } + } + #[doc = "Bits 47:32 of public device ID (ECC)"] + #[inline(always)] + pub const fn chipid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Bits 63:48 of public device ID (ECC)"] + #[inline(always)] + pub const fn chipid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(6usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn randid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Bits 31:16 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(10usize) as _) } + } + #[doc = "Bits 47:32 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Bits 63:48 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(14usize) as _) } + } + #[doc = "Bits 79:64 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Bits 95:80 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(18usize) as _) } + } + #[doc = "Bits 111:96 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Bits 127:112 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(22usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn rosc_calib(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn lposc_calib(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(34usize) as _) } + } + #[doc = "The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)"] + #[inline(always)] + pub const fn num_gpios(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "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)"] + #[inline(always)] + pub const fn info_crc0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[doc = "Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)"] + #[inline(always)] + pub const fn info_crc1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(110usize) as _) } + } + #[doc = "Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set."] + #[inline(always)] + pub const fn flash_devinfo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(168usize) as _) } + } + #[doc = "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)"] + #[inline(always)] + pub const fn flash_partition_slot_size( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(170usize) as _) } + } + #[doc = "Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set."] + #[inline(always)] + pub const fn bootsel_led_cfg( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(172usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn bootsel_pll_cfg( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(174usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn bootsel_xosc_cfg( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(176usize) as _) } + } + #[doc = "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):"] + #[inline(always)] + pub const fn usb_white_label_addr( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(184usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otpboot_src(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(188usize) as _) } + } + #[doc = "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)."] + #[inline(always)] + pub const fn otpboot_len(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(190usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otpboot_dst0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(192usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otpboot_dst1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(194usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(258usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(260usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(262usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(264usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(266usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(268usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(270usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(272usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(274usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(276usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(278usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(280usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(282usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(284usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(286usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(288usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(290usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(292usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(294usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(296usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(298usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(300usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(302usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(304usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(306usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(308usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(310usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(312usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(314usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(316usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(318usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(320usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(322usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(324usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(326usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(328usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(330usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(332usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(334usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(336usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(338usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(340usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(342usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(344usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(346usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(348usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(350usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(352usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(354usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(356usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(358usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(360usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(362usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(364usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(366usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(368usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(370usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(372usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(374usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(376usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(378usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(380usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(382usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7824usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7826usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7828usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7830usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7832usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7834usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7836usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7838usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7840usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7842usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7844usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7846usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7848usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7850usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7852usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7854usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7856usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7858usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7860usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7862usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7864usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7866usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7868usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7870usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7872usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7874usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7876usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7878usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7880usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7882usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7884usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7886usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7888usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7890usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7892usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7894usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7896usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7898usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7900usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7902usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7904usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7906usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7908usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7910usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7912usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7914usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7916usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(7918usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/otp_data/regs.rs b/src/rp2350/otp_data/regs.rs new file mode 100644 index 00000000..6eedcc0a --- /dev/null +++ b/src/rp2350/otp_data/regs.rs @@ -0,0 +1,3015 @@ +#[doc = "Bits 15:0 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey00(pub u32); +impl Bootkey00 { + #[inline(always)] + pub const fn bootkey0_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey00 { + #[inline(always)] + fn default() -> Bootkey00 { + Bootkey00(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey01(pub u32); +impl Bootkey01 { + #[inline(always)] + pub const fn bootkey0_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey01 { + #[inline(always)] + fn default() -> Bootkey01 { + Bootkey01(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey010(pub u32); +impl Bootkey010 { + #[inline(always)] + pub const fn bootkey0_10(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_10(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey010 { + #[inline(always)] + fn default() -> Bootkey010 { + Bootkey010(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey011(pub u32); +impl Bootkey011 { + #[inline(always)] + pub const fn bootkey0_11(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_11(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey011 { + #[inline(always)] + fn default() -> Bootkey011 { + Bootkey011(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey012(pub u32); +impl Bootkey012 { + #[inline(always)] + pub const fn bootkey0_12(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_12(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey012 { + #[inline(always)] + fn default() -> Bootkey012 { + Bootkey012(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey013(pub u32); +impl Bootkey013 { + #[inline(always)] + pub const fn bootkey0_13(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_13(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey013 { + #[inline(always)] + fn default() -> Bootkey013 { + Bootkey013(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey014(pub u32); +impl Bootkey014 { + #[inline(always)] + pub const fn bootkey0_14(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_14(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey014 { + #[inline(always)] + fn default() -> Bootkey014 { + Bootkey014(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey015(pub u32); +impl Bootkey015 { + #[inline(always)] + pub const fn bootkey0_15(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_15(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey015 { + #[inline(always)] + fn default() -> Bootkey015 { + Bootkey015(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey02(pub u32); +impl Bootkey02 { + #[inline(always)] + pub const fn bootkey0_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey02 { + #[inline(always)] + fn default() -> Bootkey02 { + Bootkey02(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey03(pub u32); +impl Bootkey03 { + #[inline(always)] + pub const fn bootkey0_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey03 { + #[inline(always)] + fn default() -> Bootkey03 { + Bootkey03(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey04(pub u32); +impl Bootkey04 { + #[inline(always)] + pub const fn bootkey0_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey04 { + #[inline(always)] + fn default() -> Bootkey04 { + Bootkey04(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey05(pub u32); +impl Bootkey05 { + #[inline(always)] + pub const fn bootkey0_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey05 { + #[inline(always)] + fn default() -> Bootkey05 { + Bootkey05(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey06(pub u32); +impl Bootkey06 { + #[inline(always)] + pub const fn bootkey0_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey06 { + #[inline(always)] + fn default() -> Bootkey06 { + Bootkey06(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey07(pub u32); +impl Bootkey07 { + #[inline(always)] + pub const fn bootkey0_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey07 { + #[inline(always)] + fn default() -> Bootkey07 { + Bootkey07(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey08(pub u32); +impl Bootkey08 { + #[inline(always)] + pub const fn bootkey0_8(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_8(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey08 { + #[inline(always)] + fn default() -> Bootkey08 { + Bootkey08(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey09(pub u32); +impl Bootkey09 { + #[inline(always)] + pub const fn bootkey0_9(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey0_9(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey09 { + #[inline(always)] + fn default() -> Bootkey09 { + Bootkey09(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey10(pub u32); +impl Bootkey10 { + #[inline(always)] + pub const fn bootkey1_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey10 { + #[inline(always)] + fn default() -> Bootkey10 { + Bootkey10(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey11(pub u32); +impl Bootkey11 { + #[inline(always)] + pub const fn bootkey1_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey11 { + #[inline(always)] + fn default() -> Bootkey11 { + Bootkey11(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey110(pub u32); +impl Bootkey110 { + #[inline(always)] + pub const fn bootkey1_10(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_10(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey110 { + #[inline(always)] + fn default() -> Bootkey110 { + Bootkey110(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey111(pub u32); +impl Bootkey111 { + #[inline(always)] + pub const fn bootkey1_11(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_11(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey111 { + #[inline(always)] + fn default() -> Bootkey111 { + Bootkey111(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey112(pub u32); +impl Bootkey112 { + #[inline(always)] + pub const fn bootkey1_12(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_12(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey112 { + #[inline(always)] + fn default() -> Bootkey112 { + Bootkey112(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey113(pub u32); +impl Bootkey113 { + #[inline(always)] + pub const fn bootkey1_13(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_13(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey113 { + #[inline(always)] + fn default() -> Bootkey113 { + Bootkey113(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey114(pub u32); +impl Bootkey114 { + #[inline(always)] + pub const fn bootkey1_14(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_14(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey114 { + #[inline(always)] + fn default() -> Bootkey114 { + Bootkey114(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey115(pub u32); +impl Bootkey115 { + #[inline(always)] + pub const fn bootkey1_15(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_15(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey115 { + #[inline(always)] + fn default() -> Bootkey115 { + Bootkey115(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey12(pub u32); +impl Bootkey12 { + #[inline(always)] + pub const fn bootkey1_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey12 { + #[inline(always)] + fn default() -> Bootkey12 { + Bootkey12(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey13(pub u32); +impl Bootkey13 { + #[inline(always)] + pub const fn bootkey1_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey13 { + #[inline(always)] + fn default() -> Bootkey13 { + Bootkey13(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey14(pub u32); +impl Bootkey14 { + #[inline(always)] + pub const fn bootkey1_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey14 { + #[inline(always)] + fn default() -> Bootkey14 { + Bootkey14(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey15(pub u32); +impl Bootkey15 { + #[inline(always)] + pub const fn bootkey1_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey15 { + #[inline(always)] + fn default() -> Bootkey15 { + Bootkey15(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey16(pub u32); +impl Bootkey16 { + #[inline(always)] + pub const fn bootkey1_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey16 { + #[inline(always)] + fn default() -> Bootkey16 { + Bootkey16(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey17(pub u32); +impl Bootkey17 { + #[inline(always)] + pub const fn bootkey1_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey17 { + #[inline(always)] + fn default() -> Bootkey17 { + Bootkey17(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey18(pub u32); +impl Bootkey18 { + #[inline(always)] + pub const fn bootkey1_8(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_8(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey18 { + #[inline(always)] + fn default() -> Bootkey18 { + Bootkey18(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey19(pub u32); +impl Bootkey19 { + #[inline(always)] + pub const fn bootkey1_9(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey1_9(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey19 { + #[inline(always)] + fn default() -> Bootkey19 { + Bootkey19(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey20(pub u32); +impl Bootkey20 { + #[inline(always)] + pub const fn bootkey2_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey20 { + #[inline(always)] + fn default() -> Bootkey20 { + Bootkey20(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey21(pub u32); +impl Bootkey21 { + #[inline(always)] + pub const fn bootkey2_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey21 { + #[inline(always)] + fn default() -> Bootkey21 { + Bootkey21(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey210(pub u32); +impl Bootkey210 { + #[inline(always)] + pub const fn bootkey2_10(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_10(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey210 { + #[inline(always)] + fn default() -> Bootkey210 { + Bootkey210(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey211(pub u32); +impl Bootkey211 { + #[inline(always)] + pub const fn bootkey2_11(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_11(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey211 { + #[inline(always)] + fn default() -> Bootkey211 { + Bootkey211(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey212(pub u32); +impl Bootkey212 { + #[inline(always)] + pub const fn bootkey2_12(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_12(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey212 { + #[inline(always)] + fn default() -> Bootkey212 { + Bootkey212(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey213(pub u32); +impl Bootkey213 { + #[inline(always)] + pub const fn bootkey2_13(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_13(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey213 { + #[inline(always)] + fn default() -> Bootkey213 { + Bootkey213(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey214(pub u32); +impl Bootkey214 { + #[inline(always)] + pub const fn bootkey2_14(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_14(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey214 { + #[inline(always)] + fn default() -> Bootkey214 { + Bootkey214(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey215(pub u32); +impl Bootkey215 { + #[inline(always)] + pub const fn bootkey2_15(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_15(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey215 { + #[inline(always)] + fn default() -> Bootkey215 { + Bootkey215(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey22(pub u32); +impl Bootkey22 { + #[inline(always)] + pub const fn bootkey2_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey22 { + #[inline(always)] + fn default() -> Bootkey22 { + Bootkey22(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey23(pub u32); +impl Bootkey23 { + #[inline(always)] + pub const fn bootkey2_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey23 { + #[inline(always)] + fn default() -> Bootkey23 { + Bootkey23(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey24(pub u32); +impl Bootkey24 { + #[inline(always)] + pub const fn bootkey2_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey24 { + #[inline(always)] + fn default() -> Bootkey24 { + Bootkey24(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey25(pub u32); +impl Bootkey25 { + #[inline(always)] + pub const fn bootkey2_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey25 { + #[inline(always)] + fn default() -> Bootkey25 { + Bootkey25(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey26(pub u32); +impl Bootkey26 { + #[inline(always)] + pub const fn bootkey2_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey26 { + #[inline(always)] + fn default() -> Bootkey26 { + Bootkey26(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey27(pub u32); +impl Bootkey27 { + #[inline(always)] + pub const fn bootkey2_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey27 { + #[inline(always)] + fn default() -> Bootkey27 { + Bootkey27(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey28(pub u32); +impl Bootkey28 { + #[inline(always)] + pub const fn bootkey2_8(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_8(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey28 { + #[inline(always)] + fn default() -> Bootkey28 { + Bootkey28(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey29(pub u32); +impl Bootkey29 { + #[inline(always)] + pub const fn bootkey2_9(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey2_9(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey29 { + #[inline(always)] + fn default() -> Bootkey29 { + Bootkey29(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey30(pub u32); +impl Bootkey30 { + #[inline(always)] + pub const fn bootkey3_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey30 { + #[inline(always)] + fn default() -> Bootkey30 { + Bootkey30(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey31(pub u32); +impl Bootkey31 { + #[inline(always)] + pub const fn bootkey3_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey31 { + #[inline(always)] + fn default() -> Bootkey31 { + Bootkey31(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey310(pub u32); +impl Bootkey310 { + #[inline(always)] + pub const fn bootkey3_10(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_10(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey310 { + #[inline(always)] + fn default() -> Bootkey310 { + Bootkey310(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey311(pub u32); +impl Bootkey311 { + #[inline(always)] + pub const fn bootkey3_11(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_11(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey311 { + #[inline(always)] + fn default() -> Bootkey311 { + Bootkey311(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey312(pub u32); +impl Bootkey312 { + #[inline(always)] + pub const fn bootkey3_12(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_12(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey312 { + #[inline(always)] + fn default() -> Bootkey312 { + Bootkey312(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey313(pub u32); +impl Bootkey313 { + #[inline(always)] + pub const fn bootkey3_13(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_13(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey313 { + #[inline(always)] + fn default() -> Bootkey313 { + Bootkey313(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey314(pub u32); +impl Bootkey314 { + #[inline(always)] + pub const fn bootkey3_14(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_14(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey314 { + #[inline(always)] + fn default() -> Bootkey314 { + Bootkey314(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey315(pub u32); +impl Bootkey315 { + #[inline(always)] + pub const fn bootkey3_15(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_15(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey315 { + #[inline(always)] + fn default() -> Bootkey315 { + Bootkey315(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey32(pub u32); +impl Bootkey32 { + #[inline(always)] + pub const fn bootkey3_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey32 { + #[inline(always)] + fn default() -> Bootkey32 { + Bootkey32(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey33(pub u32); +impl Bootkey33 { + #[inline(always)] + pub const fn bootkey3_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey33 { + #[inline(always)] + fn default() -> Bootkey33 { + Bootkey33(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey34(pub u32); +impl Bootkey34 { + #[inline(always)] + pub const fn bootkey3_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey34 { + #[inline(always)] + fn default() -> Bootkey34 { + Bootkey34(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey35(pub u32); +impl Bootkey35 { + #[inline(always)] + pub const fn bootkey3_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey35 { + #[inline(always)] + fn default() -> Bootkey35 { + Bootkey35(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey36(pub u32); +impl Bootkey36 { + #[inline(always)] + pub const fn bootkey3_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey36 { + #[inline(always)] + fn default() -> Bootkey36 { + Bootkey36(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey37(pub u32); +impl Bootkey37 { + #[inline(always)] + pub const fn bootkey3_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey37 { + #[inline(always)] + fn default() -> Bootkey37 { + Bootkey37(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey38(pub u32); +impl Bootkey38 { + #[inline(always)] + pub const fn bootkey3_8(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_8(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey38 { + #[inline(always)] + fn default() -> Bootkey38 { + Bootkey38(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey39(pub u32); +impl Bootkey39 { + #[inline(always)] + pub const fn bootkey3_9(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_bootkey3_9(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Bootkey39 { + #[inline(always)] + fn default() -> Bootkey39 { + Bootkey39(0) + } +} +#[doc = "Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootselLedCfg(pub u32); +impl BootselLedCfg { + #[doc = "GPIO index to use for bootloader activity LED."] + #[inline(always)] + pub const fn pin(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "GPIO index to use for bootloader activity LED."] + #[inline(always)] + pub fn set_pin(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "LED is active-low. (Default: active-high.)"] + #[inline(always)] + pub const fn activelow(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "LED is active-low. (Default: active-high.)"] + #[inline(always)] + pub fn set_activelow(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } +} +impl Default for BootselLedCfg { + #[inline(always)] + fn default() -> BootselLedCfg { + BootselLedCfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootselPllCfg(pub u32); +impl BootselPllCfg { + #[doc = "PLL feedback divisor, in the range 16..320 inclusive."] + #[inline(always)] + pub const fn fbdiv(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "PLL feedback divisor, in the range 16..320 inclusive."] + #[inline(always)] + pub fn set_fbdiv(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } + #[doc = "PLL post-divide 1 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub const fn postdiv1(&self) -> u8 { + let val = (self.0 >> 9usize) & 0x07; + val as u8 + } + #[doc = "PLL post-divide 1 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub fn set_postdiv1(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 9usize)) | (((val as u32) & 0x07) << 9usize); + } + #[doc = "PLL post-divide 2 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub const fn postdiv2(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "PLL post-divide 2 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub fn set_postdiv2(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn refdiv(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_refdiv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for BootselPllCfg { + #[inline(always)] + fn default() -> BootselPllCfg { + BootselPllCfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootselXoscCfg(pub u32); +impl BootselXoscCfg { + #[doc = "Value of the XOSC_STARTUP register"] + #[inline(always)] + pub const fn startup(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x3fff; + val as u16 + } + #[doc = "Value of the XOSC_STARTUP register"] + #[inline(always)] + pub fn set_startup(&mut self, val: u16) { + self.0 = (self.0 & !(0x3fff << 0usize)) | (((val as u32) & 0x3fff) << 0usize); + } + #[doc = "Value of the XOSC_CTRL_FREQ_RANGE register."] + #[inline(always)] + pub const fn range(&self) -> super::vals::Range { + let val = (self.0 >> 14usize) & 0x03; + super::vals::Range::from_bits(val as u8) + } + #[doc = "Value of the XOSC_CTRL_FREQ_RANGE register."] + #[inline(always)] + pub fn set_range(&mut self, val: super::vals::Range) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val.to_bits() as u32) & 0x03) << 14usize); + } +} +impl Default for BootselXoscCfg { + #[inline(always)] + fn default() -> BootselXoscCfg { + BootselXoscCfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid0(pub u32); +impl Chipid0 { + #[inline(always)] + pub const fn chipid0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_chipid0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Chipid0 { + #[inline(always)] + fn default() -> Chipid0 { + Chipid0(0) + } +} +#[doc = "Bits 31:16 of public device ID (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid1(pub u32); +impl Chipid1 { + #[inline(always)] + pub const fn chipid1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_chipid1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Chipid1 { + #[inline(always)] + fn default() -> Chipid1 { + Chipid1(0) + } +} +#[doc = "Bits 47:32 of public device ID (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid2(pub u32); +impl Chipid2 { + #[inline(always)] + pub const fn chipid2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_chipid2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Chipid2 { + #[inline(always)] + fn default() -> Chipid2 { + Chipid2(0) + } +} +#[doc = "Bits 63:48 of public device ID (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid3(pub u32); +impl Chipid3 { + #[inline(always)] + pub const fn chipid3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_chipid3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Chipid3 { + #[inline(always)] + fn default() -> Chipid3 { + Chipid3(0) + } +} +#[doc = "Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FlashDevinfo(pub u32); +impl FlashDevinfo { + #[doc = "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)."] + #[inline(always)] + pub const fn cs1_gpio(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_cs1_gpio(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn d8h_erase_supported(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_d8h_erase_supported(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn cs0_size(&self) -> super::vals::Cs0size { + let val = (self.0 >> 8usize) & 0x0f; + super::vals::Cs0size::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_cs0_size(&mut self, val: super::vals::Cs0size) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val.to_bits() as u32) & 0x0f) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn cs1_size(&self) -> super::vals::Cs1size { + let val = (self.0 >> 12usize) & 0x0f; + super::vals::Cs1size::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_cs1_size(&mut self, val: super::vals::Cs1size) { + self.0 = (self.0 & !(0x0f << 12usize)) | (((val.to_bits() as u32) & 0x0f) << 12usize); + } +} +impl Default for FlashDevinfo { + #[inline(always)] + fn default() -> FlashDevinfo { + FlashDevinfo(0) + } +} +#[doc = "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)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FlashPartitionSlotSize(pub u32); +impl FlashPartitionSlotSize { + #[inline(always)] + pub const fn flash_partition_slot_size(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_flash_partition_slot_size(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for FlashPartitionSlotSize { + #[inline(always)] + fn default() -> FlashPartitionSlotSize { + FlashPartitionSlotSize(0) + } +} +#[doc = "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)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct InfoCrc0(pub u32); +impl InfoCrc0 { + #[inline(always)] + pub const fn info_crc0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_info_crc0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for InfoCrc0 { + #[inline(always)] + fn default() -> InfoCrc0 { + InfoCrc0(0) + } +} +#[doc = "Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct InfoCrc1(pub u32); +impl InfoCrc1 { + #[inline(always)] + pub const fn info_crc1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_info_crc1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for InfoCrc1 { + #[inline(always)] + fn default() -> InfoCrc1 { + InfoCrc1(0) + } +} +#[doc = "Bits 15:0 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key10(pub u32); +impl Key10 { + #[inline(always)] + pub const fn key1_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key10 { + #[inline(always)] + fn default() -> Key10 { + Key10(0) + } +} +#[doc = "Bits 31:16 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key11(pub u32); +impl Key11 { + #[inline(always)] + pub const fn key1_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key11 { + #[inline(always)] + fn default() -> Key11 { + Key11(0) + } +} +#[doc = "Bits 47:32 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key12(pub u32); +impl Key12 { + #[inline(always)] + pub const fn key1_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key12 { + #[inline(always)] + fn default() -> Key12 { + Key12(0) + } +} +#[doc = "Bits 63:48 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key13(pub u32); +impl Key13 { + #[inline(always)] + pub const fn key1_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key13 { + #[inline(always)] + fn default() -> Key13 { + Key13(0) + } +} +#[doc = "Bits 79:64 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key14(pub u32); +impl Key14 { + #[inline(always)] + pub const fn key1_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key14 { + #[inline(always)] + fn default() -> Key14 { + Key14(0) + } +} +#[doc = "Bits 95:80 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key15(pub u32); +impl Key15 { + #[inline(always)] + pub const fn key1_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key15 { + #[inline(always)] + fn default() -> Key15 { + Key15(0) + } +} +#[doc = "Bits 111:96 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key16(pub u32); +impl Key16 { + #[inline(always)] + pub const fn key1_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key16 { + #[inline(always)] + fn default() -> Key16 { + Key16(0) + } +} +#[doc = "Bits 127:112 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key17(pub u32); +impl Key17 { + #[inline(always)] + pub const fn key1_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key1_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key17 { + #[inline(always)] + fn default() -> Key17 { + Key17(0) + } +} +#[doc = "Bits 15:0 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key20(pub u32); +impl Key20 { + #[inline(always)] + pub const fn key2_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key20 { + #[inline(always)] + fn default() -> Key20 { + Key20(0) + } +} +#[doc = "Bits 31:16 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key21(pub u32); +impl Key21 { + #[inline(always)] + pub const fn key2_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key21 { + #[inline(always)] + fn default() -> Key21 { + Key21(0) + } +} +#[doc = "Bits 47:32 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key22(pub u32); +impl Key22 { + #[inline(always)] + pub const fn key2_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key22 { + #[inline(always)] + fn default() -> Key22 { + Key22(0) + } +} +#[doc = "Bits 63:48 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key23(pub u32); +impl Key23 { + #[inline(always)] + pub const fn key2_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key23 { + #[inline(always)] + fn default() -> Key23 { + Key23(0) + } +} +#[doc = "Bits 79:64 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key24(pub u32); +impl Key24 { + #[inline(always)] + pub const fn key2_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key24 { + #[inline(always)] + fn default() -> Key24 { + Key24(0) + } +} +#[doc = "Bits 95:80 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key25(pub u32); +impl Key25 { + #[inline(always)] + pub const fn key2_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key25 { + #[inline(always)] + fn default() -> Key25 { + Key25(0) + } +} +#[doc = "Bits 111:96 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key26(pub u32); +impl Key26 { + #[inline(always)] + pub const fn key2_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key26 { + #[inline(always)] + fn default() -> Key26 { + Key26(0) + } +} +#[doc = "Bits 127:112 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key27(pub u32); +impl Key27 { + #[inline(always)] + pub const fn key2_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key2_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key27 { + #[inline(always)] + fn default() -> Key27 { + Key27(0) + } +} +#[doc = "Bits 15:0 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key30(pub u32); +impl Key30 { + #[inline(always)] + pub const fn key3_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key30 { + #[inline(always)] + fn default() -> Key30 { + Key30(0) + } +} +#[doc = "Bits 31:16 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key31(pub u32); +impl Key31 { + #[inline(always)] + pub const fn key3_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key31 { + #[inline(always)] + fn default() -> Key31 { + Key31(0) + } +} +#[doc = "Bits 47:32 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key32(pub u32); +impl Key32 { + #[inline(always)] + pub const fn key3_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key32 { + #[inline(always)] + fn default() -> Key32 { + Key32(0) + } +} +#[doc = "Bits 63:48 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key33(pub u32); +impl Key33 { + #[inline(always)] + pub const fn key3_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key33 { + #[inline(always)] + fn default() -> Key33 { + Key33(0) + } +} +#[doc = "Bits 79:64 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key34(pub u32); +impl Key34 { + #[inline(always)] + pub const fn key3_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key34 { + #[inline(always)] + fn default() -> Key34 { + Key34(0) + } +} +#[doc = "Bits 95:80 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key35(pub u32); +impl Key35 { + #[inline(always)] + pub const fn key3_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key35 { + #[inline(always)] + fn default() -> Key35 { + Key35(0) + } +} +#[doc = "Bits 111:96 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key36(pub u32); +impl Key36 { + #[inline(always)] + pub const fn key3_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key36 { + #[inline(always)] + fn default() -> Key36 { + Key36(0) + } +} +#[doc = "Bits 127:112 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key37(pub u32); +impl Key37 { + #[inline(always)] + pub const fn key3_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key3_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key37 { + #[inline(always)] + fn default() -> Key37 { + Key37(0) + } +} +#[doc = "Bits 15:0 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key40(pub u32); +impl Key40 { + #[inline(always)] + pub const fn key4_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key40 { + #[inline(always)] + fn default() -> Key40 { + Key40(0) + } +} +#[doc = "Bits 31:16 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key41(pub u32); +impl Key41 { + #[inline(always)] + pub const fn key4_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key41 { + #[inline(always)] + fn default() -> Key41 { + Key41(0) + } +} +#[doc = "Bits 47:32 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key42(pub u32); +impl Key42 { + #[inline(always)] + pub const fn key4_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key42 { + #[inline(always)] + fn default() -> Key42 { + Key42(0) + } +} +#[doc = "Bits 63:48 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key43(pub u32); +impl Key43 { + #[inline(always)] + pub const fn key4_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key43 { + #[inline(always)] + fn default() -> Key43 { + Key43(0) + } +} +#[doc = "Bits 79:64 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key44(pub u32); +impl Key44 { + #[inline(always)] + pub const fn key4_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key44 { + #[inline(always)] + fn default() -> Key44 { + Key44(0) + } +} +#[doc = "Bits 95:80 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key45(pub u32); +impl Key45 { + #[inline(always)] + pub const fn key4_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key45 { + #[inline(always)] + fn default() -> Key45 { + Key45(0) + } +} +#[doc = "Bits 111:96 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key46(pub u32); +impl Key46 { + #[inline(always)] + pub const fn key4_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key46 { + #[inline(always)] + fn default() -> Key46 { + Key46(0) + } +} +#[doc = "Bits 127:112 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key47(pub u32); +impl Key47 { + #[inline(always)] + pub const fn key4_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key4_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key47 { + #[inline(always)] + fn default() -> Key47 { + Key47(0) + } +} +#[doc = "Bits 15:0 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key50(pub u32); +impl Key50 { + #[inline(always)] + pub const fn key5_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key50 { + #[inline(always)] + fn default() -> Key50 { + Key50(0) + } +} +#[doc = "Bits 31:16 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key51(pub u32); +impl Key51 { + #[inline(always)] + pub const fn key5_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key51 { + #[inline(always)] + fn default() -> Key51 { + Key51(0) + } +} +#[doc = "Bits 47:32 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key52(pub u32); +impl Key52 { + #[inline(always)] + pub const fn key5_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key52 { + #[inline(always)] + fn default() -> Key52 { + Key52(0) + } +} +#[doc = "Bits 63:48 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key53(pub u32); +impl Key53 { + #[inline(always)] + pub const fn key5_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key53 { + #[inline(always)] + fn default() -> Key53 { + Key53(0) + } +} +#[doc = "Bits 79:64 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key54(pub u32); +impl Key54 { + #[inline(always)] + pub const fn key5_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key54 { + #[inline(always)] + fn default() -> Key54 { + Key54(0) + } +} +#[doc = "Bits 95:80 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key55(pub u32); +impl Key55 { + #[inline(always)] + pub const fn key5_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key55 { + #[inline(always)] + fn default() -> Key55 { + Key55(0) + } +} +#[doc = "Bits 111:96 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key56(pub u32); +impl Key56 { + #[inline(always)] + pub const fn key5_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key56 { + #[inline(always)] + fn default() -> Key56 { + Key56(0) + } +} +#[doc = "Bits 127:112 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key57(pub u32); +impl Key57 { + #[inline(always)] + pub const fn key5_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key5_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key57 { + #[inline(always)] + fn default() -> Key57 { + Key57(0) + } +} +#[doc = "Bits 15:0 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key60(pub u32); +impl Key60 { + #[inline(always)] + pub const fn key6_0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key60 { + #[inline(always)] + fn default() -> Key60 { + Key60(0) + } +} +#[doc = "Bits 31:16 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key61(pub u32); +impl Key61 { + #[inline(always)] + pub const fn key6_1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key61 { + #[inline(always)] + fn default() -> Key61 { + Key61(0) + } +} +#[doc = "Bits 47:32 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key62(pub u32); +impl Key62 { + #[inline(always)] + pub const fn key6_2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key62 { + #[inline(always)] + fn default() -> Key62 { + Key62(0) + } +} +#[doc = "Bits 63:48 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key63(pub u32); +impl Key63 { + #[inline(always)] + pub const fn key6_3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key63 { + #[inline(always)] + fn default() -> Key63 { + Key63(0) + } +} +#[doc = "Bits 79:64 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key64(pub u32); +impl Key64 { + #[inline(always)] + pub const fn key6_4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key64 { + #[inline(always)] + fn default() -> Key64 { + Key64(0) + } +} +#[doc = "Bits 95:80 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key65(pub u32); +impl Key65 { + #[inline(always)] + pub const fn key6_5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key65 { + #[inline(always)] + fn default() -> Key65 { + Key65(0) + } +} +#[doc = "Bits 111:96 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key66(pub u32); +impl Key66 { + #[inline(always)] + pub const fn key6_6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key66 { + #[inline(always)] + fn default() -> Key66 { + Key66(0) + } +} +#[doc = "Bits 127:112 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key67(pub u32); +impl Key67 { + #[inline(always)] + pub const fn key6_7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_key6_7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Key67 { + #[inline(always)] + fn default() -> Key67 { + Key67(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct LposcCalib(pub u32); +impl LposcCalib { + #[inline(always)] + pub const fn lposc_calib(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_lposc_calib(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for LposcCalib { + #[inline(always)] + fn default() -> LposcCalib { + LposcCalib(0) + } +} +#[doc = "The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct NumGpios(pub u32); +impl NumGpios { + #[inline(always)] + pub const fn num_gpios(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_num_gpios(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for NumGpios { + #[inline(always)] + fn default() -> NumGpios { + NumGpios(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootDst0(pub u32); +impl OtpbootDst0 { + #[inline(always)] + pub const fn otpboot_dst0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_otpboot_dst0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for OtpbootDst0 { + #[inline(always)] + fn default() -> OtpbootDst0 { + OtpbootDst0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootDst1(pub u32); +impl OtpbootDst1 { + #[inline(always)] + pub const fn otpboot_dst1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_otpboot_dst1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for OtpbootDst1 { + #[inline(always)] + fn default() -> OtpbootDst1 { + OtpbootDst1(0) + } +} +#[doc = "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)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootLen(pub u32); +impl OtpbootLen { + #[inline(always)] + pub const fn otpboot_len(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_otpboot_len(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for OtpbootLen { + #[inline(always)] + fn default() -> OtpbootLen { + OtpbootLen(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootSrc(pub u32); +impl OtpbootSrc { + #[inline(always)] + pub const fn otpboot_src(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_otpboot_src(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for OtpbootSrc { + #[inline(always)] + fn default() -> OtpbootSrc { + OtpbootSrc(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid0(pub u32); +impl Randid0 { + #[inline(always)] + pub const fn randid0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid0 { + #[inline(always)] + fn default() -> Randid0 { + Randid0(0) + } +} +#[doc = "Bits 31:16 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid1(pub u32); +impl Randid1 { + #[inline(always)] + pub const fn randid1(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid1(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid1 { + #[inline(always)] + fn default() -> Randid1 { + Randid1(0) + } +} +#[doc = "Bits 47:32 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid2(pub u32); +impl Randid2 { + #[inline(always)] + pub const fn randid2(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid2(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid2 { + #[inline(always)] + fn default() -> Randid2 { + Randid2(0) + } +} +#[doc = "Bits 63:48 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid3(pub u32); +impl Randid3 { + #[inline(always)] + pub const fn randid3(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid3(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid3 { + #[inline(always)] + fn default() -> Randid3 { + Randid3(0) + } +} +#[doc = "Bits 79:64 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid4(pub u32); +impl Randid4 { + #[inline(always)] + pub const fn randid4(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid4(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid4 { + #[inline(always)] + fn default() -> Randid4 { + Randid4(0) + } +} +#[doc = "Bits 95:80 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid5(pub u32); +impl Randid5 { + #[inline(always)] + pub const fn randid5(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid5(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid5 { + #[inline(always)] + fn default() -> Randid5 { + Randid5(0) + } +} +#[doc = "Bits 111:96 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid6(pub u32); +impl Randid6 { + #[inline(always)] + pub const fn randid6(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid6(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid6 { + #[inline(always)] + fn default() -> Randid6 { + Randid6(0) + } +} +#[doc = "Bits 127:112 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid7(pub u32); +impl Randid7 { + #[inline(always)] + pub const fn randid7(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_randid7(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Randid7 { + #[inline(always)] + fn default() -> Randid7 { + Randid7(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RoscCalib(pub u32); +impl RoscCalib { + #[inline(always)] + pub const fn rosc_calib(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_rosc_calib(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for RoscCalib { + #[inline(always)] + fn default() -> RoscCalib { + RoscCalib(0) + } +} +#[doc = "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):"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbWhiteLabelAddr(pub u32); +impl UsbWhiteLabelAddr { + #[inline(always)] + pub const fn usb_white_label_addr(&self) -> super::vals::UsbWhiteLabelAddr { + let val = (self.0 >> 0usize) & 0xffff; + super::vals::UsbWhiteLabelAddr::from_bits(val as u16) + } + #[inline(always)] + pub fn set_usb_white_label_addr(&mut self, val: super::vals::UsbWhiteLabelAddr) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val.to_bits() as u32) & 0xffff) << 0usize); + } +} +impl Default for UsbWhiteLabelAddr { + #[inline(always)] + fn default() -> UsbWhiteLabelAddr { + UsbWhiteLabelAddr(0) + } +} diff --git a/src/rp2350/otp_data/vals.rs b/src/rp2350/otp_data/vals.rs new file mode 100644 index 00000000..68e29e02 --- /dev/null +++ b/src/rp2350/otp_data/vals.rs @@ -0,0 +1,155 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Cs0size { + NONE = 0, + _8K = 0x01, + _16K = 0x02, + _32K = 0x03, + _64K = 0x04, + _128K = 0x05, + _256K = 0x06, + _512K = 0x07, + _1M = 0x08, + _2M = 0x09, + _4M = 0x0a, + _8M = 0x0b, + _16M = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, +} +impl Cs0size { + #[inline(always)] + pub const fn from_bits(val: u8) -> Cs0size { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Cs0size { + #[inline(always)] + fn from(val: u8) -> Cs0size { + Cs0size::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Cs0size) -> u8 { + Cs0size::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Cs1size { + NONE = 0, + _8K = 0x01, + _16K = 0x02, + _32K = 0x03, + _64K = 0x04, + _128K = 0x05, + _256K = 0x06, + _512K = 0x07, + _1M = 0x08, + _2M = 0x09, + _4M = 0x0a, + _8M = 0x0b, + _16M = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, +} +impl Cs1size { + #[inline(always)] + pub const fn from_bits(val: u8) -> Cs1size { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Cs1size { + #[inline(always)] + fn from(val: u8) -> Cs1size { + Cs1size::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Cs1size) -> u8 { + Cs1size::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Range { + _1_15MHZ = 0, + _10_30MHZ = 0x01, + _25_60MHZ = 0x02, + _40_100MHZ = 0x03, +} +impl Range { + #[inline(always)] + pub const fn from_bits(val: u8) -> Range { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Range { + #[inline(always)] + fn from(val: u8) -> Range { + Range::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Range) -> u8 { + Range::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct UsbWhiteLabelAddr(pub u16); +impl UsbWhiteLabelAddr { + pub const INDEX_USB_DEVICE_VID_VALUE: Self = Self(0); + pub const INDEX_USB_DEVICE_PID_VALUE: Self = Self(0x01); + pub const INDEX_USB_DEVICE_BCD_DEVICE_VALUE: Self = Self(0x02); + pub const INDEX_USB_DEVICE_LANG_ID_VALUE: Self = Self(0x03); + pub const INDEX_USB_DEVICE_MANUFACTURER_STRDEF: Self = Self(0x04); + pub const INDEX_USB_DEVICE_PRODUCT_STRDEF: Self = Self(0x05); + pub const INDEX_USB_DEVICE_SERIAL_NUMBER_STRDEF: Self = Self(0x06); + pub const INDEX_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES: Self = Self(0x07); + pub const INDEX_VOLUME_LABEL_STRDEF: Self = Self(0x08); + pub const INDEX_SCSI_INQUIRY_VENDOR_STRDEF: Self = Self(0x09); + pub const INDEX_SCSI_INQUIRY_PRODUCT_STRDEF: Self = Self(0x0a); + pub const INDEX_SCSI_INQUIRY_VERSION_STRDEF: Self = Self(0x0b); + pub const INDEX_INDEX_HTM_REDIRECT_URL_STRDEF: Self = Self(0x0c); + pub const INDEX_INDEX_HTM_REDIRECT_NAME_STRDEF: Self = Self(0x0d); + pub const INDEX_INFO_UF2_TXT_MODEL_STRDEF: Self = Self(0x0e); + pub const INDEX_INFO_UF2_TXT_BOARD_ID_STRDEF: Self = Self(0x0f); +} +impl UsbWhiteLabelAddr { + pub const fn from_bits(val: u16) -> UsbWhiteLabelAddr { + Self(val & 0xffff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for UsbWhiteLabelAddr { + #[inline(always)] + fn from(val: u16) -> UsbWhiteLabelAddr { + UsbWhiteLabelAddr::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: UsbWhiteLabelAddr) -> u16 { + UsbWhiteLabelAddr::to_bits(val) + } +} diff --git a/src/rp2350/otp_data_raw.rs b/src/rp2350/otp_data_raw.rs new file mode 100644 index 00000000..6173c50a --- /dev/null +++ b/src/rp2350/otp_data_raw.rs @@ -0,0 +1,1565 @@ +#[doc = "Predefined OTP data layout for RP2350"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpDataRaw { + ptr: *mut u8, +} +unsafe impl Send for OtpDataRaw {} +unsafe impl Sync for OtpDataRaw {} +impl OtpDataRaw { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn chipid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Bits 31:16 of public device ID (ECC)"] + #[inline(always)] + pub const fn chipid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Bits 47:32 of public device ID (ECC)"] + #[inline(always)] + pub const fn chipid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Bits 63:48 of public device ID (ECC)"] + #[inline(always)] + pub const fn chipid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn randid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Bits 31:16 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Bits 47:32 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Bits 63:48 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Bits 79:64 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Bits 95:80 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Bits 111:96 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Bits 127:112 of private per-device random number (ECC)"] + #[inline(always)] + pub const fn randid7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn rosc_calib(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn lposc_calib(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)"] + #[inline(always)] + pub const fn num_gpios(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[doc = "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)"] + #[inline(always)] + pub const fn info_crc0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(216usize) as _) } + } + #[doc = "Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)"] + #[inline(always)] + pub const fn info_crc1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(220usize) as _) } + } + #[doc = "Page 0 critical boot flags (RBIT-8)"] + #[inline(always)] + pub const fn crit0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(224usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(228usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(232usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(236usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(240usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(244usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(248usize) as _) } + } + #[doc = "Redundant copy of CRIT0"] + #[inline(always)] + pub const fn crit0_r7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(252usize) as _) } + } + #[doc = "Page 1 critical boot flags (RBIT-8)"] + #[inline(always)] + pub const fn crit1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(260usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(264usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(268usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(272usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(276usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(280usize) as _) } + } + #[doc = "Redundant copy of CRIT1"] + #[inline(always)] + pub const fn crit1_r7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(284usize) as _) } + } + #[doc = "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)"] + #[inline(always)] + pub const fn boot_flags0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(288usize) as _) } + } + #[doc = "Redundant copy of BOOT_FLAGS0"] + #[inline(always)] + pub const fn boot_flags0_r1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(292usize) as _) } + } + #[doc = "Redundant copy of BOOT_FLAGS0"] + #[inline(always)] + pub const fn boot_flags0_r2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(296usize) as _) } + } + #[doc = "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)"] + #[inline(always)] + pub const fn boot_flags1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(300usize) as _) } + } + #[doc = "Redundant copy of BOOT_FLAGS1"] + #[inline(always)] + pub const fn boot_flags1_r1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(304usize) as _) } + } + #[doc = "Redundant copy of BOOT_FLAGS1"] + #[inline(always)] + pub const fn boot_flags1_r2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(308usize) as _) } + } + #[doc = "Default boot version thermometer counter, bits 23:0 (RBIT-3)"] + #[inline(always)] + pub const fn default_boot_version0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(312usize) as _) } + } + #[doc = "Redundant copy of DEFAULT_BOOT_VERSION0"] + #[inline(always)] + pub const fn default_boot_version0_r1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(316usize) as _) } + } + #[doc = "Redundant copy of DEFAULT_BOOT_VERSION0"] + #[inline(always)] + pub const fn default_boot_version0_r2( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(320usize) as _) } + } + #[doc = "Default boot version thermometer counter, bits 47:24 (RBIT-3)"] + #[inline(always)] + pub const fn default_boot_version1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(324usize) as _) } + } + #[doc = "Redundant copy of DEFAULT_BOOT_VERSION1"] + #[inline(always)] + pub const fn default_boot_version1_r1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(328usize) as _) } + } + #[doc = "Redundant copy of DEFAULT_BOOT_VERSION1"] + #[inline(always)] + pub const fn default_boot_version1_r2( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(332usize) as _) } + } + #[doc = "Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set."] + #[inline(always)] + pub const fn flash_devinfo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(336usize) as _) } + } + #[doc = "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)"] + #[inline(always)] + pub const fn flash_partition_slot_size( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(340usize) as _) } + } + #[doc = "Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set."] + #[inline(always)] + pub const fn bootsel_led_cfg( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(344usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn bootsel_pll_cfg( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(348usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn bootsel_xosc_cfg( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(352usize) as _) } + } + #[doc = "USB boot specific feature flags (RBIT-3)"] + #[inline(always)] + pub const fn usb_boot_flags(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(356usize) as _) } + } + #[doc = "Redundant copy of USB_BOOT_FLAGS"] + #[inline(always)] + pub const fn usb_boot_flags_r1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(360usize) as _) } + } + #[doc = "Redundant copy of USB_BOOT_FLAGS"] + #[inline(always)] + pub const fn usb_boot_flags_r2( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(364usize) as _) } + } + #[doc = "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):"] + #[inline(always)] + pub const fn usb_white_label_addr( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(368usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otpboot_src(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(376usize) as _) } + } + #[doc = "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)."] + #[inline(always)] + pub const fn otpboot_len(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(380usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otpboot_dst0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(384usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn otpboot_dst1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(388usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(512usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(516usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(520usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(524usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(528usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(532usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(536usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(540usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(544usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(548usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(552usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(556usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(560usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(564usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(568usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 0 (ECC)"] + #[inline(always)] + pub const fn bootkey0_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(572usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(576usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(580usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(584usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(588usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(592usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(596usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(600usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(604usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(608usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(612usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(616usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(620usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(624usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(628usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(632usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 1 (ECC)"] + #[inline(always)] + pub const fn bootkey1_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(636usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(640usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(644usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(648usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(652usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(656usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(660usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(664usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(668usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(672usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(676usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(680usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(684usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(688usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(692usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(696usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 2 (ECC)"] + #[inline(always)] + pub const fn bootkey2_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(700usize) as _) } + } + #[doc = "Bits 15:0 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(704usize) as _) } + } + #[doc = "Bits 31:16 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(708usize) as _) } + } + #[doc = "Bits 47:32 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(712usize) as _) } + } + #[doc = "Bits 63:48 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(716usize) as _) } + } + #[doc = "Bits 79:64 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(720usize) as _) } + } + #[doc = "Bits 95:80 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(724usize) as _) } + } + #[doc = "Bits 111:96 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(728usize) as _) } + } + #[doc = "Bits 127:112 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(732usize) as _) } + } + #[doc = "Bits 143:128 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_8(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(736usize) as _) } + } + #[doc = "Bits 159:144 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_9(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(740usize) as _) } + } + #[doc = "Bits 175:160 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_10(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(744usize) as _) } + } + #[doc = "Bits 191:176 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_11(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(748usize) as _) } + } + #[doc = "Bits 207:192 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_12(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(752usize) as _) } + } + #[doc = "Bits 223:208 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_13(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(756usize) as _) } + } + #[doc = "Bits 239:224 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_14(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(760usize) as _) } + } + #[doc = "Bits 255:240 of SHA-256 hash of boot key 3 (ECC)"] + #[inline(always)] + pub const fn bootkey3_15(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(764usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15648usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15652usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15656usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15660usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15664usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15668usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15672usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 1 (ECC)"] + #[inline(always)] + pub const fn key1_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15676usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15680usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15684usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15688usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15692usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15696usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15700usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15704usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 2 (ECC)"] + #[inline(always)] + pub const fn key2_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15708usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15712usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15716usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15720usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15724usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15728usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15732usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15736usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 3 (ECC)"] + #[inline(always)] + pub const fn key3_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15740usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15744usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15748usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15752usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15756usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15760usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15764usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15768usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 4 (ECC)"] + #[inline(always)] + pub const fn key4_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15772usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15776usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15780usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15784usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15788usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15792usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15796usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15800usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 5 (ECC)"] + #[inline(always)] + pub const fn key5_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15804usize) as _) } + } + #[doc = "Bits 15:0 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15808usize) as _) } + } + #[doc = "Bits 31:16 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15812usize) as _) } + } + #[doc = "Bits 47:32 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15816usize) as _) } + } + #[doc = "Bits 63:48 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15820usize) as _) } + } + #[doc = "Bits 79:64 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15824usize) as _) } + } + #[doc = "Bits 95:80 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15828usize) as _) } + } + #[doc = "Bits 111:96 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15832usize) as _) } + } + #[doc = "Bits 127:112 of OTP access key 6 (ECC)"] + #[inline(always)] + pub const fn key6_7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15836usize) as _) } + } + #[doc = "Valid flag for key 1. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] + #[inline(always)] + pub const fn key1_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15844usize) as _) } + } + #[doc = "Valid flag for key 2. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] + #[inline(always)] + pub const fn key2_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15848usize) as _) } + } + #[doc = "Valid flag for key 3. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] + #[inline(always)] + pub const fn key3_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15852usize) as _) } + } + #[doc = "Valid flag for key 4. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] + #[inline(always)] + pub const fn key4_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15856usize) as _) } + } + #[doc = "Valid flag for key 5. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] + #[inline(always)] + pub const fn key5_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15860usize) as _) } + } + #[doc = "Valid flag for key 6. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] + #[inline(always)] + pub const fn key6_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15864usize) as _) } + } + #[doc = "Lock configuration LSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page0_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15872usize) as _) } + } + #[doc = "Lock configuration MSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page0_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15876usize) as _) } + } + #[doc = "Lock configuration LSBs for page 1 (rows 0x40 through 0x7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page1_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15880usize) as _) } + } + #[doc = "Lock configuration MSBs for page 1 (rows 0x40 through 0x7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page1_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15884usize) as _) } + } + #[doc = "Lock configuration LSBs for page 2 (rows 0x80 through 0xbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page2_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15888usize) as _) } + } + #[doc = "Lock configuration MSBs for page 2 (rows 0x80 through 0xbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page2_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15892usize) as _) } + } + #[doc = "Lock configuration LSBs for page 3 (rows 0xc0 through 0xff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page3_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15896usize) as _) } + } + #[doc = "Lock configuration MSBs for page 3 (rows 0xc0 through 0xff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page3_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15900usize) as _) } + } + #[doc = "Lock configuration LSBs for page 4 (rows 0x100 through 0x13f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page4_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15904usize) as _) } + } + #[doc = "Lock configuration MSBs for page 4 (rows 0x100 through 0x13f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page4_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15908usize) as _) } + } + #[doc = "Lock configuration LSBs for page 5 (rows 0x140 through 0x17f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page5_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15912usize) as _) } + } + #[doc = "Lock configuration MSBs for page 5 (rows 0x140 through 0x17f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page5_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15916usize) as _) } + } + #[doc = "Lock configuration LSBs for page 6 (rows 0x180 through 0x1bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page6_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15920usize) as _) } + } + #[doc = "Lock configuration MSBs for page 6 (rows 0x180 through 0x1bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page6_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15924usize) as _) } + } + #[doc = "Lock configuration LSBs for page 7 (rows 0x1c0 through 0x1ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page7_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15928usize) as _) } + } + #[doc = "Lock configuration MSBs for page 7 (rows 0x1c0 through 0x1ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page7_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15932usize) as _) } + } + #[doc = "Lock configuration LSBs for page 8 (rows 0x200 through 0x23f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page8_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15936usize) as _) } + } + #[doc = "Lock configuration MSBs for page 8 (rows 0x200 through 0x23f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page8_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15940usize) as _) } + } + #[doc = "Lock configuration LSBs for page 9 (rows 0x240 through 0x27f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page9_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15944usize) as _) } + } + #[doc = "Lock configuration MSBs for page 9 (rows 0x240 through 0x27f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page9_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15948usize) as _) } + } + #[doc = "Lock configuration LSBs for page 10 (rows 0x280 through 0x2bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page10_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15952usize) as _) } + } + #[doc = "Lock configuration MSBs for page 10 (rows 0x280 through 0x2bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page10_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15956usize) as _) } + } + #[doc = "Lock configuration LSBs for page 11 (rows 0x2c0 through 0x2ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page11_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15960usize) as _) } + } + #[doc = "Lock configuration MSBs for page 11 (rows 0x2c0 through 0x2ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page11_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15964usize) as _) } + } + #[doc = "Lock configuration LSBs for page 12 (rows 0x300 through 0x33f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page12_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15968usize) as _) } + } + #[doc = "Lock configuration MSBs for page 12 (rows 0x300 through 0x33f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page12_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15972usize) as _) } + } + #[doc = "Lock configuration LSBs for page 13 (rows 0x340 through 0x37f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page13_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15976usize) as _) } + } + #[doc = "Lock configuration MSBs for page 13 (rows 0x340 through 0x37f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page13_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15980usize) as _) } + } + #[doc = "Lock configuration LSBs for page 14 (rows 0x380 through 0x3bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page14_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15984usize) as _) } + } + #[doc = "Lock configuration MSBs for page 14 (rows 0x380 through 0x3bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page14_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15988usize) as _) } + } + #[doc = "Lock configuration LSBs for page 15 (rows 0x3c0 through 0x3ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page15_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15992usize) as _) } + } + #[doc = "Lock configuration MSBs for page 15 (rows 0x3c0 through 0x3ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page15_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(15996usize) as _) } + } + #[doc = "Lock configuration LSBs for page 16 (rows 0x400 through 0x43f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page16_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16000usize) as _) } + } + #[doc = "Lock configuration MSBs for page 16 (rows 0x400 through 0x43f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page16_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16004usize) as _) } + } + #[doc = "Lock configuration LSBs for page 17 (rows 0x440 through 0x47f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page17_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16008usize) as _) } + } + #[doc = "Lock configuration MSBs for page 17 (rows 0x440 through 0x47f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page17_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16012usize) as _) } + } + #[doc = "Lock configuration LSBs for page 18 (rows 0x480 through 0x4bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page18_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16016usize) as _) } + } + #[doc = "Lock configuration MSBs for page 18 (rows 0x480 through 0x4bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page18_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16020usize) as _) } + } + #[doc = "Lock configuration LSBs for page 19 (rows 0x4c0 through 0x4ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page19_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16024usize) as _) } + } + #[doc = "Lock configuration MSBs for page 19 (rows 0x4c0 through 0x4ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page19_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16028usize) as _) } + } + #[doc = "Lock configuration LSBs for page 20 (rows 0x500 through 0x53f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page20_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16032usize) as _) } + } + #[doc = "Lock configuration MSBs for page 20 (rows 0x500 through 0x53f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page20_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16036usize) as _) } + } + #[doc = "Lock configuration LSBs for page 21 (rows 0x540 through 0x57f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page21_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16040usize) as _) } + } + #[doc = "Lock configuration MSBs for page 21 (rows 0x540 through 0x57f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page21_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16044usize) as _) } + } + #[doc = "Lock configuration LSBs for page 22 (rows 0x580 through 0x5bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page22_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16048usize) as _) } + } + #[doc = "Lock configuration MSBs for page 22 (rows 0x580 through 0x5bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page22_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16052usize) as _) } + } + #[doc = "Lock configuration LSBs for page 23 (rows 0x5c0 through 0x5ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page23_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16056usize) as _) } + } + #[doc = "Lock configuration MSBs for page 23 (rows 0x5c0 through 0x5ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page23_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16060usize) as _) } + } + #[doc = "Lock configuration LSBs for page 24 (rows 0x600 through 0x63f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page24_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16064usize) as _) } + } + #[doc = "Lock configuration MSBs for page 24 (rows 0x600 through 0x63f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page24_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16068usize) as _) } + } + #[doc = "Lock configuration LSBs for page 25 (rows 0x640 through 0x67f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page25_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16072usize) as _) } + } + #[doc = "Lock configuration MSBs for page 25 (rows 0x640 through 0x67f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page25_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16076usize) as _) } + } + #[doc = "Lock configuration LSBs for page 26 (rows 0x680 through 0x6bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page26_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16080usize) as _) } + } + #[doc = "Lock configuration MSBs for page 26 (rows 0x680 through 0x6bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page26_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16084usize) as _) } + } + #[doc = "Lock configuration LSBs for page 27 (rows 0x6c0 through 0x6ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page27_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16088usize) as _) } + } + #[doc = "Lock configuration MSBs for page 27 (rows 0x6c0 through 0x6ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page27_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16092usize) as _) } + } + #[doc = "Lock configuration LSBs for page 28 (rows 0x700 through 0x73f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page28_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16096usize) as _) } + } + #[doc = "Lock configuration MSBs for page 28 (rows 0x700 through 0x73f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page28_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16100usize) as _) } + } + #[doc = "Lock configuration LSBs for page 29 (rows 0x740 through 0x77f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page29_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16104usize) as _) } + } + #[doc = "Lock configuration MSBs for page 29 (rows 0x740 through 0x77f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page29_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16108usize) as _) } + } + #[doc = "Lock configuration LSBs for page 30 (rows 0x780 through 0x7bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page30_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16112usize) as _) } + } + #[doc = "Lock configuration MSBs for page 30 (rows 0x780 through 0x7bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page30_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16116usize) as _) } + } + #[doc = "Lock configuration LSBs for page 31 (rows 0x7c0 through 0x7ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page31_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16120usize) as _) } + } + #[doc = "Lock configuration MSBs for page 31 (rows 0x7c0 through 0x7ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page31_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16124usize) as _) } + } + #[doc = "Lock configuration LSBs for page 32 (rows 0x800 through 0x83f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page32_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16128usize) as _) } + } + #[doc = "Lock configuration MSBs for page 32 (rows 0x800 through 0x83f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page32_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16132usize) as _) } + } + #[doc = "Lock configuration LSBs for page 33 (rows 0x840 through 0x87f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page33_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16136usize) as _) } + } + #[doc = "Lock configuration MSBs for page 33 (rows 0x840 through 0x87f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page33_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16140usize) as _) } + } + #[doc = "Lock configuration LSBs for page 34 (rows 0x880 through 0x8bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page34_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16144usize) as _) } + } + #[doc = "Lock configuration MSBs for page 34 (rows 0x880 through 0x8bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page34_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16148usize) as _) } + } + #[doc = "Lock configuration LSBs for page 35 (rows 0x8c0 through 0x8ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page35_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16152usize) as _) } + } + #[doc = "Lock configuration MSBs for page 35 (rows 0x8c0 through 0x8ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page35_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16156usize) as _) } + } + #[doc = "Lock configuration LSBs for page 36 (rows 0x900 through 0x93f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page36_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16160usize) as _) } + } + #[doc = "Lock configuration MSBs for page 36 (rows 0x900 through 0x93f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page36_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16164usize) as _) } + } + #[doc = "Lock configuration LSBs for page 37 (rows 0x940 through 0x97f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page37_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16168usize) as _) } + } + #[doc = "Lock configuration MSBs for page 37 (rows 0x940 through 0x97f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page37_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16172usize) as _) } + } + #[doc = "Lock configuration LSBs for page 38 (rows 0x980 through 0x9bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page38_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16176usize) as _) } + } + #[doc = "Lock configuration MSBs for page 38 (rows 0x980 through 0x9bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page38_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16180usize) as _) } + } + #[doc = "Lock configuration LSBs for page 39 (rows 0x9c0 through 0x9ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page39_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16184usize) as _) } + } + #[doc = "Lock configuration MSBs for page 39 (rows 0x9c0 through 0x9ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page39_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16188usize) as _) } + } + #[doc = "Lock configuration LSBs for page 40 (rows 0xa00 through 0xa3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page40_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16192usize) as _) } + } + #[doc = "Lock configuration MSBs for page 40 (rows 0xa00 through 0xa3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page40_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16196usize) as _) } + } + #[doc = "Lock configuration LSBs for page 41 (rows 0xa40 through 0xa7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page41_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16200usize) as _) } + } + #[doc = "Lock configuration MSBs for page 41 (rows 0xa40 through 0xa7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page41_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16204usize) as _) } + } + #[doc = "Lock configuration LSBs for page 42 (rows 0xa80 through 0xabf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page42_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16208usize) as _) } + } + #[doc = "Lock configuration MSBs for page 42 (rows 0xa80 through 0xabf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page42_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16212usize) as _) } + } + #[doc = "Lock configuration LSBs for page 43 (rows 0xac0 through 0xaff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page43_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16216usize) as _) } + } + #[doc = "Lock configuration MSBs for page 43 (rows 0xac0 through 0xaff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page43_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16220usize) as _) } + } + #[doc = "Lock configuration LSBs for page 44 (rows 0xb00 through 0xb3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page44_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16224usize) as _) } + } + #[doc = "Lock configuration MSBs for page 44 (rows 0xb00 through 0xb3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page44_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16228usize) as _) } + } + #[doc = "Lock configuration LSBs for page 45 (rows 0xb40 through 0xb7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page45_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16232usize) as _) } + } + #[doc = "Lock configuration MSBs for page 45 (rows 0xb40 through 0xb7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page45_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16236usize) as _) } + } + #[doc = "Lock configuration LSBs for page 46 (rows 0xb80 through 0xbbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page46_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16240usize) as _) } + } + #[doc = "Lock configuration MSBs for page 46 (rows 0xb80 through 0xbbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page46_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16244usize) as _) } + } + #[doc = "Lock configuration LSBs for page 47 (rows 0xbc0 through 0xbff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page47_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16248usize) as _) } + } + #[doc = "Lock configuration MSBs for page 47 (rows 0xbc0 through 0xbff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page47_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16252usize) as _) } + } + #[doc = "Lock configuration LSBs for page 48 (rows 0xc00 through 0xc3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page48_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16256usize) as _) } + } + #[doc = "Lock configuration MSBs for page 48 (rows 0xc00 through 0xc3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page48_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16260usize) as _) } + } + #[doc = "Lock configuration LSBs for page 49 (rows 0xc40 through 0xc7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page49_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16264usize) as _) } + } + #[doc = "Lock configuration MSBs for page 49 (rows 0xc40 through 0xc7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page49_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16268usize) as _) } + } + #[doc = "Lock configuration LSBs for page 50 (rows 0xc80 through 0xcbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page50_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16272usize) as _) } + } + #[doc = "Lock configuration MSBs for page 50 (rows 0xc80 through 0xcbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page50_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16276usize) as _) } + } + #[doc = "Lock configuration LSBs for page 51 (rows 0xcc0 through 0xcff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page51_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16280usize) as _) } + } + #[doc = "Lock configuration MSBs for page 51 (rows 0xcc0 through 0xcff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page51_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16284usize) as _) } + } + #[doc = "Lock configuration LSBs for page 52 (rows 0xd00 through 0xd3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page52_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16288usize) as _) } + } + #[doc = "Lock configuration MSBs for page 52 (rows 0xd00 through 0xd3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page52_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16292usize) as _) } + } + #[doc = "Lock configuration LSBs for page 53 (rows 0xd40 through 0xd7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page53_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16296usize) as _) } + } + #[doc = "Lock configuration MSBs for page 53 (rows 0xd40 through 0xd7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page53_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16300usize) as _) } + } + #[doc = "Lock configuration LSBs for page 54 (rows 0xd80 through 0xdbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page54_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16304usize) as _) } + } + #[doc = "Lock configuration MSBs for page 54 (rows 0xd80 through 0xdbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page54_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16308usize) as _) } + } + #[doc = "Lock configuration LSBs for page 55 (rows 0xdc0 through 0xdff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page55_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16312usize) as _) } + } + #[doc = "Lock configuration MSBs for page 55 (rows 0xdc0 through 0xdff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page55_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16316usize) as _) } + } + #[doc = "Lock configuration LSBs for page 56 (rows 0xe00 through 0xe3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page56_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16320usize) as _) } + } + #[doc = "Lock configuration MSBs for page 56 (rows 0xe00 through 0xe3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page56_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16324usize) as _) } + } + #[doc = "Lock configuration LSBs for page 57 (rows 0xe40 through 0xe7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page57_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16328usize) as _) } + } + #[doc = "Lock configuration MSBs for page 57 (rows 0xe40 through 0xe7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page57_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16332usize) as _) } + } + #[doc = "Lock configuration LSBs for page 58 (rows 0xe80 through 0xebf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page58_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16336usize) as _) } + } + #[doc = "Lock configuration MSBs for page 58 (rows 0xe80 through 0xebf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page58_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16340usize) as _) } + } + #[doc = "Lock configuration LSBs for page 59 (rows 0xec0 through 0xeff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page59_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16344usize) as _) } + } + #[doc = "Lock configuration MSBs for page 59 (rows 0xec0 through 0xeff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page59_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16348usize) as _) } + } + #[doc = "Lock configuration LSBs for page 60 (rows 0xf00 through 0xf3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page60_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16352usize) as _) } + } + #[doc = "Lock configuration MSBs for page 60 (rows 0xf00 through 0xf3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page60_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16356usize) as _) } + } + #[doc = "Lock configuration LSBs for page 61 (rows 0xf40 through 0xf7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page61_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16360usize) as _) } + } + #[doc = "Lock configuration MSBs for page 61 (rows 0xf40 through 0xf7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page61_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16364usize) as _) } + } + #[doc = "Lock configuration LSBs for page 62 (rows 0xf80 through 0xfbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page62_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16368usize) as _) } + } + #[doc = "Lock configuration MSBs for page 62 (rows 0xf80 through 0xfbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page62_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16372usize) as _) } + } + #[doc = "Lock configuration LSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page63_lock0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16376usize) as _) } + } + #[doc = "Lock configuration MSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] + #[inline(always)] + pub const fn page63_lock1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16380usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/otp_data_raw/regs.rs b/src/rp2350/otp_data_raw/regs.rs new file mode 100644 index 00000000..43a2f9fe --- /dev/null +++ b/src/rp2350/otp_data_raw/regs.rs @@ -0,0 +1,13023 @@ +#[doc = "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)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootFlags0(pub u32); +impl BootFlags0 { + #[inline(always)] + pub const fn disable_bootsel_exec2(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_bootsel_exec2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Enable bootloader activity LED. If set, bootsel_led_cfg is assumed to be valid"] + #[inline(always)] + pub const fn enable_bootsel_led(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Enable bootloader activity LED. If set, bootsel_led_cfg is assumed to be valid"] + #[inline(always)] + pub fn set_enable_bootsel_led(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable_bootsel_non_default_pll_xosc_cfg(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable_bootsel_non_default_pll_xosc_cfg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn flash_io_voltage_1v8(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_flash_io_voltage_1v8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Enable quartering of ROSC divisor during signature check, to reduce secure boot time"] + #[inline(always)] + pub const fn fast_sigcheck_rosc_div(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Enable quartering of ROSC divisor during signature check, to reduce secure boot time"] + #[inline(always)] + pub fn set_fast_sigcheck_rosc_div(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Mark FLASH_DEVINFO as containing valid, ECC'd data which describes external flash devices."] + #[inline(always)] + pub const fn flash_devinfo_enable(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "Mark FLASH_DEVINFO as containing valid, ECC'd data which describes external flash devices."] + #[inline(always)] + pub fn set_flash_devinfo_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn override_flash_partition_slot_size(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_override_flash_partition_slot_size(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Restrict flash boot path to use of a single binary at the start of flash"] + #[inline(always)] + pub const fn single_flash_binary(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Restrict flash boot path to use of a single binary at the start of flash"] + #[inline(always)] + pub fn set_single_flash_binary(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn disable_auto_switch_arch(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_disable_auto_switch_arch(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Require a partition table to be signed"] + #[inline(always)] + pub const fn secure_partition_table(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Require a partition table to be signed"] + #[inline(always)] + pub fn set_secure_partition_table(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Require a partition table to be hashed (if not signed)"] + #[inline(always)] + pub const fn hashed_partition_table(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Require a partition table to be hashed (if not signed)"] + #[inline(always)] + pub fn set_hashed_partition_table(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Require binaries to have a rollback version. Set automatically the first time a binary with a rollback version is booted."] + #[inline(always)] + pub const fn rollback_required(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Require binaries to have a rollback version. Set automatically the first time a binary with a rollback version is booted."] + #[inline(always)] + pub fn set_rollback_required(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn disable_flash_boot(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_flash_boot(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "Takes precedence over ENABLE_OTP_BOOT."] + #[inline(always)] + pub const fn disable_otp_boot(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "Takes precedence over ENABLE_OTP_BOOT."] + #[inline(always)] + pub fn set_disable_otp_boot(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable_otp_boot(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable_otp_boot(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn disable_power_scratch(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_power_scratch(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn disable_watchdog_scratch(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_watchdog_scratch(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn disable_bootsel_usb_msd_ifc(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_bootsel_usb_msd_ifc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn disable_bootsel_usb_picoboot_ifc(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_bootsel_usb_picoboot_ifc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn disable_bootsel_uart_boot(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_bootsel_uart_boot(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn disable_xip_access_on_sram_entry(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_disable_xip_access_on_sram_entry(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn disable_sram_window_boot(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_disable_sram_window_boot(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } +} +impl Default for BootFlags0 { + #[inline(always)] + fn default() -> BootFlags0 { + BootFlags0(0) + } +} +#[doc = "Redundant copy of BOOT_FLAGS0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootFlags0r1(pub u32); +impl BootFlags0r1 { + #[inline(always)] + pub const fn boot_flags0_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_boot_flags0_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for BootFlags0r1 { + #[inline(always)] + fn default() -> BootFlags0r1 { + BootFlags0r1(0) + } +} +#[doc = "Redundant copy of BOOT_FLAGS0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootFlags0r2(pub u32); +impl BootFlags0r2 { + #[inline(always)] + pub const fn boot_flags0_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_boot_flags0_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for BootFlags0r2 { + #[inline(always)] + fn default() -> BootFlags0r2 { + BootFlags0r2(0) + } +} +#[doc = "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)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootFlags1(pub u32); +impl BootFlags1 { + #[doc = "Mark each of the possible boot keys as valid. The bootrom will check signatures against all valid boot keys, and ignore invalid boot keys. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. A KEY_VALID bit is ignored if the corresponding KEY_INVALID bit is set. Boot keys are considered valid only when KEY_VALID is set and KEY_INVALID is clear. Do not mark a boot key as KEY_VALID if it does not contain a valid SHA-256 hash of your secp256k1 public key. Verify keys after programming, before setting the KEY_VALID bits -- a boot key with uncorrectable ECC faults will render your device unbootable if secure boot is enabled. Do not enable secure boot without first installing a valid key. This will render your device unbootable."] + #[inline(always)] + pub const fn key_valid(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "Mark each of the possible boot keys as valid. The bootrom will check signatures against all valid boot keys, and ignore invalid boot keys. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. A KEY_VALID bit is ignored if the corresponding KEY_INVALID bit is set. Boot keys are considered valid only when KEY_VALID is set and KEY_INVALID is clear. Do not mark a boot key as KEY_VALID if it does not contain a valid SHA-256 hash of your secp256k1 public key. Verify keys after programming, before setting the KEY_VALID bits -- a boot key with uncorrectable ECC faults will render your device unbootable if secure boot is enabled. Do not enable secure boot without first installing a valid key. This will render your device unbootable."] + #[inline(always)] + pub fn set_key_valid(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "Mark a boot key as invalid, or prevent it from ever becoming valid. The bootrom will ignore any boot key marked as invalid during secure boot signature checks. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. When provisioning boot keys, it's recommended to mark any boot key slots you don't intend to use as KEY_INVALID, so that spurious keys can not be installed at a later time."] + #[inline(always)] + pub const fn key_invalid(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "Mark a boot key as invalid, or prevent it from ever becoming valid. The bootrom will ignore any boot key marked as invalid during secure boot signature checks. Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. When provisioning boot keys, it's recommended to mark any boot key slots you don't intend to use as KEY_INVALID, so that spurious keys can not be installed at a later time."] + #[inline(always)] + pub fn set_key_invalid(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "Adjust how long to wait for a second reset when double tap BOOTSEL mode is enabled via DOUBLE_TAP. The minimum is 50 milliseconds, and each unit of this field adds an additional 50 milliseconds. For example, settings this field to its maximum value of 7 will cause the chip to wait for 400 milliseconds at boot to check for a second reset which requests entry to BOOTSEL mode. 200 milliseconds (DOUBLE_TAP_DELAY=3) is a good intermediate value."] + #[inline(always)] + pub const fn double_tap_delay(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x07; + val as u8 + } + #[doc = "Adjust how long to wait for a second reset when double tap BOOTSEL mode is enabled via DOUBLE_TAP. The minimum is 50 milliseconds, and each unit of this field adds an additional 50 milliseconds. For example, settings this field to its maximum value of 7 will cause the chip to wait for 400 milliseconds at boot to check for a second reset which requests entry to BOOTSEL mode. 200 milliseconds (DOUBLE_TAP_DELAY=3) is a good intermediate value."] + #[inline(always)] + pub fn set_double_tap_delay(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 16usize)) | (((val as u32) & 0x07) << 16usize); + } + #[doc = "Enable entering BOOTSEL mode via double-tap of the RUN/RSTn pin. Adds a significant delay to boot time, as configured by DOUBLE_TAP_DELAY. This functions by waiting at startup (i.e. following a reset) to see if a second reset is applied soon afterward. The second reset is detected by the bootrom with help of the POWMAN_CHIP_RESET_DOUBLE_TAP flag, which is not reset by the external reset pin, and the bootrom enters BOOTSEL mode (NSBOOT) to await further instruction over USB or UART."] + #[inline(always)] + pub const fn double_tap(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "Enable entering BOOTSEL mode via double-tap of the RUN/RSTn pin. Adds a significant delay to boot time, as configured by DOUBLE_TAP_DELAY. This functions by waiting at startup (i.e. following a reset) to see if a second reset is applied soon afterward. The second reset is detected by the bootrom with help of the POWMAN_CHIP_RESET_DOUBLE_TAP flag, which is not reset by the external reset pin, and the bootrom enters BOOTSEL mode (NSBOOT) to await further instruction over USB or UART."] + #[inline(always)] + pub fn set_double_tap(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } +} +impl Default for BootFlags1 { + #[inline(always)] + fn default() -> BootFlags1 { + BootFlags1(0) + } +} +#[doc = "Redundant copy of BOOT_FLAGS1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootFlags1r1(pub u32); +impl BootFlags1r1 { + #[inline(always)] + pub const fn boot_flags1_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_boot_flags1_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for BootFlags1r1 { + #[inline(always)] + fn default() -> BootFlags1r1 { + BootFlags1r1(0) + } +} +#[doc = "Redundant copy of BOOT_FLAGS1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootFlags1r2(pub u32); +impl BootFlags1r2 { + #[inline(always)] + pub const fn boot_flags1_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_boot_flags1_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for BootFlags1r2 { + #[inline(always)] + fn default() -> BootFlags1r2 { + BootFlags1r2(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey00(pub u32); +impl Bootkey00 { + #[inline(always)] + pub const fn bootkey0_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey00 { + #[inline(always)] + fn default() -> Bootkey00 { + Bootkey00(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey01(pub u32); +impl Bootkey01 { + #[inline(always)] + pub const fn bootkey0_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey01 { + #[inline(always)] + fn default() -> Bootkey01 { + Bootkey01(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey010(pub u32); +impl Bootkey010 { + #[inline(always)] + pub const fn bootkey0_10(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_10(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey010 { + #[inline(always)] + fn default() -> Bootkey010 { + Bootkey010(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey011(pub u32); +impl Bootkey011 { + #[inline(always)] + pub const fn bootkey0_11(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_11(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey011 { + #[inline(always)] + fn default() -> Bootkey011 { + Bootkey011(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey012(pub u32); +impl Bootkey012 { + #[inline(always)] + pub const fn bootkey0_12(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_12(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey012 { + #[inline(always)] + fn default() -> Bootkey012 { + Bootkey012(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey013(pub u32); +impl Bootkey013 { + #[inline(always)] + pub const fn bootkey0_13(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_13(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey013 { + #[inline(always)] + fn default() -> Bootkey013 { + Bootkey013(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey014(pub u32); +impl Bootkey014 { + #[inline(always)] + pub const fn bootkey0_14(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_14(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey014 { + #[inline(always)] + fn default() -> Bootkey014 { + Bootkey014(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey015(pub u32); +impl Bootkey015 { + #[inline(always)] + pub const fn bootkey0_15(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_15(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey015 { + #[inline(always)] + fn default() -> Bootkey015 { + Bootkey015(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey02(pub u32); +impl Bootkey02 { + #[inline(always)] + pub const fn bootkey0_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey02 { + #[inline(always)] + fn default() -> Bootkey02 { + Bootkey02(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey03(pub u32); +impl Bootkey03 { + #[inline(always)] + pub const fn bootkey0_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey03 { + #[inline(always)] + fn default() -> Bootkey03 { + Bootkey03(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey04(pub u32); +impl Bootkey04 { + #[inline(always)] + pub const fn bootkey0_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey04 { + #[inline(always)] + fn default() -> Bootkey04 { + Bootkey04(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey05(pub u32); +impl Bootkey05 { + #[inline(always)] + pub const fn bootkey0_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey05 { + #[inline(always)] + fn default() -> Bootkey05 { + Bootkey05(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey06(pub u32); +impl Bootkey06 { + #[inline(always)] + pub const fn bootkey0_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey06 { + #[inline(always)] + fn default() -> Bootkey06 { + Bootkey06(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey07(pub u32); +impl Bootkey07 { + #[inline(always)] + pub const fn bootkey0_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey07 { + #[inline(always)] + fn default() -> Bootkey07 { + Bootkey07(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey08(pub u32); +impl Bootkey08 { + #[inline(always)] + pub const fn bootkey0_8(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_8(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey08 { + #[inline(always)] + fn default() -> Bootkey08 { + Bootkey08(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 0 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey09(pub u32); +impl Bootkey09 { + #[inline(always)] + pub const fn bootkey0_9(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey0_9(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey09 { + #[inline(always)] + fn default() -> Bootkey09 { + Bootkey09(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey10(pub u32); +impl Bootkey10 { + #[inline(always)] + pub const fn bootkey1_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey10 { + #[inline(always)] + fn default() -> Bootkey10 { + Bootkey10(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey11(pub u32); +impl Bootkey11 { + #[inline(always)] + pub const fn bootkey1_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey11 { + #[inline(always)] + fn default() -> Bootkey11 { + Bootkey11(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey110(pub u32); +impl Bootkey110 { + #[inline(always)] + pub const fn bootkey1_10(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_10(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey110 { + #[inline(always)] + fn default() -> Bootkey110 { + Bootkey110(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey111(pub u32); +impl Bootkey111 { + #[inline(always)] + pub const fn bootkey1_11(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_11(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey111 { + #[inline(always)] + fn default() -> Bootkey111 { + Bootkey111(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey112(pub u32); +impl Bootkey112 { + #[inline(always)] + pub const fn bootkey1_12(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_12(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey112 { + #[inline(always)] + fn default() -> Bootkey112 { + Bootkey112(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey113(pub u32); +impl Bootkey113 { + #[inline(always)] + pub const fn bootkey1_13(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_13(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey113 { + #[inline(always)] + fn default() -> Bootkey113 { + Bootkey113(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey114(pub u32); +impl Bootkey114 { + #[inline(always)] + pub const fn bootkey1_14(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_14(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey114 { + #[inline(always)] + fn default() -> Bootkey114 { + Bootkey114(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey115(pub u32); +impl Bootkey115 { + #[inline(always)] + pub const fn bootkey1_15(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_15(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey115 { + #[inline(always)] + fn default() -> Bootkey115 { + Bootkey115(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey12(pub u32); +impl Bootkey12 { + #[inline(always)] + pub const fn bootkey1_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey12 { + #[inline(always)] + fn default() -> Bootkey12 { + Bootkey12(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey13(pub u32); +impl Bootkey13 { + #[inline(always)] + pub const fn bootkey1_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey13 { + #[inline(always)] + fn default() -> Bootkey13 { + Bootkey13(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey14(pub u32); +impl Bootkey14 { + #[inline(always)] + pub const fn bootkey1_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey14 { + #[inline(always)] + fn default() -> Bootkey14 { + Bootkey14(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey15(pub u32); +impl Bootkey15 { + #[inline(always)] + pub const fn bootkey1_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey15 { + #[inline(always)] + fn default() -> Bootkey15 { + Bootkey15(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey16(pub u32); +impl Bootkey16 { + #[inline(always)] + pub const fn bootkey1_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey16 { + #[inline(always)] + fn default() -> Bootkey16 { + Bootkey16(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey17(pub u32); +impl Bootkey17 { + #[inline(always)] + pub const fn bootkey1_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey17 { + #[inline(always)] + fn default() -> Bootkey17 { + Bootkey17(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey18(pub u32); +impl Bootkey18 { + #[inline(always)] + pub const fn bootkey1_8(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_8(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey18 { + #[inline(always)] + fn default() -> Bootkey18 { + Bootkey18(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey19(pub u32); +impl Bootkey19 { + #[inline(always)] + pub const fn bootkey1_9(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey1_9(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey19 { + #[inline(always)] + fn default() -> Bootkey19 { + Bootkey19(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey20(pub u32); +impl Bootkey20 { + #[inline(always)] + pub const fn bootkey2_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey20 { + #[inline(always)] + fn default() -> Bootkey20 { + Bootkey20(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey21(pub u32); +impl Bootkey21 { + #[inline(always)] + pub const fn bootkey2_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey21 { + #[inline(always)] + fn default() -> Bootkey21 { + Bootkey21(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey210(pub u32); +impl Bootkey210 { + #[inline(always)] + pub const fn bootkey2_10(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_10(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey210 { + #[inline(always)] + fn default() -> Bootkey210 { + Bootkey210(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey211(pub u32); +impl Bootkey211 { + #[inline(always)] + pub const fn bootkey2_11(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_11(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey211 { + #[inline(always)] + fn default() -> Bootkey211 { + Bootkey211(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey212(pub u32); +impl Bootkey212 { + #[inline(always)] + pub const fn bootkey2_12(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_12(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey212 { + #[inline(always)] + fn default() -> Bootkey212 { + Bootkey212(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey213(pub u32); +impl Bootkey213 { + #[inline(always)] + pub const fn bootkey2_13(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_13(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey213 { + #[inline(always)] + fn default() -> Bootkey213 { + Bootkey213(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey214(pub u32); +impl Bootkey214 { + #[inline(always)] + pub const fn bootkey2_14(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_14(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey214 { + #[inline(always)] + fn default() -> Bootkey214 { + Bootkey214(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey215(pub u32); +impl Bootkey215 { + #[inline(always)] + pub const fn bootkey2_15(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_15(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey215 { + #[inline(always)] + fn default() -> Bootkey215 { + Bootkey215(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey22(pub u32); +impl Bootkey22 { + #[inline(always)] + pub const fn bootkey2_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey22 { + #[inline(always)] + fn default() -> Bootkey22 { + Bootkey22(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey23(pub u32); +impl Bootkey23 { + #[inline(always)] + pub const fn bootkey2_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey23 { + #[inline(always)] + fn default() -> Bootkey23 { + Bootkey23(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey24(pub u32); +impl Bootkey24 { + #[inline(always)] + pub const fn bootkey2_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey24 { + #[inline(always)] + fn default() -> Bootkey24 { + Bootkey24(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey25(pub u32); +impl Bootkey25 { + #[inline(always)] + pub const fn bootkey2_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey25 { + #[inline(always)] + fn default() -> Bootkey25 { + Bootkey25(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey26(pub u32); +impl Bootkey26 { + #[inline(always)] + pub const fn bootkey2_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey26 { + #[inline(always)] + fn default() -> Bootkey26 { + Bootkey26(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey27(pub u32); +impl Bootkey27 { + #[inline(always)] + pub const fn bootkey2_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey27 { + #[inline(always)] + fn default() -> Bootkey27 { + Bootkey27(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey28(pub u32); +impl Bootkey28 { + #[inline(always)] + pub const fn bootkey2_8(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_8(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey28 { + #[inline(always)] + fn default() -> Bootkey28 { + Bootkey28(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey29(pub u32); +impl Bootkey29 { + #[inline(always)] + pub const fn bootkey2_9(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey2_9(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey29 { + #[inline(always)] + fn default() -> Bootkey29 { + Bootkey29(0) + } +} +#[doc = "Bits 15:0 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey30(pub u32); +impl Bootkey30 { + #[inline(always)] + pub const fn bootkey3_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey30 { + #[inline(always)] + fn default() -> Bootkey30 { + Bootkey30(0) + } +} +#[doc = "Bits 31:16 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey31(pub u32); +impl Bootkey31 { + #[inline(always)] + pub const fn bootkey3_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey31 { + #[inline(always)] + fn default() -> Bootkey31 { + Bootkey31(0) + } +} +#[doc = "Bits 175:160 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey310(pub u32); +impl Bootkey310 { + #[inline(always)] + pub const fn bootkey3_10(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_10(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey310 { + #[inline(always)] + fn default() -> Bootkey310 { + Bootkey310(0) + } +} +#[doc = "Bits 191:176 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey311(pub u32); +impl Bootkey311 { + #[inline(always)] + pub const fn bootkey3_11(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_11(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey311 { + #[inline(always)] + fn default() -> Bootkey311 { + Bootkey311(0) + } +} +#[doc = "Bits 207:192 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey312(pub u32); +impl Bootkey312 { + #[inline(always)] + pub const fn bootkey3_12(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_12(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey312 { + #[inline(always)] + fn default() -> Bootkey312 { + Bootkey312(0) + } +} +#[doc = "Bits 223:208 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey313(pub u32); +impl Bootkey313 { + #[inline(always)] + pub const fn bootkey3_13(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_13(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey313 { + #[inline(always)] + fn default() -> Bootkey313 { + Bootkey313(0) + } +} +#[doc = "Bits 239:224 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey314(pub u32); +impl Bootkey314 { + #[inline(always)] + pub const fn bootkey3_14(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_14(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey314 { + #[inline(always)] + fn default() -> Bootkey314 { + Bootkey314(0) + } +} +#[doc = "Bits 255:240 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey315(pub u32); +impl Bootkey315 { + #[inline(always)] + pub const fn bootkey3_15(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_15(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey315 { + #[inline(always)] + fn default() -> Bootkey315 { + Bootkey315(0) + } +} +#[doc = "Bits 47:32 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey32(pub u32); +impl Bootkey32 { + #[inline(always)] + pub const fn bootkey3_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey32 { + #[inline(always)] + fn default() -> Bootkey32 { + Bootkey32(0) + } +} +#[doc = "Bits 63:48 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey33(pub u32); +impl Bootkey33 { + #[inline(always)] + pub const fn bootkey3_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey33 { + #[inline(always)] + fn default() -> Bootkey33 { + Bootkey33(0) + } +} +#[doc = "Bits 79:64 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey34(pub u32); +impl Bootkey34 { + #[inline(always)] + pub const fn bootkey3_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey34 { + #[inline(always)] + fn default() -> Bootkey34 { + Bootkey34(0) + } +} +#[doc = "Bits 95:80 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey35(pub u32); +impl Bootkey35 { + #[inline(always)] + pub const fn bootkey3_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey35 { + #[inline(always)] + fn default() -> Bootkey35 { + Bootkey35(0) + } +} +#[doc = "Bits 111:96 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey36(pub u32); +impl Bootkey36 { + #[inline(always)] + pub const fn bootkey3_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey36 { + #[inline(always)] + fn default() -> Bootkey36 { + Bootkey36(0) + } +} +#[doc = "Bits 127:112 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey37(pub u32); +impl Bootkey37 { + #[inline(always)] + pub const fn bootkey3_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey37 { + #[inline(always)] + fn default() -> Bootkey37 { + Bootkey37(0) + } +} +#[doc = "Bits 143:128 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey38(pub u32); +impl Bootkey38 { + #[inline(always)] + pub const fn bootkey3_8(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_8(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey38 { + #[inline(always)] + fn default() -> Bootkey38 { + Bootkey38(0) + } +} +#[doc = "Bits 159:144 of SHA-256 hash of boot key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootkey39(pub u32); +impl Bootkey39 { + #[inline(always)] + pub const fn bootkey3_9(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_bootkey3_9(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Bootkey39 { + #[inline(always)] + fn default() -> Bootkey39 { + Bootkey39(0) + } +} +#[doc = "Pin configuration for LED status, used by USB bootloader. (ECC) Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootselLedCfg(pub u32); +impl BootselLedCfg { + #[doc = "GPIO index to use for bootloader activity LED."] + #[inline(always)] + pub const fn pin(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "GPIO index to use for bootloader activity LED."] + #[inline(always)] + pub fn set_pin(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "LED is active-low. (Default: active-high.)"] + #[inline(always)] + pub const fn activelow(&self) -> u16 { + let val = (self.0 >> 8usize) & 0xffff; + val as u16 + } + #[doc = "LED is active-low. (Default: active-high.)"] + #[inline(always)] + pub fn set_activelow(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 8usize)) | (((val as u32) & 0xffff) << 8usize); + } +} +impl Default for BootselLedCfg { + #[inline(always)] + fn default() -> BootselLedCfg { + BootselLedCfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootselPllCfg(pub u32); +impl BootselPllCfg { + #[doc = "PLL feedback divisor, in the range 16..320 inclusive."] + #[inline(always)] + pub const fn fbdiv(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "PLL feedback divisor, in the range 16..320 inclusive."] + #[inline(always)] + pub fn set_fbdiv(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } + #[doc = "PLL post-divide 1 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub const fn postdiv1(&self) -> u8 { + let val = (self.0 >> 9usize) & 0x07; + val as u8 + } + #[doc = "PLL post-divide 1 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub fn set_postdiv1(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 9usize)) | (((val as u32) & 0x07) << 9usize); + } + #[doc = "PLL post-divide 2 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub const fn postdiv2(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "PLL post-divide 2 divisor, in the range 1..7 inclusive."] + #[inline(always)] + pub fn set_postdiv2(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn refdiv(&self) -> u16 { + let val = (self.0 >> 15usize) & 0x01ff; + val as u16 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_refdiv(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 15usize)) | (((val as u32) & 0x01ff) << 15usize); + } +} +impl Default for BootselPllCfg { + #[inline(always)] + fn default() -> BootselPllCfg { + BootselPllCfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BootselXoscCfg(pub u32); +impl BootselXoscCfg { + #[doc = "Value of the XOSC_STARTUP register"] + #[inline(always)] + pub const fn startup(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x3fff; + val as u16 + } + #[doc = "Value of the XOSC_STARTUP register"] + #[inline(always)] + pub fn set_startup(&mut self, val: u16) { + self.0 = (self.0 & !(0x3fff << 0usize)) | (((val as u32) & 0x3fff) << 0usize); + } + #[doc = "Value of the XOSC_CTRL_FREQ_RANGE register."] + #[inline(always)] + pub const fn range(&self) -> super::vals::Range { + let val = (self.0 >> 14usize) & 0x03ff; + super::vals::Range::from_bits(val as u16) + } + #[doc = "Value of the XOSC_CTRL_FREQ_RANGE register."] + #[inline(always)] + pub fn set_range(&mut self, val: super::vals::Range) { + self.0 = (self.0 & !(0x03ff << 14usize)) | (((val.to_bits() as u32) & 0x03ff) << 14usize); + } +} +impl Default for BootselXoscCfg { + #[inline(always)] + fn default() -> BootselXoscCfg { + BootselXoscCfg(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid0(pub u32); +impl Chipid0 { + #[inline(always)] + pub const fn chipid0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_chipid0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Chipid0 { + #[inline(always)] + fn default() -> Chipid0 { + Chipid0(0) + } +} +#[doc = "Bits 31:16 of public device ID (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid1(pub u32); +impl Chipid1 { + #[inline(always)] + pub const fn chipid1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_chipid1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Chipid1 { + #[inline(always)] + fn default() -> Chipid1 { + Chipid1(0) + } +} +#[doc = "Bits 47:32 of public device ID (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid2(pub u32); +impl Chipid2 { + #[inline(always)] + pub const fn chipid2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_chipid2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Chipid2 { + #[inline(always)] + fn default() -> Chipid2 { + Chipid2(0) + } +} +#[doc = "Bits 63:48 of public device ID (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Chipid3(pub u32); +impl Chipid3 { + #[inline(always)] + pub const fn chipid3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_chipid3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Chipid3 { + #[inline(always)] + fn default() -> Chipid3 { + Chipid3(0) + } +} +#[doc = "Page 0 critical boot flags (RBIT-8)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0(pub u32); +impl Crit0 { + #[doc = "Permanently disable ARM processors (Cortex-M33)"] + #[inline(always)] + pub const fn arm_disable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Permanently disable ARM processors (Cortex-M33)"] + #[inline(always)] + pub fn set_arm_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Permanently disable RISC-V processors (Hazard3)"] + #[inline(always)] + pub const fn riscv_disable(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Permanently disable RISC-V processors (Hazard3)"] + #[inline(always)] + pub fn set_riscv_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Crit0 { + #[inline(always)] + fn default() -> Crit0 { + Crit0(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r1(pub u32); +impl Crit0r1 { + #[inline(always)] + pub const fn crit0_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r1 { + #[inline(always)] + fn default() -> Crit0r1 { + Crit0r1(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r2(pub u32); +impl Crit0r2 { + #[inline(always)] + pub const fn crit0_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r2 { + #[inline(always)] + fn default() -> Crit0r2 { + Crit0r2(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r3(pub u32); +impl Crit0r3 { + #[inline(always)] + pub const fn crit0_r3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r3 { + #[inline(always)] + fn default() -> Crit0r3 { + Crit0r3(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r4(pub u32); +impl Crit0r4 { + #[inline(always)] + pub const fn crit0_r4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r4 { + #[inline(always)] + fn default() -> Crit0r4 { + Crit0r4(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r5(pub u32); +impl Crit0r5 { + #[inline(always)] + pub const fn crit0_r5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r5 { + #[inline(always)] + fn default() -> Crit0r5 { + Crit0r5(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r6(pub u32); +impl Crit0r6 { + #[inline(always)] + pub const fn crit0_r6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r6 { + #[inline(always)] + fn default() -> Crit0r6 { + Crit0r6(0) + } +} +#[doc = "Redundant copy of CRIT0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit0r7(pub u32); +impl Crit0r7 { + #[inline(always)] + pub const fn crit0_r7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit0_r7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit0r7 { + #[inline(always)] + fn default() -> Crit0r7 { + Crit0r7(0) + } +} +#[doc = "Page 1 critical boot flags (RBIT-8)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1(pub u32); +impl Crit1 { + #[doc = "Enable boot signature enforcement, and permanently disable the RISC-V cores."] + #[inline(always)] + pub const fn secure_boot_enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Enable boot signature enforcement, and permanently disable the RISC-V cores."] + #[inline(always)] + pub fn set_secure_boot_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Disable Secure debug access"] + #[inline(always)] + pub const fn secure_debug_disable(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Disable Secure debug access"] + #[inline(always)] + pub fn set_secure_debug_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Disable all debug access"] + #[inline(always)] + pub const fn debug_disable(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Disable all debug access"] + #[inline(always)] + pub fn set_debug_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Set the default boot architecture, 0=ARM 1=RISC-V. Ignored if ARM_DISABLE, RISCV_DISABLE or SECURE_BOOT_ENABLE is set."] + #[inline(always)] + pub const fn boot_arch(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Set the default boot architecture, 0=ARM 1=RISC-V. Ignored if ARM_DISABLE, RISCV_DISABLE or SECURE_BOOT_ENABLE is set."] + #[inline(always)] + pub fn set_boot_arch(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Arm the glitch detectors to reset the system if an abnormal clock/power event is observed."] + #[inline(always)] + pub const fn glitch_detector_enable(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Arm the glitch detectors to reset the system if an abnormal clock/power event is observed."] + #[inline(always)] + pub fn set_glitch_detector_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Increase the sensitivity of the glitch detectors from their default."] + #[inline(always)] + pub const fn glitch_detector_sens(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x03; + val as u8 + } + #[doc = "Increase the sensitivity of the glitch detectors from their default."] + #[inline(always)] + pub fn set_glitch_detector_sens(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 5usize)) | (((val as u32) & 0x03) << 5usize); + } +} +impl Default for Crit1 { + #[inline(always)] + fn default() -> Crit1 { + Crit1(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r1(pub u32); +impl Crit1r1 { + #[inline(always)] + pub const fn crit1_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r1 { + #[inline(always)] + fn default() -> Crit1r1 { + Crit1r1(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r2(pub u32); +impl Crit1r2 { + #[inline(always)] + pub const fn crit1_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r2 { + #[inline(always)] + fn default() -> Crit1r2 { + Crit1r2(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r3(pub u32); +impl Crit1r3 { + #[inline(always)] + pub const fn crit1_r3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r3 { + #[inline(always)] + fn default() -> Crit1r3 { + Crit1r3(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r4(pub u32); +impl Crit1r4 { + #[inline(always)] + pub const fn crit1_r4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r4 { + #[inline(always)] + fn default() -> Crit1r4 { + Crit1r4(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r5(pub u32); +impl Crit1r5 { + #[inline(always)] + pub const fn crit1_r5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r5 { + #[inline(always)] + fn default() -> Crit1r5 { + Crit1r5(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r6(pub u32); +impl Crit1r6 { + #[inline(always)] + pub const fn crit1_r6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r6 { + #[inline(always)] + fn default() -> Crit1r6 { + Crit1r6(0) + } +} +#[doc = "Redundant copy of CRIT1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Crit1r7(pub u32); +impl Crit1r7 { + #[inline(always)] + pub const fn crit1_r7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_crit1_r7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Crit1r7 { + #[inline(always)] + fn default() -> Crit1r7 { + Crit1r7(0) + } +} +#[doc = "Default boot version thermometer counter, bits 23:0 (RBIT-3)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DefaultBootVersion0(pub u32); +impl DefaultBootVersion0 { + #[inline(always)] + pub const fn default_boot_version0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_default_boot_version0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for DefaultBootVersion0 { + #[inline(always)] + fn default() -> DefaultBootVersion0 { + DefaultBootVersion0(0) + } +} +#[doc = "Redundant copy of DEFAULT_BOOT_VERSION0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DefaultBootVersion0r1(pub u32); +impl DefaultBootVersion0r1 { + #[inline(always)] + pub const fn default_boot_version0_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_default_boot_version0_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for DefaultBootVersion0r1 { + #[inline(always)] + fn default() -> DefaultBootVersion0r1 { + DefaultBootVersion0r1(0) + } +} +#[doc = "Redundant copy of DEFAULT_BOOT_VERSION0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DefaultBootVersion0r2(pub u32); +impl DefaultBootVersion0r2 { + #[inline(always)] + pub const fn default_boot_version0_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_default_boot_version0_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for DefaultBootVersion0r2 { + #[inline(always)] + fn default() -> DefaultBootVersion0r2 { + DefaultBootVersion0r2(0) + } +} +#[doc = "Default boot version thermometer counter, bits 47:24 (RBIT-3)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DefaultBootVersion1(pub u32); +impl DefaultBootVersion1 { + #[inline(always)] + pub const fn default_boot_version1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_default_boot_version1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for DefaultBootVersion1 { + #[inline(always)] + fn default() -> DefaultBootVersion1 { + DefaultBootVersion1(0) + } +} +#[doc = "Redundant copy of DEFAULT_BOOT_VERSION1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DefaultBootVersion1r1(pub u32); +impl DefaultBootVersion1r1 { + #[inline(always)] + pub const fn default_boot_version1_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_default_boot_version1_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for DefaultBootVersion1r1 { + #[inline(always)] + fn default() -> DefaultBootVersion1r1 { + DefaultBootVersion1r1(0) + } +} +#[doc = "Redundant copy of DEFAULT_BOOT_VERSION1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DefaultBootVersion1r2(pub u32); +impl DefaultBootVersion1r2 { + #[inline(always)] + pub const fn default_boot_version1_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_default_boot_version1_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for DefaultBootVersion1r2 { + #[inline(always)] + fn default() -> DefaultBootVersion1r2 { + DefaultBootVersion1r2(0) + } +} +#[doc = "Stores information about external flash device(s). (ECC) Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FlashDevinfo(pub u32); +impl FlashDevinfo { + #[doc = "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)."] + #[inline(always)] + pub const fn cs1_gpio(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_cs1_gpio(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn d8h_erase_supported(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_d8h_erase_supported(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn cs0_size(&self) -> super::vals::Cs0size { + let val = (self.0 >> 8usize) & 0x0f; + super::vals::Cs0size::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_cs0_size(&mut self, val: super::vals::Cs0size) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val.to_bits() as u32) & 0x0f) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn cs1_size(&self) -> super::vals::Cs1size { + let val = (self.0 >> 12usize) & 0x0fff; + super::vals::Cs1size::from_bits(val as u16) + } + #[doc = "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."] + #[inline(always)] + pub fn set_cs1_size(&mut self, val: super::vals::Cs1size) { + self.0 = (self.0 & !(0x0fff << 12usize)) | (((val.to_bits() as u32) & 0x0fff) << 12usize); + } +} +impl Default for FlashDevinfo { + #[inline(always)] + fn default() -> FlashDevinfo { + FlashDevinfo(0) + } +} +#[doc = "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)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FlashPartitionSlotSize(pub u32); +impl FlashPartitionSlotSize { + #[inline(always)] + pub const fn flash_partition_slot_size(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_flash_partition_slot_size(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for FlashPartitionSlotSize { + #[inline(always)] + fn default() -> FlashPartitionSlotSize { + FlashPartitionSlotSize(0) + } +} +#[doc = "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)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct InfoCrc0(pub u32); +impl InfoCrc0 { + #[inline(always)] + pub const fn info_crc0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_info_crc0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for InfoCrc0 { + #[inline(always)] + fn default() -> InfoCrc0 { + InfoCrc0(0) + } +} +#[doc = "Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct InfoCrc1(pub u32); +impl InfoCrc1 { + #[inline(always)] + pub const fn info_crc1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_info_crc1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for InfoCrc1 { + #[inline(always)] + fn default() -> InfoCrc1 { + InfoCrc1(0) + } +} +#[doc = "Bits 15:0 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key10(pub u32); +impl Key10 { + #[inline(always)] + pub const fn key1_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key10 { + #[inline(always)] + fn default() -> Key10 { + Key10(0) + } +} +#[doc = "Bits 31:16 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key11(pub u32); +impl Key11 { + #[inline(always)] + pub const fn key1_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key11 { + #[inline(always)] + fn default() -> Key11 { + Key11(0) + } +} +#[doc = "Bits 47:32 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key12(pub u32); +impl Key12 { + #[inline(always)] + pub const fn key1_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key12 { + #[inline(always)] + fn default() -> Key12 { + Key12(0) + } +} +#[doc = "Bits 63:48 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key13(pub u32); +impl Key13 { + #[inline(always)] + pub const fn key1_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key13 { + #[inline(always)] + fn default() -> Key13 { + Key13(0) + } +} +#[doc = "Bits 79:64 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key14(pub u32); +impl Key14 { + #[inline(always)] + pub const fn key1_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key14 { + #[inline(always)] + fn default() -> Key14 { + Key14(0) + } +} +#[doc = "Bits 95:80 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key15(pub u32); +impl Key15 { + #[inline(always)] + pub const fn key1_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key15 { + #[inline(always)] + fn default() -> Key15 { + Key15(0) + } +} +#[doc = "Bits 111:96 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key16(pub u32); +impl Key16 { + #[inline(always)] + pub const fn key1_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key16 { + #[inline(always)] + fn default() -> Key16 { + Key16(0) + } +} +#[doc = "Bits 127:112 of OTP access key 1 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key17(pub u32); +impl Key17 { + #[inline(always)] + pub const fn key1_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key1_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key17 { + #[inline(always)] + fn default() -> Key17 { + Key17(0) + } +} +#[doc = "Valid flag for key 1. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key1valid(pub u32); +impl Key1valid { + #[inline(always)] + pub const fn valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r1(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r2(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for Key1valid { + #[inline(always)] + fn default() -> Key1valid { + Key1valid(0) + } +} +#[doc = "Bits 15:0 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key20(pub u32); +impl Key20 { + #[inline(always)] + pub const fn key2_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key20 { + #[inline(always)] + fn default() -> Key20 { + Key20(0) + } +} +#[doc = "Bits 31:16 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key21(pub u32); +impl Key21 { + #[inline(always)] + pub const fn key2_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key21 { + #[inline(always)] + fn default() -> Key21 { + Key21(0) + } +} +#[doc = "Bits 47:32 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key22(pub u32); +impl Key22 { + #[inline(always)] + pub const fn key2_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key22 { + #[inline(always)] + fn default() -> Key22 { + Key22(0) + } +} +#[doc = "Bits 63:48 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key23(pub u32); +impl Key23 { + #[inline(always)] + pub const fn key2_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key23 { + #[inline(always)] + fn default() -> Key23 { + Key23(0) + } +} +#[doc = "Bits 79:64 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key24(pub u32); +impl Key24 { + #[inline(always)] + pub const fn key2_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key24 { + #[inline(always)] + fn default() -> Key24 { + Key24(0) + } +} +#[doc = "Bits 95:80 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key25(pub u32); +impl Key25 { + #[inline(always)] + pub const fn key2_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key25 { + #[inline(always)] + fn default() -> Key25 { + Key25(0) + } +} +#[doc = "Bits 111:96 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key26(pub u32); +impl Key26 { + #[inline(always)] + pub const fn key2_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key26 { + #[inline(always)] + fn default() -> Key26 { + Key26(0) + } +} +#[doc = "Bits 127:112 of OTP access key 2 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key27(pub u32); +impl Key27 { + #[inline(always)] + pub const fn key2_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key2_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key27 { + #[inline(always)] + fn default() -> Key27 { + Key27(0) + } +} +#[doc = "Valid flag for key 2. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key2valid(pub u32); +impl Key2valid { + #[inline(always)] + pub const fn valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r1(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r2(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for Key2valid { + #[inline(always)] + fn default() -> Key2valid { + Key2valid(0) + } +} +#[doc = "Bits 15:0 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key30(pub u32); +impl Key30 { + #[inline(always)] + pub const fn key3_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key30 { + #[inline(always)] + fn default() -> Key30 { + Key30(0) + } +} +#[doc = "Bits 31:16 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key31(pub u32); +impl Key31 { + #[inline(always)] + pub const fn key3_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key31 { + #[inline(always)] + fn default() -> Key31 { + Key31(0) + } +} +#[doc = "Bits 47:32 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key32(pub u32); +impl Key32 { + #[inline(always)] + pub const fn key3_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key32 { + #[inline(always)] + fn default() -> Key32 { + Key32(0) + } +} +#[doc = "Bits 63:48 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key33(pub u32); +impl Key33 { + #[inline(always)] + pub const fn key3_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key33 { + #[inline(always)] + fn default() -> Key33 { + Key33(0) + } +} +#[doc = "Bits 79:64 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key34(pub u32); +impl Key34 { + #[inline(always)] + pub const fn key3_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key34 { + #[inline(always)] + fn default() -> Key34 { + Key34(0) + } +} +#[doc = "Bits 95:80 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key35(pub u32); +impl Key35 { + #[inline(always)] + pub const fn key3_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key35 { + #[inline(always)] + fn default() -> Key35 { + Key35(0) + } +} +#[doc = "Bits 111:96 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key36(pub u32); +impl Key36 { + #[inline(always)] + pub const fn key3_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key36 { + #[inline(always)] + fn default() -> Key36 { + Key36(0) + } +} +#[doc = "Bits 127:112 of OTP access key 3 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key37(pub u32); +impl Key37 { + #[inline(always)] + pub const fn key3_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key3_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key37 { + #[inline(always)] + fn default() -> Key37 { + Key37(0) + } +} +#[doc = "Valid flag for key 3. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key3valid(pub u32); +impl Key3valid { + #[inline(always)] + pub const fn valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r1(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r2(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for Key3valid { + #[inline(always)] + fn default() -> Key3valid { + Key3valid(0) + } +} +#[doc = "Bits 15:0 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key40(pub u32); +impl Key40 { + #[inline(always)] + pub const fn key4_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key40 { + #[inline(always)] + fn default() -> Key40 { + Key40(0) + } +} +#[doc = "Bits 31:16 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key41(pub u32); +impl Key41 { + #[inline(always)] + pub const fn key4_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key41 { + #[inline(always)] + fn default() -> Key41 { + Key41(0) + } +} +#[doc = "Bits 47:32 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key42(pub u32); +impl Key42 { + #[inline(always)] + pub const fn key4_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key42 { + #[inline(always)] + fn default() -> Key42 { + Key42(0) + } +} +#[doc = "Bits 63:48 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key43(pub u32); +impl Key43 { + #[inline(always)] + pub const fn key4_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key43 { + #[inline(always)] + fn default() -> Key43 { + Key43(0) + } +} +#[doc = "Bits 79:64 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key44(pub u32); +impl Key44 { + #[inline(always)] + pub const fn key4_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key44 { + #[inline(always)] + fn default() -> Key44 { + Key44(0) + } +} +#[doc = "Bits 95:80 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key45(pub u32); +impl Key45 { + #[inline(always)] + pub const fn key4_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key45 { + #[inline(always)] + fn default() -> Key45 { + Key45(0) + } +} +#[doc = "Bits 111:96 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key46(pub u32); +impl Key46 { + #[inline(always)] + pub const fn key4_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key46 { + #[inline(always)] + fn default() -> Key46 { + Key46(0) + } +} +#[doc = "Bits 127:112 of OTP access key 4 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key47(pub u32); +impl Key47 { + #[inline(always)] + pub const fn key4_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key4_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key47 { + #[inline(always)] + fn default() -> Key47 { + Key47(0) + } +} +#[doc = "Valid flag for key 4. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key4valid(pub u32); +impl Key4valid { + #[inline(always)] + pub const fn valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r1(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r2(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for Key4valid { + #[inline(always)] + fn default() -> Key4valid { + Key4valid(0) + } +} +#[doc = "Bits 15:0 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key50(pub u32); +impl Key50 { + #[inline(always)] + pub const fn key5_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key50 { + #[inline(always)] + fn default() -> Key50 { + Key50(0) + } +} +#[doc = "Bits 31:16 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key51(pub u32); +impl Key51 { + #[inline(always)] + pub const fn key5_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key51 { + #[inline(always)] + fn default() -> Key51 { + Key51(0) + } +} +#[doc = "Bits 47:32 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key52(pub u32); +impl Key52 { + #[inline(always)] + pub const fn key5_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key52 { + #[inline(always)] + fn default() -> Key52 { + Key52(0) + } +} +#[doc = "Bits 63:48 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key53(pub u32); +impl Key53 { + #[inline(always)] + pub const fn key5_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key53 { + #[inline(always)] + fn default() -> Key53 { + Key53(0) + } +} +#[doc = "Bits 79:64 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key54(pub u32); +impl Key54 { + #[inline(always)] + pub const fn key5_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key54 { + #[inline(always)] + fn default() -> Key54 { + Key54(0) + } +} +#[doc = "Bits 95:80 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key55(pub u32); +impl Key55 { + #[inline(always)] + pub const fn key5_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key55 { + #[inline(always)] + fn default() -> Key55 { + Key55(0) + } +} +#[doc = "Bits 111:96 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key56(pub u32); +impl Key56 { + #[inline(always)] + pub const fn key5_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key56 { + #[inline(always)] + fn default() -> Key56 { + Key56(0) + } +} +#[doc = "Bits 127:112 of OTP access key 5 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key57(pub u32); +impl Key57 { + #[inline(always)] + pub const fn key5_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key5_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key57 { + #[inline(always)] + fn default() -> Key57 { + Key57(0) + } +} +#[doc = "Valid flag for key 5. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key5valid(pub u32); +impl Key5valid { + #[inline(always)] + pub const fn valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r1(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r2(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for Key5valid { + #[inline(always)] + fn default() -> Key5valid { + Key5valid(0) + } +} +#[doc = "Bits 15:0 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key60(pub u32); +impl Key60 { + #[inline(always)] + pub const fn key6_0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key60 { + #[inline(always)] + fn default() -> Key60 { + Key60(0) + } +} +#[doc = "Bits 31:16 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key61(pub u32); +impl Key61 { + #[inline(always)] + pub const fn key6_1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key61 { + #[inline(always)] + fn default() -> Key61 { + Key61(0) + } +} +#[doc = "Bits 47:32 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key62(pub u32); +impl Key62 { + #[inline(always)] + pub const fn key6_2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key62 { + #[inline(always)] + fn default() -> Key62 { + Key62(0) + } +} +#[doc = "Bits 63:48 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key63(pub u32); +impl Key63 { + #[inline(always)] + pub const fn key6_3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key63 { + #[inline(always)] + fn default() -> Key63 { + Key63(0) + } +} +#[doc = "Bits 79:64 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key64(pub u32); +impl Key64 { + #[inline(always)] + pub const fn key6_4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key64 { + #[inline(always)] + fn default() -> Key64 { + Key64(0) + } +} +#[doc = "Bits 95:80 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key65(pub u32); +impl Key65 { + #[inline(always)] + pub const fn key6_5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key65 { + #[inline(always)] + fn default() -> Key65 { + Key65(0) + } +} +#[doc = "Bits 111:96 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key66(pub u32); +impl Key66 { + #[inline(always)] + pub const fn key6_6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key66 { + #[inline(always)] + fn default() -> Key66 { + Key66(0) + } +} +#[doc = "Bits 127:112 of OTP access key 6 (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key67(pub u32); +impl Key67 { + #[inline(always)] + pub const fn key6_7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_key6_7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Key67 { + #[inline(always)] + fn default() -> Key67 { + Key67(0) + } +} +#[doc = "Valid flag for key 6. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Key6valid(pub u32); +impl Key6valid { + #[inline(always)] + pub const fn valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r1(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub const fn valid_r2(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Redundant copy of VALID, with 3-way majority vote"] + #[inline(always)] + pub fn set_valid_r2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } +} +impl Default for Key6valid { + #[inline(always)] + fn default() -> Key6valid { + Key6valid(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct LposcCalib(pub u32); +impl LposcCalib { + #[inline(always)] + pub const fn lposc_calib(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_lposc_calib(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for LposcCalib { + #[inline(always)] + fn default() -> LposcCalib { + LposcCalib(0) + } +} +#[doc = "The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct NumGpios(pub u32); +impl NumGpios { + #[inline(always)] + pub const fn num_gpios(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_num_gpios(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for NumGpios { + #[inline(always)] + fn default() -> NumGpios { + NumGpios(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootDst0(pub u32); +impl OtpbootDst0 { + #[inline(always)] + pub const fn otpboot_dst0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_otpboot_dst0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for OtpbootDst0 { + #[inline(always)] + fn default() -> OtpbootDst0 { + OtpbootDst0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootDst1(pub u32); +impl OtpbootDst1 { + #[inline(always)] + pub const fn otpboot_dst1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_otpboot_dst1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for OtpbootDst1 { + #[inline(always)] + fn default() -> OtpbootDst1 { + OtpbootDst1(0) + } +} +#[doc = "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)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootLen(pub u32); +impl OtpbootLen { + #[inline(always)] + pub const fn otpboot_len(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_otpboot_len(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for OtpbootLen { + #[inline(always)] + fn default() -> OtpbootLen { + OtpbootLen(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct OtpbootSrc(pub u32); +impl OtpbootSrc { + #[inline(always)] + pub const fn otpboot_src(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_otpboot_src(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for OtpbootSrc { + #[inline(always)] + fn default() -> OtpbootSrc { + OtpbootSrc(0) + } +} +#[doc = "Lock configuration LSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page0lock0(pub u32); +impl Page0lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page0lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page0lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page0lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page0lock0 { + #[inline(always)] + fn default() -> Page0lock0 { + Page0lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page0lock1(pub u32); +impl Page0lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page0lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page0lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page0lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page0lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page0lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page0lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page0lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page0lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page0lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page0lock1 { + #[inline(always)] + fn default() -> Page0lock1 { + Page0lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 10 (rows 0x280 through 0x2bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page10lock0(pub u32); +impl Page10lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page10lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page10lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page10lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page10lock0 { + #[inline(always)] + fn default() -> Page10lock0 { + Page10lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 10 (rows 0x280 through 0x2bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page10lock1(pub u32); +impl Page10lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page10lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page10lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page10lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page10lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page10lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page10lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page10lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page10lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page10lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page10lock1 { + #[inline(always)] + fn default() -> Page10lock1 { + Page10lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 11 (rows 0x2c0 through 0x2ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page11lock0(pub u32); +impl Page11lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page11lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page11lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page11lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page11lock0 { + #[inline(always)] + fn default() -> Page11lock0 { + Page11lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 11 (rows 0x2c0 through 0x2ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page11lock1(pub u32); +impl Page11lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page11lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page11lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page11lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page11lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page11lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page11lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page11lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page11lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page11lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page11lock1 { + #[inline(always)] + fn default() -> Page11lock1 { + Page11lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 12 (rows 0x300 through 0x33f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page12lock0(pub u32); +impl Page12lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page12lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page12lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page12lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page12lock0 { + #[inline(always)] + fn default() -> Page12lock0 { + Page12lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 12 (rows 0x300 through 0x33f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page12lock1(pub u32); +impl Page12lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page12lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page12lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page12lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page12lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page12lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page12lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page12lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page12lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page12lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page12lock1 { + #[inline(always)] + fn default() -> Page12lock1 { + Page12lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 13 (rows 0x340 through 0x37f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page13lock0(pub u32); +impl Page13lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page13lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page13lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page13lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page13lock0 { + #[inline(always)] + fn default() -> Page13lock0 { + Page13lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 13 (rows 0x340 through 0x37f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page13lock1(pub u32); +impl Page13lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page13lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page13lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page13lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page13lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page13lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page13lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page13lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page13lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page13lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page13lock1 { + #[inline(always)] + fn default() -> Page13lock1 { + Page13lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 14 (rows 0x380 through 0x3bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page14lock0(pub u32); +impl Page14lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page14lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page14lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page14lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page14lock0 { + #[inline(always)] + fn default() -> Page14lock0 { + Page14lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 14 (rows 0x380 through 0x3bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page14lock1(pub u32); +impl Page14lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page14lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page14lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page14lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page14lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page14lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page14lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page14lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page14lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page14lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page14lock1 { + #[inline(always)] + fn default() -> Page14lock1 { + Page14lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 15 (rows 0x3c0 through 0x3ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page15lock0(pub u32); +impl Page15lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page15lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page15lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page15lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page15lock0 { + #[inline(always)] + fn default() -> Page15lock0 { + Page15lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 15 (rows 0x3c0 through 0x3ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page15lock1(pub u32); +impl Page15lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page15lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page15lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page15lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page15lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page15lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page15lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page15lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page15lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page15lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page15lock1 { + #[inline(always)] + fn default() -> Page15lock1 { + Page15lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 16 (rows 0x400 through 0x43f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page16lock0(pub u32); +impl Page16lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page16lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page16lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page16lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page16lock0 { + #[inline(always)] + fn default() -> Page16lock0 { + Page16lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 16 (rows 0x400 through 0x43f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page16lock1(pub u32); +impl Page16lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page16lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page16lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page16lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page16lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page16lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page16lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page16lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page16lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page16lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page16lock1 { + #[inline(always)] + fn default() -> Page16lock1 { + Page16lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 17 (rows 0x440 through 0x47f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page17lock0(pub u32); +impl Page17lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page17lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page17lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page17lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page17lock0 { + #[inline(always)] + fn default() -> Page17lock0 { + Page17lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 17 (rows 0x440 through 0x47f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page17lock1(pub u32); +impl Page17lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page17lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page17lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page17lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page17lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page17lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page17lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page17lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page17lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page17lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page17lock1 { + #[inline(always)] + fn default() -> Page17lock1 { + Page17lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 18 (rows 0x480 through 0x4bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page18lock0(pub u32); +impl Page18lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page18lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page18lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page18lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page18lock0 { + #[inline(always)] + fn default() -> Page18lock0 { + Page18lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 18 (rows 0x480 through 0x4bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page18lock1(pub u32); +impl Page18lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page18lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page18lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page18lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page18lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page18lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page18lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page18lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page18lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page18lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page18lock1 { + #[inline(always)] + fn default() -> Page18lock1 { + Page18lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 19 (rows 0x4c0 through 0x4ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page19lock0(pub u32); +impl Page19lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page19lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page19lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page19lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page19lock0 { + #[inline(always)] + fn default() -> Page19lock0 { + Page19lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 19 (rows 0x4c0 through 0x4ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page19lock1(pub u32); +impl Page19lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page19lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page19lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page19lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page19lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page19lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page19lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page19lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page19lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page19lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page19lock1 { + #[inline(always)] + fn default() -> Page19lock1 { + Page19lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 1 (rows 0x40 through 0x7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page1lock0(pub u32); +impl Page1lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page1lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page1lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page1lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page1lock0 { + #[inline(always)] + fn default() -> Page1lock0 { + Page1lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 1 (rows 0x40 through 0x7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page1lock1(pub u32); +impl Page1lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page1lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page1lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page1lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page1lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page1lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page1lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page1lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page1lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page1lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page1lock1 { + #[inline(always)] + fn default() -> Page1lock1 { + Page1lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 20 (rows 0x500 through 0x53f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page20lock0(pub u32); +impl Page20lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page20lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page20lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page20lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page20lock0 { + #[inline(always)] + fn default() -> Page20lock0 { + Page20lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 20 (rows 0x500 through 0x53f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page20lock1(pub u32); +impl Page20lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page20lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page20lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page20lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page20lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page20lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page20lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page20lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page20lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page20lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page20lock1 { + #[inline(always)] + fn default() -> Page20lock1 { + Page20lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 21 (rows 0x540 through 0x57f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page21lock0(pub u32); +impl Page21lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page21lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page21lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page21lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page21lock0 { + #[inline(always)] + fn default() -> Page21lock0 { + Page21lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 21 (rows 0x540 through 0x57f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page21lock1(pub u32); +impl Page21lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page21lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page21lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page21lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page21lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page21lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page21lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page21lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page21lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page21lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page21lock1 { + #[inline(always)] + fn default() -> Page21lock1 { + Page21lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 22 (rows 0x580 through 0x5bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page22lock0(pub u32); +impl Page22lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page22lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page22lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page22lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page22lock0 { + #[inline(always)] + fn default() -> Page22lock0 { + Page22lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 22 (rows 0x580 through 0x5bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page22lock1(pub u32); +impl Page22lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page22lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page22lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page22lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page22lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page22lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page22lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page22lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page22lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page22lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page22lock1 { + #[inline(always)] + fn default() -> Page22lock1 { + Page22lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 23 (rows 0x5c0 through 0x5ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page23lock0(pub u32); +impl Page23lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page23lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page23lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page23lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page23lock0 { + #[inline(always)] + fn default() -> Page23lock0 { + Page23lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 23 (rows 0x5c0 through 0x5ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page23lock1(pub u32); +impl Page23lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page23lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page23lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page23lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page23lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page23lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page23lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page23lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page23lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page23lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page23lock1 { + #[inline(always)] + fn default() -> Page23lock1 { + Page23lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 24 (rows 0x600 through 0x63f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page24lock0(pub u32); +impl Page24lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page24lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page24lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page24lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page24lock0 { + #[inline(always)] + fn default() -> Page24lock0 { + Page24lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 24 (rows 0x600 through 0x63f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page24lock1(pub u32); +impl Page24lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page24lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page24lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page24lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page24lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page24lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page24lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page24lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page24lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page24lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page24lock1 { + #[inline(always)] + fn default() -> Page24lock1 { + Page24lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 25 (rows 0x640 through 0x67f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page25lock0(pub u32); +impl Page25lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page25lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page25lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page25lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page25lock0 { + #[inline(always)] + fn default() -> Page25lock0 { + Page25lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 25 (rows 0x640 through 0x67f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page25lock1(pub u32); +impl Page25lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page25lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page25lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page25lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page25lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page25lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page25lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page25lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page25lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page25lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page25lock1 { + #[inline(always)] + fn default() -> Page25lock1 { + Page25lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 26 (rows 0x680 through 0x6bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page26lock0(pub u32); +impl Page26lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page26lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page26lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page26lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page26lock0 { + #[inline(always)] + fn default() -> Page26lock0 { + Page26lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 26 (rows 0x680 through 0x6bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page26lock1(pub u32); +impl Page26lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page26lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page26lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page26lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page26lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page26lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page26lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page26lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page26lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page26lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page26lock1 { + #[inline(always)] + fn default() -> Page26lock1 { + Page26lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 27 (rows 0x6c0 through 0x6ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page27lock0(pub u32); +impl Page27lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page27lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page27lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page27lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page27lock0 { + #[inline(always)] + fn default() -> Page27lock0 { + Page27lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 27 (rows 0x6c0 through 0x6ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page27lock1(pub u32); +impl Page27lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page27lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page27lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page27lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page27lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page27lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page27lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page27lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page27lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page27lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page27lock1 { + #[inline(always)] + fn default() -> Page27lock1 { + Page27lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 28 (rows 0x700 through 0x73f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page28lock0(pub u32); +impl Page28lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page28lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page28lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page28lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page28lock0 { + #[inline(always)] + fn default() -> Page28lock0 { + Page28lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 28 (rows 0x700 through 0x73f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page28lock1(pub u32); +impl Page28lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page28lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page28lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page28lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page28lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page28lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page28lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page28lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page28lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page28lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page28lock1 { + #[inline(always)] + fn default() -> Page28lock1 { + Page28lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 29 (rows 0x740 through 0x77f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page29lock0(pub u32); +impl Page29lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page29lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page29lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page29lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page29lock0 { + #[inline(always)] + fn default() -> Page29lock0 { + Page29lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 29 (rows 0x740 through 0x77f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page29lock1(pub u32); +impl Page29lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page29lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page29lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page29lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page29lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page29lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page29lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page29lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page29lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page29lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page29lock1 { + #[inline(always)] + fn default() -> Page29lock1 { + Page29lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 2 (rows 0x80 through 0xbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page2lock0(pub u32); +impl Page2lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page2lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page2lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page2lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page2lock0 { + #[inline(always)] + fn default() -> Page2lock0 { + Page2lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 2 (rows 0x80 through 0xbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page2lock1(pub u32); +impl Page2lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page2lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page2lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page2lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page2lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page2lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page2lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page2lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page2lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page2lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page2lock1 { + #[inline(always)] + fn default() -> Page2lock1 { + Page2lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 30 (rows 0x780 through 0x7bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page30lock0(pub u32); +impl Page30lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page30lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page30lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page30lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page30lock0 { + #[inline(always)] + fn default() -> Page30lock0 { + Page30lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 30 (rows 0x780 through 0x7bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page30lock1(pub u32); +impl Page30lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page30lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page30lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page30lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page30lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page30lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page30lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page30lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page30lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page30lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page30lock1 { + #[inline(always)] + fn default() -> Page30lock1 { + Page30lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 31 (rows 0x7c0 through 0x7ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page31lock0(pub u32); +impl Page31lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page31lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page31lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page31lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page31lock0 { + #[inline(always)] + fn default() -> Page31lock0 { + Page31lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 31 (rows 0x7c0 through 0x7ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page31lock1(pub u32); +impl Page31lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page31lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page31lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page31lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page31lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page31lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page31lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page31lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page31lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page31lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page31lock1 { + #[inline(always)] + fn default() -> Page31lock1 { + Page31lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 32 (rows 0x800 through 0x83f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page32lock0(pub u32); +impl Page32lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page32lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page32lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page32lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page32lock0 { + #[inline(always)] + fn default() -> Page32lock0 { + Page32lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 32 (rows 0x800 through 0x83f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page32lock1(pub u32); +impl Page32lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page32lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page32lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page32lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page32lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page32lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page32lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page32lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page32lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page32lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page32lock1 { + #[inline(always)] + fn default() -> Page32lock1 { + Page32lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 33 (rows 0x840 through 0x87f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page33lock0(pub u32); +impl Page33lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page33lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page33lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page33lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page33lock0 { + #[inline(always)] + fn default() -> Page33lock0 { + Page33lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 33 (rows 0x840 through 0x87f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page33lock1(pub u32); +impl Page33lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page33lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page33lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page33lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page33lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page33lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page33lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page33lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page33lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page33lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page33lock1 { + #[inline(always)] + fn default() -> Page33lock1 { + Page33lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 34 (rows 0x880 through 0x8bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page34lock0(pub u32); +impl Page34lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page34lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page34lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page34lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page34lock0 { + #[inline(always)] + fn default() -> Page34lock0 { + Page34lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 34 (rows 0x880 through 0x8bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page34lock1(pub u32); +impl Page34lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page34lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page34lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page34lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page34lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page34lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page34lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page34lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page34lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page34lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page34lock1 { + #[inline(always)] + fn default() -> Page34lock1 { + Page34lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 35 (rows 0x8c0 through 0x8ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page35lock0(pub u32); +impl Page35lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page35lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page35lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page35lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page35lock0 { + #[inline(always)] + fn default() -> Page35lock0 { + Page35lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 35 (rows 0x8c0 through 0x8ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page35lock1(pub u32); +impl Page35lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page35lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page35lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page35lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page35lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page35lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page35lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page35lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page35lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page35lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page35lock1 { + #[inline(always)] + fn default() -> Page35lock1 { + Page35lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 36 (rows 0x900 through 0x93f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page36lock0(pub u32); +impl Page36lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page36lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page36lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page36lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page36lock0 { + #[inline(always)] + fn default() -> Page36lock0 { + Page36lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 36 (rows 0x900 through 0x93f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page36lock1(pub u32); +impl Page36lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page36lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page36lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page36lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page36lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page36lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page36lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page36lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page36lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page36lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page36lock1 { + #[inline(always)] + fn default() -> Page36lock1 { + Page36lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 37 (rows 0x940 through 0x97f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page37lock0(pub u32); +impl Page37lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page37lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page37lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page37lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page37lock0 { + #[inline(always)] + fn default() -> Page37lock0 { + Page37lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 37 (rows 0x940 through 0x97f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page37lock1(pub u32); +impl Page37lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page37lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page37lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page37lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page37lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page37lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page37lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page37lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page37lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page37lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page37lock1 { + #[inline(always)] + fn default() -> Page37lock1 { + Page37lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 38 (rows 0x980 through 0x9bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page38lock0(pub u32); +impl Page38lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page38lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page38lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page38lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page38lock0 { + #[inline(always)] + fn default() -> Page38lock0 { + Page38lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 38 (rows 0x980 through 0x9bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page38lock1(pub u32); +impl Page38lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page38lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page38lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page38lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page38lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page38lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page38lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page38lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page38lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page38lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page38lock1 { + #[inline(always)] + fn default() -> Page38lock1 { + Page38lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 39 (rows 0x9c0 through 0x9ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page39lock0(pub u32); +impl Page39lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page39lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page39lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page39lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page39lock0 { + #[inline(always)] + fn default() -> Page39lock0 { + Page39lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 39 (rows 0x9c0 through 0x9ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page39lock1(pub u32); +impl Page39lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page39lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page39lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page39lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page39lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page39lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page39lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page39lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page39lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page39lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page39lock1 { + #[inline(always)] + fn default() -> Page39lock1 { + Page39lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 3 (rows 0xc0 through 0xff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page3lock0(pub u32); +impl Page3lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page3lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page3lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page3lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page3lock0 { + #[inline(always)] + fn default() -> Page3lock0 { + Page3lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 3 (rows 0xc0 through 0xff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page3lock1(pub u32); +impl Page3lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page3lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page3lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page3lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page3lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page3lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page3lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page3lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page3lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page3lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page3lock1 { + #[inline(always)] + fn default() -> Page3lock1 { + Page3lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 40 (rows 0xa00 through 0xa3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page40lock0(pub u32); +impl Page40lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page40lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page40lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page40lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page40lock0 { + #[inline(always)] + fn default() -> Page40lock0 { + Page40lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 40 (rows 0xa00 through 0xa3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page40lock1(pub u32); +impl Page40lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page40lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page40lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page40lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page40lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page40lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page40lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page40lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page40lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page40lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page40lock1 { + #[inline(always)] + fn default() -> Page40lock1 { + Page40lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 41 (rows 0xa40 through 0xa7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page41lock0(pub u32); +impl Page41lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page41lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page41lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page41lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page41lock0 { + #[inline(always)] + fn default() -> Page41lock0 { + Page41lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 41 (rows 0xa40 through 0xa7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page41lock1(pub u32); +impl Page41lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page41lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page41lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page41lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page41lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page41lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page41lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page41lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page41lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page41lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page41lock1 { + #[inline(always)] + fn default() -> Page41lock1 { + Page41lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 42 (rows 0xa80 through 0xabf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page42lock0(pub u32); +impl Page42lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page42lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page42lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page42lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page42lock0 { + #[inline(always)] + fn default() -> Page42lock0 { + Page42lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 42 (rows 0xa80 through 0xabf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page42lock1(pub u32); +impl Page42lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page42lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page42lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page42lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page42lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page42lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page42lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page42lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page42lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page42lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page42lock1 { + #[inline(always)] + fn default() -> Page42lock1 { + Page42lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 43 (rows 0xac0 through 0xaff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page43lock0(pub u32); +impl Page43lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page43lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page43lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page43lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page43lock0 { + #[inline(always)] + fn default() -> Page43lock0 { + Page43lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 43 (rows 0xac0 through 0xaff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page43lock1(pub u32); +impl Page43lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page43lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page43lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page43lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page43lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page43lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page43lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page43lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page43lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page43lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page43lock1 { + #[inline(always)] + fn default() -> Page43lock1 { + Page43lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 44 (rows 0xb00 through 0xb3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page44lock0(pub u32); +impl Page44lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page44lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page44lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page44lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page44lock0 { + #[inline(always)] + fn default() -> Page44lock0 { + Page44lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 44 (rows 0xb00 through 0xb3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page44lock1(pub u32); +impl Page44lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page44lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page44lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page44lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page44lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page44lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page44lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page44lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page44lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page44lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page44lock1 { + #[inline(always)] + fn default() -> Page44lock1 { + Page44lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 45 (rows 0xb40 through 0xb7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page45lock0(pub u32); +impl Page45lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page45lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page45lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page45lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page45lock0 { + #[inline(always)] + fn default() -> Page45lock0 { + Page45lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 45 (rows 0xb40 through 0xb7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page45lock1(pub u32); +impl Page45lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page45lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page45lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page45lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page45lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page45lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page45lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page45lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page45lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page45lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page45lock1 { + #[inline(always)] + fn default() -> Page45lock1 { + Page45lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 46 (rows 0xb80 through 0xbbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page46lock0(pub u32); +impl Page46lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page46lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page46lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page46lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page46lock0 { + #[inline(always)] + fn default() -> Page46lock0 { + Page46lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 46 (rows 0xb80 through 0xbbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page46lock1(pub u32); +impl Page46lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page46lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page46lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page46lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page46lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page46lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page46lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page46lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page46lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page46lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page46lock1 { + #[inline(always)] + fn default() -> Page46lock1 { + Page46lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 47 (rows 0xbc0 through 0xbff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page47lock0(pub u32); +impl Page47lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page47lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page47lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page47lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page47lock0 { + #[inline(always)] + fn default() -> Page47lock0 { + Page47lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 47 (rows 0xbc0 through 0xbff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page47lock1(pub u32); +impl Page47lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page47lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page47lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page47lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page47lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page47lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page47lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page47lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page47lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page47lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page47lock1 { + #[inline(always)] + fn default() -> Page47lock1 { + Page47lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 48 (rows 0xc00 through 0xc3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page48lock0(pub u32); +impl Page48lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page48lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page48lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page48lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page48lock0 { + #[inline(always)] + fn default() -> Page48lock0 { + Page48lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 48 (rows 0xc00 through 0xc3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page48lock1(pub u32); +impl Page48lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page48lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page48lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page48lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page48lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page48lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page48lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page48lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page48lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page48lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page48lock1 { + #[inline(always)] + fn default() -> Page48lock1 { + Page48lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 49 (rows 0xc40 through 0xc7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page49lock0(pub u32); +impl Page49lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page49lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page49lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page49lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page49lock0 { + #[inline(always)] + fn default() -> Page49lock0 { + Page49lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 49 (rows 0xc40 through 0xc7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page49lock1(pub u32); +impl Page49lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page49lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page49lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page49lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page49lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page49lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page49lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page49lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page49lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page49lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page49lock1 { + #[inline(always)] + fn default() -> Page49lock1 { + Page49lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 4 (rows 0x100 through 0x13f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page4lock0(pub u32); +impl Page4lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page4lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page4lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page4lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page4lock0 { + #[inline(always)] + fn default() -> Page4lock0 { + Page4lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 4 (rows 0x100 through 0x13f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page4lock1(pub u32); +impl Page4lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page4lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page4lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page4lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page4lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page4lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page4lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page4lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page4lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page4lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page4lock1 { + #[inline(always)] + fn default() -> Page4lock1 { + Page4lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 50 (rows 0xc80 through 0xcbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page50lock0(pub u32); +impl Page50lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page50lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page50lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page50lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page50lock0 { + #[inline(always)] + fn default() -> Page50lock0 { + Page50lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 50 (rows 0xc80 through 0xcbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page50lock1(pub u32); +impl Page50lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page50lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page50lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page50lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page50lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page50lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page50lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page50lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page50lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page50lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page50lock1 { + #[inline(always)] + fn default() -> Page50lock1 { + Page50lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 51 (rows 0xcc0 through 0xcff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page51lock0(pub u32); +impl Page51lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page51lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page51lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page51lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page51lock0 { + #[inline(always)] + fn default() -> Page51lock0 { + Page51lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 51 (rows 0xcc0 through 0xcff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page51lock1(pub u32); +impl Page51lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page51lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page51lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page51lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page51lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page51lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page51lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page51lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page51lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page51lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page51lock1 { + #[inline(always)] + fn default() -> Page51lock1 { + Page51lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 52 (rows 0xd00 through 0xd3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page52lock0(pub u32); +impl Page52lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page52lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page52lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page52lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page52lock0 { + #[inline(always)] + fn default() -> Page52lock0 { + Page52lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 52 (rows 0xd00 through 0xd3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page52lock1(pub u32); +impl Page52lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page52lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page52lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page52lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page52lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page52lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page52lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page52lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page52lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page52lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page52lock1 { + #[inline(always)] + fn default() -> Page52lock1 { + Page52lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 53 (rows 0xd40 through 0xd7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page53lock0(pub u32); +impl Page53lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page53lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page53lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page53lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page53lock0 { + #[inline(always)] + fn default() -> Page53lock0 { + Page53lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 53 (rows 0xd40 through 0xd7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page53lock1(pub u32); +impl Page53lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page53lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page53lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page53lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page53lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page53lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page53lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page53lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page53lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page53lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page53lock1 { + #[inline(always)] + fn default() -> Page53lock1 { + Page53lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 54 (rows 0xd80 through 0xdbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page54lock0(pub u32); +impl Page54lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page54lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page54lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page54lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page54lock0 { + #[inline(always)] + fn default() -> Page54lock0 { + Page54lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 54 (rows 0xd80 through 0xdbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page54lock1(pub u32); +impl Page54lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page54lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page54lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page54lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page54lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page54lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page54lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page54lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page54lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page54lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page54lock1 { + #[inline(always)] + fn default() -> Page54lock1 { + Page54lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 55 (rows 0xdc0 through 0xdff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page55lock0(pub u32); +impl Page55lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page55lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page55lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page55lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page55lock0 { + #[inline(always)] + fn default() -> Page55lock0 { + Page55lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 55 (rows 0xdc0 through 0xdff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page55lock1(pub u32); +impl Page55lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page55lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page55lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page55lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page55lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page55lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page55lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page55lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page55lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page55lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page55lock1 { + #[inline(always)] + fn default() -> Page55lock1 { + Page55lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 56 (rows 0xe00 through 0xe3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page56lock0(pub u32); +impl Page56lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page56lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page56lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page56lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page56lock0 { + #[inline(always)] + fn default() -> Page56lock0 { + Page56lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 56 (rows 0xe00 through 0xe3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page56lock1(pub u32); +impl Page56lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page56lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page56lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page56lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page56lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page56lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page56lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page56lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page56lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page56lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page56lock1 { + #[inline(always)] + fn default() -> Page56lock1 { + Page56lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 57 (rows 0xe40 through 0xe7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page57lock0(pub u32); +impl Page57lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page57lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page57lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page57lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page57lock0 { + #[inline(always)] + fn default() -> Page57lock0 { + Page57lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 57 (rows 0xe40 through 0xe7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page57lock1(pub u32); +impl Page57lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page57lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page57lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page57lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page57lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page57lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page57lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page57lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page57lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page57lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page57lock1 { + #[inline(always)] + fn default() -> Page57lock1 { + Page57lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 58 (rows 0xe80 through 0xebf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page58lock0(pub u32); +impl Page58lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page58lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page58lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page58lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page58lock0 { + #[inline(always)] + fn default() -> Page58lock0 { + Page58lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 58 (rows 0xe80 through 0xebf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page58lock1(pub u32); +impl Page58lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page58lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page58lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page58lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page58lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page58lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page58lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page58lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page58lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page58lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page58lock1 { + #[inline(always)] + fn default() -> Page58lock1 { + Page58lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 59 (rows 0xec0 through 0xeff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page59lock0(pub u32); +impl Page59lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page59lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page59lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page59lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page59lock0 { + #[inline(always)] + fn default() -> Page59lock0 { + Page59lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 59 (rows 0xec0 through 0xeff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page59lock1(pub u32); +impl Page59lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page59lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page59lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page59lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page59lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page59lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page59lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page59lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page59lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page59lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page59lock1 { + #[inline(always)] + fn default() -> Page59lock1 { + Page59lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 5 (rows 0x140 through 0x17f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page5lock0(pub u32); +impl Page5lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page5lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page5lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page5lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page5lock0 { + #[inline(always)] + fn default() -> Page5lock0 { + Page5lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 5 (rows 0x140 through 0x17f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page5lock1(pub u32); +impl Page5lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page5lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page5lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page5lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page5lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page5lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page5lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page5lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page5lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page5lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page5lock1 { + #[inline(always)] + fn default() -> Page5lock1 { + Page5lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 60 (rows 0xf00 through 0xf3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page60lock0(pub u32); +impl Page60lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page60lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page60lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page60lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page60lock0 { + #[inline(always)] + fn default() -> Page60lock0 { + Page60lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 60 (rows 0xf00 through 0xf3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page60lock1(pub u32); +impl Page60lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page60lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page60lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page60lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page60lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page60lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page60lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page60lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page60lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page60lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page60lock1 { + #[inline(always)] + fn default() -> Page60lock1 { + Page60lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 61 (rows 0xf40 through 0xf7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page61lock0(pub u32); +impl Page61lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page61lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page61lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page61lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page61lock0 { + #[inline(always)] + fn default() -> Page61lock0 { + Page61lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 61 (rows 0xf40 through 0xf7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page61lock1(pub u32); +impl Page61lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page61lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page61lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page61lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page61lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page61lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page61lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page61lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page61lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page61lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page61lock1 { + #[inline(always)] + fn default() -> Page61lock1 { + Page61lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 62 (rows 0xf80 through 0xfbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page62lock0(pub u32); +impl Page62lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page62lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page62lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page62lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page62lock0 { + #[inline(always)] + fn default() -> Page62lock0 { + Page62lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 62 (rows 0xf80 through 0xfbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page62lock1(pub u32); +impl Page62lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page62lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page62lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page62lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page62lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page62lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page62lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page62lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page62lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page62lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page62lock1 { + #[inline(always)] + fn default() -> Page62lock1 { + Page62lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page63lock0(pub u32); +impl Page63lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page63lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page63lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page63lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Decommission for RMA of a suspected faulty device. This re-enables the factory test JTAG interface, and makes pages 3 through 61 of the OTP permanently inaccessible."] + #[inline(always)] + pub const fn rma(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Decommission for RMA of a suspected faulty device. This re-enables the factory test JTAG interface, and makes pages 3 through 61 of the OTP permanently inaccessible."] + #[inline(always)] + pub fn set_rma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page63lock0 { + #[inline(always)] + fn default() -> Page63lock0 { + Page63lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page63lock1(pub u32); +impl Page63lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page63lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page63lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page63lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page63lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page63lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page63lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page63lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page63lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page63lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page63lock1 { + #[inline(always)] + fn default() -> Page63lock1 { + Page63lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 6 (rows 0x180 through 0x1bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page6lock0(pub u32); +impl Page6lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page6lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page6lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page6lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page6lock0 { + #[inline(always)] + fn default() -> Page6lock0 { + Page6lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 6 (rows 0x180 through 0x1bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page6lock1(pub u32); +impl Page6lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page6lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page6lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page6lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page6lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page6lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page6lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page6lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page6lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page6lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page6lock1 { + #[inline(always)] + fn default() -> Page6lock1 { + Page6lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 7 (rows 0x1c0 through 0x1ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page7lock0(pub u32); +impl Page7lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page7lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page7lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page7lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page7lock0 { + #[inline(always)] + fn default() -> Page7lock0 { + Page7lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 7 (rows 0x1c0 through 0x1ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page7lock1(pub u32); +impl Page7lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page7lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page7lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page7lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page7lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page7lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page7lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page7lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page7lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page7lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page7lock1 { + #[inline(always)] + fn default() -> Page7lock1 { + Page7lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 8 (rows 0x200 through 0x23f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page8lock0(pub u32); +impl Page8lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page8lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page8lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page8lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page8lock0 { + #[inline(always)] + fn default() -> Page8lock0 { + Page8lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 8 (rows 0x200 through 0x23f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page8lock1(pub u32); +impl Page8lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page8lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page8lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page8lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page8lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page8lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page8lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page8lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page8lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page8lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page8lock1 { + #[inline(always)] + fn default() -> Page8lock1 { + Page8lock1(0) + } +} +#[doc = "Lock configuration LSBs for page 9 (rows 0x240 through 0x27f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page9lock0(pub u32); +impl Page9lock0 { + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_w(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_w(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub const fn key_r(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required."] + #[inline(always)] + pub fn set_key_r(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub const fn no_key_state(&self) -> super::vals::Page9lock0noKeyState { + let val = (self.0 >> 6usize) & 0x01; + super::vals::Page9lock0noKeyState::from_bits(val as u8) + } + #[doc = "State when at least one key is registered for this page and no matching key has been entered."] + #[inline(always)] + pub fn set_no_key_state(&mut self, val: super::vals::Page9lock0noKeyState) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val.to_bits() as u32) & 0x01) << 6usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page9lock0 { + #[inline(always)] + fn default() -> Page9lock0 { + Page9lock0(0) + } +} +#[doc = "Lock configuration MSBs for page 9 (rows 0x240 through 0x27f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. This OTP location is always readable, and is write-protected by its own permissions."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Page9lock1(pub u32); +impl Page9lock1 { + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_s(&self) -> super::vals::Page9lock1lockS { + let val = (self.0 >> 0usize) & 0x03; + super::vals::Page9lock1lockS::from_bits(val as u8) + } + #[doc = "Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_s(&mut self, val: super::vals::Page9lock1lockS) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub const fn lock_ns(&self) -> super::vals::Page9lock1lockNs { + let val = (self.0 >> 2usize) & 0x03; + super::vals::Page9lock1lockNs::from_bits(val as u8) + } + #[doc = "Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API."] + #[inline(always)] + pub fn set_lock_ns(&mut self, val: super::vals::Page9lock1lockNs) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub const fn lock_bl(&self) -> super::vals::Page9lock1lockBl { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Page9lock1lockBl::from_bits(val as u8) + } + #[doc = "Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers."] + #[inline(always)] + pub fn set_lock_bl(&mut self, val: super::vals::Page9lock1lockBl) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub const fn r2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0xff; + val as u8 + } + #[doc = "Redundant copy of bits 7:0"] + #[inline(always)] + pub fn set_r2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 16usize)) | (((val as u32) & 0xff) << 16usize); + } +} +impl Default for Page9lock1 { + #[inline(always)] + fn default() -> Page9lock1 { + Page9lock1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid0(pub u32); +impl Randid0 { + #[inline(always)] + pub const fn randid0(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid0(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid0 { + #[inline(always)] + fn default() -> Randid0 { + Randid0(0) + } +} +#[doc = "Bits 31:16 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid1(pub u32); +impl Randid1 { + #[inline(always)] + pub const fn randid1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid1 { + #[inline(always)] + fn default() -> Randid1 { + Randid1(0) + } +} +#[doc = "Bits 47:32 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid2(pub u32); +impl Randid2 { + #[inline(always)] + pub const fn randid2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid2 { + #[inline(always)] + fn default() -> Randid2 { + Randid2(0) + } +} +#[doc = "Bits 63:48 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid3(pub u32); +impl Randid3 { + #[inline(always)] + pub const fn randid3(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid3(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid3 { + #[inline(always)] + fn default() -> Randid3 { + Randid3(0) + } +} +#[doc = "Bits 79:64 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid4(pub u32); +impl Randid4 { + #[inline(always)] + pub const fn randid4(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid4(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid4 { + #[inline(always)] + fn default() -> Randid4 { + Randid4(0) + } +} +#[doc = "Bits 95:80 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid5(pub u32); +impl Randid5 { + #[inline(always)] + pub const fn randid5(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid5(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid5 { + #[inline(always)] + fn default() -> Randid5 { + Randid5(0) + } +} +#[doc = "Bits 111:96 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid6(pub u32); +impl Randid6 { + #[inline(always)] + pub const fn randid6(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid6(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid6 { + #[inline(always)] + fn default() -> Randid6 { + Randid6(0) + } +} +#[doc = "Bits 127:112 of private per-device random number (ECC)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randid7(pub u32); +impl Randid7 { + #[inline(always)] + pub const fn randid7(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_randid7(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Randid7 { + #[inline(always)] + fn default() -> Randid7 { + Randid7(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RoscCalib(pub u32); +impl RoscCalib { + #[inline(always)] + pub const fn rosc_calib(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_rosc_calib(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for RoscCalib { + #[inline(always)] + fn default() -> RoscCalib { + RoscCalib(0) + } +} +#[doc = "USB boot specific feature flags (RBIT-3)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbBootFlags(pub u32); +impl UsbBootFlags { + #[doc = "valid flag for USB_DEVICE_VID_VALUE entry of the USB_WHITE_LABEL struct (index 0)"] + #[inline(always)] + pub const fn wl_usb_device_vid_value_valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_VID_VALUE entry of the USB_WHITE_LABEL struct (index 0)"] + #[inline(always)] + pub fn set_wl_usb_device_vid_value_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "valid flag for USB_DEVICE_PID_VALUE entry of the USB_WHITE_LABEL struct (index 1)"] + #[inline(always)] + pub const fn wl_usb_device_pid_value_valid(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_PID_VALUE entry of the USB_WHITE_LABEL struct (index 1)"] + #[inline(always)] + pub fn set_wl_usb_device_pid_value_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "valid flag for USB_DEVICE_BCD_DEVICEVALUE entry of the USB_WHITE_LABEL struct (index 2)"] + #[inline(always)] + pub const fn wl_usb_device_serial_number_value_valid(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_BCD_DEVICEVALUE entry of the USB_WHITE_LABEL struct (index 2)"] + #[inline(always)] + pub fn set_wl_usb_device_serial_number_value_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "valid flag for USB_DEVICE_LANG_ID_VALUE entry of the USB_WHITE_LABEL struct (index 3)"] + #[inline(always)] + pub const fn wl_usb_device_lang_id_value_valid(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_LANG_ID_VALUE entry of the USB_WHITE_LABEL struct (index 3)"] + #[inline(always)] + pub fn set_wl_usb_device_lang_id_value_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "valid flag for USB_DEVICE_MANUFACTURER_STRDEF entry of the USB_WHITE_LABEL struct (index 4)"] + #[inline(always)] + pub const fn wl_usb_device_manufacturer_strdef_valid(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_MANUFACTURER_STRDEF entry of the USB_WHITE_LABEL struct (index 4)"] + #[inline(always)] + pub fn set_wl_usb_device_manufacturer_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "valid flag for USB_DEVICE_PRODUCT_STRDEF entry of the USB_WHITE_LABEL struct (index 5)"] + #[inline(always)] + pub const fn wl_usb_device_product_strdef_valid(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_PRODUCT_STRDEF entry of the USB_WHITE_LABEL struct (index 5)"] + #[inline(always)] + pub fn set_wl_usb_device_product_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "valid flag for USB_DEVICE_SERIAL_NUMBER_STRDEF entry of the USB_WHITE_LABEL struct (index 6)"] + #[inline(always)] + pub const fn wl_usb_device_serial_number_strdef_valid(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_DEVICE_SERIAL_NUMBER_STRDEF entry of the USB_WHITE_LABEL struct (index 6)"] + #[inline(always)] + pub fn set_wl_usb_device_serial_number_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "valid flag for USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES entry of the USB_WHITE_LABEL struct (index 7)"] + #[inline(always)] + pub const fn wl_usb_config_attributes_max_power_values_valid(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "valid flag for USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES entry of the USB_WHITE_LABEL struct (index 7)"] + #[inline(always)] + pub fn set_wl_usb_config_attributes_max_power_values_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "valid flag for VOLUME_LABEL_STRDEF entry of the USB_WHITE_LABEL struct (index 8)"] + #[inline(always)] + pub const fn wl_volume_label_strdef_valid(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "valid flag for VOLUME_LABEL_STRDEF entry of the USB_WHITE_LABEL struct (index 8)"] + #[inline(always)] + pub fn set_wl_volume_label_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "valid flag for SCSI_INQUIRY_VENDOR_STRDEF entry of the USB_WHITE_LABEL struct (index 9)"] + #[inline(always)] + pub const fn wl_scsi_inquiry_vendor_strdef_valid(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "valid flag for SCSI_INQUIRY_VENDOR_STRDEF entry of the USB_WHITE_LABEL struct (index 9)"] + #[inline(always)] + pub fn set_wl_scsi_inquiry_vendor_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "valid flag for SCSI_INQUIRY_PRODUCT_STRDEF entry of the USB_WHITE_LABEL struct (index 10)"] + #[inline(always)] + pub const fn wl_scsi_inquiry_product_strdef_valid(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "valid flag for SCSI_INQUIRY_PRODUCT_STRDEF entry of the USB_WHITE_LABEL struct (index 10)"] + #[inline(always)] + pub fn set_wl_scsi_inquiry_product_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "valid flag for SCSI_INQUIRY_VERSION_STRDEF entry of the USB_WHITE_LABEL struct (index 11)"] + #[inline(always)] + pub const fn wl_scsi_inquiry_version_strdef_valid(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "valid flag for SCSI_INQUIRY_VERSION_STRDEF entry of the USB_WHITE_LABEL struct (index 11)"] + #[inline(always)] + pub fn set_wl_scsi_inquiry_version_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "valid flag for INDEX_HTM_REDIRECT_URL_STRDEF entry of the USB_WHITE_LABEL struct (index 12)"] + #[inline(always)] + pub const fn wl_index_htm_redirect_url_strdef_valid(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "valid flag for INDEX_HTM_REDIRECT_URL_STRDEF entry of the USB_WHITE_LABEL struct (index 12)"] + #[inline(always)] + pub fn set_wl_index_htm_redirect_url_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "valid flag for INDEX_HTM_REDIRECT_NAME_STRDEF entry of the USB_WHITE_LABEL struct (index 13)"] + #[inline(always)] + pub const fn wl_index_htm_redirect_name_strdef_valid(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "valid flag for INDEX_HTM_REDIRECT_NAME_STRDEF entry of the USB_WHITE_LABEL struct (index 13)"] + #[inline(always)] + pub fn set_wl_index_htm_redirect_name_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "valid flag for INFO_UF2_TXT_MODEL_STRDEF entry of the USB_WHITE_LABEL struct (index 14)"] + #[inline(always)] + pub const fn wl_info_uf2_txt_model_strdef_valid(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "valid flag for INFO_UF2_TXT_MODEL_STRDEF entry of the USB_WHITE_LABEL struct (index 14)"] + #[inline(always)] + pub fn set_wl_info_uf2_txt_model_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[doc = "valid flag for the USB_WHITE_LABEL_ADDR field"] + #[inline(always)] + pub const fn wl_info_uf2_txt_board_id_strdef_valid(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "valid flag for the USB_WHITE_LABEL_ADDR field"] + #[inline(always)] + pub fn set_wl_info_uf2_txt_board_id_strdef_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "valid flag for INFO_UF2_TXT_BOARD_ID_STRDEF entry of the USB_WHITE_LABEL struct (index 15)"] + #[inline(always)] + pub const fn white_label_addr_valid(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[doc = "valid flag for INFO_UF2_TXT_BOARD_ID_STRDEF entry of the USB_WHITE_LABEL struct (index 15)"] + #[inline(always)] + pub fn set_white_label_addr_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[doc = "Swap DM/DP during USB boot, to support board layouts with mirrored USB routing (deliberate or accidental)."] + #[inline(always)] + pub const fn dp_dm_swap(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "Swap DM/DP during USB boot, to support board layouts with mirrored USB routing (deliberate or accidental)."] + #[inline(always)] + pub fn set_dp_dm_swap(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } +} +impl Default for UsbBootFlags { + #[inline(always)] + fn default() -> UsbBootFlags { + UsbBootFlags(0) + } +} +#[doc = "Redundant copy of USB_BOOT_FLAGS"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbBootFlagsR1(pub u32); +impl UsbBootFlagsR1 { + #[inline(always)] + pub const fn usb_boot_flags_r1(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_usb_boot_flags_r1(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for UsbBootFlagsR1 { + #[inline(always)] + fn default() -> UsbBootFlagsR1 { + UsbBootFlagsR1(0) + } +} +#[doc = "Redundant copy of USB_BOOT_FLAGS"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbBootFlagsR2(pub u32); +impl UsbBootFlagsR2 { + #[inline(always)] + pub const fn usb_boot_flags_r2(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_usb_boot_flags_r2(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for UsbBootFlagsR2 { + #[inline(always)] + fn default() -> UsbBootFlagsR2 { + UsbBootFlagsR2(0) + } +} +#[doc = "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):"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbWhiteLabelAddr(pub u32); +impl UsbWhiteLabelAddr { + #[inline(always)] + pub const fn usb_white_label_addr(&self) -> super::vals::UsbWhiteLabelAddr { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + super::vals::UsbWhiteLabelAddr::from_bits(val as u32) + } + #[inline(always)] + pub fn set_usb_white_label_addr(&mut self, val: super::vals::UsbWhiteLabelAddr) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) + | (((val.to_bits() as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for UsbWhiteLabelAddr { + #[inline(always)] + fn default() -> UsbWhiteLabelAddr { + UsbWhiteLabelAddr(0) + } +} diff --git a/src/rp2350/otp_data_raw/vals.rs b/src/rp2350/otp_data_raw/vals.rs new file mode 100644 index 00000000..c6337e79 --- /dev/null +++ b/src/rp2350/otp_data_raw/vals.rs @@ -0,0 +1,8470 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Cs0size { + NONE = 0, + _8K = 0x01, + _16K = 0x02, + _32K = 0x03, + _64K = 0x04, + _128K = 0x05, + _256K = 0x06, + _512K = 0x07, + _1M = 0x08, + _2M = 0x09, + _4M = 0x0a, + _8M = 0x0b, + _16M = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, +} +impl Cs0size { + #[inline(always)] + pub const fn from_bits(val: u8) -> Cs0size { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Cs0size { + #[inline(always)] + fn from(val: u8) -> Cs0size { + Cs0size::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Cs0size) -> u8 { + Cs0size::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Cs1size(pub u16); +impl Cs1size { + pub const NONE: Self = Self(0); + pub const _8K: Self = Self(0x01); + pub const _16K: Self = Self(0x02); + pub const _32K: Self = Self(0x03); + pub const _64K: Self = Self(0x04); + pub const _128K: Self = Self(0x05); + pub const _256K: Self = Self(0x06); + pub const _512K: Self = Self(0x07); + pub const _1M: Self = Self(0x08); + pub const _2M: Self = Self(0x09); + pub const _4M: Self = Self(0x0a); + pub const _8M: Self = Self(0x0b); + pub const _16M: Self = Self(0x0c); +} +impl Cs1size { + pub const fn from_bits(val: u16) -> Cs1size { + Self(val & 0x0fff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Cs1size { + #[inline(always)] + fn from(val: u16) -> Cs1size { + Cs1size::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Cs1size) -> u16 { + Cs1size::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page0lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page0lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page0lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page0lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page0lock0noKeyState { + Page0lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page0lock0noKeyState) -> u8 { + Page0lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page0lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page0lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page0lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page0lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page0lock1lockBl { + Page0lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page0lock1lockBl) -> u8 { + Page0lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page0lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page0lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page0lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page0lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page0lock1lockNs { + Page0lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page0lock1lockNs) -> u8 { + Page0lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page0lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page0lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page0lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page0lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page0lock1lockS { + Page0lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page0lock1lockS) -> u8 { + Page0lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page10lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page10lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page10lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page10lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page10lock0noKeyState { + Page10lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page10lock0noKeyState) -> u8 { + Page10lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page10lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page10lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page10lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page10lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page10lock1lockBl { + Page10lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page10lock1lockBl) -> u8 { + Page10lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page10lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page10lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page10lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page10lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page10lock1lockNs { + Page10lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page10lock1lockNs) -> u8 { + Page10lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page10lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page10lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page10lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page10lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page10lock1lockS { + Page10lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page10lock1lockS) -> u8 { + Page10lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page11lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page11lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page11lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page11lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page11lock0noKeyState { + Page11lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page11lock0noKeyState) -> u8 { + Page11lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page11lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page11lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page11lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page11lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page11lock1lockBl { + Page11lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page11lock1lockBl) -> u8 { + Page11lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page11lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page11lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page11lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page11lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page11lock1lockNs { + Page11lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page11lock1lockNs) -> u8 { + Page11lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page11lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page11lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page11lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page11lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page11lock1lockS { + Page11lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page11lock1lockS) -> u8 { + Page11lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page12lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page12lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page12lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page12lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page12lock0noKeyState { + Page12lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page12lock0noKeyState) -> u8 { + Page12lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page12lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page12lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page12lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page12lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page12lock1lockBl { + Page12lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page12lock1lockBl) -> u8 { + Page12lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page12lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page12lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page12lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page12lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page12lock1lockNs { + Page12lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page12lock1lockNs) -> u8 { + Page12lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page12lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page12lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page12lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page12lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page12lock1lockS { + Page12lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page12lock1lockS) -> u8 { + Page12lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page13lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page13lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page13lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page13lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page13lock0noKeyState { + Page13lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page13lock0noKeyState) -> u8 { + Page13lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page13lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page13lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page13lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page13lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page13lock1lockBl { + Page13lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page13lock1lockBl) -> u8 { + Page13lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page13lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page13lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page13lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page13lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page13lock1lockNs { + Page13lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page13lock1lockNs) -> u8 { + Page13lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page13lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page13lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page13lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page13lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page13lock1lockS { + Page13lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page13lock1lockS) -> u8 { + Page13lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page14lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page14lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page14lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page14lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page14lock0noKeyState { + Page14lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page14lock0noKeyState) -> u8 { + Page14lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page14lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page14lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page14lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page14lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page14lock1lockBl { + Page14lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page14lock1lockBl) -> u8 { + Page14lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page14lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page14lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page14lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page14lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page14lock1lockNs { + Page14lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page14lock1lockNs) -> u8 { + Page14lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page14lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page14lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page14lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page14lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page14lock1lockS { + Page14lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page14lock1lockS) -> u8 { + Page14lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page15lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page15lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page15lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page15lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page15lock0noKeyState { + Page15lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page15lock0noKeyState) -> u8 { + Page15lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page15lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page15lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page15lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page15lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page15lock1lockBl { + Page15lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page15lock1lockBl) -> u8 { + Page15lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page15lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page15lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page15lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page15lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page15lock1lockNs { + Page15lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page15lock1lockNs) -> u8 { + Page15lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page15lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page15lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page15lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page15lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page15lock1lockS { + Page15lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page15lock1lockS) -> u8 { + Page15lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page16lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page16lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page16lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page16lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page16lock0noKeyState { + Page16lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page16lock0noKeyState) -> u8 { + Page16lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page16lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page16lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page16lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page16lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page16lock1lockBl { + Page16lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page16lock1lockBl) -> u8 { + Page16lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page16lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page16lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page16lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page16lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page16lock1lockNs { + Page16lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page16lock1lockNs) -> u8 { + Page16lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page16lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page16lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page16lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page16lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page16lock1lockS { + Page16lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page16lock1lockS) -> u8 { + Page16lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page17lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page17lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page17lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page17lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page17lock0noKeyState { + Page17lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page17lock0noKeyState) -> u8 { + Page17lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page17lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page17lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page17lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page17lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page17lock1lockBl { + Page17lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page17lock1lockBl) -> u8 { + Page17lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page17lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page17lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page17lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page17lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page17lock1lockNs { + Page17lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page17lock1lockNs) -> u8 { + Page17lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page17lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page17lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page17lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page17lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page17lock1lockS { + Page17lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page17lock1lockS) -> u8 { + Page17lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page18lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page18lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page18lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page18lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page18lock0noKeyState { + Page18lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page18lock0noKeyState) -> u8 { + Page18lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page18lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page18lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page18lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page18lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page18lock1lockBl { + Page18lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page18lock1lockBl) -> u8 { + Page18lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page18lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page18lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page18lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page18lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page18lock1lockNs { + Page18lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page18lock1lockNs) -> u8 { + Page18lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page18lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page18lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page18lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page18lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page18lock1lockS { + Page18lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page18lock1lockS) -> u8 { + Page18lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page19lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page19lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page19lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page19lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page19lock0noKeyState { + Page19lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page19lock0noKeyState) -> u8 { + Page19lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page19lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page19lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page19lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page19lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page19lock1lockBl { + Page19lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page19lock1lockBl) -> u8 { + Page19lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page19lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page19lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page19lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page19lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page19lock1lockNs { + Page19lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page19lock1lockNs) -> u8 { + Page19lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page19lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page19lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page19lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page19lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page19lock1lockS { + Page19lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page19lock1lockS) -> u8 { + Page19lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page1lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page1lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page1lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page1lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page1lock0noKeyState { + Page1lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page1lock0noKeyState) -> u8 { + Page1lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page1lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page1lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page1lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page1lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page1lock1lockBl { + Page1lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page1lock1lockBl) -> u8 { + Page1lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page1lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page1lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page1lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page1lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page1lock1lockNs { + Page1lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page1lock1lockNs) -> u8 { + Page1lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page1lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page1lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page1lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page1lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page1lock1lockS { + Page1lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page1lock1lockS) -> u8 { + Page1lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page20lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page20lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page20lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page20lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page20lock0noKeyState { + Page20lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page20lock0noKeyState) -> u8 { + Page20lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page20lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page20lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page20lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page20lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page20lock1lockBl { + Page20lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page20lock1lockBl) -> u8 { + Page20lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page20lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page20lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page20lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page20lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page20lock1lockNs { + Page20lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page20lock1lockNs) -> u8 { + Page20lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page20lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page20lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page20lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page20lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page20lock1lockS { + Page20lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page20lock1lockS) -> u8 { + Page20lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page21lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page21lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page21lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page21lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page21lock0noKeyState { + Page21lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page21lock0noKeyState) -> u8 { + Page21lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page21lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page21lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page21lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page21lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page21lock1lockBl { + Page21lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page21lock1lockBl) -> u8 { + Page21lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page21lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page21lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page21lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page21lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page21lock1lockNs { + Page21lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page21lock1lockNs) -> u8 { + Page21lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page21lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page21lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page21lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page21lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page21lock1lockS { + Page21lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page21lock1lockS) -> u8 { + Page21lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page22lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page22lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page22lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page22lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page22lock0noKeyState { + Page22lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page22lock0noKeyState) -> u8 { + Page22lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page22lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page22lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page22lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page22lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page22lock1lockBl { + Page22lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page22lock1lockBl) -> u8 { + Page22lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page22lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page22lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page22lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page22lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page22lock1lockNs { + Page22lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page22lock1lockNs) -> u8 { + Page22lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page22lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page22lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page22lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page22lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page22lock1lockS { + Page22lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page22lock1lockS) -> u8 { + Page22lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page23lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page23lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page23lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page23lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page23lock0noKeyState { + Page23lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page23lock0noKeyState) -> u8 { + Page23lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page23lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page23lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page23lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page23lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page23lock1lockBl { + Page23lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page23lock1lockBl) -> u8 { + Page23lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page23lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page23lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page23lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page23lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page23lock1lockNs { + Page23lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page23lock1lockNs) -> u8 { + Page23lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page23lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page23lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page23lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page23lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page23lock1lockS { + Page23lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page23lock1lockS) -> u8 { + Page23lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page24lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page24lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page24lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page24lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page24lock0noKeyState { + Page24lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page24lock0noKeyState) -> u8 { + Page24lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page24lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page24lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page24lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page24lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page24lock1lockBl { + Page24lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page24lock1lockBl) -> u8 { + Page24lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page24lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page24lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page24lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page24lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page24lock1lockNs { + Page24lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page24lock1lockNs) -> u8 { + Page24lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page24lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page24lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page24lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page24lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page24lock1lockS { + Page24lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page24lock1lockS) -> u8 { + Page24lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page25lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page25lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page25lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page25lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page25lock0noKeyState { + Page25lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page25lock0noKeyState) -> u8 { + Page25lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page25lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page25lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page25lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page25lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page25lock1lockBl { + Page25lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page25lock1lockBl) -> u8 { + Page25lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page25lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page25lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page25lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page25lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page25lock1lockNs { + Page25lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page25lock1lockNs) -> u8 { + Page25lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page25lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page25lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page25lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page25lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page25lock1lockS { + Page25lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page25lock1lockS) -> u8 { + Page25lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page26lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page26lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page26lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page26lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page26lock0noKeyState { + Page26lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page26lock0noKeyState) -> u8 { + Page26lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page26lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page26lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page26lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page26lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page26lock1lockBl { + Page26lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page26lock1lockBl) -> u8 { + Page26lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page26lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page26lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page26lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page26lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page26lock1lockNs { + Page26lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page26lock1lockNs) -> u8 { + Page26lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page26lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page26lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page26lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page26lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page26lock1lockS { + Page26lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page26lock1lockS) -> u8 { + Page26lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page27lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page27lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page27lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page27lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page27lock0noKeyState { + Page27lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page27lock0noKeyState) -> u8 { + Page27lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page27lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page27lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page27lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page27lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page27lock1lockBl { + Page27lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page27lock1lockBl) -> u8 { + Page27lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page27lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page27lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page27lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page27lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page27lock1lockNs { + Page27lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page27lock1lockNs) -> u8 { + Page27lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page27lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page27lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page27lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page27lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page27lock1lockS { + Page27lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page27lock1lockS) -> u8 { + Page27lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page28lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page28lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page28lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page28lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page28lock0noKeyState { + Page28lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page28lock0noKeyState) -> u8 { + Page28lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page28lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page28lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page28lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page28lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page28lock1lockBl { + Page28lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page28lock1lockBl) -> u8 { + Page28lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page28lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page28lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page28lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page28lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page28lock1lockNs { + Page28lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page28lock1lockNs) -> u8 { + Page28lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page28lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page28lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page28lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page28lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page28lock1lockS { + Page28lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page28lock1lockS) -> u8 { + Page28lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page29lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page29lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page29lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page29lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page29lock0noKeyState { + Page29lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page29lock0noKeyState) -> u8 { + Page29lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page29lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page29lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page29lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page29lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page29lock1lockBl { + Page29lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page29lock1lockBl) -> u8 { + Page29lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page29lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page29lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page29lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page29lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page29lock1lockNs { + Page29lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page29lock1lockNs) -> u8 { + Page29lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page29lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page29lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page29lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page29lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page29lock1lockS { + Page29lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page29lock1lockS) -> u8 { + Page29lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page2lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page2lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page2lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page2lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page2lock0noKeyState { + Page2lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page2lock0noKeyState) -> u8 { + Page2lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page2lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page2lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page2lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page2lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page2lock1lockBl { + Page2lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page2lock1lockBl) -> u8 { + Page2lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page2lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page2lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page2lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page2lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page2lock1lockNs { + Page2lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page2lock1lockNs) -> u8 { + Page2lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page2lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page2lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page2lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page2lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page2lock1lockS { + Page2lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page2lock1lockS) -> u8 { + Page2lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page30lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page30lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page30lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page30lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page30lock0noKeyState { + Page30lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page30lock0noKeyState) -> u8 { + Page30lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page30lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page30lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page30lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page30lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page30lock1lockBl { + Page30lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page30lock1lockBl) -> u8 { + Page30lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page30lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page30lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page30lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page30lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page30lock1lockNs { + Page30lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page30lock1lockNs) -> u8 { + Page30lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page30lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page30lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page30lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page30lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page30lock1lockS { + Page30lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page30lock1lockS) -> u8 { + Page30lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page31lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page31lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page31lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page31lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page31lock0noKeyState { + Page31lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page31lock0noKeyState) -> u8 { + Page31lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page31lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page31lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page31lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page31lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page31lock1lockBl { + Page31lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page31lock1lockBl) -> u8 { + Page31lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page31lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page31lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page31lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page31lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page31lock1lockNs { + Page31lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page31lock1lockNs) -> u8 { + Page31lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page31lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page31lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page31lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page31lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page31lock1lockS { + Page31lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page31lock1lockS) -> u8 { + Page31lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page32lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page32lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page32lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page32lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page32lock0noKeyState { + Page32lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page32lock0noKeyState) -> u8 { + Page32lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page32lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page32lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page32lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page32lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page32lock1lockBl { + Page32lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page32lock1lockBl) -> u8 { + Page32lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page32lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page32lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page32lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page32lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page32lock1lockNs { + Page32lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page32lock1lockNs) -> u8 { + Page32lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page32lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page32lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page32lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page32lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page32lock1lockS { + Page32lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page32lock1lockS) -> u8 { + Page32lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page33lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page33lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page33lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page33lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page33lock0noKeyState { + Page33lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page33lock0noKeyState) -> u8 { + Page33lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page33lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page33lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page33lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page33lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page33lock1lockBl { + Page33lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page33lock1lockBl) -> u8 { + Page33lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page33lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page33lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page33lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page33lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page33lock1lockNs { + Page33lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page33lock1lockNs) -> u8 { + Page33lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page33lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page33lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page33lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page33lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page33lock1lockS { + Page33lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page33lock1lockS) -> u8 { + Page33lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page34lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page34lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page34lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page34lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page34lock0noKeyState { + Page34lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page34lock0noKeyState) -> u8 { + Page34lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page34lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page34lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page34lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page34lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page34lock1lockBl { + Page34lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page34lock1lockBl) -> u8 { + Page34lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page34lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page34lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page34lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page34lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page34lock1lockNs { + Page34lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page34lock1lockNs) -> u8 { + Page34lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page34lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page34lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page34lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page34lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page34lock1lockS { + Page34lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page34lock1lockS) -> u8 { + Page34lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page35lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page35lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page35lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page35lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page35lock0noKeyState { + Page35lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page35lock0noKeyState) -> u8 { + Page35lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page35lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page35lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page35lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page35lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page35lock1lockBl { + Page35lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page35lock1lockBl) -> u8 { + Page35lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page35lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page35lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page35lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page35lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page35lock1lockNs { + Page35lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page35lock1lockNs) -> u8 { + Page35lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page35lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page35lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page35lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page35lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page35lock1lockS { + Page35lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page35lock1lockS) -> u8 { + Page35lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page36lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page36lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page36lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page36lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page36lock0noKeyState { + Page36lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page36lock0noKeyState) -> u8 { + Page36lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page36lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page36lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page36lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page36lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page36lock1lockBl { + Page36lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page36lock1lockBl) -> u8 { + Page36lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page36lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page36lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page36lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page36lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page36lock1lockNs { + Page36lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page36lock1lockNs) -> u8 { + Page36lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page36lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page36lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page36lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page36lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page36lock1lockS { + Page36lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page36lock1lockS) -> u8 { + Page36lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page37lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page37lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page37lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page37lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page37lock0noKeyState { + Page37lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page37lock0noKeyState) -> u8 { + Page37lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page37lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page37lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page37lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page37lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page37lock1lockBl { + Page37lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page37lock1lockBl) -> u8 { + Page37lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page37lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page37lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page37lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page37lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page37lock1lockNs { + Page37lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page37lock1lockNs) -> u8 { + Page37lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page37lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page37lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page37lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page37lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page37lock1lockS { + Page37lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page37lock1lockS) -> u8 { + Page37lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page38lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page38lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page38lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page38lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page38lock0noKeyState { + Page38lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page38lock0noKeyState) -> u8 { + Page38lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page38lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page38lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page38lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page38lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page38lock1lockBl { + Page38lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page38lock1lockBl) -> u8 { + Page38lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page38lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page38lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page38lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page38lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page38lock1lockNs { + Page38lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page38lock1lockNs) -> u8 { + Page38lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page38lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page38lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page38lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page38lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page38lock1lockS { + Page38lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page38lock1lockS) -> u8 { + Page38lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page39lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page39lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page39lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page39lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page39lock0noKeyState { + Page39lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page39lock0noKeyState) -> u8 { + Page39lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page39lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page39lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page39lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page39lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page39lock1lockBl { + Page39lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page39lock1lockBl) -> u8 { + Page39lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page39lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page39lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page39lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page39lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page39lock1lockNs { + Page39lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page39lock1lockNs) -> u8 { + Page39lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page39lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page39lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page39lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page39lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page39lock1lockS { + Page39lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page39lock1lockS) -> u8 { + Page39lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page3lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page3lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page3lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page3lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page3lock0noKeyState { + Page3lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page3lock0noKeyState) -> u8 { + Page3lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page3lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page3lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page3lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page3lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page3lock1lockBl { + Page3lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page3lock1lockBl) -> u8 { + Page3lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page3lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page3lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page3lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page3lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page3lock1lockNs { + Page3lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page3lock1lockNs) -> u8 { + Page3lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page3lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page3lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page3lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page3lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page3lock1lockS { + Page3lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page3lock1lockS) -> u8 { + Page3lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page40lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page40lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page40lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page40lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page40lock0noKeyState { + Page40lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page40lock0noKeyState) -> u8 { + Page40lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page40lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page40lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page40lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page40lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page40lock1lockBl { + Page40lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page40lock1lockBl) -> u8 { + Page40lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page40lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page40lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page40lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page40lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page40lock1lockNs { + Page40lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page40lock1lockNs) -> u8 { + Page40lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page40lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page40lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page40lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page40lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page40lock1lockS { + Page40lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page40lock1lockS) -> u8 { + Page40lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page41lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page41lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page41lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page41lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page41lock0noKeyState { + Page41lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page41lock0noKeyState) -> u8 { + Page41lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page41lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page41lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page41lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page41lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page41lock1lockBl { + Page41lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page41lock1lockBl) -> u8 { + Page41lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page41lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page41lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page41lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page41lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page41lock1lockNs { + Page41lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page41lock1lockNs) -> u8 { + Page41lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page41lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page41lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page41lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page41lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page41lock1lockS { + Page41lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page41lock1lockS) -> u8 { + Page41lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page42lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page42lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page42lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page42lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page42lock0noKeyState { + Page42lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page42lock0noKeyState) -> u8 { + Page42lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page42lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page42lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page42lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page42lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page42lock1lockBl { + Page42lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page42lock1lockBl) -> u8 { + Page42lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page42lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page42lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page42lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page42lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page42lock1lockNs { + Page42lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page42lock1lockNs) -> u8 { + Page42lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page42lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page42lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page42lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page42lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page42lock1lockS { + Page42lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page42lock1lockS) -> u8 { + Page42lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page43lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page43lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page43lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page43lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page43lock0noKeyState { + Page43lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page43lock0noKeyState) -> u8 { + Page43lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page43lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page43lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page43lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page43lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page43lock1lockBl { + Page43lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page43lock1lockBl) -> u8 { + Page43lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page43lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page43lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page43lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page43lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page43lock1lockNs { + Page43lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page43lock1lockNs) -> u8 { + Page43lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page43lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page43lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page43lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page43lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page43lock1lockS { + Page43lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page43lock1lockS) -> u8 { + Page43lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page44lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page44lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page44lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page44lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page44lock0noKeyState { + Page44lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page44lock0noKeyState) -> u8 { + Page44lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page44lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page44lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page44lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page44lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page44lock1lockBl { + Page44lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page44lock1lockBl) -> u8 { + Page44lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page44lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page44lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page44lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page44lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page44lock1lockNs { + Page44lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page44lock1lockNs) -> u8 { + Page44lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page44lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page44lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page44lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page44lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page44lock1lockS { + Page44lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page44lock1lockS) -> u8 { + Page44lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page45lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page45lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page45lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page45lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page45lock0noKeyState { + Page45lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page45lock0noKeyState) -> u8 { + Page45lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page45lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page45lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page45lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page45lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page45lock1lockBl { + Page45lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page45lock1lockBl) -> u8 { + Page45lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page45lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page45lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page45lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page45lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page45lock1lockNs { + Page45lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page45lock1lockNs) -> u8 { + Page45lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page45lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page45lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page45lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page45lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page45lock1lockS { + Page45lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page45lock1lockS) -> u8 { + Page45lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page46lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page46lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page46lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page46lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page46lock0noKeyState { + Page46lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page46lock0noKeyState) -> u8 { + Page46lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page46lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page46lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page46lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page46lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page46lock1lockBl { + Page46lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page46lock1lockBl) -> u8 { + Page46lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page46lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page46lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page46lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page46lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page46lock1lockNs { + Page46lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page46lock1lockNs) -> u8 { + Page46lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page46lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page46lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page46lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page46lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page46lock1lockS { + Page46lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page46lock1lockS) -> u8 { + Page46lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page47lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page47lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page47lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page47lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page47lock0noKeyState { + Page47lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page47lock0noKeyState) -> u8 { + Page47lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page47lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page47lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page47lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page47lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page47lock1lockBl { + Page47lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page47lock1lockBl) -> u8 { + Page47lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page47lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page47lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page47lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page47lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page47lock1lockNs { + Page47lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page47lock1lockNs) -> u8 { + Page47lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page47lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page47lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page47lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page47lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page47lock1lockS { + Page47lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page47lock1lockS) -> u8 { + Page47lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page48lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page48lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page48lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page48lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page48lock0noKeyState { + Page48lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page48lock0noKeyState) -> u8 { + Page48lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page48lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page48lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page48lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page48lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page48lock1lockBl { + Page48lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page48lock1lockBl) -> u8 { + Page48lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page48lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page48lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page48lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page48lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page48lock1lockNs { + Page48lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page48lock1lockNs) -> u8 { + Page48lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page48lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page48lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page48lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page48lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page48lock1lockS { + Page48lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page48lock1lockS) -> u8 { + Page48lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page49lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page49lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page49lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page49lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page49lock0noKeyState { + Page49lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page49lock0noKeyState) -> u8 { + Page49lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page49lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page49lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page49lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page49lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page49lock1lockBl { + Page49lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page49lock1lockBl) -> u8 { + Page49lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page49lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page49lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page49lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page49lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page49lock1lockNs { + Page49lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page49lock1lockNs) -> u8 { + Page49lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page49lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page49lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page49lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page49lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page49lock1lockS { + Page49lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page49lock1lockS) -> u8 { + Page49lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page4lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page4lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page4lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page4lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page4lock0noKeyState { + Page4lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page4lock0noKeyState) -> u8 { + Page4lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page4lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page4lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page4lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page4lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page4lock1lockBl { + Page4lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page4lock1lockBl) -> u8 { + Page4lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page4lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page4lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page4lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page4lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page4lock1lockNs { + Page4lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page4lock1lockNs) -> u8 { + Page4lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page4lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page4lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page4lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page4lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page4lock1lockS { + Page4lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page4lock1lockS) -> u8 { + Page4lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page50lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page50lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page50lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page50lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page50lock0noKeyState { + Page50lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page50lock0noKeyState) -> u8 { + Page50lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page50lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page50lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page50lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page50lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page50lock1lockBl { + Page50lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page50lock1lockBl) -> u8 { + Page50lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page50lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page50lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page50lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page50lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page50lock1lockNs { + Page50lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page50lock1lockNs) -> u8 { + Page50lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page50lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page50lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page50lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page50lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page50lock1lockS { + Page50lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page50lock1lockS) -> u8 { + Page50lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page51lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page51lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page51lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page51lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page51lock0noKeyState { + Page51lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page51lock0noKeyState) -> u8 { + Page51lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page51lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page51lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page51lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page51lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page51lock1lockBl { + Page51lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page51lock1lockBl) -> u8 { + Page51lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page51lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page51lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page51lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page51lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page51lock1lockNs { + Page51lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page51lock1lockNs) -> u8 { + Page51lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page51lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page51lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page51lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page51lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page51lock1lockS { + Page51lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page51lock1lockS) -> u8 { + Page51lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page52lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page52lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page52lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page52lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page52lock0noKeyState { + Page52lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page52lock0noKeyState) -> u8 { + Page52lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page52lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page52lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page52lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page52lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page52lock1lockBl { + Page52lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page52lock1lockBl) -> u8 { + Page52lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page52lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page52lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page52lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page52lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page52lock1lockNs { + Page52lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page52lock1lockNs) -> u8 { + Page52lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page52lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page52lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page52lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page52lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page52lock1lockS { + Page52lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page52lock1lockS) -> u8 { + Page52lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page53lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page53lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page53lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page53lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page53lock0noKeyState { + Page53lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page53lock0noKeyState) -> u8 { + Page53lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page53lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page53lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page53lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page53lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page53lock1lockBl { + Page53lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page53lock1lockBl) -> u8 { + Page53lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page53lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page53lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page53lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page53lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page53lock1lockNs { + Page53lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page53lock1lockNs) -> u8 { + Page53lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page53lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page53lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page53lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page53lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page53lock1lockS { + Page53lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page53lock1lockS) -> u8 { + Page53lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page54lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page54lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page54lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page54lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page54lock0noKeyState { + Page54lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page54lock0noKeyState) -> u8 { + Page54lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page54lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page54lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page54lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page54lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page54lock1lockBl { + Page54lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page54lock1lockBl) -> u8 { + Page54lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page54lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page54lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page54lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page54lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page54lock1lockNs { + Page54lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page54lock1lockNs) -> u8 { + Page54lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page54lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page54lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page54lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page54lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page54lock1lockS { + Page54lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page54lock1lockS) -> u8 { + Page54lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page55lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page55lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page55lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page55lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page55lock0noKeyState { + Page55lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page55lock0noKeyState) -> u8 { + Page55lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page55lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page55lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page55lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page55lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page55lock1lockBl { + Page55lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page55lock1lockBl) -> u8 { + Page55lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page55lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page55lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page55lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page55lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page55lock1lockNs { + Page55lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page55lock1lockNs) -> u8 { + Page55lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page55lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page55lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page55lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page55lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page55lock1lockS { + Page55lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page55lock1lockS) -> u8 { + Page55lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page56lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page56lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page56lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page56lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page56lock0noKeyState { + Page56lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page56lock0noKeyState) -> u8 { + Page56lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page56lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page56lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page56lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page56lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page56lock1lockBl { + Page56lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page56lock1lockBl) -> u8 { + Page56lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page56lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page56lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page56lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page56lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page56lock1lockNs { + Page56lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page56lock1lockNs) -> u8 { + Page56lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page56lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page56lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page56lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page56lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page56lock1lockS { + Page56lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page56lock1lockS) -> u8 { + Page56lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page57lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page57lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page57lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page57lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page57lock0noKeyState { + Page57lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page57lock0noKeyState) -> u8 { + Page57lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page57lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page57lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page57lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page57lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page57lock1lockBl { + Page57lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page57lock1lockBl) -> u8 { + Page57lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page57lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page57lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page57lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page57lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page57lock1lockNs { + Page57lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page57lock1lockNs) -> u8 { + Page57lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page57lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page57lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page57lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page57lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page57lock1lockS { + Page57lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page57lock1lockS) -> u8 { + Page57lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page58lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page58lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page58lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page58lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page58lock0noKeyState { + Page58lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page58lock0noKeyState) -> u8 { + Page58lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page58lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page58lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page58lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page58lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page58lock1lockBl { + Page58lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page58lock1lockBl) -> u8 { + Page58lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page58lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page58lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page58lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page58lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page58lock1lockNs { + Page58lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page58lock1lockNs) -> u8 { + Page58lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page58lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page58lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page58lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page58lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page58lock1lockS { + Page58lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page58lock1lockS) -> u8 { + Page58lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page59lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page59lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page59lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page59lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page59lock0noKeyState { + Page59lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page59lock0noKeyState) -> u8 { + Page59lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page59lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page59lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page59lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page59lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page59lock1lockBl { + Page59lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page59lock1lockBl) -> u8 { + Page59lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page59lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page59lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page59lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page59lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page59lock1lockNs { + Page59lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page59lock1lockNs) -> u8 { + Page59lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page59lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page59lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page59lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page59lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page59lock1lockS { + Page59lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page59lock1lockS) -> u8 { + Page59lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page5lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page5lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page5lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page5lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page5lock0noKeyState { + Page5lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page5lock0noKeyState) -> u8 { + Page5lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page5lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page5lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page5lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page5lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page5lock1lockBl { + Page5lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page5lock1lockBl) -> u8 { + Page5lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page5lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page5lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page5lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page5lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page5lock1lockNs { + Page5lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page5lock1lockNs) -> u8 { + Page5lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page5lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page5lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page5lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page5lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page5lock1lockS { + Page5lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page5lock1lockS) -> u8 { + Page5lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page60lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page60lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page60lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page60lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page60lock0noKeyState { + Page60lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page60lock0noKeyState) -> u8 { + Page60lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page60lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page60lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page60lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page60lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page60lock1lockBl { + Page60lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page60lock1lockBl) -> u8 { + Page60lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page60lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page60lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page60lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page60lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page60lock1lockNs { + Page60lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page60lock1lockNs) -> u8 { + Page60lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page60lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page60lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page60lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page60lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page60lock1lockS { + Page60lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page60lock1lockS) -> u8 { + Page60lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page61lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page61lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page61lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page61lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page61lock0noKeyState { + Page61lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page61lock0noKeyState) -> u8 { + Page61lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page61lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page61lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page61lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page61lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page61lock1lockBl { + Page61lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page61lock1lockBl) -> u8 { + Page61lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page61lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page61lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page61lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page61lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page61lock1lockNs { + Page61lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page61lock1lockNs) -> u8 { + Page61lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page61lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page61lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page61lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page61lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page61lock1lockS { + Page61lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page61lock1lockS) -> u8 { + Page61lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page62lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page62lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page62lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page62lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page62lock0noKeyState { + Page62lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page62lock0noKeyState) -> u8 { + Page62lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page62lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page62lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page62lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page62lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page62lock1lockBl { + Page62lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page62lock1lockBl) -> u8 { + Page62lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page62lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page62lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page62lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page62lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page62lock1lockNs { + Page62lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page62lock1lockNs) -> u8 { + Page62lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page62lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page62lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page62lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page62lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page62lock1lockS { + Page62lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page62lock1lockS) -> u8 { + Page62lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page63lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page63lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page63lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page63lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page63lock0noKeyState { + Page63lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page63lock0noKeyState) -> u8 { + Page63lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page63lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page63lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page63lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page63lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page63lock1lockBl { + Page63lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page63lock1lockBl) -> u8 { + Page63lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page63lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page63lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page63lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page63lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page63lock1lockNs { + Page63lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page63lock1lockNs) -> u8 { + Page63lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page63lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page63lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page63lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page63lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page63lock1lockS { + Page63lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page63lock1lockS) -> u8 { + Page63lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page6lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page6lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page6lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page6lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page6lock0noKeyState { + Page6lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page6lock0noKeyState) -> u8 { + Page6lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page6lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page6lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page6lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page6lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page6lock1lockBl { + Page6lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page6lock1lockBl) -> u8 { + Page6lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page6lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page6lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page6lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page6lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page6lock1lockNs { + Page6lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page6lock1lockNs) -> u8 { + Page6lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page6lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page6lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page6lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page6lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page6lock1lockS { + Page6lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page6lock1lockS) -> u8 { + Page6lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page7lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page7lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page7lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page7lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page7lock0noKeyState { + Page7lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page7lock0noKeyState) -> u8 { + Page7lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page7lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page7lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page7lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page7lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page7lock1lockBl { + Page7lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page7lock1lockBl) -> u8 { + Page7lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page7lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page7lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page7lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page7lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page7lock1lockNs { + Page7lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page7lock1lockNs) -> u8 { + Page7lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page7lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page7lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page7lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page7lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page7lock1lockS { + Page7lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page7lock1lockS) -> u8 { + Page7lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page8lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page8lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page8lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page8lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page8lock0noKeyState { + Page8lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page8lock0noKeyState) -> u8 { + Page8lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page8lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page8lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page8lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page8lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page8lock1lockBl { + Page8lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page8lock1lockBl) -> u8 { + Page8lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page8lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page8lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page8lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page8lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page8lock1lockNs { + Page8lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page8lock1lockNs) -> u8 { + Page8lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page8lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page8lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page8lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page8lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page8lock1lockS { + Page8lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page8lock1lockS) -> u8 { + Page8lock1lockS::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page9lock0noKeyState { + READ_ONLY = 0, + INACCESSIBLE = 0x01, +} +impl Page9lock0noKeyState { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page9lock0noKeyState { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page9lock0noKeyState { + #[inline(always)] + fn from(val: u8) -> Page9lock0noKeyState { + Page9lock0noKeyState::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page9lock0noKeyState) -> u8 { + Page9lock0noKeyState::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page9lock1lockBl { + #[doc = "Bootloader permits user reads and writes to this page"] + READ_WRITE = 0, + #[doc = "Bootloader permits user reads of this page"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE"] + RESERVED = 0x02, + #[doc = "Bootloader does not permit user access to this page"] + INACCESSIBLE = 0x03, +} +impl Page9lock1lockBl { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page9lock1lockBl { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page9lock1lockBl { + #[inline(always)] + fn from(val: u8) -> Page9lock1lockBl { + Page9lock1lockBl::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page9lock1lockBl) -> u8 { + Page9lock1lockBl::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page9lock1lockNs { + #[doc = "Page can be read by Non-secure software, and Secure software may permit Non-secure writes."] + READ_WRITE = 0, + #[doc = "Page can be read by Non-secure software"] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Non-secure software."] + INACCESSIBLE = 0x03, +} +impl Page9lock1lockNs { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page9lock1lockNs { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page9lock1lockNs { + #[inline(always)] + fn from(val: u8) -> Page9lock1lockNs { + Page9lock1lockNs::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page9lock1lockNs) -> u8 { + Page9lock1lockNs::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Page9lock1lockS { + #[doc = "Page is fully accessible by Secure software."] + READ_WRITE = 0, + #[doc = "Page can be read by Secure software, but can not be written."] + READ_ONLY = 0x01, + #[doc = "Do not use. Behaves the same as INACCESSIBLE."] + RESERVED = 0x02, + #[doc = "Page can not be accessed by Secure software."] + INACCESSIBLE = 0x03, +} +impl Page9lock1lockS { + #[inline(always)] + pub const fn from_bits(val: u8) -> Page9lock1lockS { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Page9lock1lockS { + #[inline(always)] + fn from(val: u8) -> Page9lock1lockS { + Page9lock1lockS::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Page9lock1lockS) -> u8 { + Page9lock1lockS::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Range(pub u16); +impl Range { + pub const _1_15MHZ: Self = Self(0); + pub const _10_30MHZ: Self = Self(0x01); + pub const _25_60MHZ: Self = Self(0x02); + pub const _40_100MHZ: Self = Self(0x03); +} +impl Range { + pub const fn from_bits(val: u16) -> Range { + Self(val & 0x03ff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Range { + #[inline(always)] + fn from(val: u16) -> Range { + Range::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Range) -> u16 { + Range::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct UsbWhiteLabelAddr(pub u32); +impl UsbWhiteLabelAddr { + pub const INDEX_USB_DEVICE_VID_VALUE: Self = Self(0); + pub const INDEX_USB_DEVICE_PID_VALUE: Self = Self(0x01); + pub const INDEX_USB_DEVICE_BCD_DEVICE_VALUE: Self = Self(0x02); + pub const INDEX_USB_DEVICE_LANG_ID_VALUE: Self = Self(0x03); + pub const INDEX_USB_DEVICE_MANUFACTURER_STRDEF: Self = Self(0x04); + pub const INDEX_USB_DEVICE_PRODUCT_STRDEF: Self = Self(0x05); + pub const INDEX_USB_DEVICE_SERIAL_NUMBER_STRDEF: Self = Self(0x06); + pub const INDEX_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES: Self = Self(0x07); + pub const INDEX_VOLUME_LABEL_STRDEF: Self = Self(0x08); + pub const INDEX_SCSI_INQUIRY_VENDOR_STRDEF: Self = Self(0x09); + pub const INDEX_SCSI_INQUIRY_PRODUCT_STRDEF: Self = Self(0x0a); + pub const INDEX_SCSI_INQUIRY_VERSION_STRDEF: Self = Self(0x0b); + pub const INDEX_INDEX_HTM_REDIRECT_URL_STRDEF: Self = Self(0x0c); + pub const INDEX_INDEX_HTM_REDIRECT_NAME_STRDEF: Self = Self(0x0d); + pub const INDEX_INFO_UF2_TXT_MODEL_STRDEF: Self = Self(0x0e); + pub const INDEX_INFO_UF2_TXT_BOARD_ID_STRDEF: Self = Self(0x0f); +} +impl UsbWhiteLabelAddr { + pub const fn from_bits(val: u32) -> UsbWhiteLabelAddr { + Self(val & 0x00ff_ffff) + } + pub const fn to_bits(self) -> u32 { + self.0 + } +} +impl From for UsbWhiteLabelAddr { + #[inline(always)] + fn from(val: u32) -> UsbWhiteLabelAddr { + UsbWhiteLabelAddr::from_bits(val) + } +} +impl From for u32 { + #[inline(always)] + fn from(val: UsbWhiteLabelAddr) -> u32 { + UsbWhiteLabelAddr::to_bits(val) + } +} diff --git a/src/rp2350/pads.rs b/src/rp2350/pads.rs new file mode 100644 index 00000000..27767a6f --- /dev/null +++ b/src/rp2350/pads.rs @@ -0,0 +1,30 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pads { + ptr: *mut u8, +} +unsafe impl Send for Pads {} +unsafe impl Sync for Pads {} +impl Pads { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Voltage select. Per bank control"] + #[inline(always)] + pub const fn voltage_select( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn gpio(self, n: usize) -> crate::common::Reg { + assert!(n < 50usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize + n * 4usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/pads/regs.rs b/src/rp2350/pads/regs.rs new file mode 100644 index 00000000..ddb9275e --- /dev/null +++ b/src/rp2350/pads/regs.rs @@ -0,0 +1,120 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct GpioCtrl(pub u32); +impl GpioCtrl { + #[doc = "Slew rate control. 1 = Fast, 0 = Slow"] + #[inline(always)] + pub const fn slewfast(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Slew rate control. 1 = Fast, 0 = Slow"] + #[inline(always)] + pub fn set_slewfast(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Enable schmitt trigger"] + #[inline(always)] + pub const fn schmitt(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Enable schmitt trigger"] + #[inline(always)] + pub fn set_schmitt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Pull down enable"] + #[inline(always)] + pub const fn pde(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Pull down enable"] + #[inline(always)] + pub fn set_pde(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Pull up enable"] + #[inline(always)] + pub const fn pue(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Pull up enable"] + #[inline(always)] + pub fn set_pue(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Drive strength."] + #[inline(always)] + pub const fn drive(&self) -> super::vals::Drive { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Drive::from_bits(val as u8) + } + #[doc = "Drive strength."] + #[inline(always)] + pub fn set_drive(&mut self, val: super::vals::Drive) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "Input enable"] + #[inline(always)] + pub const fn ie(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Input enable"] + #[inline(always)] + pub fn set_ie(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Output disable. Has priority over output enable from peripherals"] + #[inline(always)] + pub const fn od(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Output disable. Has priority over output enable from peripherals"] + #[inline(always)] + pub fn set_od(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Pad isolation control. Remove this once the pad is configured by software."] + #[inline(always)] + pub const fn iso(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Pad isolation control. Remove this once the pad is configured by software."] + #[inline(always)] + pub fn set_iso(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } +} +impl Default for GpioCtrl { + #[inline(always)] + fn default() -> GpioCtrl { + GpioCtrl(0) + } +} +#[doc = "Voltage select. Per bank control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct VoltageSelect(pub u32); +impl VoltageSelect { + #[inline(always)] + pub const fn voltage_select(&self) -> super::vals::VoltageSelect { + let val = (self.0 >> 0usize) & 0x01; + super::vals::VoltageSelect::from_bits(val as u8) + } + #[inline(always)] + pub fn set_voltage_select(&mut self, val: super::vals::VoltageSelect) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize); + } +} +impl Default for VoltageSelect { + #[inline(always)] + fn default() -> VoltageSelect { + VoltageSelect(0) + } +} diff --git a/src/rp2350/pads/vals.rs b/src/rp2350/pads/vals.rs new file mode 100644 index 00000000..f9e7d6c3 --- /dev/null +++ b/src/rp2350/pads/vals.rs @@ -0,0 +1,60 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Drive { + _2MA = 0, + _4MA = 0x01, + _8MA = 0x02, + _12MA = 0x03, +} +impl Drive { + #[inline(always)] + pub const fn from_bits(val: u8) -> Drive { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Drive { + #[inline(always)] + fn from(val: u8) -> Drive { + Drive::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Drive) -> u8 { + Drive::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum VoltageSelect { + #[doc = "Set voltage to 3.3V (DVDD >= 2V5)"] + _3V3 = 0, + #[doc = "Set voltage to 1.8V (DVDD <= 1V8)"] + _1V8 = 0x01, +} +impl VoltageSelect { + #[inline(always)] + pub const fn from_bits(val: u8) -> VoltageSelect { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for VoltageSelect { + #[inline(always)] + fn from(val: u8) -> VoltageSelect { + VoltageSelect::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: VoltageSelect) -> u8 { + VoltageSelect::to_bits(val) + } +} diff --git a/src/rp2350/pio.rs b/src/rp2350/pio.rs new file mode 100644 index 00000000..a30ccc0c --- /dev/null +++ b/src/rp2350/pio.rs @@ -0,0 +1,267 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq { + ptr: *mut u8, +} +unsafe impl Send for Irq {} +unsafe impl Sync for Irq {} +impl Irq { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Interrupt Enable for irq0"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Interrupt Force for irq0"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Interrupt status after masking & forcing for irq0"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } +} +#[doc = "Programmable IO block"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pio { + ptr: *mut u8, +} +unsafe impl Send for Pio {} +unsafe impl Sync for Pio {} +impl Pio { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "PIO control register"] + #[inline(always)] + pub const fn ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "FIFO status register"] + #[inline(always)] + pub const fn fstat(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "FIFO debug register"] + #[inline(always)] + pub const fn fdebug(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "FIFO levels"] + #[inline(always)] + pub const fn flevel(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn txf(self, n: usize) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize + n * 4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn rxf(self, n: usize) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize + n * 4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn irq(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn irq_force(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn input_sync_bypass(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn dbg_padout(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn dbg_padoe(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn dbg_cfginfo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "Write-only access to instruction memory location 0"] + #[inline(always)] + pub const fn instr_mem( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 32usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize + n * 4usize) as _) } + } + #[inline(always)] + pub const fn sm(self, n: usize) -> StateMachine { + assert!(n < 4usize); + unsafe { StateMachine::from_ptr(self.ptr.add(200usize + n * 24usize) as _) } + } + #[doc = "Direct read/write access to entry 0 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf0_putget0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(296usize) as _) } + } + #[doc = "Direct read/write access to entry 1 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf0_putget1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(300usize) as _) } + } + #[doc = "Direct read/write access to entry 2 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf0_putget2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(304usize) as _) } + } + #[doc = "Direct read/write access to entry 3 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf0_putget3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(308usize) as _) } + } + #[doc = "Direct read/write access to entry 0 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf1_putget0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(312usize) as _) } + } + #[doc = "Direct read/write access to entry 1 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf1_putget1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(316usize) as _) } + } + #[doc = "Direct read/write access to entry 2 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf1_putget2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(320usize) as _) } + } + #[doc = "Direct read/write access to entry 3 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf1_putget3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(324usize) as _) } + } + #[doc = "Direct read/write access to entry 0 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf2_putget0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(328usize) as _) } + } + #[doc = "Direct read/write access to entry 1 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf2_putget1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(332usize) as _) } + } + #[doc = "Direct read/write access to entry 2 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf2_putget2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(336usize) as _) } + } + #[doc = "Direct read/write access to entry 3 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf2_putget3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(340usize) as _) } + } + #[doc = "Direct read/write access to entry 0 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf3_putget0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(344usize) as _) } + } + #[doc = "Direct read/write access to entry 1 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf3_putget1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(348usize) as _) } + } + #[doc = "Direct read/write access to entry 2 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf3_putget2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(352usize) as _) } + } + #[doc = "Direct read/write access to entry 3 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set."] + #[inline(always)] + pub const fn rxf3_putget3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(356usize) as _) } + } + #[doc = "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)."] + #[inline(always)] + pub const fn gpiobase(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(360usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(364usize) as _) } + } + #[inline(always)] + pub const fn irqs(self, n: usize) -> Irq { + assert!(n < 2usize); + unsafe { Irq::from_ptr(self.ptr.add(368usize + n * 12usize) as _) } + } +} +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct StateMachine { + ptr: *mut u8, +} +unsafe impl Send for StateMachine {} +unsafe impl Sync for StateMachine {} +impl StateMachine { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Clock divisor register for state machine 1 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"] + #[inline(always)] + pub const fn clkdiv(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Execution/behavioural settings for state machine 1"] + #[inline(always)] + pub const fn execctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Control behaviour of the input/output shift registers for state machine 1"] + #[inline(always)] + pub const fn shiftctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Current instruction address of state machine 1"] + #[inline(always)] + pub const fn addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Read to see the instruction currently addressed by state machine 1's program counter Write to execute an instruction immediately (including jumps) and then resume execution."] + #[inline(always)] + pub const fn instr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "State machine pin control"] + #[inline(always)] + pub const fn pinctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/pio/regs.rs b/src/rp2350/pio/regs.rs new file mode 100644 index 00000000..5da9bccf --- /dev/null +++ b/src/rp2350/pio/regs.rs @@ -0,0 +1,1023 @@ +#[doc = "PIO control register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ctrl(pub u32); +impl Ctrl { + #[doc = "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."] + #[inline(always)] + pub const fn sm_enable(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sm_enable(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sm_restart(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sm_restart(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn clkdiv_restart(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_clkdiv_restart(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn prev_pio_mask(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_prev_pio_mask(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn next_pio_mask(&self) -> u8 { + let val = (self.0 >> 20usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_next_pio_mask(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 20usize)) | (((val as u32) & 0x0f) << 20usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn nextprev_sm_enable(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nextprev_sm_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn nextprev_sm_disable(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nextprev_sm_disable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn nextprev_clkdiv_restart(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nextprev_clkdiv_restart(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } +} +impl Default for Ctrl { + #[inline(always)] + fn default() -> Ctrl { + Ctrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DbgCfginfo(pub u32); +impl DbgCfginfo { + #[doc = "The depth of the state machine TX/RX FIFOs, measured in words. Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double this depth."] + #[inline(always)] + pub const fn fifo_depth(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "The depth of the state machine TX/RX FIFOs, measured in words. Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double this depth."] + #[inline(always)] + pub fn set_fifo_depth(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "The number of state machines this PIO instance is equipped with."] + #[inline(always)] + pub const fn sm_count(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "The number of state machines this PIO instance is equipped with."] + #[inline(always)] + pub fn set_sm_count(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "The size of the instruction memory, measured in units of one instruction"] + #[inline(always)] + pub const fn imem_size(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x3f; + val as u8 + } + #[doc = "The size of the instruction memory, measured in units of one instruction"] + #[inline(always)] + pub fn set_imem_size(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 16usize)) | (((val as u32) & 0x3f) << 16usize); + } + #[doc = "Version of the core PIO hardware."] + #[inline(always)] + pub const fn version(&self) -> super::vals::Version { + let val = (self.0 >> 28usize) & 0x0f; + super::vals::Version::from_bits(val as u8) + } + #[doc = "Version of the core PIO hardware."] + #[inline(always)] + pub fn set_version(&mut self, val: super::vals::Version) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val.to_bits() as u32) & 0x0f) << 28usize); + } +} +impl Default for DbgCfginfo { + #[inline(always)] + fn default() -> DbgCfginfo { + DbgCfginfo(0) + } +} +#[doc = "FIFO debug register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fdebug(pub u32); +impl Fdebug { + #[doc = "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."] + #[inline(always)] + pub const fn rxstall(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxstall(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxunder(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxunder(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txover(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txover(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } + #[doc = "State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear."] + #[inline(always)] + pub const fn txstall(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x0f; + val as u8 + } + #[doc = "State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear."] + #[inline(always)] + pub fn set_txstall(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize); + } +} +impl Default for Fdebug { + #[inline(always)] + fn default() -> Fdebug { + Fdebug(0) + } +} +#[doc = "FIFO levels"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Flevel(pub u32); +impl Flevel { + #[inline(always)] + pub const fn tx0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_tx0(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[inline(always)] + pub const fn rx0(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_rx0(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } + #[inline(always)] + pub const fn tx1(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_tx1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[inline(always)] + pub const fn rx1(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_rx1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 12usize)) | (((val as u32) & 0x0f) << 12usize); + } + #[inline(always)] + pub const fn tx2(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_tx2(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } + #[inline(always)] + pub const fn rx2(&self) -> u8 { + let val = (self.0 >> 20usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_rx2(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 20usize)) | (((val as u32) & 0x0f) << 20usize); + } + #[inline(always)] + pub const fn tx3(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_tx3(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize); + } + #[inline(always)] + pub const fn rx3(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_rx3(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val as u32) & 0x0f) << 28usize); + } +} +impl Default for Flevel { + #[inline(always)] + fn default() -> Flevel { + Flevel(0) + } +} +#[doc = "FIFO status register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fstat(pub u32); +impl Fstat { + #[doc = "State machine RX FIFO is full"] + #[inline(always)] + pub const fn rxfull(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "State machine RX FIFO is full"] + #[inline(always)] + pub fn set_rxfull(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "State machine RX FIFO is empty"] + #[inline(always)] + pub const fn rxempty(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "State machine RX FIFO is empty"] + #[inline(always)] + pub fn set_rxempty(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "State machine TX FIFO is full"] + #[inline(always)] + pub const fn txfull(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "State machine TX FIFO is full"] + #[inline(always)] + pub fn set_txfull(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } + #[doc = "State machine TX FIFO is empty"] + #[inline(always)] + pub const fn txempty(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x0f; + val as u8 + } + #[doc = "State machine TX FIFO is empty"] + #[inline(always)] + pub fn set_txempty(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 24usize)) | (((val as u32) & 0x0f) << 24usize); + } +} +impl Default for Fstat { + #[inline(always)] + fn default() -> Fstat { + Fstat(0) + } +} +#[doc = "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)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Gpiobase(pub u32); +impl Gpiobase { + #[inline(always)] + pub const fn gpiobase(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gpiobase(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Gpiobase { + #[inline(always)] + fn default() -> Gpiobase { + Gpiobase(0) + } +} +#[doc = "Write-only access to instruction memory location 19"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct InstrMem(pub u32); +impl InstrMem { + #[inline(always)] + pub const fn instr_mem(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_instr_mem(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for InstrMem { + #[inline(always)] + fn default() -> InstrMem { + InstrMem(0) + } +} +#[doc = "Interrupt Enable for irq1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr(pub u32); +impl Intr { + #[inline(always)] + pub const fn sm0_rxnempty(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm0_rxnempty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn sm1_rxnempty(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm1_rxnempty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn sm2_rxnempty(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm2_rxnempty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn sm3_rxnempty(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm3_rxnempty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn sm0_txnfull(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm0_txnfull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn sm1_txnfull(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm1_txnfull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn sm2_txnfull(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm2_txnfull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn sm3_txnfull(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm3_txnfull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn sm0(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn sm1(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn sm2(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn sm3(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn sm4(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn sm5(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn sm6(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn sm7(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sm7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for Intr { + #[inline(always)] + fn default() -> Intr { + Intr(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq(pub u32); +impl Irq { + #[inline(always)] + pub const fn irq(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_irq(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Irq { + #[inline(always)] + fn default() -> Irq { + Irq(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IrqForce(pub u32); +impl IrqForce { + #[inline(always)] + pub const fn irq_force(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_irq_force(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for IrqForce { + #[inline(always)] + fn default() -> IrqForce { + IrqForce(0) + } +} +#[doc = "Current instruction address of state machine 3"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmAddr(pub u32); +impl SmAddr { + #[inline(always)] + pub const fn addr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[inline(always)] + pub fn set_addr(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } +} +impl Default for SmAddr { + #[inline(always)] + fn default() -> SmAddr { + SmAddr(0) + } +} +#[doc = "Clock divisor register for state machine 3 Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmClkdiv(pub u32); +impl SmClkdiv { + #[doc = "Fractional part of clock divisor"] + #[inline(always)] + pub const fn frac(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "Fractional part of clock divisor"] + #[inline(always)] + pub fn set_frac(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[doc = "Effective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0."] + #[inline(always)] + pub const fn int(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[doc = "Effective frequency is sysclk/(int + frac/256). Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0."] + #[inline(always)] + pub fn set_int(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for SmClkdiv { + #[inline(always)] + fn default() -> SmClkdiv { + SmClkdiv(0) + } +} +#[doc = "Execution/behavioural settings for state machine 3"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmExecctrl(pub u32); +impl SmExecctrl { + #[doc = "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."] + #[inline(always)] + pub const fn status_n(&self) -> super::vals::ExecctrlStatusN { + let val = (self.0 >> 0usize) & 0x1f; + super::vals::ExecctrlStatusN::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_status_n(&mut self, val: super::vals::ExecctrlStatusN) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val.to_bits() as u32) & 0x1f) << 0usize); + } + #[doc = "Comparison used for the MOV x, STATUS instruction."] + #[inline(always)] + pub const fn status_sel(&self) -> super::vals::ExecctrlStatusSel { + let val = (self.0 >> 5usize) & 0x03; + super::vals::ExecctrlStatusSel::from_bits(val as u8) + } + #[doc = "Comparison used for the MOV x, STATUS instruction."] + #[inline(always)] + pub fn set_status_sel(&mut self, val: super::vals::ExecctrlStatusSel) { + self.0 = (self.0 & !(0x03 << 5usize)) | (((val.to_bits() as u32) & 0x03) << 5usize); + } + #[doc = "After reaching wrap_top, execution is wrapped to this address."] + #[inline(always)] + pub const fn wrap_bottom(&self) -> u8 { + let val = (self.0 >> 7usize) & 0x1f; + val as u8 + } + #[doc = "After reaching wrap_top, execution is wrapped to this address."] + #[inline(always)] + pub fn set_wrap_bottom(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 7usize)) | (((val as u32) & 0x1f) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn wrap_top(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_wrap_top(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 12usize)) | (((val as u32) & 0x1f) << 12usize); + } + #[doc = "Continuously assert the most recent OUT/SET to the pins"] + #[inline(always)] + pub const fn out_sticky(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Continuously assert the most recent OUT/SET to the pins"] + #[inline(always)] + pub fn set_out_sticky(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "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 < ...)"] + #[inline(always)] + pub const fn inline_out_en(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "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 < ...)"] + #[inline(always)] + pub fn set_inline_out_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "Which data bit to use for inline OUT enable"] + #[inline(always)] + pub const fn out_en_sel(&self) -> u8 { + let val = (self.0 >> 19usize) & 0x1f; + val as u8 + } + #[doc = "Which data bit to use for inline OUT enable"] + #[inline(always)] + pub fn set_out_en_sel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 19usize)) | (((val as u32) & 0x1f) << 19usize); + } + #[doc = "The GPIO number to use as condition for JMP PIN. Unaffected by input mapping."] + #[inline(always)] + pub const fn jmp_pin(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x1f; + val as u8 + } + #[doc = "The GPIO number to use as condition for JMP PIN. Unaffected by input mapping."] + #[inline(always)] + pub fn set_jmp_pin(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 24usize)) | (((val as u32) & 0x1f) << 24usize); + } + #[doc = "If 1, side-set data is asserted to pin directions, instead of pin values"] + #[inline(always)] + pub const fn side_pindir(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "If 1, side-set data is asserted to pin directions, instead of pin values"] + #[inline(always)] + pub fn set_side_pindir(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn side_en(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_side_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes."] + #[inline(always)] + pub const fn exec_stalled(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes."] + #[inline(always)] + pub fn set_exec_stalled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for SmExecctrl { + #[inline(always)] + fn default() -> SmExecctrl { + SmExecctrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmInstr(pub u32); +impl SmInstr { + #[inline(always)] + pub const fn instr(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_instr(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for SmInstr { + #[inline(always)] + fn default() -> SmInstr { + SmInstr(0) + } +} +#[doc = "State machine pin control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmPinctrl(pub u32); +impl SmPinctrl { + #[doc = "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."] + #[inline(always)] + pub const fn out_base(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_out_base(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn set_base(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_set_base(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 5usize)) | (((val as u32) & 0x1f) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sideset_base(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sideset_base(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 10usize)) | (((val as u32) & 0x1f) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn in_base(&self) -> u8 { + let val = (self.0 >> 15usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_in_base(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 15usize)) | (((val as u32) & 0x1f) << 15usize); + } + #[doc = "The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive."] + #[inline(always)] + pub const fn out_count(&self) -> u8 { + let val = (self.0 >> 20usize) & 0x3f; + val as u8 + } + #[doc = "The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive."] + #[inline(always)] + pub fn set_out_count(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 20usize)) | (((val as u32) & 0x3f) << 20usize); + } + #[doc = "The number of pins asserted by a SET. In the range 0 to 5 inclusive."] + #[inline(always)] + pub const fn set_count(&self) -> u8 { + let val = (self.0 >> 26usize) & 0x07; + val as u8 + } + #[doc = "The number of pins asserted by a SET. In the range 0 to 5 inclusive."] + #[inline(always)] + pub fn set_set_count(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 26usize)) | (((val as u32) & 0x07) << 26usize); + } + #[doc = "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)."] + #[inline(always)] + pub const fn sideset_count(&self) -> u8 { + let val = (self.0 >> 29usize) & 0x07; + val as u8 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_sideset_count(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 29usize)) | (((val as u32) & 0x07) << 29usize); + } +} +impl Default for SmPinctrl { + #[inline(always)] + fn default() -> SmPinctrl { + SmPinctrl(0) + } +} +#[doc = "Control behaviour of the input/output shift registers for state machine 3"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmShiftctrl(pub u32); +impl SmShiftctrl { + #[doc = "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."] + #[inline(always)] + pub const fn in_count(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_in_count(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fjoin_rx_get(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fjoin_rx_get(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fjoin_rx_put(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fjoin_rx_put(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn autopush(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_autopush(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn autopull(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_autopull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "1 = shift input shift register to right (data enters from left). 0 = to left."] + #[inline(always)] + pub const fn in_shiftdir(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "1 = shift input shift register to right (data enters from left). 0 = to left."] + #[inline(always)] + pub fn set_in_shiftdir(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "1 = shift out of output shift register to right. 0 = to left."] + #[inline(always)] + pub const fn out_shiftdir(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "1 = shift out of output shift register to right. 0 = to left."] + #[inline(always)] + pub fn set_out_shiftdir(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32."] + #[inline(always)] + pub const fn push_thresh(&self) -> u8 { + let val = (self.0 >> 20usize) & 0x1f; + val as u8 + } + #[doc = "Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. Write 0 for value of 32."] + #[inline(always)] + pub fn set_push_thresh(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 20usize)) | (((val as u32) & 0x1f) << 20usize); + } + #[doc = "Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32."] + #[inline(always)] + pub const fn pull_thresh(&self) -> u8 { + let val = (self.0 >> 25usize) & 0x1f; + val as u8 + } + #[doc = "Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. Write 0 for value of 32."] + #[inline(always)] + pub fn set_pull_thresh(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 25usize)) | (((val as u32) & 0x1f) << 25usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fjoin_tx(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fjoin_tx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fjoin_rx(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fjoin_rx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for SmShiftctrl { + #[inline(always)] + fn default() -> SmShiftctrl { + SmShiftctrl(0) + } +} diff --git a/src/rp2350/pio/vals.rs b/src/rp2350/pio/vals.rs new file mode 100644 index 00000000..9f61b3b2 --- /dev/null +++ b/src/rp2350/pio/vals.rs @@ -0,0 +1,108 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct ExecctrlStatusN(pub u8); +impl ExecctrlStatusN { + #[doc = "Index 0-7 of an IRQ flag in this PIO block"] + pub const IRQ: Self = Self(0); + #[doc = "Index 0-7 of an IRQ flag in the next lower-numbered PIO block"] + pub const IRQ_PREVPIO: Self = Self(0x08); + #[doc = "Index 0-7 of an IRQ flag in the next higher-numbered PIO block"] + pub const IRQ_NEXTPIO: Self = Self(0x10); +} +impl ExecctrlStatusN { + pub const fn from_bits(val: u8) -> ExecctrlStatusN { + Self(val & 0x1f) + } + pub const fn to_bits(self) -> u8 { + self.0 + } +} +impl From for ExecctrlStatusN { + #[inline(always)] + fn from(val: u8) -> ExecctrlStatusN { + ExecctrlStatusN::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ExecctrlStatusN) -> u8 { + ExecctrlStatusN::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ExecctrlStatusSel { + #[doc = "All-ones if TX FIFO level < N, otherwise all-zeroes"] + TXLEVEL = 0, + #[doc = "All-ones if RX FIFO level < N, otherwise all-zeroes"] + RXLEVEL = 0x01, + #[doc = "All-ones if the indexed IRQ flag is raised, otherwise all-zeroes"] + IRQ = 0x02, + _RESERVED_3 = 0x03, +} +impl ExecctrlStatusSel { + #[inline(always)] + pub const fn from_bits(val: u8) -> ExecctrlStatusSel { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ExecctrlStatusSel { + #[inline(always)] + fn from(val: u8) -> ExecctrlStatusSel { + ExecctrlStatusSel::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ExecctrlStatusSel) -> u8 { + ExecctrlStatusSel::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Version { + #[doc = "Version 0 (RP2040)"] + V0 = 0, + #[doc = "Version 1 (RP2350)"] + V1 = 0x01, + _RESERVED_2 = 0x02, + _RESERVED_3 = 0x03, + _RESERVED_4 = 0x04, + _RESERVED_5 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, + _RESERVED_8 = 0x08, + _RESERVED_9 = 0x09, + _RESERVED_a = 0x0a, + _RESERVED_b = 0x0b, + _RESERVED_c = 0x0c, + _RESERVED_d = 0x0d, + _RESERVED_e = 0x0e, + _RESERVED_f = 0x0f, +} +impl Version { + #[inline(always)] + pub const fn from_bits(val: u8) -> Version { + unsafe { core::mem::transmute(val & 0x0f) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Version { + #[inline(always)] + fn from(val: u8) -> Version { + Version::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Version) -> u8 { + Version::to_bits(val) + } +} diff --git a/src/rp2350/pll.rs b/src/rp2350/pll.rs new file mode 100644 index 00000000..db4207bc --- /dev/null +++ b/src/rp2350/pll.rs @@ -0,0 +1,57 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pll { + ptr: *mut u8, +} +unsafe impl Send for Pll {} +unsafe impl Sync for Pll {} +impl Pll { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Control and Status GENERAL CONSTRAINTS: Reference clock frequency min=5MHz, max=800MHz Feedback divider min=16, max=320 VCO frequency min=750MHz, max=1600MHz"] + #[inline(always)] + pub const fn cs(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Controls the PLL power modes."] + #[inline(always)] + pub const fn pwr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Feedback divisor (note: this PLL does not support fractional division)"] + #[inline(always)] + pub const fn fbdiv_int(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn prim(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/pll/regs.rs b/src/rp2350/pll/regs.rs new file mode 100644 index 00000000..92d95d02 --- /dev/null +++ b/src/rp2350/pll/regs.rs @@ -0,0 +1,253 @@ +#[doc = "Control and Status GENERAL CONSTRAINTS: Reference clock frequency min=5MHz, max=800MHz Feedback divider min=16, max=320 VCO frequency min=750MHz, max=1600MHz"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Cs(pub u32); +impl Cs { + #[doc = "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."] + #[inline(always)] + pub const fn refdiv(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_refdiv(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn bypass(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_bypass(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "PLL is not locked Ideally this is cleared when PLL lock is seen and this should never normally be set"] + #[inline(always)] + pub const fn lock_n(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "PLL is not locked Ideally this is cleared when PLL lock is seen and this should never normally be set"] + #[inline(always)] + pub fn set_lock_n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "PLL is locked"] + #[inline(always)] + pub const fn lock(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "PLL is locked"] + #[inline(always)] + pub fn set_lock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for Cs { + #[inline(always)] + fn default() -> Cs { + Cs(0) + } +} +#[doc = "Feedback divisor (note: this PLL does not support fractional division)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FbdivInt(pub u32); +impl FbdivInt { + #[doc = "see ctrl reg description for constraints"] + #[inline(always)] + pub const fn fbdiv_int(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "see ctrl reg description for constraints"] + #[inline(always)] + pub fn set_fbdiv_int(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } +} +impl Default for FbdivInt { + #[inline(always)] + fn default() -> FbdivInt { + FbdivInt(0) + } +} +#[doc = "Interrupt Enable"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte(pub u32); +impl Inte { + #[inline(always)] + pub const fn lock_n_sticky(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_lock_n_sticky(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Inte { + #[inline(always)] + fn default() -> Inte { + Inte(0) + } +} +#[doc = "Interrupt Force"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf(pub u32); +impl Intf { + #[inline(always)] + pub const fn lock_n_sticky(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_lock_n_sticky(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Intf { + #[inline(always)] + fn default() -> Intf { + Intf(0) + } +} +#[doc = "Raw Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr(pub u32); +impl Intr { + #[inline(always)] + pub const fn lock_n_sticky(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_lock_n_sticky(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Intr { + #[inline(always)] + fn default() -> Intr { + Intr(0) + } +} +#[doc = "Interrupt status after masking & forcing"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints(pub u32); +impl Ints { + #[inline(always)] + pub const fn lock_n_sticky(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_lock_n_sticky(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Ints { + #[inline(always)] + fn default() -> Ints { + Ints(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Prim(pub u32); +impl Prim { + #[doc = "divide by 1-7"] + #[inline(always)] + pub const fn postdiv2(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "divide by 1-7"] + #[inline(always)] + pub fn set_postdiv2(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "divide by 1-7"] + #[inline(always)] + pub const fn postdiv1(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x07; + val as u8 + } + #[doc = "divide by 1-7"] + #[inline(always)] + pub fn set_postdiv1(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 16usize)) | (((val as u32) & 0x07) << 16usize); + } +} +impl Default for Prim { + #[inline(always)] + fn default() -> Prim { + Prim(0) + } +} +#[doc = "Controls the PLL power modes."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwr(pub u32); +impl Pwr { + #[doc = "PLL powerdown To save power set high when PLL output not required."] + #[inline(always)] + pub const fn pd(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "PLL powerdown To save power set high when PLL output not required."] + #[inline(always)] + pub fn set_pd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "PLL DSM powerdown Nothing is achieved by setting this low."] + #[inline(always)] + pub const fn dsmpd(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "PLL DSM powerdown Nothing is achieved by setting this low."] + #[inline(always)] + pub fn set_dsmpd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "PLL post divider powerdown To save power set high when PLL output not required or bypass=1."] + #[inline(always)] + pub const fn postdivpd(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "PLL post divider powerdown To save power set high when PLL output not required or bypass=1."] + #[inline(always)] + pub fn set_postdivpd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "PLL VCO powerdown To save power set high when PLL output not required or bypass=1."] + #[inline(always)] + pub const fn vcopd(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "PLL VCO powerdown To save power set high when PLL output not required or bypass=1."] + #[inline(always)] + pub fn set_vcopd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } +} +impl Default for Pwr { + #[inline(always)] + fn default() -> Pwr { + Pwr(0) + } +} diff --git a/src/rp2350/powman.rs b/src/rp2350/powman.rs new file mode 100644 index 00000000..e321669a --- /dev/null +++ b/src/rp2350/powman.rs @@ -0,0 +1,331 @@ +#[doc = "Controls vreg, bor, lposc, chip resets & xosc startup, powman and provides scratch register for general use and for bootcode use"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Powman { + ptr: *mut u8, +} +unsafe impl Send for Powman {} +unsafe impl Sync for Powman {} +impl Powman { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Indicates a bad password has been used"] + #[inline(always)] + pub const fn badpasswd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Voltage Regulator Control"] + #[inline(always)] + pub const fn vreg_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Voltage Regulator Status"] + #[inline(always)] + pub const fn vreg_sts(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Voltage Regulator Settings"] + #[inline(always)] + pub const fn vreg(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Voltage Regulator Low Power Entry Settings"] + #[inline(always)] + pub const fn vreg_lp_entry(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Voltage Regulator Low Power Exit Settings"] + #[inline(always)] + pub const fn vreg_lp_exit(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Brown-out Detection Control"] + #[inline(always)] + pub const fn bod_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Brown-out Detection Settings"] + #[inline(always)] + pub const fn bod(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Brown-out Detection Low Power Entry Settings"] + #[inline(always)] + pub const fn bod_lp_entry(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Brown-out Detection Low Power Exit Settings"] + #[inline(always)] + pub const fn bod_lp_exit(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Low power oscillator control register."] + #[inline(always)] + pub const fn lposc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Chip reset control and status"] + #[inline(always)] + pub const fn chip_reset(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn wdsel(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "For configuration of the power sequencer Writes are ignored while POWMAN_STATE_CHANGING=1"] + #[inline(always)] + pub const fn seq_cfg(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn state(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[inline(always)] + pub const fn pow_fastdiv(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "power state machine delays"] + #[inline(always)] + pub const fn pow_delay(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "Configures a gpio as a power mode aware control output"] + #[inline(always)] + pub const fn ext_ctrl0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "Configures a gpio as a power mode aware control output"] + #[inline(always)] + pub const fn ext_ctrl1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ext_time_ref(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "Informs the AON Timer of the integer component of the clock frequency when running off the LPOSC."] + #[inline(always)] + pub const fn lposc_freq_khz_int( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "Informs the AON Timer of the fractional component of the clock frequency when running off the LPOSC."] + #[inline(always)] + pub const fn lposc_freq_khz_frac( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(84usize) as _) } + } + #[doc = "Informs the AON Timer of the integer component of the clock frequency when running off the XOSC."] + #[inline(always)] + pub const fn xosc_freq_khz_int( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } + } + #[doc = "Informs the AON Timer of the fractional component of the clock frequency when running off the XOSC."] + #[inline(always)] + pub const fn xosc_freq_khz_frac( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[inline(always)] + pub const fn set_time_63to48( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[inline(always)] + pub const fn set_time_47to32( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } + } + #[inline(always)] + pub const fn set_time_31to16( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } + } + #[inline(always)] + pub const fn set_time_15to0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[inline(always)] + pub const fn read_time_upper(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } + } + #[inline(always)] + pub const fn read_time_lower(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } + } + #[inline(always)] + pub const fn alarm_time_63to48( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } + } + #[inline(always)] + pub const fn alarm_time_47to32( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } + } + #[inline(always)] + pub const fn alarm_time_31to16( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } + } + #[inline(always)] + pub const fn alarm_time_15to0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } + } + #[inline(always)] + pub const fn timer(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(136usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn pwrup0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(140usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn pwrup1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(144usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn pwrup2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(148usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn pwrup3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(152usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn current_pwrup_req( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(156usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn last_swcore_pwrup( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(160usize) as _) } + } + #[inline(always)] + pub const fn dbg_pwrcfg(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(164usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn bootdis(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(168usize) as _) } + } + #[inline(always)] + pub const fn dbgconfig(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(172usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(176usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(180usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(184usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(188usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(192usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(196usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(200usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn scratch7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(204usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn boot0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(208usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn boot1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(212usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn boot2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(216usize) as _) } + } + #[doc = "Scratch register. Information persists in low power mode"] + #[inline(always)] + pub const fn boot3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(220usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(224usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(228usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(232usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(236usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/powman/regs.rs b/src/rp2350/powman/regs.rs new file mode 100644 index 00000000..059ae24a --- /dev/null +++ b/src/rp2350/powman/regs.rs @@ -0,0 +1,2145 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AlarmTime15to0(pub u32); +impl AlarmTime15to0 { + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub const fn alarm_time_15to0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub fn set_alarm_time_15to0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for AlarmTime15to0 { + #[inline(always)] + fn default() -> AlarmTime15to0 { + AlarmTime15to0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AlarmTime31to16(pub u32); +impl AlarmTime31to16 { + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub const fn alarm_time_31to16(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub fn set_alarm_time_31to16(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for AlarmTime31to16 { + #[inline(always)] + fn default() -> AlarmTime31to16 { + AlarmTime31to16(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AlarmTime47to32(pub u32); +impl AlarmTime47to32 { + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub const fn alarm_time_47to32(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub fn set_alarm_time_47to32(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for AlarmTime47to32 { + #[inline(always)] + fn default() -> AlarmTime47to32 { + AlarmTime47to32(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AlarmTime63to48(pub u32); +impl AlarmTime63to48 { + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub const fn alarm_time_63to48(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "This field must only be written when POWMAN_ALARM_ENAB=0"] + #[inline(always)] + pub fn set_alarm_time_63to48(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for AlarmTime63to48 { + #[inline(always)] + fn default() -> AlarmTime63to48 { + AlarmTime63to48(0) + } +} +#[doc = "Indicates a bad password has been used"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Badpasswd(pub u32); +impl Badpasswd { + #[inline(always)] + pub const fn badpasswd(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_badpasswd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Badpasswd { + #[inline(always)] + fn default() -> Badpasswd { + Badpasswd(0) + } +} +#[doc = "Brown-out Detection Settings"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bod(pub u32); +impl Bod { + #[doc = "enable brown-out detection 0=not enabled, 1=enabled"] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "enable brown-out detection 0=not enabled, 1=enabled"] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn vsel(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_vsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 4usize)) | (((val as u32) & 0x1f) << 4usize); + } +} +impl Default for Bod { + #[inline(always)] + fn default() -> Bod { + Bod(0) + } +} +#[doc = "Brown-out Detection Control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BodCtrl(pub u32); +impl BodCtrl { + #[doc = "isolates the brown-out detection control interface 0 - not isolated (default) 1 - isolated"] + #[inline(always)] + pub const fn isolate(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "isolates the brown-out detection control interface 0 - not isolated (default) 1 - isolated"] + #[inline(always)] + pub fn set_isolate(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for BodCtrl { + #[inline(always)] + fn default() -> BodCtrl { + BodCtrl(0) + } +} +#[doc = "Brown-out Detection Low Power Entry Settings"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BodLpEntry(pub u32); +impl BodLpEntry { + #[doc = "enable brown-out detection 0=not enabled, 1=enabled"] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "enable brown-out detection 0=not enabled, 1=enabled"] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn vsel(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_vsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 4usize)) | (((val as u32) & 0x1f) << 4usize); + } +} +impl Default for BodLpEntry { + #[inline(always)] + fn default() -> BodLpEntry { + BodLpEntry(0) + } +} +#[doc = "Brown-out Detection Low Power Exit Settings"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BodLpExit(pub u32); +impl BodLpExit { + #[doc = "enable brown-out detection 0=not enabled, 1=enabled"] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "enable brown-out detection 0=not enabled, 1=enabled"] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn vsel(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_vsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 4usize)) | (((val as u32) & 0x1f) << 4usize); + } +} +impl Default for BodLpExit { + #[inline(always)] + fn default() -> BodLpExit { + BodLpExit(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Bootdis(pub u32); +impl Bootdis { + #[doc = "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."] + #[inline(always)] + pub const fn now(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_now(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn next(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_next(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Bootdis { + #[inline(always)] + fn default() -> Bootdis { + Bootdis(0) + } +} +#[doc = "Chip reset control and status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChipReset(pub u32); +impl ChipReset { + #[doc = "This flag is set by double-tapping RUN. It tells bootcode to go into the bootloader."] + #[inline(always)] + pub const fn double_tap(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "This flag is set by double-tapping RUN. It tells bootcode to go into the bootloader."] + #[inline(always)] + pub fn set_double_tap(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rescue_flag(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rescue_flag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_por(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_por(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_bor(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_bor(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_run_low(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_run_low(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_dp_reset_req(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_dp_reset_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_rescue(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_rescue(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_watchdog_reset_powman_async(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_watchdog_reset_powman_async(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_watchdog_reset_powman(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_watchdog_reset_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_watchdog_reset_swcore(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_watchdog_reset_swcore(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_swcore_pd(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_swcore_pd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_glitch_detect(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_glitch_detect(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_hzd_sys_reset_req(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_hzd_sys_reset_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn had_watchdog_reset_rsm(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_had_watchdog_reset_rsm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for ChipReset { + #[inline(always)] + fn default() -> ChipReset { + ChipReset(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct CurrentPwrupReq(pub u32); +impl CurrentPwrupReq { + #[inline(always)] + pub const fn current_pwrup_req(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x7f; + val as u8 + } + #[inline(always)] + pub fn set_current_pwrup_req(&mut self, val: u8) { + self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize); + } +} +impl Default for CurrentPwrupReq { + #[inline(always)] + fn default() -> CurrentPwrupReq { + CurrentPwrupReq(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DbgPwrcfg(pub u32); +impl DbgPwrcfg { + #[doc = "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"] + #[inline(always)] + pub const fn ignore(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_ignore(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for DbgPwrcfg { + #[inline(always)] + fn default() -> DbgPwrcfg { + DbgPwrcfg(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dbgconfig(pub u32); +impl Dbgconfig { + #[doc = "Configure DP instance ID for SWD multidrop selection. Recommend that this is NOT changed until you require debug access in multi-chip environment"] + #[inline(always)] + pub const fn dp_instid(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "Configure DP instance ID for SWD multidrop selection. Recommend that this is NOT changed until you require debug access in multi-chip environment"] + #[inline(always)] + pub fn set_dp_instid(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for Dbgconfig { + #[inline(always)] + fn default() -> Dbgconfig { + Dbgconfig(0) + } +} +#[doc = "Configures a gpio as a power mode aware control output"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ExtCtrl0(pub u32); +impl ExtCtrl0 { + #[doc = "selects from gpio 0->30 set to 31 to disable this feature"] + #[inline(always)] + pub const fn gpio_select(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "selects from gpio 0->30 set to 31 to disable this feature"] + #[inline(always)] + pub fn set_gpio_select(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[inline(always)] + pub const fn init(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_init(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn init_state(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_init_state(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "output level when entering the low power state"] + #[inline(always)] + pub const fn lp_entry_state(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "output level when entering the low power state"] + #[inline(always)] + pub fn set_lp_entry_state(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "output level when exiting the low power state"] + #[inline(always)] + pub const fn lp_exit_state(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "output level when exiting the low power state"] + #[inline(always)] + pub fn set_lp_exit_state(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } +} +impl Default for ExtCtrl0 { + #[inline(always)] + fn default() -> ExtCtrl0 { + ExtCtrl0(0) + } +} +#[doc = "Configures a gpio as a power mode aware control output"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ExtCtrl1(pub u32); +impl ExtCtrl1 { + #[doc = "selects from gpio 0->30 set to 31 to disable this feature"] + #[inline(always)] + pub const fn gpio_select(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "selects from gpio 0->30 set to 31 to disable this feature"] + #[inline(always)] + pub fn set_gpio_select(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[inline(always)] + pub const fn init(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_init(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn init_state(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_init_state(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "output level when entering the low power state"] + #[inline(always)] + pub const fn lp_entry_state(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "output level when entering the low power state"] + #[inline(always)] + pub fn set_lp_entry_state(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "output level when exiting the low power state"] + #[inline(always)] + pub const fn lp_exit_state(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "output level when exiting the low power state"] + #[inline(always)] + pub fn set_lp_exit_state(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } +} +impl Default for ExtCtrl1 { + #[inline(always)] + fn default() -> ExtCtrl1 { + ExtCtrl1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ExtTimeRef(pub u32); +impl ExtTimeRef { + #[doc = "0 -> gpio12 1 -> gpio20 2 -> gpio14 3 -> gpio22"] + #[inline(always)] + pub const fn source_sel(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "0 -> gpio12 1 -> gpio20 2 -> gpio14 3 -> gpio22"] + #[inline(always)] + pub fn set_source_sel(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn drive_lpck(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_drive_lpck(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for ExtTimeRef { + #[inline(always)] + fn default() -> ExtTimeRef { + ExtTimeRef(0) + } +} +#[doc = "Interrupt Enable"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Inte(pub u32); +impl Inte { + #[inline(always)] + pub const fn vreg_output_low(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vreg_output_low(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn timer(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub const fn state_req_ignored(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub fn set_state_req_ignored(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub const fn pwrup_while_waiting(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub fn set_pwrup_while_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Inte { + #[inline(always)] + fn default() -> Inte { + Inte(0) + } +} +#[doc = "Interrupt Force"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intf(pub u32); +impl Intf { + #[inline(always)] + pub const fn vreg_output_low(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vreg_output_low(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn timer(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub const fn state_req_ignored(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub fn set_state_req_ignored(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub const fn pwrup_while_waiting(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub fn set_pwrup_while_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Intf { + #[inline(always)] + fn default() -> Intf { + Intf(0) + } +} +#[doc = "Raw Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr(pub u32); +impl Intr { + #[inline(always)] + pub const fn vreg_output_low(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vreg_output_low(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn timer(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub const fn state_req_ignored(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub fn set_state_req_ignored(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub const fn pwrup_while_waiting(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub fn set_pwrup_while_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Intr { + #[inline(always)] + fn default() -> Intr { + Intr(0) + } +} +#[doc = "Interrupt status after masking & forcing"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ints(pub u32); +impl Ints { + #[inline(always)] + pub const fn vreg_output_low(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vreg_output_low(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn timer(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub const fn state_req_ignored(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Source is state.req_ignored"] + #[inline(always)] + pub fn set_state_req_ignored(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub const fn pwrup_while_waiting(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Source is state.pwrup_while_waiting"] + #[inline(always)] + pub fn set_pwrup_while_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Ints { + #[inline(always)] + fn default() -> Ints { + Ints(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct LastSwcorePwrup(pub u32); +impl LastSwcorePwrup { + #[inline(always)] + pub const fn last_swcore_pwrup(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x7f; + val as u8 + } + #[inline(always)] + pub fn set_last_swcore_pwrup(&mut self, val: u8) { + self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize); + } +} +impl Default for LastSwcorePwrup { + #[inline(always)] + fn default() -> LastSwcorePwrup { + LastSwcorePwrup(0) + } +} +#[doc = "Low power oscillator control register."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Lposc(pub u32); +impl Lposc { + #[doc = "This feature has been removed"] + #[inline(always)] + pub const fn mode(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "This feature has been removed"] + #[inline(always)] + pub fn set_mode(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[doc = "Frequency trim - the trim step is typically 1% of the reset frequency, but can be up to 3%"] + #[inline(always)] + pub const fn trim(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x3f; + val as u8 + } + #[doc = "Frequency trim - the trim step is typically 1% of the reset frequency, but can be up to 3%"] + #[inline(always)] + pub fn set_trim(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 4usize)) | (((val as u32) & 0x3f) << 4usize); + } +} +impl Default for Lposc { + #[inline(always)] + fn default() -> Lposc { + Lposc(0) + } +} +#[doc = "Informs the AON Timer of the fractional component of the clock frequency when running off the LPOSC."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct LposcFreqKhzFrac(pub u32); +impl LposcFreqKhzFrac { + #[doc = "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"] + #[inline(always)] + pub const fn lposc_freq_khz_frac(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_lposc_freq_khz_frac(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for LposcFreqKhzFrac { + #[inline(always)] + fn default() -> LposcFreqKhzFrac { + LposcFreqKhzFrac(0) + } +} +#[doc = "Informs the AON Timer of the integer component of the clock frequency when running off the LPOSC."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct LposcFreqKhzInt(pub u32); +impl LposcFreqKhzInt { + #[doc = "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"] + #[inline(always)] + pub const fn lposc_freq_khz_int(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_lposc_freq_khz_int(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } +} +impl Default for LposcFreqKhzInt { + #[inline(always)] + fn default() -> LposcFreqKhzInt { + LposcFreqKhzInt(0) + } +} +#[doc = "power state machine delays"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PowDelay(pub u32); +impl PowDelay { + #[doc = "timing between the swcore power state machine steps measured in units of the lposc period, 0 gives a delay of 1 unit"] + #[inline(always)] + pub const fn swcore_step(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "timing between the swcore power state machine steps measured in units of the lposc period, 0 gives a delay of 1 unit"] + #[inline(always)] + pub fn set_swcore_step(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "timing between the xip power state machine steps measured in units of the lposc period, 0 gives a delay of 1 unit"] + #[inline(always)] + pub const fn xip_step(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "timing between the xip power state machine steps measured in units of the lposc period, 0 gives a delay of 1 unit"] + #[inline(always)] + pub fn set_xip_step(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn sram_step(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_sram_step(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } +} +impl Default for PowDelay { + #[inline(always)] + fn default() -> PowDelay { + PowDelay(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PowFastdiv(pub u32); +impl PowFastdiv { + #[doc = "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"] + #[inline(always)] + pub const fn pow_fastdiv(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x07ff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_pow_fastdiv(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 0usize)) | (((val as u32) & 0x07ff) << 0usize); + } +} +impl Default for PowFastdiv { + #[inline(always)] + fn default() -> PowFastdiv { + PowFastdiv(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwrup0(pub u32); +impl Pwrup0 { + #[inline(always)] + pub const fn source(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[inline(always)] + pub fn set_source(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn direction(&self) -> super::vals::Pwrup0direction { + let val = (self.0 >> 7usize) & 0x01; + super::vals::Pwrup0direction::from_bits(val as u8) + } + #[inline(always)] + pub fn set_direction(&mut self, val: super::vals::Pwrup0direction) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val.to_bits() as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Pwrup0mode { + let val = (self.0 >> 8usize) & 0x01; + super::vals::Pwrup0mode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Pwrup0mode) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val.to_bits() as u32) & 0x01) << 8usize); + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub const fn status(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub fn set_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub const fn raw_status(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub fn set_raw_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Pwrup0 { + #[inline(always)] + fn default() -> Pwrup0 { + Pwrup0(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwrup1(pub u32); +impl Pwrup1 { + #[inline(always)] + pub const fn source(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[inline(always)] + pub fn set_source(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn direction(&self) -> super::vals::Pwrup1direction { + let val = (self.0 >> 7usize) & 0x01; + super::vals::Pwrup1direction::from_bits(val as u8) + } + #[inline(always)] + pub fn set_direction(&mut self, val: super::vals::Pwrup1direction) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val.to_bits() as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Pwrup1mode { + let val = (self.0 >> 8usize) & 0x01; + super::vals::Pwrup1mode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Pwrup1mode) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val.to_bits() as u32) & 0x01) << 8usize); + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub const fn status(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub fn set_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub const fn raw_status(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub fn set_raw_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Pwrup1 { + #[inline(always)] + fn default() -> Pwrup1 { + Pwrup1(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwrup2(pub u32); +impl Pwrup2 { + #[inline(always)] + pub const fn source(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[inline(always)] + pub fn set_source(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn direction(&self) -> super::vals::Pwrup2direction { + let val = (self.0 >> 7usize) & 0x01; + super::vals::Pwrup2direction::from_bits(val as u8) + } + #[inline(always)] + pub fn set_direction(&mut self, val: super::vals::Pwrup2direction) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val.to_bits() as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Pwrup2mode { + let val = (self.0 >> 8usize) & 0x01; + super::vals::Pwrup2mode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Pwrup2mode) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val.to_bits() as u32) & 0x01) << 8usize); + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub const fn status(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub fn set_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub const fn raw_status(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub fn set_raw_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Pwrup2 { + #[inline(always)] + fn default() -> Pwrup2 { + Pwrup2(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwrup3(pub u32); +impl Pwrup3 { + #[inline(always)] + pub const fn source(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[inline(always)] + pub fn set_source(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn direction(&self) -> super::vals::Pwrup3direction { + let val = (self.0 >> 7usize) & 0x01; + super::vals::Pwrup3direction::from_bits(val as u8) + } + #[inline(always)] + pub fn set_direction(&mut self, val: super::vals::Pwrup3direction) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val.to_bits() as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn mode(&self) -> super::vals::Pwrup3mode { + let val = (self.0 >> 8usize) & 0x01; + super::vals::Pwrup3mode::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_mode(&mut self, val: super::vals::Pwrup3mode) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val.to_bits() as u32) & 0x01) << 8usize); + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub const fn status(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Status of gpio wakeup. Write to 1 to clear a latched edge detect."] + #[inline(always)] + pub fn set_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub const fn raw_status(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Value of selected gpio pin (only if enable == 1)"] + #[inline(always)] + pub fn set_raw_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Pwrup3 { + #[inline(always)] + fn default() -> Pwrup3 { + Pwrup3(0) + } +} +#[doc = "For configuration of the power sequencer Writes are ignored while POWMAN_STATE_CHANGING=1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SeqCfg(pub u32); +impl SeqCfg { + #[doc = "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"] + #[inline(always)] + pub const fn hw_pwrup_sram1(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_hw_pwrup_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn hw_pwrup_sram0(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_hw_pwrup_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn use_vreg_lp(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_use_vreg_lp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn use_vreg_hp(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_use_vreg_hp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn use_bod_lp(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_use_bod_lp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn use_bod_hp(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_use_bod_hp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn run_lposc_in_lp(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_run_lposc_in_lp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn use_fast_powck(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_use_fast_powck(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "Indicates the voltage regulator (VREG) mode 0 = VREG high power mode which is the default 1 = VREG low power mode"] + #[inline(always)] + pub const fn using_vreg_lp(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Indicates the voltage regulator (VREG) mode 0 = VREG high power mode which is the default 1 = VREG low power mode"] + #[inline(always)] + pub fn set_using_vreg_lp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Indicates the brown-out detector (BOD) mode 0 = BOD high power mode which is the default 1 = BOD low power mode"] + #[inline(always)] + pub const fn using_bod_lp(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Indicates the brown-out detector (BOD) mode 0 = BOD high power mode which is the default 1 = BOD low power mode"] + #[inline(always)] + pub fn set_using_bod_lp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn using_fast_powck(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_using_fast_powck(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } +} +impl Default for SeqCfg { + #[inline(always)] + fn default() -> SeqCfg { + SeqCfg(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SetTime15to0(pub u32); +impl SetTime15to0 { + #[doc = "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"] + #[inline(always)] + pub const fn set_time_15to0(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_set_time_15to0(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for SetTime15to0 { + #[inline(always)] + fn default() -> SetTime15to0 { + SetTime15to0(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SetTime31to16(pub u32); +impl SetTime31to16 { + #[doc = "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"] + #[inline(always)] + pub const fn set_time_31to16(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_set_time_31to16(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for SetTime31to16 { + #[inline(always)] + fn default() -> SetTime31to16 { + SetTime31to16(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SetTime47to32(pub u32); +impl SetTime47to32 { + #[doc = "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"] + #[inline(always)] + pub const fn set_time_47to32(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_set_time_47to32(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for SetTime47to32 { + #[inline(always)] + fn default() -> SetTime47to32 { + SetTime47to32(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SetTime63to48(pub u32); +impl SetTime63to48 { + #[doc = "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"] + #[inline(always)] + pub const fn set_time_63to48(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_set_time_63to48(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for SetTime63to48 { + #[inline(always)] + fn default() -> SetTime63to48 { + SetTime63to48(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct State(pub u32); +impl State { + #[inline(always)] + pub const fn current(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_current(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[inline(always)] + pub const fn req(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_req(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } + #[inline(always)] + pub const fn req_ignored(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_req_ignored(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down."] + #[inline(always)] + pub const fn pwrup_while_waiting(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down."] + #[inline(always)] + pub fn set_pwrup_while_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Bad software initiated state request. No action taken."] + #[inline(always)] + pub const fn bad_sw_req(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Bad software initiated state request. No action taken."] + #[inline(always)] + pub fn set_bad_sw_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)"] + #[inline(always)] + pub const fn bad_hw_req(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up)"] + #[inline(always)] + pub fn set_bad_hw_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn waiting(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_waiting(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn changing(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_changing(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } +} +impl Default for State { + #[inline(always)] + fn default() -> State { + State(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer(pub u32); +impl Timer { + #[doc = "Control whether Non-secure software can write to the timer registers. All other registers are hardwired to be inaccessible to Non-secure."] + #[inline(always)] + pub const fn nonsec_write(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Control whether Non-secure software can write to the timer registers. All other registers are hardwired to be inaccessible to Non-secure."] + #[inline(always)] + pub fn set_nonsec_write(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn run(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_run(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Clears the timer, does not disable the timer and does not affect the alarm. This control can be written at any time."] + #[inline(always)] + pub const fn clear(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Clears the timer, does not disable the timer and does not affect the alarm. This control can be written at any time."] + #[inline(always)] + pub fn set_clear(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Enables the alarm. The alarm must be disabled while writing the alarm time."] + #[inline(always)] + pub const fn alarm_enab(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Enables the alarm. The alarm must be disabled while writing the alarm time."] + #[inline(always)] + pub fn set_alarm_enab(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Alarm wakes the chip from low power mode"] + #[inline(always)] + pub const fn pwrup_on_alarm(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "Alarm wakes the chip from low power mode"] + #[inline(always)] + pub fn set_pwrup_on_alarm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "Alarm has fired. Write to 1 to clear the alarm."] + #[inline(always)] + pub const fn alarm(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Alarm has fired. Write to 1 to clear the alarm."] + #[inline(always)] + pub fn set_alarm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Switch to lposc as the source of the 1kHz timer tick"] + #[inline(always)] + pub const fn use_lposc(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Switch to lposc as the source of the 1kHz timer tick"] + #[inline(always)] + pub fn set_use_lposc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "switch to xosc as the source of the 1kHz timer tick"] + #[inline(always)] + pub const fn use_xosc(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "switch to xosc as the source of the 1kHz timer tick"] + #[inline(always)] + pub fn set_use_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "switch to gpio as the source of the 1kHz timer tick"] + #[inline(always)] + pub const fn use_gpio_1khz(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "switch to gpio as the source of the 1kHz timer tick"] + #[inline(always)] + pub fn set_use_gpio_1khz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Selects the gpio source as the reference for the sec counter. The msec counter will continue to use the lposc or xosc reference."] + #[inline(always)] + pub const fn use_gpio_1hz(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "Selects the gpio source as the reference for the sec counter. The msec counter will continue to use the lposc or xosc reference."] + #[inline(always)] + pub fn set_use_gpio_1hz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "Timer is running from xosc"] + #[inline(always)] + pub const fn using_xosc(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Timer is running from xosc"] + #[inline(always)] + pub fn set_using_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Timer is running from lposc"] + #[inline(always)] + pub const fn using_lposc(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Timer is running from lposc"] + #[inline(always)] + pub fn set_using_lposc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "Timer is running from a 1khz gpio source"] + #[inline(always)] + pub const fn using_gpio_1khz(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "Timer is running from a 1khz gpio source"] + #[inline(always)] + pub fn set_using_gpio_1khz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "Timer is synchronised to a 1hz gpio source"] + #[inline(always)] + pub const fn using_gpio_1hz(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "Timer is synchronised to a 1hz gpio source"] + #[inline(always)] + pub fn set_using_gpio_1hz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } +} +impl Default for Timer { + #[inline(always)] + fn default() -> Timer { + Timer(0) + } +} +#[doc = "Voltage Regulator Settings"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Vreg(pub u32); +impl Vreg { + #[doc = "high impedance mode select 0=not in high impedance mode, 1=in high impedance mode"] + #[inline(always)] + pub const fn hiz(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "high impedance mode select 0=not in high impedance mode, 1=in high impedance mode"] + #[inline(always)] + pub fn set_hiz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn vsel(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_vsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 4usize)) | (((val as u32) & 0x1f) << 4usize); + } + #[doc = "regulator state is being updated writes to the vreg register will be ignored when this field is set"] + #[inline(always)] + pub const fn update_in_progress(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "regulator state is being updated writes to the vreg register will be ignored when this field is set"] + #[inline(always)] + pub fn set_update_in_progress(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for Vreg { + #[inline(always)] + fn default() -> Vreg { + Vreg(0) + } +} +#[doc = "Voltage Regulator Control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct VregCtrl(pub u32); +impl VregCtrl { + #[doc = "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"] + #[inline(always)] + pub const fn ht_th(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x07; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_ht_th(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 4usize)) | (((val as u32) & 0x07) << 4usize); + } + #[doc = "0=not disabled, 1=enabled"] + #[inline(always)] + pub const fn disable_voltage_limit(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "0=not disabled, 1=enabled"] + #[inline(always)] + pub fn set_disable_voltage_limit(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "isolates the VREG control interface 0 - not isolated (default) 1 - isolated"] + #[inline(always)] + pub const fn isolate(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "isolates the VREG control interface 0 - not isolated (default) 1 - isolated"] + #[inline(always)] + pub fn set_isolate(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "unlocks the VREG control interface after power up 0 - Locked (default) 1 - Unlocked It cannot be relocked when it is unlocked."] + #[inline(always)] + pub const fn unlock(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "unlocks the VREG control interface after power up 0 - Locked (default) 1 - Unlocked It cannot be relocked when it is unlocked."] + #[inline(always)] + pub fn set_unlock(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "returns the regulator to its startup settings 0 - reset 1 - not reset (default)"] + #[inline(always)] + pub const fn rst_n(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "returns the regulator to its startup settings 0 - reset 1 - not reset (default)"] + #[inline(always)] + pub fn set_rst_n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for VregCtrl { + #[inline(always)] + fn default() -> VregCtrl { + VregCtrl(0) + } +} +#[doc = "Voltage Regulator Low Power Entry Settings"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct VregLpEntry(pub u32); +impl VregLpEntry { + #[doc = "high impedance mode select 0=not in high impedance mode, 1=in high impedance mode"] + #[inline(always)] + pub const fn hiz(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "high impedance mode select 0=not in high impedance mode, 1=in high impedance mode"] + #[inline(always)] + pub fn set_hiz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn mode(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_mode(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn vsel(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_vsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 4usize)) | (((val as u32) & 0x1f) << 4usize); + } +} +impl Default for VregLpEntry { + #[inline(always)] + fn default() -> VregLpEntry { + VregLpEntry(0) + } +} +#[doc = "Voltage Regulator Low Power Exit Settings"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct VregLpExit(pub u32); +impl VregLpExit { + #[doc = "high impedance mode select 0=not in high impedance mode, 1=in high impedance mode"] + #[inline(always)] + pub const fn hiz(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "high impedance mode select 0=not in high impedance mode, 1=in high impedance mode"] + #[inline(always)] + pub fn set_hiz(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn mode(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_mode(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn vsel(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_vsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 4usize)) | (((val as u32) & 0x1f) << 4usize); + } +} +impl Default for VregLpExit { + #[inline(always)] + fn default() -> VregLpExit { + VregLpExit(0) + } +} +#[doc = "Voltage Regulator Status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct VregSts(pub u32); +impl VregSts { + #[doc = "startup status 0=startup complete, 1=starting up"] + #[inline(always)] + pub const fn startup(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "startup status 0=startup complete, 1=starting up"] + #[inline(always)] + pub fn set_startup(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "output regulation status 0=not in regulation, 1=in regulation"] + #[inline(always)] + pub const fn vout_ok(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "output regulation status 0=not in regulation, 1=in regulation"] + #[inline(always)] + pub fn set_vout_ok(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for VregSts { + #[inline(always)] + fn default() -> VregSts { + VregSts(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Wdsel(pub u32); +impl Wdsel { + #[doc = "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"] + #[inline(always)] + pub const fn reset_powman_async(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_reset_powman_async(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn reset_powman(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_reset_powman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn reset_swcore(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_reset_swcore(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn reset_rsm(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_reset_rsm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for Wdsel { + #[inline(always)] + fn default() -> Wdsel { + Wdsel(0) + } +} +#[doc = "Informs the AON Timer of the fractional component of the clock frequency when running off the XOSC."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XoscFreqKhzFrac(pub u32); +impl XoscFreqKhzFrac { + #[doc = "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"] + #[inline(always)] + pub const fn xosc_freq_khz_frac(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_xosc_freq_khz_frac(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for XoscFreqKhzFrac { + #[inline(always)] + fn default() -> XoscFreqKhzFrac { + XoscFreqKhzFrac(0) + } +} +#[doc = "Informs the AON Timer of the integer component of the clock frequency when running off the XOSC."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XoscFreqKhzInt(pub u32); +impl XoscFreqKhzInt { + #[doc = "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"] + #[inline(always)] + pub const fn xosc_freq_khz_int(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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"] + #[inline(always)] + pub fn set_xosc_freq_khz_int(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for XoscFreqKhzInt { + #[inline(always)] + fn default() -> XoscFreqKhzInt { + XoscFreqKhzInt(0) + } +} diff --git a/src/rp2350/powman/vals.rs b/src/rp2350/powman/vals.rs new file mode 100644 index 00000000..22a4e0ce --- /dev/null +++ b/src/rp2350/powman/vals.rs @@ -0,0 +1,224 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup0direction { + LOW_FALLING = 0, + HIGH_RISING = 0x01, +} +impl Pwrup0direction { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup0direction { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup0direction { + #[inline(always)] + fn from(val: u8) -> Pwrup0direction { + Pwrup0direction::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup0direction) -> u8 { + Pwrup0direction::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup0mode { + LEVEL = 0, + EDGE = 0x01, +} +impl Pwrup0mode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup0mode { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup0mode { + #[inline(always)] + fn from(val: u8) -> Pwrup0mode { + Pwrup0mode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup0mode) -> u8 { + Pwrup0mode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup1direction { + LOW_FALLING = 0, + HIGH_RISING = 0x01, +} +impl Pwrup1direction { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup1direction { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup1direction { + #[inline(always)] + fn from(val: u8) -> Pwrup1direction { + Pwrup1direction::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup1direction) -> u8 { + Pwrup1direction::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup1mode { + LEVEL = 0, + EDGE = 0x01, +} +impl Pwrup1mode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup1mode { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup1mode { + #[inline(always)] + fn from(val: u8) -> Pwrup1mode { + Pwrup1mode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup1mode) -> u8 { + Pwrup1mode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup2direction { + LOW_FALLING = 0, + HIGH_RISING = 0x01, +} +impl Pwrup2direction { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup2direction { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup2direction { + #[inline(always)] + fn from(val: u8) -> Pwrup2direction { + Pwrup2direction::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup2direction) -> u8 { + Pwrup2direction::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup2mode { + LEVEL = 0, + EDGE = 0x01, +} +impl Pwrup2mode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup2mode { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup2mode { + #[inline(always)] + fn from(val: u8) -> Pwrup2mode { + Pwrup2mode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup2mode) -> u8 { + Pwrup2mode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup3direction { + LOW_FALLING = 0, + HIGH_RISING = 0x01, +} +impl Pwrup3direction { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup3direction { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup3direction { + #[inline(always)] + fn from(val: u8) -> Pwrup3direction { + Pwrup3direction::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup3direction) -> u8 { + Pwrup3direction::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Pwrup3mode { + LEVEL = 0, + EDGE = 0x01, +} +impl Pwrup3mode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Pwrup3mode { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Pwrup3mode { + #[inline(always)] + fn from(val: u8) -> Pwrup3mode { + Pwrup3mode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Pwrup3mode) -> u8 { + Pwrup3mode::to_bits(val) + } +} diff --git a/src/rp2350/psm.rs b/src/rp2350/psm.rs new file mode 100644 index 00000000..17805bc3 --- /dev/null +++ b/src/rp2350/psm.rs @@ -0,0 +1,37 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Psm { + ptr: *mut u8, +} +unsafe impl Send for Psm {} +unsafe impl Sync for Psm {} +impl Psm { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Force block out of reset (i.e. power it on)"] + #[inline(always)] + pub const fn frce_on(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Force into reset (i.e. power it off)"] + #[inline(always)] + pub const fn frce_off(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Set to 1 if the watchdog should reset this"] + #[inline(always)] + pub const fn wdsel(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Is the subsystem ready?"] + #[inline(always)] + pub const fn done(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/psm/regs.rs b/src/rp2350/psm/regs.rs new file mode 100644 index 00000000..8c862ee6 --- /dev/null +++ b/src/rp2350/psm/regs.rs @@ -0,0 +1,948 @@ +#[doc = "Is the subsystem ready?"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Done(pub u32); +impl Done { + #[inline(always)] + pub const fn proc_cold(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc_cold(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn otp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn rosc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn xosc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn resets(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clocks(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn psm_ready(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_psm_ready(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn busfabric(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn rom(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn bootram(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn sram0(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn sram1(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn sram2(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn sram3(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn sram4(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn sram5(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn sram6(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn sram7(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn sram8(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn sram9(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn xip(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn sio(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn accessctrl(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } +} +impl Default for Done { + #[inline(always)] + fn default() -> Done { + Done(0) + } +} +#[doc = "Force into reset (i.e. power it off)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FrceOff(pub u32); +impl FrceOff { + #[inline(always)] + pub const fn proc_cold(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc_cold(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn otp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn rosc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn xosc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn resets(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clocks(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn psm_ready(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_psm_ready(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn busfabric(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn rom(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn bootram(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn sram0(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn sram1(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn sram2(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn sram3(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn sram4(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn sram5(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn sram6(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn sram7(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn sram8(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn sram9(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn xip(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn sio(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn accessctrl(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } +} +impl Default for FrceOff { + #[inline(always)] + fn default() -> FrceOff { + FrceOff(0) + } +} +#[doc = "Force block out of reset (i.e. power it on)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FrceOn(pub u32); +impl FrceOn { + #[inline(always)] + pub const fn proc_cold(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc_cold(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn otp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn rosc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn xosc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn resets(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clocks(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn psm_ready(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_psm_ready(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn busfabric(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn rom(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn bootram(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn sram0(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn sram1(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn sram2(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn sram3(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn sram4(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn sram5(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn sram6(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn sram7(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn sram8(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn sram9(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn xip(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn sio(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn accessctrl(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } +} +impl Default for FrceOn { + #[inline(always)] + fn default() -> FrceOn { + FrceOn(0) + } +} +#[doc = "Set to 1 if the watchdog should reset this"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Wdsel(pub u32); +impl Wdsel { + #[inline(always)] + pub const fn proc_cold(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc_cold(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn otp(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_otp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn rosc(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn xosc(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xosc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn resets(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_resets(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn clocks(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_clocks(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn psm_ready(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_psm_ready(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn busfabric(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_busfabric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn rom(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn bootram(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn sram0(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn sram1(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn sram2(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn sram3(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn sram4(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn sram5(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn sram6(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn sram7(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn sram8(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn sram9(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn xip(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_xip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn sio(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn accessctrl(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_accessctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn proc0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn proc1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_proc1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } +} +impl Default for Wdsel { + #[inline(always)] + fn default() -> Wdsel { + Wdsel(0) + } +} diff --git a/src/rp2350/pwm.rs b/src/rp2350/pwm.rs new file mode 100644 index 00000000..12164a7d --- /dev/null +++ b/src/rp2350/pwm.rs @@ -0,0 +1,105 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Channel { + ptr: *mut u8, +} +unsafe impl Send for Channel {} +unsafe impl Sync for Channel {} +impl Channel { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Control and status register"] + #[inline(always)] + pub const fn csr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Direct access to the PWM counter"] + #[inline(always)] + pub const fn ctr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Counter compare values"] + #[inline(always)] + pub const fn cc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Counter wrap value"] + #[inline(always)] + pub const fn top(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } +} +#[doc = "Simple PWM"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pwm { + ptr: *mut u8, +} +unsafe impl Send for Pwm {} +unsafe impl Sync for Pwm {} +impl Pwm { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[inline(always)] + pub const fn ch(self, n: usize) -> Channel { + assert!(n < 12usize); + unsafe { Channel::from_ptr(self.ptr.add(0usize + n * 20usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn en(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(240usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(244usize) as _) } + } + #[doc = "Interrupt Enable for irq0"] + #[inline(always)] + pub const fn irq0_inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(248usize) as _) } + } + #[doc = "Interrupt Force for irq0"] + #[inline(always)] + pub const fn irq0_intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(252usize) as _) } + } + #[doc = "Interrupt status after masking & forcing for irq0"] + #[inline(always)] + pub const fn irq0_ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize) as _) } + } + #[doc = "Interrupt Enable for irq1"] + #[inline(always)] + pub const fn irq1_inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(260usize) as _) } + } + #[doc = "Interrupt Force for irq1"] + #[inline(always)] + pub const fn irq1_intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(264usize) as _) } + } + #[doc = "Interrupt status after masking & forcing for irq1"] + #[inline(always)] + pub const fn irq1_ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(268usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/pwm/regs.rs b/src/rp2350/pwm/regs.rs new file mode 100644 index 00000000..3bcf2aa3 --- /dev/null +++ b/src/rp2350/pwm/regs.rs @@ -0,0 +1,1149 @@ +#[doc = "Counter compare values"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChCc(pub u32); +impl ChCc { + #[inline(always)] + pub const fn a(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_a(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[inline(always)] + pub const fn b(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_b(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for ChCc { + #[inline(always)] + fn default() -> ChCc { + ChCc(0) + } +} +#[doc = "Control and status register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChCsr(pub u32); +impl ChCsr { + #[doc = "Enable the PWM channel."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Enable the PWM channel."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "1: Enable phase-correct modulation. 0: Trailing-edge"] + #[inline(always)] + pub const fn ph_correct(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "1: Enable phase-correct modulation. 0: Trailing-edge"] + #[inline(always)] + pub fn set_ph_correct(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Invert output A"] + #[inline(always)] + pub const fn a_inv(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Invert output A"] + #[inline(always)] + pub fn set_a_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Invert output B"] + #[inline(always)] + pub const fn b_inv(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Invert output B"] + #[inline(always)] + pub fn set_b_inv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn divmode(&self) -> super::vals::Divmode { + let val = (self.0 >> 4usize) & 0x03; + super::vals::Divmode::from_bits(val as u8) + } + #[inline(always)] + pub fn set_divmode(&mut self, val: super::vals::Divmode) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ph_ret(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ph_ret(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn ph_adv(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_ph_adv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for ChCsr { + #[inline(always)] + fn default() -> ChCsr { + ChCsr(0) + } +} +#[doc = "Direct access to the PWM counter"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChCtr(pub u32); +impl ChCtr { + #[inline(always)] + pub const fn ctr(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_ctr(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for ChCtr { + #[inline(always)] + fn default() -> ChCtr { + ChCtr(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChDiv(pub u32); +impl ChDiv { + #[inline(always)] + pub const fn frac(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_frac(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[inline(always)] + pub const fn int(&self) -> u8 { + let val = (self.0 >> 4usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_int(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 4usize)) | (((val as u32) & 0xff) << 4usize); + } +} +impl Default for ChDiv { + #[inline(always)] + fn default() -> ChDiv { + ChDiv(0) + } +} +#[doc = "Counter wrap value"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChTop(pub u32); +impl ChTop { + #[inline(always)] + pub const fn top(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_top(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for ChTop { + #[inline(always)] + fn default() -> ChTop { + ChTop(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct En(pub u32); +impl En { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for En { + #[inline(always)] + fn default() -> En { + En(0) + } +} +#[doc = "Raw Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Intr(pub u32); +impl Intr { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Intr { + #[inline(always)] + fn default() -> Intr { + Intr(0) + } +} +#[doc = "Interrupt Enable for irq0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq0inte(pub u32); +impl Irq0inte { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Irq0inte { + #[inline(always)] + fn default() -> Irq0inte { + Irq0inte(0) + } +} +#[doc = "Interrupt Force for irq0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq0intf(pub u32); +impl Irq0intf { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Irq0intf { + #[inline(always)] + fn default() -> Irq0intf { + Irq0intf(0) + } +} +#[doc = "Interrupt status after masking & forcing for irq0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq0ints(pub u32); +impl Irq0ints { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Irq0ints { + #[inline(always)] + fn default() -> Irq0ints { + Irq0ints(0) + } +} +#[doc = "Interrupt Enable for irq1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq1inte(pub u32); +impl Irq1inte { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Irq1inte { + #[inline(always)] + fn default() -> Irq1inte { + Irq1inte(0) + } +} +#[doc = "Interrupt Force for irq1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq1intf(pub u32); +impl Irq1intf { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Irq1intf { + #[inline(always)] + fn default() -> Irq1intf { + Irq1intf(0) + } +} +#[doc = "Interrupt status after masking & forcing for irq1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Irq1ints(pub u32); +impl Irq1ints { + #[inline(always)] + pub const fn ch0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ch1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ch2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ch3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ch4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ch5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ch6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ch7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ch8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ch9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ch10(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch10(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ch11(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ch11(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Irq1ints { + #[inline(always)] + fn default() -> Irq1ints { + Irq1ints(0) + } +} diff --git a/src/rp2350/pwm/vals.rs b/src/rp2350/pwm/vals.rs new file mode 100644 index 00000000..cd8bad90 --- /dev/null +++ b/src/rp2350/pwm/vals.rs @@ -0,0 +1,102 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch10csrDivmode { + #[doc = "Free-running counting at rate dictated by fractional divider"] + DIV = 0, + #[doc = "Fractional divider operation is gated by the PWM B pin."] + LEVEL = 0x01, + #[doc = "Counter advances with each rising edge of the PWM B pin."] + RISE = 0x02, + #[doc = "Counter advances with each falling edge of the PWM B pin."] + FALL = 0x03, +} +impl Ch10csrDivmode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch10csrDivmode { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch10csrDivmode { + #[inline(always)] + fn from(val: u8) -> Ch10csrDivmode { + Ch10csrDivmode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch10csrDivmode) -> u8 { + Ch10csrDivmode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Ch11csrDivmode { + #[doc = "Free-running counting at rate dictated by fractional divider"] + DIV = 0, + #[doc = "Fractional divider operation is gated by the PWM B pin."] + LEVEL = 0x01, + #[doc = "Counter advances with each rising edge of the PWM B pin."] + RISE = 0x02, + #[doc = "Counter advances with each falling edge of the PWM B pin."] + FALL = 0x03, +} +impl Ch11csrDivmode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Ch11csrDivmode { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Ch11csrDivmode { + #[inline(always)] + fn from(val: u8) -> Ch11csrDivmode { + Ch11csrDivmode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Ch11csrDivmode) -> u8 { + Ch11csrDivmode::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Divmode { + #[doc = "Free-running counting at rate dictated by fractional divider"] + DIV = 0, + #[doc = "Fractional divider operation is gated by the PWM B pin."] + LEVEL = 0x01, + #[doc = "Counter advances with each rising edge of the PWM B pin."] + RISE = 0x02, + #[doc = "Counter advances with each falling edge of the PWM B pin."] + FALL = 0x03, +} +impl Divmode { + #[inline(always)] + pub const fn from_bits(val: u8) -> Divmode { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Divmode { + #[inline(always)] + fn from(val: u8) -> Divmode { + Divmode::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Divmode) -> u8 { + Divmode::to_bits(val) + } +} diff --git a/src/rp2350/qmi.rs b/src/rp2350/qmi.rs new file mode 100644 index 00000000..c1730113 --- /dev/null +++ b/src/rp2350/qmi.rs @@ -0,0 +1,124 @@ +#[doc = "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."] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Qmi { + ptr: *mut u8, +} +unsafe impl Send for Qmi {} +unsafe impl Sync for Qmi {} +impl Qmi { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn direct_csr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Transmit FIFO for direct mode"] + #[inline(always)] + pub const fn direct_tx(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Receive FIFO for direct mode"] + #[inline(always)] + pub const fn direct_rx(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Timing configuration register for memory address window 0."] + #[inline(always)] + pub const fn m0_timing(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m0_rfmt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m0_rcmd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m0_wfmt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m0_wcmd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Timing configuration register for memory address window 1."] + #[inline(always)] + pub const fn m1_timing(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m1_rfmt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m1_rcmd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m1_wfmt(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn m1_wcmd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn atrans7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/qmi/regs.rs b/src/rp2350/qmi/regs.rs new file mode 100644 index 00000000..db508fe6 --- /dev/null +++ b/src/rp2350/qmi/regs.rs @@ -0,0 +1,1308 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans0(pub u32); +impl Atrans0 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans0 { + #[inline(always)] + fn default() -> Atrans0 { + Atrans0(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans1(pub u32); +impl Atrans1 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans1 { + #[inline(always)] + fn default() -> Atrans1 { + Atrans1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans2(pub u32); +impl Atrans2 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans2 { + #[inline(always)] + fn default() -> Atrans2 { + Atrans2(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans3(pub u32); +impl Atrans3 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans3 { + #[inline(always)] + fn default() -> Atrans3 { + Atrans3(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans4(pub u32); +impl Atrans4 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans4 { + #[inline(always)] + fn default() -> Atrans4 { + Atrans4(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans5(pub u32); +impl Atrans5 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans5 { + #[inline(always)] + fn default() -> Atrans5 { + Atrans5(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans6(pub u32); +impl Atrans6 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans6 { + #[inline(always)] + fn default() -> Atrans6 { + Atrans6(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Atrans7(pub u32); +impl Atrans7 { + #[doc = "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."] + #[inline(always)] + pub const fn base(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x0fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_base(&mut self, val: u16) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn size(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x07ff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_size(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 16usize)) | (((val as u32) & 0x07ff) << 16usize); + } +} +impl Default for Atrans7 { + #[inline(always)] + fn default() -> Atrans7 { + Atrans7(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DirectCsr(pub u32); +impl DirectCsr { + #[doc = "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."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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.)"] + #[inline(always)] + pub const fn busy(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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.)"] + #[inline(always)] + pub fn set_busy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "When 1, assert (i.e. drive low) the CS0n chip select line. Note that this applies even when DIRECT_CSR_EN is 0."] + #[inline(always)] + pub const fn assert_cs0n(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "When 1, assert (i.e. drive low) the CS0n chip select line. Note that this applies even when DIRECT_CSR_EN is 0."] + #[inline(always)] + pub fn set_assert_cs0n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "When 1, assert (i.e. drive low) the CS1n chip select line. Note that this applies even when DIRECT_CSR_EN is 0."] + #[inline(always)] + pub const fn assert_cs1n(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "When 1, assert (i.e. drive low) the CS1n chip select line. Note that this applies even when DIRECT_CSR_EN is 0."] + #[inline(always)] + pub fn set_assert_cs1n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "When 1, automatically assert the CS0n chip select line whenever the BUSY flag is set."] + #[inline(always)] + pub const fn auto_cs0n(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "When 1, automatically assert the CS0n chip select line whenever the BUSY flag is set."] + #[inline(always)] + pub fn set_auto_cs0n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "When 1, automatically assert the CS1n chip select line whenever the BUSY flag is set."] + #[inline(always)] + pub const fn auto_cs1n(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "When 1, automatically assert the CS1n chip select line whenever the BUSY flag is set."] + #[inline(always)] + pub fn set_auto_cs1n(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "When 1, the DIRECT_TX FIFO is currently full. If the processor tries to write more data, that data will be ignored."] + #[inline(always)] + pub const fn txfull(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "When 1, the DIRECT_TX FIFO is currently full. If the processor tries to write more data, that data will be ignored."] + #[inline(always)] + pub fn set_txfull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txempty(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txempty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "Current level of DIRECT_TX FIFO"] + #[inline(always)] + pub const fn txlevel(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "Current level of DIRECT_TX FIFO"] + #[inline(always)] + pub fn set_txlevel(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxempty(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxempty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxfull(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxfull(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "Current level of DIRECT_RX FIFO"] + #[inline(always)] + pub const fn rxlevel(&self) -> u8 { + let val = (self.0 >> 18usize) & 0x07; + val as u8 + } + #[doc = "Current level of DIRECT_RX FIFO"] + #[inline(always)] + pub fn set_rxlevel(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 18usize)) | (((val as u32) & 0x07) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn clkdiv(&self) -> u8 { + let val = (self.0 >> 22usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_clkdiv(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 22usize)) | (((val as u32) & 0xff) << 22usize); + } + #[doc = "Delay the read data sample timing, in units of one half of a system clock cycle. (Not necessarily half of an SCK cycle.)"] + #[inline(always)] + pub const fn rxdelay(&self) -> u8 { + let val = (self.0 >> 30usize) & 0x03; + val as u8 + } + #[doc = "Delay the read data sample timing, in units of one half of a system clock cycle. (Not necessarily half of an SCK cycle.)"] + #[inline(always)] + pub fn set_rxdelay(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 30usize)) | (((val as u32) & 0x03) << 30usize); + } +} +impl Default for DirectCsr { + #[inline(always)] + fn default() -> DirectCsr { + DirectCsr(0) + } +} +#[doc = "Receive FIFO for direct mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DirectRx(pub u32); +impl DirectRx { + #[doc = "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."] + #[inline(always)] + pub const fn direct_rx(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_direct_rx(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for DirectRx { + #[inline(always)] + fn default() -> DirectRx { + DirectRx(0) + } +} +#[doc = "Transmit FIFO for direct mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DirectTx(pub u32); +impl DirectTx { + #[doc = "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."] + #[inline(always)] + pub const fn data(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_data(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely."] + #[inline(always)] + pub const fn iwidth(&self) -> super::vals::Iwidth { + let val = (self.0 >> 16usize) & 0x03; + super::vals::Iwidth::from_bits(val as u8) + } + #[doc = "Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely."] + #[inline(always)] + pub fn set_iwidth(&mut self, val: super::vals::Iwidth) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val.to_bits() as u32) & 0x03) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dwidth(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dwidth(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn oe(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_oe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn nopush(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nopush(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } +} +impl Default for DirectTx { + #[inline(always)] + fn default() -> DirectTx { + DirectTx(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M0rcmd(pub u32); +impl M0rcmd { + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub const fn prefix(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_prefix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub const fn suffix(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_suffix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } +} +impl Default for M0rcmd { + #[inline(always)] + fn default() -> M0rcmd { + M0rcmd(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M0rfmt(pub u32); +impl M0rfmt { + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub const fn prefix_width(&self) -> super::vals::M0rfmtPrefixWidth { + let val = (self.0 >> 0usize) & 0x03; + super::vals::M0rfmtPrefixWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub fn set_prefix_width(&mut self, val: super::vals::M0rfmtPrefixWidth) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub const fn addr_width(&self) -> super::vals::M0rfmtAddrWidth { + let val = (self.0 >> 2usize) & 0x03; + super::vals::M0rfmtAddrWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub fn set_addr_width(&mut self, val: super::vals::M0rfmtAddrWidth) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub const fn suffix_width(&self) -> super::vals::M0rfmtSuffixWidth { + let val = (self.0 >> 4usize) & 0x03; + super::vals::M0rfmtSuffixWidth::from_bits(val as u8) + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub fn set_suffix_width(&mut self, val: super::vals::M0rfmtSuffixWidth) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dummy_width(&self) -> super::vals::M0rfmtDummyWidth { + let val = (self.0 >> 6usize) & 0x03; + super::vals::M0rfmtDummyWidth::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_dummy_width(&mut self, val: super::vals::M0rfmtDummyWidth) { + self.0 = (self.0 & !(0x03 << 6usize)) | (((val.to_bits() as u32) & 0x03) << 6usize); + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub const fn data_width(&self) -> super::vals::M0rfmtDataWidth { + let val = (self.0 >> 8usize) & 0x03; + super::vals::M0rfmtDataWidth::from_bits(val as u8) + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub fn set_data_width(&mut self, val: super::vals::M0rfmtDataWidth) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val.to_bits() as u32) & 0x03) << 8usize); + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub const fn prefix_len(&self) -> super::vals::M0rfmtPrefixLen { + let val = (self.0 >> 12usize) & 0x01; + super::vals::M0rfmtPrefixLen::from_bits(val as u8) + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub fn set_prefix_len(&mut self, val: super::vals::M0rfmtPrefixLen) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val.to_bits() as u32) & 0x01) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn suffix_len(&self) -> super::vals::M0rfmtSuffixLen { + let val = (self.0 >> 14usize) & 0x03; + super::vals::M0rfmtSuffixLen::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_suffix_len(&mut self, val: super::vals::M0rfmtSuffixLen) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val.to_bits() as u32) & 0x03) << 14usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn dummy_len(&self) -> super::vals::M0rfmtDummyLen { + let val = (self.0 >> 16usize) & 0x07; + super::vals::M0rfmtDummyLen::from_bits(val as u8) + } + #[doc = "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)"] + #[inline(always)] + pub fn set_dummy_len(&mut self, val: super::vals::M0rfmtDummyLen) { + self.0 = (self.0 & !(0x07 << 16usize)) | (((val.to_bits() as u32) & 0x07) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dtr(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dtr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for M0rfmt { + #[inline(always)] + fn default() -> M0rfmt { + M0rfmt(0) + } +} +#[doc = "Timing configuration register for memory address window 0."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M0timing(pub u32); +impl M0timing { + #[doc = "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."] + #[inline(always)] + pub const fn clkdiv(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_clkdiv(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxdelay(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxdelay(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 8usize)) | (((val as u32) & 0x07) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn min_deselect(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_min_deselect(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 12usize)) | (((val as u32) & 0x1f) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn max_select(&self) -> u8 { + let val = (self.0 >> 17usize) & 0x3f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_max_select(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 17usize)) | (((val as u32) & 0x3f) << 17usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn select_hold(&self) -> u8 { + let val = (self.0 >> 23usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_select_hold(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 23usize)) | (((val as u32) & 0x03) << 23usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn select_setup(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_select_setup(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn pagebreak(&self) -> super::vals::M0timingPagebreak { + let val = (self.0 >> 28usize) & 0x03; + super::vals::M0timingPagebreak::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_pagebreak(&mut self, val: super::vals::M0timingPagebreak) { + self.0 = (self.0 & !(0x03 << 28usize)) | (((val.to_bits() as u32) & 0x03) << 28usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn cooldown(&self) -> u8 { + let val = (self.0 >> 30usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_cooldown(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 30usize)) | (((val as u32) & 0x03) << 30usize); + } +} +impl Default for M0timing { + #[inline(always)] + fn default() -> M0timing { + M0timing(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M0wcmd(pub u32); +impl M0wcmd { + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub const fn prefix(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_prefix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub const fn suffix(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_suffix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } +} +impl Default for M0wcmd { + #[inline(always)] + fn default() -> M0wcmd { + M0wcmd(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M0wfmt(pub u32); +impl M0wfmt { + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub const fn prefix_width(&self) -> super::vals::M0wfmtPrefixWidth { + let val = (self.0 >> 0usize) & 0x03; + super::vals::M0wfmtPrefixWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub fn set_prefix_width(&mut self, val: super::vals::M0wfmtPrefixWidth) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub const fn addr_width(&self) -> super::vals::M0wfmtAddrWidth { + let val = (self.0 >> 2usize) & 0x03; + super::vals::M0wfmtAddrWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub fn set_addr_width(&mut self, val: super::vals::M0wfmtAddrWidth) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub const fn suffix_width(&self) -> super::vals::M0wfmtSuffixWidth { + let val = (self.0 >> 4usize) & 0x03; + super::vals::M0wfmtSuffixWidth::from_bits(val as u8) + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub fn set_suffix_width(&mut self, val: super::vals::M0wfmtSuffixWidth) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dummy_width(&self) -> super::vals::M0wfmtDummyWidth { + let val = (self.0 >> 6usize) & 0x03; + super::vals::M0wfmtDummyWidth::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_dummy_width(&mut self, val: super::vals::M0wfmtDummyWidth) { + self.0 = (self.0 & !(0x03 << 6usize)) | (((val.to_bits() as u32) & 0x03) << 6usize); + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub const fn data_width(&self) -> super::vals::M0wfmtDataWidth { + let val = (self.0 >> 8usize) & 0x03; + super::vals::M0wfmtDataWidth::from_bits(val as u8) + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub fn set_data_width(&mut self, val: super::vals::M0wfmtDataWidth) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val.to_bits() as u32) & 0x03) << 8usize); + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub const fn prefix_len(&self) -> super::vals::M0wfmtPrefixLen { + let val = (self.0 >> 12usize) & 0x01; + super::vals::M0wfmtPrefixLen::from_bits(val as u8) + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub fn set_prefix_len(&mut self, val: super::vals::M0wfmtPrefixLen) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val.to_bits() as u32) & 0x01) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn suffix_len(&self) -> super::vals::M0wfmtSuffixLen { + let val = (self.0 >> 14usize) & 0x03; + super::vals::M0wfmtSuffixLen::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_suffix_len(&mut self, val: super::vals::M0wfmtSuffixLen) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val.to_bits() as u32) & 0x03) << 14usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn dummy_len(&self) -> super::vals::M0wfmtDummyLen { + let val = (self.0 >> 16usize) & 0x07; + super::vals::M0wfmtDummyLen::from_bits(val as u8) + } + #[doc = "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)"] + #[inline(always)] + pub fn set_dummy_len(&mut self, val: super::vals::M0wfmtDummyLen) { + self.0 = (self.0 & !(0x07 << 16usize)) | (((val.to_bits() as u32) & 0x07) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dtr(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dtr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for M0wfmt { + #[inline(always)] + fn default() -> M0wfmt { + M0wfmt(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M1rcmd(pub u32); +impl M1rcmd { + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub const fn prefix(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_prefix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub const fn suffix(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_suffix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } +} +impl Default for M1rcmd { + #[inline(always)] + fn default() -> M1rcmd { + M1rcmd(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M1rfmt(pub u32); +impl M1rfmt { + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub const fn prefix_width(&self) -> super::vals::M1rfmtPrefixWidth { + let val = (self.0 >> 0usize) & 0x03; + super::vals::M1rfmtPrefixWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub fn set_prefix_width(&mut self, val: super::vals::M1rfmtPrefixWidth) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub const fn addr_width(&self) -> super::vals::M1rfmtAddrWidth { + let val = (self.0 >> 2usize) & 0x03; + super::vals::M1rfmtAddrWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub fn set_addr_width(&mut self, val: super::vals::M1rfmtAddrWidth) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub const fn suffix_width(&self) -> super::vals::M1rfmtSuffixWidth { + let val = (self.0 >> 4usize) & 0x03; + super::vals::M1rfmtSuffixWidth::from_bits(val as u8) + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub fn set_suffix_width(&mut self, val: super::vals::M1rfmtSuffixWidth) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dummy_width(&self) -> super::vals::M1rfmtDummyWidth { + let val = (self.0 >> 6usize) & 0x03; + super::vals::M1rfmtDummyWidth::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_dummy_width(&mut self, val: super::vals::M1rfmtDummyWidth) { + self.0 = (self.0 & !(0x03 << 6usize)) | (((val.to_bits() as u32) & 0x03) << 6usize); + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub const fn data_width(&self) -> super::vals::M1rfmtDataWidth { + let val = (self.0 >> 8usize) & 0x03; + super::vals::M1rfmtDataWidth::from_bits(val as u8) + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub fn set_data_width(&mut self, val: super::vals::M1rfmtDataWidth) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val.to_bits() as u32) & 0x03) << 8usize); + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub const fn prefix_len(&self) -> super::vals::M1rfmtPrefixLen { + let val = (self.0 >> 12usize) & 0x01; + super::vals::M1rfmtPrefixLen::from_bits(val as u8) + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub fn set_prefix_len(&mut self, val: super::vals::M1rfmtPrefixLen) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val.to_bits() as u32) & 0x01) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn suffix_len(&self) -> super::vals::M1rfmtSuffixLen { + let val = (self.0 >> 14usize) & 0x03; + super::vals::M1rfmtSuffixLen::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_suffix_len(&mut self, val: super::vals::M1rfmtSuffixLen) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val.to_bits() as u32) & 0x03) << 14usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn dummy_len(&self) -> super::vals::M1rfmtDummyLen { + let val = (self.0 >> 16usize) & 0x07; + super::vals::M1rfmtDummyLen::from_bits(val as u8) + } + #[doc = "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)"] + #[inline(always)] + pub fn set_dummy_len(&mut self, val: super::vals::M1rfmtDummyLen) { + self.0 = (self.0 & !(0x07 << 16usize)) | (((val.to_bits() as u32) & 0x07) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dtr(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dtr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for M1rfmt { + #[inline(always)] + fn default() -> M1rfmt { + M1rfmt(0) + } +} +#[doc = "Timing configuration register for memory address window 1."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M1timing(pub u32); +impl M1timing { + #[doc = "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."] + #[inline(always)] + pub const fn clkdiv(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_clkdiv(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxdelay(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxdelay(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 8usize)) | (((val as u32) & 0x07) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn min_deselect(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x1f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_min_deselect(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 12usize)) | (((val as u32) & 0x1f) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn max_select(&self) -> u8 { + let val = (self.0 >> 17usize) & 0x3f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_max_select(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 17usize)) | (((val as u32) & 0x3f) << 17usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn select_hold(&self) -> u8 { + let val = (self.0 >> 23usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_select_hold(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 23usize)) | (((val as u32) & 0x03) << 23usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn select_setup(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_select_setup(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn pagebreak(&self) -> super::vals::M1timingPagebreak { + let val = (self.0 >> 28usize) & 0x03; + super::vals::M1timingPagebreak::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_pagebreak(&mut self, val: super::vals::M1timingPagebreak) { + self.0 = (self.0 & !(0x03 << 28usize)) | (((val.to_bits() as u32) & 0x03) << 28usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn cooldown(&self) -> u8 { + let val = (self.0 >> 30usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_cooldown(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 30usize)) | (((val as u32) & 0x03) << 30usize); + } +} +impl Default for M1timing { + #[inline(always)] + fn default() -> M1timing { + M1timing(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M1wcmd(pub u32); +impl M1wcmd { + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub const fn prefix(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_prefix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub const fn suffix(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero."] + #[inline(always)] + pub fn set_suffix(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } +} +impl Default for M1wcmd { + #[inline(always)] + fn default() -> M1wcmd { + M1wcmd(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct M1wfmt(pub u32); +impl M1wfmt { + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub const fn prefix_width(&self) -> super::vals::M1wfmtPrefixWidth { + let val = (self.0 >> 0usize) & 0x03; + super::vals::M1wfmtPrefixWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the command prefix, if any"] + #[inline(always)] + pub fn set_prefix_width(&mut self, val: super::vals::M1wfmtPrefixWidth) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub const fn addr_width(&self) -> super::vals::M1wfmtAddrWidth { + let val = (self.0 >> 2usize) & 0x03; + super::vals::M1wfmtAddrWidth::from_bits(val as u8) + } + #[doc = "The transfer width used for the address. The address phase always transfers 24 bits in total."] + #[inline(always)] + pub fn set_addr_width(&mut self, val: super::vals::M1wfmtAddrWidth) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val.to_bits() as u32) & 0x03) << 2usize); + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub const fn suffix_width(&self) -> super::vals::M1wfmtSuffixWidth { + let val = (self.0 >> 4usize) & 0x03; + super::vals::M1wfmtSuffixWidth::from_bits(val as u8) + } + #[doc = "The width used for the post-address command suffix, if any"] + #[inline(always)] + pub fn set_suffix_width(&mut self, val: super::vals::M1wfmtSuffixWidth) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val.to_bits() as u32) & 0x03) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dummy_width(&self) -> super::vals::M1wfmtDummyWidth { + let val = (self.0 >> 6usize) & 0x03; + super::vals::M1wfmtDummyWidth::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_dummy_width(&mut self, val: super::vals::M1wfmtDummyWidth) { + self.0 = (self.0 & !(0x03 << 6usize)) | (((val.to_bits() as u32) & 0x03) << 6usize); + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub const fn data_width(&self) -> super::vals::M1wfmtDataWidth { + let val = (self.0 >> 8usize) & 0x03; + super::vals::M1wfmtDataWidth::from_bits(val as u8) + } + #[doc = "The width used for the data transfer"] + #[inline(always)] + pub fn set_data_width(&mut self, val: super::vals::M1wfmtDataWidth) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val.to_bits() as u32) & 0x03) << 8usize); + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub const fn prefix_len(&self) -> super::vals::M1wfmtPrefixLen { + let val = (self.0 >> 12usize) & 0x01; + super::vals::M1wfmtPrefixLen::from_bits(val as u8) + } + #[doc = "Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single)"] + #[inline(always)] + pub fn set_prefix_len(&mut self, val: super::vals::M1wfmtPrefixLen) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val.to_bits() as u32) & 0x01) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn suffix_len(&self) -> super::vals::M1wfmtSuffixLen { + let val = (self.0 >> 14usize) & 0x03; + super::vals::M1wfmtSuffixLen::from_bits(val as u8) + } + #[doc = "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."] + #[inline(always)] + pub fn set_suffix_len(&mut self, val: super::vals::M1wfmtSuffixLen) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val.to_bits() as u32) & 0x03) << 14usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn dummy_len(&self) -> super::vals::M1wfmtDummyLen { + let val = (self.0 >> 16usize) & 0x07; + super::vals::M1wfmtDummyLen::from_bits(val as u8) + } + #[doc = "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)"] + #[inline(always)] + pub fn set_dummy_len(&mut self, val: super::vals::M1wfmtDummyLen) { + self.0 = (self.0 & !(0x07 << 16usize)) | (((val.to_bits() as u32) & 0x07) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dtr(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dtr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for M1wfmt { + #[inline(always)] + fn default() -> M1wfmt { + M1wfmt(0) + } +} diff --git a/src/rp2350/qmi/vals.rs b/src/rp2350/qmi/vals.rs new file mode 100644 index 00000000..937d94a4 --- /dev/null +++ b/src/rp2350/qmi/vals.rs @@ -0,0 +1,1177 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Iwidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl Iwidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> Iwidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Iwidth { + #[inline(always)] + fn from(val: u8) -> Iwidth { + Iwidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Iwidth) -> u8 { + Iwidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtAddrWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0rfmtAddrWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtAddrWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtAddrWidth { + #[inline(always)] + fn from(val: u8) -> M0rfmtAddrWidth { + M0rfmtAddrWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtAddrWidth) -> u8 { + M0rfmtAddrWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtDataWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0rfmtDataWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtDataWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtDataWidth { + #[inline(always)] + fn from(val: u8) -> M0rfmtDataWidth { + M0rfmtDataWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtDataWidth) -> u8 { + M0rfmtDataWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtDummyLen { + #[doc = "No dummy phase"] + NONE = 0, + #[doc = "4 dummy bits"] + _4 = 0x01, + #[doc = "8 dummy bits"] + _8 = 0x02, + #[doc = "12 dummy bits"] + _12 = 0x03, + #[doc = "16 dummy bits"] + _16 = 0x04, + #[doc = "20 dummy bits"] + _20 = 0x05, + #[doc = "24 dummy bits"] + _24 = 0x06, + #[doc = "28 dummy bits"] + _28 = 0x07, +} +impl M0rfmtDummyLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtDummyLen { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtDummyLen { + #[inline(always)] + fn from(val: u8) -> M0rfmtDummyLen { + M0rfmtDummyLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtDummyLen) -> u8 { + M0rfmtDummyLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtDummyWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0rfmtDummyWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtDummyWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtDummyWidth { + #[inline(always)] + fn from(val: u8) -> M0rfmtDummyWidth { + M0rfmtDummyWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtDummyWidth) -> u8 { + M0rfmtDummyWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtPrefixLen { + #[doc = "No prefix"] + NONE = 0, + #[doc = "8-bit prefix"] + _8 = 0x01, +} +impl M0rfmtPrefixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtPrefixLen { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtPrefixLen { + #[inline(always)] + fn from(val: u8) -> M0rfmtPrefixLen { + M0rfmtPrefixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtPrefixLen) -> u8 { + M0rfmtPrefixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtPrefixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0rfmtPrefixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtPrefixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtPrefixWidth { + #[inline(always)] + fn from(val: u8) -> M0rfmtPrefixWidth { + M0rfmtPrefixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtPrefixWidth) -> u8 { + M0rfmtPrefixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtSuffixLen { + #[doc = "No suffix"] + NONE = 0, + _RESERVED_1 = 0x01, + #[doc = "8-bit suffix"] + _8 = 0x02, + _RESERVED_3 = 0x03, +} +impl M0rfmtSuffixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtSuffixLen { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtSuffixLen { + #[inline(always)] + fn from(val: u8) -> M0rfmtSuffixLen { + M0rfmtSuffixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtSuffixLen) -> u8 { + M0rfmtSuffixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0rfmtSuffixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0rfmtSuffixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0rfmtSuffixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0rfmtSuffixWidth { + #[inline(always)] + fn from(val: u8) -> M0rfmtSuffixWidth { + M0rfmtSuffixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0rfmtSuffixWidth) -> u8 { + M0rfmtSuffixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0timingPagebreak { + #[doc = "No page boundary is enforced"] + NONE = 0, + #[doc = "Break bursts crossing a 256-byte page boundary"] + _256 = 0x01, + #[doc = "Break bursts crossing a 1024-byte quad-page boundary"] + _1024 = 0x02, + #[doc = "Break bursts crossing a 4096-byte sector boundary"] + _4096 = 0x03, +} +impl M0timingPagebreak { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0timingPagebreak { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0timingPagebreak { + #[inline(always)] + fn from(val: u8) -> M0timingPagebreak { + M0timingPagebreak::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0timingPagebreak) -> u8 { + M0timingPagebreak::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtAddrWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0wfmtAddrWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtAddrWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtAddrWidth { + #[inline(always)] + fn from(val: u8) -> M0wfmtAddrWidth { + M0wfmtAddrWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtAddrWidth) -> u8 { + M0wfmtAddrWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtDataWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0wfmtDataWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtDataWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtDataWidth { + #[inline(always)] + fn from(val: u8) -> M0wfmtDataWidth { + M0wfmtDataWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtDataWidth) -> u8 { + M0wfmtDataWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtDummyLen { + #[doc = "No dummy phase"] + NONE = 0, + #[doc = "4 dummy bits"] + _4 = 0x01, + #[doc = "8 dummy bits"] + _8 = 0x02, + #[doc = "12 dummy bits"] + _12 = 0x03, + #[doc = "16 dummy bits"] + _16 = 0x04, + #[doc = "20 dummy bits"] + _20 = 0x05, + #[doc = "24 dummy bits"] + _24 = 0x06, + #[doc = "28 dummy bits"] + _28 = 0x07, +} +impl M0wfmtDummyLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtDummyLen { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtDummyLen { + #[inline(always)] + fn from(val: u8) -> M0wfmtDummyLen { + M0wfmtDummyLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtDummyLen) -> u8 { + M0wfmtDummyLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtDummyWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0wfmtDummyWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtDummyWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtDummyWidth { + #[inline(always)] + fn from(val: u8) -> M0wfmtDummyWidth { + M0wfmtDummyWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtDummyWidth) -> u8 { + M0wfmtDummyWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtPrefixLen { + #[doc = "No prefix"] + NONE = 0, + #[doc = "8-bit prefix"] + _8 = 0x01, +} +impl M0wfmtPrefixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtPrefixLen { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtPrefixLen { + #[inline(always)] + fn from(val: u8) -> M0wfmtPrefixLen { + M0wfmtPrefixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtPrefixLen) -> u8 { + M0wfmtPrefixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtPrefixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0wfmtPrefixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtPrefixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtPrefixWidth { + #[inline(always)] + fn from(val: u8) -> M0wfmtPrefixWidth { + M0wfmtPrefixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtPrefixWidth) -> u8 { + M0wfmtPrefixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtSuffixLen { + #[doc = "No suffix"] + NONE = 0, + _RESERVED_1 = 0x01, + #[doc = "8-bit suffix"] + _8 = 0x02, + _RESERVED_3 = 0x03, +} +impl M0wfmtSuffixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtSuffixLen { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtSuffixLen { + #[inline(always)] + fn from(val: u8) -> M0wfmtSuffixLen { + M0wfmtSuffixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtSuffixLen) -> u8 { + M0wfmtSuffixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M0wfmtSuffixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M0wfmtSuffixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M0wfmtSuffixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M0wfmtSuffixWidth { + #[inline(always)] + fn from(val: u8) -> M0wfmtSuffixWidth { + M0wfmtSuffixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M0wfmtSuffixWidth) -> u8 { + M0wfmtSuffixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtAddrWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1rfmtAddrWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtAddrWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtAddrWidth { + #[inline(always)] + fn from(val: u8) -> M1rfmtAddrWidth { + M1rfmtAddrWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtAddrWidth) -> u8 { + M1rfmtAddrWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtDataWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1rfmtDataWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtDataWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtDataWidth { + #[inline(always)] + fn from(val: u8) -> M1rfmtDataWidth { + M1rfmtDataWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtDataWidth) -> u8 { + M1rfmtDataWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtDummyLen { + #[doc = "No dummy phase"] + NONE = 0, + #[doc = "4 dummy bits"] + _4 = 0x01, + #[doc = "8 dummy bits"] + _8 = 0x02, + #[doc = "12 dummy bits"] + _12 = 0x03, + #[doc = "16 dummy bits"] + _16 = 0x04, + #[doc = "20 dummy bits"] + _20 = 0x05, + #[doc = "24 dummy bits"] + _24 = 0x06, + #[doc = "28 dummy bits"] + _28 = 0x07, +} +impl M1rfmtDummyLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtDummyLen { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtDummyLen { + #[inline(always)] + fn from(val: u8) -> M1rfmtDummyLen { + M1rfmtDummyLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtDummyLen) -> u8 { + M1rfmtDummyLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtDummyWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1rfmtDummyWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtDummyWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtDummyWidth { + #[inline(always)] + fn from(val: u8) -> M1rfmtDummyWidth { + M1rfmtDummyWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtDummyWidth) -> u8 { + M1rfmtDummyWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtPrefixLen { + #[doc = "No prefix"] + NONE = 0, + #[doc = "8-bit prefix"] + _8 = 0x01, +} +impl M1rfmtPrefixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtPrefixLen { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtPrefixLen { + #[inline(always)] + fn from(val: u8) -> M1rfmtPrefixLen { + M1rfmtPrefixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtPrefixLen) -> u8 { + M1rfmtPrefixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtPrefixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1rfmtPrefixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtPrefixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtPrefixWidth { + #[inline(always)] + fn from(val: u8) -> M1rfmtPrefixWidth { + M1rfmtPrefixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtPrefixWidth) -> u8 { + M1rfmtPrefixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtSuffixLen { + #[doc = "No suffix"] + NONE = 0, + _RESERVED_1 = 0x01, + #[doc = "8-bit suffix"] + _8 = 0x02, + _RESERVED_3 = 0x03, +} +impl M1rfmtSuffixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtSuffixLen { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtSuffixLen { + #[inline(always)] + fn from(val: u8) -> M1rfmtSuffixLen { + M1rfmtSuffixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtSuffixLen) -> u8 { + M1rfmtSuffixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1rfmtSuffixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1rfmtSuffixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1rfmtSuffixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1rfmtSuffixWidth { + #[inline(always)] + fn from(val: u8) -> M1rfmtSuffixWidth { + M1rfmtSuffixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1rfmtSuffixWidth) -> u8 { + M1rfmtSuffixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1timingPagebreak { + #[doc = "No page boundary is enforced"] + NONE = 0, + #[doc = "Break bursts crossing a 256-byte page boundary"] + _256 = 0x01, + #[doc = "Break bursts crossing a 1024-byte quad-page boundary"] + _1024 = 0x02, + #[doc = "Break bursts crossing a 4096-byte sector boundary"] + _4096 = 0x03, +} +impl M1timingPagebreak { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1timingPagebreak { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1timingPagebreak { + #[inline(always)] + fn from(val: u8) -> M1timingPagebreak { + M1timingPagebreak::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1timingPagebreak) -> u8 { + M1timingPagebreak::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtAddrWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1wfmtAddrWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtAddrWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtAddrWidth { + #[inline(always)] + fn from(val: u8) -> M1wfmtAddrWidth { + M1wfmtAddrWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtAddrWidth) -> u8 { + M1wfmtAddrWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtDataWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1wfmtDataWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtDataWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtDataWidth { + #[inline(always)] + fn from(val: u8) -> M1wfmtDataWidth { + M1wfmtDataWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtDataWidth) -> u8 { + M1wfmtDataWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtDummyLen { + #[doc = "No dummy phase"] + NONE = 0, + #[doc = "4 dummy bits"] + _4 = 0x01, + #[doc = "8 dummy bits"] + _8 = 0x02, + #[doc = "12 dummy bits"] + _12 = 0x03, + #[doc = "16 dummy bits"] + _16 = 0x04, + #[doc = "20 dummy bits"] + _20 = 0x05, + #[doc = "24 dummy bits"] + _24 = 0x06, + #[doc = "28 dummy bits"] + _28 = 0x07, +} +impl M1wfmtDummyLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtDummyLen { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtDummyLen { + #[inline(always)] + fn from(val: u8) -> M1wfmtDummyLen { + M1wfmtDummyLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtDummyLen) -> u8 { + M1wfmtDummyLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtDummyWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1wfmtDummyWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtDummyWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtDummyWidth { + #[inline(always)] + fn from(val: u8) -> M1wfmtDummyWidth { + M1wfmtDummyWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtDummyWidth) -> u8 { + M1wfmtDummyWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtPrefixLen { + #[doc = "No prefix"] + NONE = 0, + #[doc = "8-bit prefix"] + _8 = 0x01, +} +impl M1wfmtPrefixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtPrefixLen { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtPrefixLen { + #[inline(always)] + fn from(val: u8) -> M1wfmtPrefixLen { + M1wfmtPrefixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtPrefixLen) -> u8 { + M1wfmtPrefixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtPrefixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1wfmtPrefixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtPrefixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtPrefixWidth { + #[inline(always)] + fn from(val: u8) -> M1wfmtPrefixWidth { + M1wfmtPrefixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtPrefixWidth) -> u8 { + M1wfmtPrefixWidth::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtSuffixLen { + #[doc = "No suffix"] + NONE = 0, + _RESERVED_1 = 0x01, + #[doc = "8-bit suffix"] + _8 = 0x02, + _RESERVED_3 = 0x03, +} +impl M1wfmtSuffixLen { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtSuffixLen { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtSuffixLen { + #[inline(always)] + fn from(val: u8) -> M1wfmtSuffixLen { + M1wfmtSuffixLen::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtSuffixLen) -> u8 { + M1wfmtSuffixLen::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum M1wfmtSuffixWidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl M1wfmtSuffixWidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> M1wfmtSuffixWidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for M1wfmtSuffixWidth { + #[inline(always)] + fn from(val: u8) -> M1wfmtSuffixWidth { + M1wfmtSuffixWidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: M1wfmtSuffixWidth) -> u8 { + M1wfmtSuffixWidth::to_bits(val) + } +} diff --git a/src/rp2350/resets.rs b/src/rp2350/resets.rs new file mode 100644 index 00000000..334731d1 --- /dev/null +++ b/src/rp2350/resets.rs @@ -0,0 +1,29 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Resets { + ptr: *mut u8, +} +unsafe impl Send for Resets {} +unsafe impl Sync for Resets {} +impl Resets { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[inline(always)] + pub const fn reset(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn wdsel(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[inline(always)] + pub const fn reset_done(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/resets/regs.rs b/src/rp2350/resets/regs.rs new file mode 100644 index 00000000..bac5ba85 --- /dev/null +++ b/src/rp2350/resets/regs.rs @@ -0,0 +1,544 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Peripherals(pub u32); +impl Peripherals { + #[inline(always)] + pub const fn adc(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn busctrl(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_busctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn hstx(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn i2c0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_i2c0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn i2c1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_i2c1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn io_bank0(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_io_bank0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn io_qspi(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_io_qspi(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn jtag(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_jtag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn pads_bank0(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pads_bank0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn pads_qspi(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pads_qspi(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn pio0(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn pio1(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn pio2(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn pll_sys(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pll_sys(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn pll_usb(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pll_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn pwm(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pwm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn sha256(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sha256(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn spi0(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn spi1(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn syscfg(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_syscfg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn sysinfo(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sysinfo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn tbman(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tbman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn timer0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn timer1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn trng(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_trng(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn uart0(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn uart1(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn usbctrl(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usbctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for Peripherals { + #[inline(always)] + fn default() -> Peripherals { + Peripherals(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Wdsel(pub u32); +impl Wdsel { + #[inline(always)] + pub const fn adc(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_adc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn busctrl(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_busctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn dma(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dma(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn hstx(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_hstx(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn i2c0(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_i2c0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn i2c1(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_i2c1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn io_bank0(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_io_bank0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn io_qspi(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_io_qspi(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn jtag(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_jtag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn pads_bank0(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pads_bank0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn pads_qspi(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pads_qspi(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn pio0(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pio0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn pio1(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pio1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn pio2(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pio2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn pll_sys(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pll_sys(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn pll_usb(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pll_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn pwm(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pwm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn sha256(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sha256(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn spi0(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_spi0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn spi1(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_spi1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn syscfg(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_syscfg(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn sysinfo(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sysinfo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn tbman(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tbman(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn timer0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn timer1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn trng(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_trng(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn uart0(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_uart0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn uart1(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_uart1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn usbctrl(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usbctrl(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for Wdsel { + #[inline(always)] + fn default() -> Wdsel { + Wdsel(0) + } +} diff --git a/src/rp2350/rosc.rs b/src/rp2350/rosc.rs new file mode 100644 index 00000000..b3772cec --- /dev/null +++ b/src/rp2350/rosc.rs @@ -0,0 +1,68 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Rosc { + ptr: *mut u8, +} +unsafe impl Send for Rosc {} +unsafe impl Sync for Rosc {} +impl Rosc { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Ring Oscillator control"] + #[inline(always)] + pub const fn ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn freqa(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "For a detailed description see freqa register"] + #[inline(always)] + pub const fn freqb(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Loads a value to the LFSR randomiser"] + #[inline(always)] + pub const fn random(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Ring Oscillator pause control"] + #[inline(always)] + pub const fn dormant(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Controls the output divider"] + #[inline(always)] + pub const fn div(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Controls the phase shifted output"] + #[inline(always)] + pub const fn phase(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Ring Oscillator Status"] + #[inline(always)] + pub const fn status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn randombit(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/rosc/regs.rs b/src/rp2350/rosc/regs.rs new file mode 100644 index 00000000..d28e0151 --- /dev/null +++ b/src/rp2350/rosc/regs.rs @@ -0,0 +1,391 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Count(pub u32); +impl Count { + #[inline(always)] + pub const fn count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_count(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Count { + #[inline(always)] + fn default() -> Count { + Count(0) + } +} +#[doc = "Ring Oscillator control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ctrl(pub u32); +impl Ctrl { + #[doc = "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"] + #[inline(always)] + pub const fn freq_range(&self) -> super::vals::FreqRange { + let val = (self.0 >> 0usize) & 0x0fff; + super::vals::FreqRange::from_bits(val as u16) + } + #[doc = "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"] + #[inline(always)] + pub fn set_freq_range(&mut self, val: super::vals::FreqRange) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val.to_bits() as u32) & 0x0fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn enable(&self) -> super::vals::Enable { + let val = (self.0 >> 12usize) & 0x0fff; + super::vals::Enable::from_bits(val as u16) + } + #[doc = "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."] + #[inline(always)] + pub fn set_enable(&mut self, val: super::vals::Enable) { + self.0 = (self.0 & !(0x0fff << 12usize)) | (((val.to_bits() as u32) & 0x0fff) << 12usize); + } +} +impl Default for Ctrl { + #[inline(always)] + fn default() -> Ctrl { + Ctrl(0) + } +} +#[doc = "Controls the output divider"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Div(pub u32); +impl Div { + #[doc = "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"] + #[inline(always)] + pub const fn div(&self) -> super::vals::Div { + let val = (self.0 >> 0usize) & 0xffff; + super::vals::Div::from_bits(val as u16) + } + #[doc = "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"] + #[inline(always)] + pub fn set_div(&mut self, val: super::vals::Div) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val.to_bits() as u32) & 0xffff) << 0usize); + } +} +impl Default for Div { + #[inline(always)] + fn default() -> Div { + Div(0) + } +} +#[doc = "Ring Oscillator pause control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dormant(pub u32); +impl Dormant { + #[doc = "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"] + #[inline(always)] + pub const fn dormant(&self) -> super::vals::Dormant { + let val = (self.0 >> 0usize) & 0xffff_ffff; + super::vals::Dormant::from_bits(val as u32) + } + #[doc = "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"] + #[inline(always)] + pub fn set_dormant(&mut self, val: super::vals::Dormant) { + self.0 = (self.0 & !(0xffff_ffff << 0usize)) + | (((val.to_bits() as u32) & 0xffff_ffff) << 0usize); + } +} +impl Default for Dormant { + #[inline(always)] + fn default() -> Dormant { + Dormant(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Freqa(pub u32); +impl Freqa { + #[doc = "Stage 0 drive strength"] + #[inline(always)] + pub const fn ds0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Stage 0 drive strength"] + #[inline(always)] + pub fn set_ds0(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Randomises the stage 0 drive strength"] + #[inline(always)] + pub const fn ds0_random(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Randomises the stage 0 drive strength"] + #[inline(always)] + pub fn set_ds0_random(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Stage 1 drive strength"] + #[inline(always)] + pub const fn ds1(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x07; + val as u8 + } + #[doc = "Stage 1 drive strength"] + #[inline(always)] + pub fn set_ds1(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 4usize)) | (((val as u32) & 0x07) << 4usize); + } + #[doc = "Randomises the stage 1 drive strength"] + #[inline(always)] + pub const fn ds1_random(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Randomises the stage 1 drive strength"] + #[inline(always)] + pub fn set_ds1_random(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Stage 2 drive strength"] + #[inline(always)] + pub const fn ds2(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x07; + val as u8 + } + #[doc = "Stage 2 drive strength"] + #[inline(always)] + pub fn set_ds2(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 8usize)) | (((val as u32) & 0x07) << 8usize); + } + #[doc = "Stage 3 drive strength"] + #[inline(always)] + pub const fn ds3(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "Stage 3 drive strength"] + #[inline(always)] + pub fn set_ds3(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "Set to 0x9696 to apply the settings Any other value in this field will set all drive strengths to 0"] + #[inline(always)] + pub const fn passwd(&self) -> super::vals::Passwd { + let val = (self.0 >> 16usize) & 0xffff; + super::vals::Passwd::from_bits(val as u16) + } + #[doc = "Set to 0x9696 to apply the settings Any other value in this field will set all drive strengths to 0"] + #[inline(always)] + pub fn set_passwd(&mut self, val: super::vals::Passwd) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val.to_bits() as u32) & 0xffff) << 16usize); + } +} +impl Default for Freqa { + #[inline(always)] + fn default() -> Freqa { + Freqa(0) + } +} +#[doc = "For a detailed description see freqa register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Freqb(pub u32); +impl Freqb { + #[doc = "Stage 4 drive strength"] + #[inline(always)] + pub const fn ds4(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "Stage 4 drive strength"] + #[inline(always)] + pub fn set_ds4(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "Stage 5 drive strength"] + #[inline(always)] + pub const fn ds5(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x07; + val as u8 + } + #[doc = "Stage 5 drive strength"] + #[inline(always)] + pub fn set_ds5(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 4usize)) | (((val as u32) & 0x07) << 4usize); + } + #[doc = "Stage 6 drive strength"] + #[inline(always)] + pub const fn ds6(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x07; + val as u8 + } + #[doc = "Stage 6 drive strength"] + #[inline(always)] + pub fn set_ds6(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 8usize)) | (((val as u32) & 0x07) << 8usize); + } + #[doc = "Stage 7 drive strength"] + #[inline(always)] + pub const fn ds7(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "Stage 7 drive strength"] + #[inline(always)] + pub fn set_ds7(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "Set to 0x9696 to apply the settings Any other value in this field will set all drive strengths to 0"] + #[inline(always)] + pub const fn passwd(&self) -> super::vals::Passwd { + let val = (self.0 >> 16usize) & 0xffff; + super::vals::Passwd::from_bits(val as u16) + } + #[doc = "Set to 0x9696 to apply the settings Any other value in this field will set all drive strengths to 0"] + #[inline(always)] + pub fn set_passwd(&mut self, val: super::vals::Passwd) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val.to_bits() as u32) & 0xffff) << 16usize); + } +} +impl Default for Freqb { + #[inline(always)] + fn default() -> Freqb { + Freqb(0) + } +} +#[doc = "Controls the phase shifted output"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Phase(pub u32); +impl Phase { + #[doc = "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"] + #[inline(always)] + pub const fn shift(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[doc = "invert the phase-shifted output this is ignored when div=1"] + #[inline(always)] + pub const fn flip(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "invert the phase-shifted output this is ignored when div=1"] + #[inline(always)] + pub fn set_flip(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "enable the phase-shifted output this can be changed on-the-fly"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "enable the phase-shifted output this can be changed on-the-fly"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "set to 0xaa any other value enables the output with shift=0"] + #[inline(always)] + pub const fn passwd(&self) -> u8 { + let val = (self.0 >> 4usize) & 0xff; + val as u8 + } + #[doc = "set to 0xaa any other value enables the output with shift=0"] + #[inline(always)] + pub fn set_passwd(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 4usize)) | (((val as u32) & 0xff) << 4usize); + } +} +impl Default for Phase { + #[inline(always)] + fn default() -> Phase { + Phase(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Randombit(pub u32); +impl Randombit { + #[inline(always)] + pub const fn randombit(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_randombit(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Randombit { + #[inline(always)] + fn default() -> Randombit { + Randombit(0) + } +} +#[doc = "Ring Oscillator Status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Status(pub u32); +impl Status { + #[doc = "Oscillator is enabled but not necessarily running and stable this resets to 0 but transitions to 1 during chip startup"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Oscillator is enabled but not necessarily running and stable this resets to 0 but transitions to 1 during chip startup"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "post-divider is running this resets to 0 but transitions to 1 during chip startup"] + #[inline(always)] + pub const fn div_running(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "post-divider is running this resets to 0 but transitions to 1 during chip startup"] + #[inline(always)] + pub fn set_div_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT"] + #[inline(always)] + pub const fn badwrite(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT"] + #[inline(always)] + pub fn set_badwrite(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Oscillator is running and stable"] + #[inline(always)] + pub const fn stable(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "Oscillator is running and stable"] + #[inline(always)] + pub fn set_stable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for Status { + #[inline(always)] + fn default() -> Status { + Status(0) + } +} diff --git a/src/rp2350/rosc/vals.rs b/src/rp2350/rosc/vals.rs new file mode 100644 index 00000000..7e19fc7e --- /dev/null +++ b/src/rp2350/rosc/vals.rs @@ -0,0 +1,135 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Div(pub u16); +impl Div { + pub const PASS: Self = Self(0xaa00); +} +impl Div { + pub const fn from_bits(val: u16) -> Div { + Self(val & 0xffff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Div { + #[inline(always)] + fn from(val: u16) -> Div { + Div::from_bits(val) + } +} +impl From
for u16 { + #[inline(always)] + fn from(val: Div) -> u16 { + Div::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Dormant(pub u32); +impl Dormant { + pub const DORMANT: Self = Self(0x636f_6d61); + pub const WAKE: Self = Self(0x7761_6b65); +} +impl Dormant { + pub const fn from_bits(val: u32) -> Dormant { + Self(val & 0xffff_ffff) + } + pub const fn to_bits(self) -> u32 { + self.0 + } +} +impl From for Dormant { + #[inline(always)] + fn from(val: u32) -> Dormant { + Dormant::from_bits(val) + } +} +impl From for u32 { + #[inline(always)] + fn from(val: Dormant) -> u32 { + Dormant::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Enable(pub u16); +impl Enable { + pub const DISABLE: Self = Self(0x0d1e); + pub const ENABLE: Self = Self(0x0fab); +} +impl Enable { + pub const fn from_bits(val: u16) -> Enable { + Self(val & 0x0fff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Enable { + #[inline(always)] + fn from(val: u16) -> Enable { + Enable::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Enable) -> u16 { + Enable::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct FreqRange(pub u16); +impl FreqRange { + pub const LOW: Self = Self(0x0fa4); + pub const MEDIUM: Self = Self(0x0fa5); + pub const TOOHIGH: Self = Self(0x0fa6); + pub const HIGH: Self = Self(0x0fa7); +} +impl FreqRange { + pub const fn from_bits(val: u16) -> FreqRange { + Self(val & 0x0fff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for FreqRange { + #[inline(always)] + fn from(val: u16) -> FreqRange { + FreqRange::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: FreqRange) -> u16 { + FreqRange::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Passwd(pub u16); +impl Passwd { + pub const PASS: Self = Self(0x9696); +} +impl Passwd { + pub const fn from_bits(val: u16) -> Passwd { + Self(val & 0xffff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Passwd { + #[inline(always)] + fn from(val: u16) -> Passwd { + Passwd::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Passwd) -> u16 { + Passwd::to_bits(val) + } +} diff --git a/src/rp2350/sha256.rs b/src/rp2350/sha256.rs new file mode 100644 index 00000000..5dd83fbd --- /dev/null +++ b/src/rp2350/sha256.rs @@ -0,0 +1,69 @@ +#[doc = "SHA-256 hash function implementation"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sha256 { + ptr: *mut u8, +} +unsafe impl Send for Sha256 {} +unsafe impl Sync for Sha256 {} +impl Sha256 { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Control and status register"] + #[inline(always)] + pub const fn csr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Write data register"] + #[inline(always)] + pub const fn wdata(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0."] + #[inline(always)] + pub const fn sum7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/sha256/regs.rs b/src/rp2350/sha256/regs.rs new file mode 100644 index 00000000..0226d156 --- /dev/null +++ b/src/rp2350/sha256/regs.rs @@ -0,0 +1,78 @@ +#[doc = "Control and status register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Csr(pub u32); +impl Csr { + #[doc = "Write 1 to prepare the SHA-256 core for a new checksum. The SUMx registers are initialised to the proper values (fractional bits of square roots of first 8 primes) and internal counters are cleared. This immediately forces WDATA_RDY and SUM_VLD high. START must be written before initiating a DMA transfer to the SHA-256 core, because the core will always request 16 transfers at a time (1 512-bit block). Additionally, the DMA channel should be configured for a multiple of 16 32-bit transfers."] + #[inline(always)] + pub const fn start(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to prepare the SHA-256 core for a new checksum. The SUMx registers are initialised to the proper values (fractional bits of square roots of first 8 primes) and internal counters are cleared. This immediately forces WDATA_RDY and SUM_VLD high. START must be written before initiating a DMA transfer to the SHA-256 core, because the core will always request 16 transfers at a time (1 512-bit block). Additionally, the DMA channel should be configured for a multiple of 16 32-bit transfers."] + #[inline(always)] + pub fn set_start(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, the SHA-256 core is ready to accept more data through the WDATA register. After writing 16 words, this flag will go low for 57 cycles whilst the core completes its digest."] + #[inline(always)] + pub const fn wdata_rdy(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, the SHA-256 core is ready to accept more data through the WDATA register. After writing 16 words, this flag will go low for 57 cycles whilst the core completes its digest."] + #[inline(always)] + pub fn set_wdata_rdy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, the SHA-256 checksum presented in registers SUM0 through SUM7 is currently valid. Goes low when WDATA is first written, then returns high once 16 words have been written and the digest of the current 512-bit block has subsequently completed."] + #[inline(always)] + pub const fn sum_vld(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, the SHA-256 checksum presented in registers SUM0 through SUM7 is currently valid. Goes low when WDATA is first written, then returns high once 16 words have been written and the digest of the current 512-bit block has subsequently completed."] + #[inline(always)] + pub fn set_sum_vld(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Set when a write occurs whilst the SHA-256 core is not ready for data (WDATA_RDY is low). Write one to clear."] + #[inline(always)] + pub const fn err_wdata_not_rdy(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Set when a write occurs whilst the SHA-256 core is not ready for data (WDATA_RDY is low). Write one to clear."] + #[inline(always)] + pub fn set_err_wdata_not_rdy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Configure DREQ logic for the correct DMA data size. Must be configured before the DMA channel is triggered. The SHA-256 core's DREQ logic requests one entire block of data at once, since there is no FIFO, and data goes straight into the core's message schedule and digest hardware. Therefore, when transferring data with DMA, CSR_DMA_SIZE must be configured in advance so that the correct number of transfers can be requested per block."] + #[inline(always)] + pub const fn dma_size(&self) -> super::vals::DmaSize { + let val = (self.0 >> 8usize) & 0x03; + super::vals::DmaSize::from_bits(val as u8) + } + #[doc = "Configure DREQ logic for the correct DMA data size. Must be configured before the DMA channel is triggered. The SHA-256 core's DREQ logic requests one entire block of data at once, since there is no FIFO, and data goes straight into the core's message schedule and digest hardware. Therefore, when transferring data with DMA, CSR_DMA_SIZE must be configured in advance so that the correct number of transfers can be requested per block."] + #[inline(always)] + pub fn set_dma_size(&mut self, val: super::vals::DmaSize) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val.to_bits() as u32) & 0x03) << 8usize); + } + #[doc = "Enable byte swapping of 32-bit values at the point they are committed to the SHA message scheduler. This block's bus interface assembles byte/halfword data into message words in little-endian order, so that DMAing the same buffer with different transfer sizes always gives the same result on a little-endian system like RP2350. However, when marshalling bytes into blocks, SHA expects that the first byte is the *most significant* in each message word. To resolve this, once the bus interface has accumulated 32 bits of data (either a word write, two halfword writes in little-endian order, or four byte writes in little-endian order) the final value can be byte-swapped before passing to the actual SHA core. This feature is enabled by default because using the SHA core to checksum byte buffers is expected to be more common than having preformatted SHA message words lying around."] + #[inline(always)] + pub const fn bswap(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Enable byte swapping of 32-bit values at the point they are committed to the SHA message scheduler. This block's bus interface assembles byte/halfword data into message words in little-endian order, so that DMAing the same buffer with different transfer sizes always gives the same result on a little-endian system like RP2350. However, when marshalling bytes into blocks, SHA expects that the first byte is the *most significant* in each message word. To resolve this, once the bus interface has accumulated 32 bits of data (either a word write, two halfword writes in little-endian order, or four byte writes in little-endian order) the final value can be byte-swapped before passing to the actual SHA core. This feature is enabled by default because using the SHA core to checksum byte buffers is expected to be more common than having preformatted SHA message words lying around."] + #[inline(always)] + pub fn set_bswap(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for Csr { + #[inline(always)] + fn default() -> Csr { + Csr(0) + } +} diff --git a/src/rp2350/sha256/vals.rs b/src/rp2350/sha256/vals.rs new file mode 100644 index 00000000..a35fc835 --- /dev/null +++ b/src/rp2350/sha256/vals.rs @@ -0,0 +1,30 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum DmaSize { + _8BIT = 0, + _16BIT = 0x01, + _32BIT = 0x02, + _RESERVED_3 = 0x03, +} +impl DmaSize { + #[inline(always)] + pub const fn from_bits(val: u8) -> DmaSize { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for DmaSize { + #[inline(always)] + fn from(val: u8) -> DmaSize { + DmaSize::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: DmaSize) -> u8 { + DmaSize::to_bits(val) + } +} diff --git a/src/rp2350/sio.rs b/src/rp2350/sio.rs new file mode 100644 index 00000000..039e2360 --- /dev/null +++ b/src/rp2350/sio.rs @@ -0,0 +1,336 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Fifo { + ptr: *mut u8, +} +unsafe impl Send for Fifo {} +unsafe impl Sync for Fifo {} +impl Fifo { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "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."] + #[inline(always)] + pub const fn st(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Write access to this core's TX FIFO"] + #[inline(always)] + pub const fn wr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Read access to this core's RX FIFO"] + #[inline(always)] + pub const fn rd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } +} +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Gpio { + ptr: *mut u8, +} +unsafe impl Send for Gpio {} +unsafe impl Sync for Gpio {} +impl Gpio { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "GPIO0...31 output value"] + #[inline(always)] + pub const fn value(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "GPIO0...31 output value set"] + #[inline(always)] + pub const fn value_set(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "GPIO0...31 output value clear"] + #[inline(always)] + pub const fn value_clr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "GPIO0...31 output value XOR"] + #[inline(always)] + pub const fn value_xor(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } +} +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp { + ptr: *mut u8, +} +unsafe impl Send for Interp {} +unsafe impl Sync for Interp {} +impl Interp { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Read/write access to accumulator 0"] + #[inline(always)] + pub const fn accum0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Read/write access to accumulator 1"] + #[inline(always)] + pub const fn accum1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Read/write access to BASE0 register."] + #[inline(always)] + pub const fn base0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Read/write access to BASE1 register."] + #[inline(always)] + pub const fn base1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Read/write access to BASE2 register."] + #[inline(always)] + pub const fn base2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Read LANE0 result, and simultaneously write lane results to both accumulators (POP)."] + #[inline(always)] + pub const fn pop_lane0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Read LANE1 result, and simultaneously write lane results to both accumulators (POP)."] + #[inline(always)] + pub const fn pop_lane1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Read FULL result, and simultaneously write lane results to both accumulators (POP)."] + #[inline(always)] + pub const fn pop_full(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Read LANE0 result, without altering any internal state (PEEK)."] + #[inline(always)] + pub const fn peek_lane0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Read LANE1 result, without altering any internal state (PEEK)."] + #[inline(always)] + pub const fn peek_lane1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Read FULL result, without altering any internal state (PEEK)."] + #[inline(always)] + pub const fn peek_full(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Control register for lane 0"] + #[inline(always)] + pub const fn ctrl_lane0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "Control register for lane 1"] + #[inline(always)] + pub const fn ctrl_lane1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "Values written here are atomically added to ACCUM0 Reading yields lane 0's raw shift and mask value (BASE0 not added)."] + #[inline(always)] + pub const fn accum0_add(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "Values written here are atomically added to ACCUM1 Reading yields lane 1's raw shift and mask value (BASE1 not added)."] + #[inline(always)] + pub const fn accum1_add(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn base_1and0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } +} +#[doc = "Single-cycle IO block Provides core-local and inter-core hardware for the two processors, with single-cycle access."] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sio { + ptr: *mut u8, +} +unsafe impl Send for Sio {} +unsafe impl Sync for Sio {} +impl Sio { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Processor core identifier"] + #[inline(always)] + pub const fn cpuid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Input value for GPIO0...31. In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) appear as zero."] + #[inline(always)] + pub const fn gpio_in(self, n: usize) -> crate::common::Reg { + assert!(n < 2usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize + n * 4usize) as _) } + } + #[inline(always)] + pub const fn gpio_out(self, n: usize) -> Gpio { + assert!(n < 2usize); + unsafe { Gpio::from_ptr(self.ptr.add(16usize + n * 4usize) as _) } + } + #[inline(always)] + pub const fn gpio_oe(self, n: usize) -> Gpio { + assert!(n < 2usize); + unsafe { Gpio::from_ptr(self.ptr.add(48usize + n * 4usize) as _) } + } + #[inline(always)] + pub const fn fifo(self) -> Fifo { + unsafe { Fifo::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "Spinlock state A bitmap containing the state of all 32 spinlocks (1=locked). Mainly intended for debugging."] + #[inline(always)] + pub const fn spinlock_st(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[inline(always)] + pub const fn interp(self, n: usize) -> Interp { + assert!(n < 2usize); + unsafe { Interp::from_ptr(self.ptr.add(128usize + n * 64usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn spinlock(self, n: usize) -> crate::common::Reg { + assert!(n < 32usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize + n * 4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn doorbell_out_set( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(384usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn doorbell_out_clr( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(388usize) as _) } + } + #[doc = "Write 1s to trigger doorbell interrupts on this core. Read to get status of doorbells currently asserted on this core."] + #[inline(always)] + pub const fn doorbell_in_set( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(392usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn doorbell_in_clr( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(396usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn peri_nonsec(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(400usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn riscv_softirq(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(416usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn mtime_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(420usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn mtime(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(432usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn mtimeh(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(436usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn mtimecmp(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(440usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn mtimecmph(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(444usize) as _) } + } + #[doc = "Control register for TMDS encoder."] + #[inline(always)] + pub const fn tmds_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(448usize) as _) } + } + #[doc = "Write-only access to the TMDS colour data register."] + #[inline(always)] + pub const fn tmds_wdata(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(452usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_peek_single(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(456usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_pop_single(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(460usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_peek_double_l0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(464usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_pop_double_l0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(468usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_peek_double_l1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(472usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_pop_double_l1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(476usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_peek_double_l2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(480usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn tmds_pop_double_l2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(484usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/sio/regs.rs b/src/rp2350/sio/regs.rs new file mode 100644 index 00000000..623f3c5d --- /dev/null +++ b/src/rp2350/sio/regs.rs @@ -0,0 +1,991 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DoorbellInClr(pub u32); +impl DoorbellInClr { + #[inline(always)] + pub const fn doorbell_in_clr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_doorbell_in_clr(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for DoorbellInClr { + #[inline(always)] + fn default() -> DoorbellInClr { + DoorbellInClr(0) + } +} +#[doc = "Write 1s to trigger doorbell interrupts on this core. Read to get status of doorbells currently asserted on this core."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DoorbellInSet(pub u32); +impl DoorbellInSet { + #[inline(always)] + pub const fn doorbell_in_set(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_doorbell_in_set(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for DoorbellInSet { + #[inline(always)] + fn default() -> DoorbellInSet { + DoorbellInSet(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DoorbellOutClr(pub u32); +impl DoorbellOutClr { + #[inline(always)] + pub const fn doorbell_out_clr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_doorbell_out_clr(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for DoorbellOutClr { + #[inline(always)] + fn default() -> DoorbellOutClr { + DoorbellOutClr(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DoorbellOutSet(pub u32); +impl DoorbellOutSet { + #[inline(always)] + pub const fn doorbell_out_set(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_doorbell_out_set(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for DoorbellOutSet { + #[inline(always)] + fn default() -> DoorbellOutSet { + DoorbellOutSet(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct FifoSt(pub u32); +impl FifoSt { + #[doc = "Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid)"] + #[inline(always)] + pub const fn vld(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid)"] + #[inline(always)] + pub fn set_vld(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data)"] + #[inline(always)] + pub const fn rdy(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data)"] + #[inline(always)] + pub fn set_rdy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO."] + #[inline(always)] + pub const fn wof(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO."] + #[inline(always)] + pub fn set_wof(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO."] + #[inline(always)] + pub const fn roe(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO."] + #[inline(always)] + pub fn set_roe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for FifoSt { + #[inline(always)] + fn default() -> FifoSt { + FifoSt(0) + } +} +#[doc = "Values written here are atomically added to ACCUM0 Reading yields lane 0's raw shift and mask value (BASE0 not added)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp0accum0add(pub u32); +impl Interp0accum0add { + #[inline(always)] + pub const fn interp0_accum0_add(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_interp0_accum0_add(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Interp0accum0add { + #[inline(always)] + fn default() -> Interp0accum0add { + Interp0accum0add(0) + } +} +#[doc = "Values written here are atomically added to ACCUM1 Reading yields lane 1's raw shift and mask value (BASE1 not added)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp0accum1add(pub u32); +impl Interp0accum1add { + #[inline(always)] + pub const fn interp0_accum1_add(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_interp0_accum1_add(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Interp0accum1add { + #[inline(always)] + fn default() -> Interp0accum1add { + Interp0accum1add(0) + } +} +#[doc = "Control register for lane 0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp0ctrlLane0(pub u32); +impl Interp0ctrlLane0 { + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub const fn shift(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub fn set_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub const fn mask_lsb(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x1f; + val as u8 + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub fn set_mask_lsb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 5usize)) | (((val as u32) & 0x1f) << 5usize); + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub const fn mask_msb(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x1f; + val as u8 + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub fn set_mask_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 10usize)) | (((val as u32) & 0x1f) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn signed(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_signed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn cross_input(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_cross_input(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub const fn cross_result(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub fn set_cross_result(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result."] + #[inline(always)] + pub const fn add_raw(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result."] + #[inline(always)] + pub fn set_add_raw(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn force_msb(&self) -> u8 { + let val = (self.0 >> 19usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_force_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 19usize)) | (((val as u32) & 0x03) << 19usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn blend(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_blend(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[doc = "Indicates if any masked-off MSBs in ACCUM0 are set."] + #[inline(always)] + pub const fn overf0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "Indicates if any masked-off MSBs in ACCUM0 are set."] + #[inline(always)] + pub fn set_overf0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "Indicates if any masked-off MSBs in ACCUM1 are set."] + #[inline(always)] + pub const fn overf1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "Indicates if any masked-off MSBs in ACCUM1 are set."] + #[inline(always)] + pub fn set_overf1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Set if either OVERF0 or OVERF1 is set."] + #[inline(always)] + pub const fn overf(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Set if either OVERF0 or OVERF1 is set."] + #[inline(always)] + pub fn set_overf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } +} +impl Default for Interp0ctrlLane0 { + #[inline(always)] + fn default() -> Interp0ctrlLane0 { + Interp0ctrlLane0(0) + } +} +#[doc = "Control register for lane 1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp0ctrlLane1(pub u32); +impl Interp0ctrlLane1 { + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub const fn shift(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub fn set_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub const fn mask_lsb(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x1f; + val as u8 + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub fn set_mask_lsb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 5usize)) | (((val as u32) & 0x1f) << 5usize); + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub const fn mask_msb(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x1f; + val as u8 + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub fn set_mask_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 10usize)) | (((val as u32) & 0x1f) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn signed(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_signed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn cross_input(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_cross_input(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub const fn cross_result(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub fn set_cross_result(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."] + #[inline(always)] + pub const fn add_raw(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."] + #[inline(always)] + pub fn set_add_raw(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn force_msb(&self) -> u8 { + let val = (self.0 >> 19usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_force_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 19usize)) | (((val as u32) & 0x03) << 19usize); + } +} +impl Default for Interp0ctrlLane1 { + #[inline(always)] + fn default() -> Interp0ctrlLane1 { + Interp0ctrlLane1(0) + } +} +#[doc = "Values written here are atomically added to ACCUM0 Reading yields lane 0's raw shift and mask value (BASE0 not added)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp1accum0add(pub u32); +impl Interp1accum0add { + #[inline(always)] + pub const fn interp1_accum0_add(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_interp1_accum0_add(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Interp1accum0add { + #[inline(always)] + fn default() -> Interp1accum0add { + Interp1accum0add(0) + } +} +#[doc = "Values written here are atomically added to ACCUM1 Reading yields lane 1's raw shift and mask value (BASE1 not added)."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp1accum1add(pub u32); +impl Interp1accum1add { + #[inline(always)] + pub const fn interp1_accum1_add(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_interp1_accum1_add(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Interp1accum1add { + #[inline(always)] + fn default() -> Interp1accum1add { + Interp1accum1add(0) + } +} +#[doc = "Control register for lane 0"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp1ctrlLane0(pub u32); +impl Interp1ctrlLane0 { + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub const fn shift(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub fn set_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub const fn mask_lsb(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x1f; + val as u8 + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub fn set_mask_lsb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 5usize)) | (((val as u32) & 0x1f) << 5usize); + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub const fn mask_msb(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x1f; + val as u8 + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub fn set_mask_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 10usize)) | (((val as u32) & 0x1f) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn signed(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_signed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn cross_input(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_cross_input(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub const fn cross_result(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub fn set_cross_result(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result."] + #[inline(always)] + pub const fn add_raw(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result."] + #[inline(always)] + pub fn set_add_raw(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn force_msb(&self) -> u8 { + let val = (self.0 >> 19usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_force_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 19usize)) | (((val as u32) & 0x03) << 19usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn clamp(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_clamp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[doc = "Indicates if any masked-off MSBs in ACCUM0 are set."] + #[inline(always)] + pub const fn overf0(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "Indicates if any masked-off MSBs in ACCUM0 are set."] + #[inline(always)] + pub fn set_overf0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "Indicates if any masked-off MSBs in ACCUM1 are set."] + #[inline(always)] + pub const fn overf1(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "Indicates if any masked-off MSBs in ACCUM1 are set."] + #[inline(always)] + pub fn set_overf1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Set if either OVERF0 or OVERF1 is set."] + #[inline(always)] + pub const fn overf(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Set if either OVERF0 or OVERF1 is set."] + #[inline(always)] + pub fn set_overf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } +} +impl Default for Interp1ctrlLane0 { + #[inline(always)] + fn default() -> Interp1ctrlLane0 { + Interp1ctrlLane0(0) + } +} +#[doc = "Control register for lane 1"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Interp1ctrlLane1(pub u32); +impl Interp1ctrlLane1 { + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub const fn shift(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised."] + #[inline(always)] + pub fn set_shift(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub const fn mask_lsb(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x1f; + val as u8 + } + #[doc = "The least-significant bit allowed to pass by the mask (inclusive)"] + #[inline(always)] + pub fn set_mask_lsb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 5usize)) | (((val as u32) & 0x1f) << 5usize); + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub const fn mask_msb(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x1f; + val as u8 + } + #[doc = "The most-significant bit allowed to pass by the mask (inclusive) Setting MSB < LSB may cause chip to turn inside-out"] + #[inline(always)] + pub fn set_mask_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 10usize)) | (((val as u32) & 0x1f) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn signed(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_signed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "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)"] + #[inline(always)] + pub const fn cross_input(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_cross_input(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub const fn cross_result(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "If 1, feed the opposite lane's result into this lane's accumulator on POP."] + #[inline(always)] + pub fn set_cross_result(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."] + #[inline(always)] + pub const fn add_raw(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result."] + #[inline(always)] + pub fn set_add_raw(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn force_msb(&self) -> u8 { + let val = (self.0 >> 19usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_force_msb(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 19usize)) | (((val as u32) & 0x03) << 19usize); + } +} +impl Default for Interp1ctrlLane1 { + #[inline(always)] + fn default() -> Interp1ctrlLane1 { + Interp1ctrlLane1(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MtimeCtrl(pub u32); +impl MtimeCtrl { + #[doc = "Timer enable bit. When 0, the timer will not increment automatically."] + #[inline(always)] + pub const fn en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Timer enable bit. When 0, the timer will not increment automatically."] + #[inline(always)] + pub fn set_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fullspeed(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fullspeed(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "If 1, the timer pauses when core 0 is in the debug halt state."] + #[inline(always)] + pub const fn dbgpause_core0(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "If 1, the timer pauses when core 0 is in the debug halt state."] + #[inline(always)] + pub fn set_dbgpause_core0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "If 1, the timer pauses when core 1 is in the debug halt state."] + #[inline(always)] + pub const fn dbgpause_core1(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "If 1, the timer pauses when core 1 is in the debug halt state."] + #[inline(always)] + pub fn set_dbgpause_core1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for MtimeCtrl { + #[inline(always)] + fn default() -> MtimeCtrl { + MtimeCtrl(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PeriNonsec(pub u32); +impl PeriNonsec { + #[doc = "If 1, detach interpolator 0 (of this core) from the Secure SIO, and attach to the Non-secure SIO."] + #[inline(always)] + pub const fn interp0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "If 1, detach interpolator 0 (of this core) from the Secure SIO, and attach to the Non-secure SIO."] + #[inline(always)] + pub fn set_interp0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "If 1, detach interpolator 1 (of this core) from the Secure SIO, and attach to the Non-secure SIO."] + #[inline(always)] + pub const fn interp1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "If 1, detach interpolator 1 (of this core) from the Secure SIO, and attach to the Non-secure SIO."] + #[inline(always)] + pub fn set_interp1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "IF 1, detach TMDS encoder (of this core) from the Secure SIO, and attach to the Non-secure SIO."] + #[inline(always)] + pub const fn tmds(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "IF 1, detach TMDS encoder (of this core) from the Secure SIO, and attach to the Non-secure SIO."] + #[inline(always)] + pub fn set_tmds(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } +} +impl Default for PeriNonsec { + #[inline(always)] + fn default() -> PeriNonsec { + PeriNonsec(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RiscvSoftirq(pub u32); +impl RiscvSoftirq { + #[doc = "Write 1 to atomically set the core 0 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub const fn core0_set(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to atomically set the core 0 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub fn set_core0_set(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Write 1 to atomically set the core 1 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub const fn core1_set(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to atomically set the core 1 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub fn set_core1_set(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Write 1 to atomically clear the core 0 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub const fn core0_clr(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to atomically clear the core 0 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub fn set_core0_clr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Write 1 to atomically clear the core 1 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub const fn core1_clr(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Write 1 to atomically clear the core 1 software interrupt flag. Read to get the status of this flag."] + #[inline(always)] + pub fn set_core1_clr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } +} +impl Default for RiscvSoftirq { + #[inline(always)] + fn default() -> RiscvSoftirq { + RiscvSoftirq(0) + } +} +#[doc = "Control register for TMDS encoder."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TmdsCtrl(pub u32); +impl TmdsCtrl { + #[doc = "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."] + #[inline(always)] + pub const fn l0_rot(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_l0_rot(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn l1_rot(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_l1_rot(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn l2_rot(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_l2_rot(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn l0_nbits(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_l0_nbits(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 12usize)) | (((val as u32) & 0x07) << 12usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn l1_nbits(&self) -> u8 { + let val = (self.0 >> 15usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_l1_nbits(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 15usize)) | (((val as u32) & 0x07) << 15usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn l2_nbits(&self) -> u8 { + let val = (self.0 >> 18usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_l2_nbits(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 18usize)) | (((val as u32) & 0x07) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn interleave(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_interleave(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "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.)"] + #[inline(always)] + pub const fn pix_shift(&self) -> super::vals::PixShift { + let val = (self.0 >> 24usize) & 0x07; + super::vals::PixShift::from_bits(val as u8) + } + #[doc = "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.)"] + #[inline(always)] + pub fn set_pix_shift(&mut self, val: super::vals::PixShift) { + self.0 = (self.0 & !(0x07 << 24usize)) | (((val.to_bits() as u32) & 0x07) << 24usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn pix2_noshift(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_pix2_noshift(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[doc = "Clear the running DC balance state of the TMDS encoders. This bit should be written once at the beginning of each scanline."] + #[inline(always)] + pub const fn clear_balance(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Clear the running DC balance state of the TMDS encoders. This bit should be written once at the beginning of each scanline."] + #[inline(always)] + pub fn set_clear_balance(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } +} +impl Default for TmdsCtrl { + #[inline(always)] + fn default() -> TmdsCtrl { + TmdsCtrl(0) + } +} diff --git a/src/rp2350/sio/vals.rs b/src/rp2350/sio/vals.rs new file mode 100644 index 00000000..1ffa3eac --- /dev/null +++ b/src/rp2350/sio/vals.rs @@ -0,0 +1,40 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum PixShift { + #[doc = "Do not shift the colour data register."] + _0 = 0, + #[doc = "Shift the colour data register by 1 bit"] + _1 = 0x01, + #[doc = "Shift the colour data register by 2 bits"] + _2 = 0x02, + #[doc = "Shift the colour data register by 4 bits"] + _4 = 0x03, + #[doc = "Shift the colour data register by 8 bits"] + _8 = 0x04, + #[doc = "Shift the colour data register by 16 bits"] + _16 = 0x05, + _RESERVED_6 = 0x06, + _RESERVED_7 = 0x07, +} +impl PixShift { + #[inline(always)] + pub const fn from_bits(val: u8) -> PixShift { + unsafe { core::mem::transmute(val & 0x07) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for PixShift { + #[inline(always)] + fn from(val: u8) -> PixShift { + PixShift::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: PixShift) -> u8 { + PixShift::to_bits(val) + } +} diff --git a/src/rp2350/spi.rs b/src/rp2350/spi.rs new file mode 100644 index 00000000..0a4f215e --- /dev/null +++ b/src/rp2350/spi.rs @@ -0,0 +1,107 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Spi { + ptr: *mut u8, +} +unsafe impl Send for Spi {} +unsafe impl Sync for Spi {} +impl Spi { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Control register 0, SSPCR0 on page 3-4"] + #[inline(always)] + pub const fn cr0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Control register 1, SSPCR1 on page 3-5"] + #[inline(always)] + pub const fn cr1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Data register, SSPDR on page 3-6"] + #[inline(always)] + pub const fn dr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Status register, SSPSR on page 3-7"] + #[inline(always)] + pub const fn sr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Clock prescale register, SSPCPSR on page 3-8"] + #[inline(always)] + pub const fn cpsr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Interrupt mask set or clear register, SSPIMSC on page 3-9"] + #[inline(always)] + pub const fn imsc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Raw interrupt status register, SSPRIS on page 3-10"] + #[inline(always)] + pub const fn ris(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Masked interrupt status register, SSPMIS on page 3-11"] + #[inline(always)] + pub const fn mis(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Interrupt clear register, SSPICR on page 3-11"] + #[inline(always)] + pub const fn icr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "DMA control register, SSPDMACR on page 3-12"] + #[inline(always)] + pub const fn dmacr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] + #[inline(always)] + pub const fn periphid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4064usize) as _) } + } + #[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] + #[inline(always)] + pub const fn periphid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4068usize) as _) } + } + #[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] + #[inline(always)] + pub const fn periphid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4072usize) as _) } + } + #[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] + #[inline(always)] + pub const fn periphid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4076usize) as _) } + } + #[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] + #[inline(always)] + pub const fn pcellid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4080usize) as _) } + } + #[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] + #[inline(always)] + pub const fn pcellid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4084usize) as _) } + } + #[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] + #[inline(always)] + pub const fn pcellid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4088usize) as _) } + } + #[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] + #[inline(always)] + pub const fn pcellid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4092usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/spi/regs.rs b/src/rp2350/spi/regs.rs new file mode 100644 index 00000000..f41451de --- /dev/null +++ b/src/rp2350/spi/regs.rs @@ -0,0 +1,678 @@ +#[doc = "Clock prescale register, SSPCPSR on page 3-8"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Cpsr(pub u32); +impl Cpsr { + #[doc = "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."] + #[inline(always)] + pub const fn cpsdvsr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_cpsdvsr(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Cpsr { + #[inline(always)] + fn default() -> Cpsr { + Cpsr(0) + } +} +#[doc = "Control register 0, SSPCR0 on page 3-4"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Cr0(pub u32); +impl Cr0 { + #[doc = "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."] + #[inline(always)] + pub const fn dss(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dss(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation."] + #[inline(always)] + pub const fn frf(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x03; + val as u8 + } + #[doc = "Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation."] + #[inline(always)] + pub fn set_frf(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val as u32) & 0x03) << 4usize); + } + #[doc = "SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10."] + #[inline(always)] + pub const fn spo(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10."] + #[inline(always)] + pub fn set_spo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10."] + #[inline(always)] + pub const fn sph(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10."] + #[inline(always)] + pub fn set_sph(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn scr(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_scr(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } +} +impl Default for Cr0 { + #[inline(always)] + fn default() -> Cr0 { + Cr0(0) + } +} +#[doc = "Control register 1, SSPCR1 on page 3-5"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Cr1(pub u32); +impl Cr1 { + #[doc = "Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally."] + #[inline(always)] + pub const fn lbm(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally."] + #[inline(always)] + pub fn set_lbm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled."] + #[inline(always)] + pub const fn sse(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled."] + #[inline(always)] + pub fn set_sse(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ms(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ms(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sod(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sod(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Cr1 { + #[inline(always)] + fn default() -> Cr1 { + Cr1(0) + } +} +#[doc = "DMA control register, SSPDMACR on page 3-12"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dmacr(pub u32); +impl Dmacr { + #[doc = "Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled."] + #[inline(always)] + pub const fn rxdmae(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled."] + #[inline(always)] + pub fn set_rxdmae(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled."] + #[inline(always)] + pub const fn txdmae(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled."] + #[inline(always)] + pub fn set_txdmae(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Dmacr { + #[inline(always)] + fn default() -> Dmacr { + Dmacr(0) + } +} +#[doc = "Data register, SSPDR on page 3-6"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dr(pub u32); +impl Dr { + #[doc = "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."] + #[inline(always)] + pub const fn data(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_data(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Dr { + #[inline(always)] + fn default() -> Dr { + Dr(0) + } +} +#[doc = "Interrupt clear register, SSPICR on page 3-11"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Icr(pub u32); +impl Icr { + #[doc = "Clears the SSPRORINTR interrupt"] + #[inline(always)] + pub const fn roric(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Clears the SSPRORINTR interrupt"] + #[inline(always)] + pub fn set_roric(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Clears the SSPRTINTR interrupt"] + #[inline(always)] + pub const fn rtic(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Clears the SSPRTINTR interrupt"] + #[inline(always)] + pub fn set_rtic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Icr { + #[inline(always)] + fn default() -> Icr { + Icr(0) + } +} +#[doc = "Interrupt mask set or clear register, SSPIMSC on page 3-9"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Imsc(pub u32); +impl Imsc { + #[doc = "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."] + #[inline(always)] + pub const fn rorim(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rorim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rtim(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rtim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxim(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txim(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Imsc { + #[inline(always)] + fn default() -> Imsc { + Imsc(0) + } +} +#[doc = "Masked interrupt status register, SSPMIS on page 3-11"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Mis(pub u32); +impl Mis { + #[doc = "Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt"] + #[inline(always)] + pub const fn rormis(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt"] + #[inline(always)] + pub fn set_rormis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt"] + #[inline(always)] + pub const fn rtmis(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt"] + #[inline(always)] + pub fn set_rtmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt"] + #[inline(always)] + pub const fn rxmis(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt"] + #[inline(always)] + pub fn set_rxmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt"] + #[inline(always)] + pub const fn txmis(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt"] + #[inline(always)] + pub fn set_txmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Mis { + #[inline(always)] + fn default() -> Mis { + Mis(0) + } +} +#[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pcellid0(pub u32); +impl Pcellid0 { + #[doc = "These bits read back as 0x0D"] + #[inline(always)] + pub const fn ssppcellid0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x0D"] + #[inline(always)] + pub fn set_ssppcellid0(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Pcellid0 { + #[inline(always)] + fn default() -> Pcellid0 { + Pcellid0(0) + } +} +#[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pcellid1(pub u32); +impl Pcellid1 { + #[doc = "These bits read back as 0xF0"] + #[inline(always)] + pub const fn ssppcellid1(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0xF0"] + #[inline(always)] + pub fn set_ssppcellid1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Pcellid1 { + #[inline(always)] + fn default() -> Pcellid1 { + Pcellid1(0) + } +} +#[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pcellid2(pub u32); +impl Pcellid2 { + #[doc = "These bits read back as 0x05"] + #[inline(always)] + pub const fn ssppcellid2(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x05"] + #[inline(always)] + pub fn set_ssppcellid2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Pcellid2 { + #[inline(always)] + fn default() -> Pcellid2 { + Pcellid2(0) + } +} +#[doc = "PrimeCell identification registers, SSPPCellID0-3 on page 3-16"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pcellid3(pub u32); +impl Pcellid3 { + #[doc = "These bits read back as 0xB1"] + #[inline(always)] + pub const fn ssppcellid3(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0xB1"] + #[inline(always)] + pub fn set_ssppcellid3(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Pcellid3 { + #[inline(always)] + fn default() -> Pcellid3 { + Pcellid3(0) + } +} +#[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Periphid0(pub u32); +impl Periphid0 { + #[doc = "These bits read back as 0x22"] + #[inline(always)] + pub const fn partnumber0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x22"] + #[inline(always)] + pub fn set_partnumber0(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Periphid0 { + #[inline(always)] + fn default() -> Periphid0 { + Periphid0(0) + } +} +#[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Periphid1(pub u32); +impl Periphid1 { + #[doc = "These bits read back as 0x0"] + #[inline(always)] + pub const fn partnumber1(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "These bits read back as 0x0"] + #[inline(always)] + pub fn set_partnumber1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "These bits read back as 0x1"] + #[inline(always)] + pub const fn designer0(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "These bits read back as 0x1"] + #[inline(always)] + pub fn set_designer0(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } +} +impl Default for Periphid1 { + #[inline(always)] + fn default() -> Periphid1 { + Periphid1(0) + } +} +#[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Periphid2(pub u32); +impl Periphid2 { + #[doc = "These bits read back as 0x4"] + #[inline(always)] + pub const fn designer1(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "These bits read back as 0x4"] + #[inline(always)] + pub fn set_designer1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "These bits return the peripheral revision"] + #[inline(always)] + pub const fn revision(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "These bits return the peripheral revision"] + #[inline(always)] + pub fn set_revision(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } +} +impl Default for Periphid2 { + #[inline(always)] + fn default() -> Periphid2 { + Periphid2(0) + } +} +#[doc = "Peripheral identification registers, SSPPeriphID0-3 on page 3-13"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Periphid3(pub u32); +impl Periphid3 { + #[doc = "These bits read back as 0x00"] + #[inline(always)] + pub const fn configuration(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x00"] + #[inline(always)] + pub fn set_configuration(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Periphid3 { + #[inline(always)] + fn default() -> Periphid3 { + Periphid3(0) + } +} +#[doc = "Raw interrupt status register, SSPRIS on page 3-10"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ris(pub u32); +impl Ris { + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt"] + #[inline(always)] + pub const fn rorris(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt"] + #[inline(always)] + pub fn set_rorris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt"] + #[inline(always)] + pub const fn rtris(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt"] + #[inline(always)] + pub fn set_rtris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt"] + #[inline(always)] + pub const fn rxris(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt"] + #[inline(always)] + pub fn set_rxris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt"] + #[inline(always)] + pub const fn txris(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt"] + #[inline(always)] + pub fn set_txris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Ris { + #[inline(always)] + fn default() -> Ris { + Ris(0) + } +} +#[doc = "Status register, SSPSR on page 3-7"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sr(pub u32); +impl Sr { + #[doc = "Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty."] + #[inline(always)] + pub const fn tfe(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty."] + #[inline(always)] + pub fn set_tfe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full."] + #[inline(always)] + pub const fn tnf(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full."] + #[inline(always)] + pub fn set_tnf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty."] + #[inline(always)] + pub const fn rne(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty."] + #[inline(always)] + pub fn set_rne(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full."] + #[inline(always)] + pub const fn rff(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full."] + #[inline(always)] + pub fn set_rff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn bsy(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_bsy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Sr { + #[inline(always)] + fn default() -> Sr { + Sr(0) + } +} diff --git a/src/rp2350/syscfg.rs b/src/rp2350/syscfg.rs new file mode 100644 index 00000000..e770429c --- /dev/null +++ b/src/rp2350/syscfg.rs @@ -0,0 +1,50 @@ +#[doc = "Register block for various chip control signals"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Syscfg { + ptr: *mut u8, +} +unsafe impl Send for Syscfg {} +unsafe impl Sync for Syscfg {} +impl Syscfg { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Configuration for processors"] + #[inline(always)] + pub const fn proc_config(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn proc_in_sync_bypass(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn proc_in_sync_bypass_hi( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Directly control the chip SWD debug port"] + #[inline(always)] + pub const fn dbgforce(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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"] + #[inline(always)] + pub const fn mempowerdown(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Auxiliary system control register"] + #[inline(always)] + pub const fn auxctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/syscfg/regs.rs b/src/rp2350/syscfg/regs.rs new file mode 100644 index 00000000..9a92b99d --- /dev/null +++ b/src/rp2350/syscfg/regs.rs @@ -0,0 +1,308 @@ +#[doc = "Auxiliary system control register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Auxctrl(pub u32); +impl Auxctrl { + #[doc = "* 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."] + #[inline(always)] + pub const fn auxctrl(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "* 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."] + #[inline(always)] + pub fn set_auxctrl(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Auxctrl { + #[inline(always)] + fn default() -> Auxctrl { + Auxctrl(0) + } +} +#[doc = "Directly control the chip SWD debug port"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dbgforce(pub u32); +impl Dbgforce { + #[doc = "Observe the value of SWDIO output."] + #[inline(always)] + pub const fn swdo(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Observe the value of SWDIO output."] + #[inline(always)] + pub fn set_swdo(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Directly drive SWDIO input, if ATTACH is set"] + #[inline(always)] + pub const fn swdi(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Directly drive SWDIO input, if ATTACH is set"] + #[inline(always)] + pub fn set_swdi(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Directly drive SWCLK, if ATTACH is set"] + #[inline(always)] + pub const fn swclk(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Directly drive SWCLK, if ATTACH is set"] + #[inline(always)] + pub fn set_swclk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Attach chip debug port to syscfg controls, and disconnect it from external SWD pads."] + #[inline(always)] + pub const fn attach(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Attach chip debug port to syscfg controls, and disconnect it from external SWD pads."] + #[inline(always)] + pub fn set_attach(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Dbgforce { + #[inline(always)] + fn default() -> Dbgforce { + Dbgforce(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Mempowerdown(pub u32); +impl Mempowerdown { + #[inline(always)] + pub const fn sram0(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn sram1(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn sram2(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn sram3(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram3(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn sram4(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn sram5(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram5(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn sram6(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram6(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn sram7(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram7(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn sram8(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram8(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn sram9(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_sram9(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn usb(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usb(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn rom(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rom(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn bootram(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_bootram(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } +} +impl Default for Mempowerdown { + #[inline(always)] + fn default() -> Mempowerdown { + Mempowerdown(0) + } +} +#[doc = "Configuration for processors"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ProcConfig(pub u32); +impl ProcConfig { + #[doc = "Indication that proc0 has halted"] + #[inline(always)] + pub const fn proc0_halted(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Indication that proc0 has halted"] + #[inline(always)] + pub fn set_proc0_halted(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Indication that proc1 has halted"] + #[inline(always)] + pub const fn proc1_halted(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Indication that proc1 has halted"] + #[inline(always)] + pub fn set_proc1_halted(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for ProcConfig { + #[inline(always)] + fn default() -> ProcConfig { + ProcConfig(0) + } +} +#[doc = "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"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ProcInSyncBypassHi(pub u32); +impl ProcInSyncBypassHi { + #[inline(always)] + pub const fn gpio(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_gpio(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[inline(always)] + pub const fn usb_dp(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usb_dp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn usb_dm(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_usb_dm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn qspi_sck(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_qspi_sck(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn qspi_csn(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_qspi_csn(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn qspi_sd(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_qspi_sd(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val as u32) & 0x0f) << 28usize); + } +} +impl Default for ProcInSyncBypassHi { + #[inline(always)] + fn default() -> ProcInSyncBypassHi { + ProcInSyncBypassHi(0) + } +} diff --git a/src/rp2350/sysinfo.rs b/src/rp2350/sysinfo.rs new file mode 100644 index 00000000..5a7dff28 --- /dev/null +++ b/src/rp2350/sysinfo.rs @@ -0,0 +1,36 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Sysinfo { + ptr: *mut u8, +} +unsafe impl Send for Sysinfo {} +unsafe impl Sync for Sysinfo {} +impl Sysinfo { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "JEDEC JEP-106 compliant chip identifier."] + #[inline(always)] + pub const fn chip_id(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn package_sel(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Platform register. Allows software to know what environment it is running in during pre-production development. Post-production, the PLATFORM is always ASIC, non-SIM."] + #[inline(always)] + pub const fn platform(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Git hash of the chip source. Used to identify chip version."] + #[inline(always)] + pub const fn gitref_rp2350(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/sysinfo/regs.rs b/src/rp2350/sysinfo/regs.rs new file mode 100644 index 00000000..7b6babf2 --- /dev/null +++ b/src/rp2350/sysinfo/regs.rs @@ -0,0 +1,125 @@ +#[doc = "JEDEC JEP-106 compliant chip identifier."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct ChipId(pub u32); +impl ChipId { + #[inline(always)] + pub const fn stop_bit(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_stop_bit(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn manufacturer(&self) -> u16 { + let val = (self.0 >> 1usize) & 0x07ff; + val as u16 + } + #[inline(always)] + pub fn set_manufacturer(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 1usize)) | (((val as u32) & 0x07ff) << 1usize); + } + #[inline(always)] + pub const fn part(&self) -> u16 { + let val = (self.0 >> 12usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_part(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 12usize)) | (((val as u32) & 0xffff) << 12usize); + } + #[inline(always)] + pub const fn revision(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_revision(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val as u32) & 0x0f) << 28usize); + } +} +impl Default for ChipId { + #[inline(always)] + fn default() -> ChipId { + ChipId(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct PackageSel(pub u32); +impl PackageSel { + #[inline(always)] + pub const fn package_sel(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_package_sel(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for PackageSel { + #[inline(always)] + fn default() -> PackageSel { + PackageSel(0) + } +} +#[doc = "Platform register. Allows software to know what environment it is running in during pre-production development. Post-production, the PLATFORM is always ASIC, non-SIM."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Platform(pub u32); +impl Platform { + #[inline(always)] + pub const fn fpga(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_fpga(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn asic(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_asic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn hdlsim(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_hdlsim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn batchsim(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_batchsim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn gatesim(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_gatesim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } +} +impl Default for Platform { + #[inline(always)] + fn default() -> Platform { + Platform(0) + } +} diff --git a/src/rp2350/tbman.rs b/src/rp2350/tbman.rs new file mode 100644 index 00000000..f3d65156 --- /dev/null +++ b/src/rp2350/tbman.rs @@ -0,0 +1,23 @@ +#[doc = "For managing simulation testbenches"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Tbman { + ptr: *mut u8, +} +unsafe impl Send for Tbman {} +unsafe impl Sync for Tbman {} +impl Tbman { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Indicates the type of platform in use"] + #[inline(always)] + pub const fn platform(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/tbman/regs.rs b/src/rp2350/tbman/regs.rs new file mode 100644 index 00000000..fd318142 --- /dev/null +++ b/src/rp2350/tbman/regs.rs @@ -0,0 +1,45 @@ +#[doc = "Indicates the type of platform in use"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Platform(pub u32); +impl Platform { + #[doc = "Indicates the platform is an ASIC"] + #[inline(always)] + pub const fn asic(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Indicates the platform is an ASIC"] + #[inline(always)] + pub fn set_asic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Indicates the platform is an FPGA"] + #[inline(always)] + pub const fn fpga(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Indicates the platform is an FPGA"] + #[inline(always)] + pub fn set_fpga(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Indicates the platform is a simulation"] + #[inline(always)] + pub const fn hdlsim(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Indicates the platform is a simulation"] + #[inline(always)] + pub fn set_hdlsim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for Platform { + #[inline(always)] + fn default() -> Platform { + Platform(0) + } +} diff --git a/src/rp2350/ticks.rs b/src/rp2350/ticks.rs new file mode 100644 index 00000000..98f86780 --- /dev/null +++ b/src/rp2350/ticks.rs @@ -0,0 +1,99 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ticks { + ptr: *mut u8, +} +unsafe impl Send for Ticks {} +unsafe impl Sync for Ticks {} +impl Ticks { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Controls the tick generator"] + #[inline(always)] + pub const fn proc0_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn proc0_cycles(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[inline(always)] + pub const fn proc0_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Controls the tick generator"] + #[inline(always)] + pub const fn proc1_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[inline(always)] + pub const fn proc1_cycles(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[inline(always)] + pub const fn proc1_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Controls the tick generator"] + #[inline(always)] + pub const fn timer0_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[inline(always)] + pub const fn timer0_cycles(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[inline(always)] + pub const fn timer0_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Controls the tick generator"] + #[inline(always)] + pub const fn timer1_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[inline(always)] + pub const fn timer1_cycles(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[inline(always)] + pub const fn timer1_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "Controls the tick generator"] + #[inline(always)] + pub const fn watchdog_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[inline(always)] + pub const fn watchdog_cycles( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[inline(always)] + pub const fn watchdog_count( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "Controls the tick generator"] + #[inline(always)] + pub const fn riscv_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[inline(always)] + pub const fn riscv_cycles(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[inline(always)] + pub const fn riscv_count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/ticks/regs.rs b/src/rp2350/ticks/regs.rs new file mode 100644 index 00000000..fe7b526d --- /dev/null +++ b/src/rp2350/ticks/regs.rs @@ -0,0 +1,468 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Proc0count(pub u32); +impl Proc0count { + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub const fn proc0_count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub fn set_proc0_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Proc0count { + #[inline(always)] + fn default() -> Proc0count { + Proc0count(0) + } +} +#[doc = "Controls the tick generator"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Proc0ctrl(pub u32); +impl Proc0ctrl { + #[doc = "start / stop tick generation"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "start / stop tick generation"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Proc0ctrl { + #[inline(always)] + fn default() -> Proc0ctrl { + Proc0ctrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Proc0cycles(pub u32); +impl Proc0cycles { + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub const fn proc0_cycles(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub fn set_proc0_cycles(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Proc0cycles { + #[inline(always)] + fn default() -> Proc0cycles { + Proc0cycles(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Proc1count(pub u32); +impl Proc1count { + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub const fn proc1_count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub fn set_proc1_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Proc1count { + #[inline(always)] + fn default() -> Proc1count { + Proc1count(0) + } +} +#[doc = "Controls the tick generator"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Proc1ctrl(pub u32); +impl Proc1ctrl { + #[doc = "start / stop tick generation"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "start / stop tick generation"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Proc1ctrl { + #[inline(always)] + fn default() -> Proc1ctrl { + Proc1ctrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Proc1cycles(pub u32); +impl Proc1cycles { + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub const fn proc1_cycles(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub fn set_proc1_cycles(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Proc1cycles { + #[inline(always)] + fn default() -> Proc1cycles { + Proc1cycles(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RiscvCount(pub u32); +impl RiscvCount { + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub const fn riscv_count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub fn set_riscv_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for RiscvCount { + #[inline(always)] + fn default() -> RiscvCount { + RiscvCount(0) + } +} +#[doc = "Controls the tick generator"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RiscvCtrl(pub u32); +impl RiscvCtrl { + #[doc = "start / stop tick generation"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "start / stop tick generation"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for RiscvCtrl { + #[inline(always)] + fn default() -> RiscvCtrl { + RiscvCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RiscvCycles(pub u32); +impl RiscvCycles { + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub const fn riscv_cycles(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub fn set_riscv_cycles(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for RiscvCycles { + #[inline(always)] + fn default() -> RiscvCycles { + RiscvCycles(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer0count(pub u32); +impl Timer0count { + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub const fn timer0_count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub fn set_timer0_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Timer0count { + #[inline(always)] + fn default() -> Timer0count { + Timer0count(0) + } +} +#[doc = "Controls the tick generator"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer0ctrl(pub u32); +impl Timer0ctrl { + #[doc = "start / stop tick generation"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "start / stop tick generation"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Timer0ctrl { + #[inline(always)] + fn default() -> Timer0ctrl { + Timer0ctrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer0cycles(pub u32); +impl Timer0cycles { + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub const fn timer0_cycles(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub fn set_timer0_cycles(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Timer0cycles { + #[inline(always)] + fn default() -> Timer0cycles { + Timer0cycles(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer1count(pub u32); +impl Timer1count { + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub const fn timer1_count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub fn set_timer1_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Timer1count { + #[inline(always)] + fn default() -> Timer1count { + Timer1count(0) + } +} +#[doc = "Controls the tick generator"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer1ctrl(pub u32); +impl Timer1ctrl { + #[doc = "start / stop tick generation"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "start / stop tick generation"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Timer1ctrl { + #[inline(always)] + fn default() -> Timer1ctrl { + Timer1ctrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer1cycles(pub u32); +impl Timer1cycles { + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub const fn timer1_cycles(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub fn set_timer1_cycles(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for Timer1cycles { + #[inline(always)] + fn default() -> Timer1cycles { + Timer1cycles(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct WatchdogCount(pub u32); +impl WatchdogCount { + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub const fn watchdog_count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Count down timer: the remaining number clk_tick cycles before the next tick is generated."] + #[inline(always)] + pub fn set_watchdog_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for WatchdogCount { + #[inline(always)] + fn default() -> WatchdogCount { + WatchdogCount(0) + } +} +#[doc = "Controls the tick generator"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct WatchdogCtrl(pub u32); +impl WatchdogCtrl { + #[doc = "start / stop tick generation"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "start / stop tick generation"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub const fn running(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Is the tick generator running?"] + #[inline(always)] + pub fn set_running(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for WatchdogCtrl { + #[inline(always)] + fn default() -> WatchdogCtrl { + WatchdogCtrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct WatchdogCycles(pub u32); +impl WatchdogCycles { + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub const fn watchdog_cycles(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x01ff; + val as u16 + } + #[doc = "Total number of clk_tick cycles before the next tick."] + #[inline(always)] + pub fn set_watchdog_cycles(&mut self, val: u16) { + self.0 = (self.0 & !(0x01ff << 0usize)) | (((val as u32) & 0x01ff) << 0usize); + } +} +impl Default for WatchdogCycles { + #[inline(always)] + fn default() -> WatchdogCycles { + WatchdogCycles(0) + } +} diff --git a/src/rp2350/timer.rs b/src/rp2350/timer.rs new file mode 100644 index 00000000..2a795aca --- /dev/null +++ b/src/rp2350/timer.rs @@ -0,0 +1,100 @@ +#[doc = "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"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Timer { + ptr: *mut u8, +} +unsafe impl Send for Timer {} +unsafe impl Sync for Timer {} +impl Timer { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Write to bits 63:32 of time always write timelw before timehw"] + #[inline(always)] + pub const fn timehw(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Write to bits 31:0 of time writes do not get copied to time until timehw is written"] + #[inline(always)] + pub const fn timelw(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Read from bits 63:32 of time always read timelr before timehr"] + #[inline(always)] + pub const fn timehr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Read from bits 31:0 of time"] + #[inline(always)] + pub const fn timelr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Arm alarm 0, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM0 == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register."] + #[inline(always)] + pub const fn alarm(self, n: usize) -> crate::common::Reg { + assert!(n < 4usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize + n * 4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn armed(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Raw read from bits 63:32 of time (no side effects)"] + #[inline(always)] + pub const fn timerawh(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Raw read from bits 31:0 of time (no side effects)"] + #[inline(always)] + pub const fn timerawl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Set bits high to enable pause when the corresponding debug ports are active"] + #[inline(always)] + pub const fn dbgpause(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "Set high to pause the timer"] + #[inline(always)] + pub const fn pause(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "Set locked bit to disable write access to timer Once set, cannot be cleared (without a reset)"] + #[inline(always)] + pub const fn locked(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn source(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/timer/regs.rs b/src/rp2350/timer/regs.rs new file mode 100644 index 00000000..37212c31 --- /dev/null +++ b/src/rp2350/timer/regs.rs @@ -0,0 +1,143 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Armed(pub u32); +impl Armed { + #[inline(always)] + pub const fn armed(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_armed(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } +} +impl Default for Armed { + #[inline(always)] + fn default() -> Armed { + Armed(0) + } +} +#[doc = "Set bits high to enable pause when the corresponding debug ports are active"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dbgpause(pub u32); +impl Dbgpause { + #[doc = "Pause when processor 0 is in debug mode"] + #[inline(always)] + pub const fn dbg0(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Pause when processor 0 is in debug mode"] + #[inline(always)] + pub fn set_dbg0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Pause when processor 1 is in debug mode"] + #[inline(always)] + pub const fn dbg1(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Pause when processor 1 is in debug mode"] + #[inline(always)] + pub fn set_dbg1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for Dbgpause { + #[inline(always)] + fn default() -> Dbgpause { + Dbgpause(0) + } +} +#[doc = "Interrupt Force"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Int(pub u32); +impl Int { + #[inline(always)] + pub const fn alarm(&self, n: usize) -> bool { + assert!(n < 4usize); + let offs = 0usize + n * 1usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_alarm(&mut self, n: usize, val: bool) { + assert!(n < 4usize); + let offs = 0usize + n * 1usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for Int { + #[inline(always)] + fn default() -> Int { + Int(0) + } +} +#[doc = "Set locked bit to disable write access to timer Once set, cannot be cleared (without a reset)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Locked(pub u32); +impl Locked { + #[inline(always)] + pub const fn locked(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_locked(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Locked { + #[inline(always)] + fn default() -> Locked { + Locked(0) + } +} +#[doc = "Set high to pause the timer"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Pause(pub u32); +impl Pause { + #[inline(always)] + pub const fn pause(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_pause(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } +} +impl Default for Pause { + #[inline(always)] + fn default() -> Pause { + Pause(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Source(pub u32); +impl Source { + #[inline(always)] + pub const fn clk_sys(&self) -> super::vals::ClkSys { + let val = (self.0 >> 0usize) & 0x01; + super::vals::ClkSys::from_bits(val as u8) + } + #[inline(always)] + pub fn set_clk_sys(&mut self, val: super::vals::ClkSys) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val.to_bits() as u32) & 0x01) << 0usize); + } +} +impl Default for Source { + #[inline(always)] + fn default() -> Source { + Source(0) + } +} diff --git a/src/rp2350/timer/vals.rs b/src/rp2350/timer/vals.rs new file mode 100644 index 00000000..0c506c29 --- /dev/null +++ b/src/rp2350/timer/vals.rs @@ -0,0 +1,28 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum ClkSys { + TICK = 0, + CLK_SYS = 0x01, +} +impl ClkSys { + #[inline(always)] + pub const fn from_bits(val: u8) -> ClkSys { + unsafe { core::mem::transmute(val & 0x01) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for ClkSys { + #[inline(always)] + fn from(val: u8) -> ClkSys { + ClkSys::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: ClkSys) -> u8 { + ClkSys::to_bits(val) + } +} diff --git a/src/rp2350/trng.rs b/src/rp2350/trng.rs new file mode 100644 index 00000000..08b8ce85 --- /dev/null +++ b/src/rp2350/trng.rs @@ -0,0 +1,149 @@ +#[doc = "ARM TrustZone RNG register block"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Trng { + ptr: *mut u8, +} +unsafe impl Send for Trng {} +unsafe impl Sync for Trng {} +impl Trng { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Interrupt masking."] + #[inline(always)] + pub const fn rng_imr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize) as _) } + } + #[doc = "RNG status register. If corresponding RNG_IMR bit is unmasked, an interrupt will be generated."] + #[inline(always)] + pub const fn rng_isr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(260usize) as _) } + } + #[doc = "Interrupt/status bit clear Register."] + #[inline(always)] + pub const fn rng_icr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(264usize) as _) } + } + #[doc = "Selecting the inverter-chain length."] + #[inline(always)] + pub const fn trng_config(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(268usize) as _) } + } + #[doc = "192 bit collection indication."] + #[inline(always)] + pub const fn trng_valid(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(272usize) as _) } + } + #[doc = "RNG collected bits."] + #[inline(always)] + pub const fn ehr_data0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(276usize) as _) } + } + #[doc = "RNG collected bits."] + #[inline(always)] + pub const fn ehr_data1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(280usize) as _) } + } + #[doc = "RNG collected bits."] + #[inline(always)] + pub const fn ehr_data2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(284usize) as _) } + } + #[doc = "RNG collected bits."] + #[inline(always)] + pub const fn ehr_data3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(288usize) as _) } + } + #[doc = "RNG collected bits."] + #[inline(always)] + pub const fn ehr_data4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(292usize) as _) } + } + #[doc = "RNG collected bits."] + #[inline(always)] + pub const fn ehr_data5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(296usize) as _) } + } + #[doc = "Enable signal for the random source."] + #[inline(always)] + pub const fn rnd_source_enable( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(300usize) as _) } + } + #[doc = "Counts clocks between sampling of random bit."] + #[inline(always)] + pub const fn sample_cnt1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(304usize) as _) } + } + #[doc = "Statistic about Autocorrelation test activations."] + #[inline(always)] + pub const fn autocorr_statistic( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(308usize) as _) } + } + #[doc = "Debug register."] + #[inline(always)] + pub const fn trng_debug_control( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(312usize) as _) } + } + #[doc = "Generate internal SW reset within the RNG block."] + #[inline(always)] + pub const fn trng_sw_reset(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(320usize) as _) } + } + #[doc = "Enable the RNG debug mode"] + #[inline(always)] + pub const fn rng_debug_en_input( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(436usize) as _) } + } + #[doc = "RNG Busy indication."] + #[inline(always)] + pub const fn trng_busy(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(440usize) as _) } + } + #[doc = "Reset the counter of collected bits in the RNG."] + #[inline(always)] + pub const fn rst_bits_counter( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(444usize) as _) } + } + #[doc = "Displays the version settings of the TRNG."] + #[inline(always)] + pub const fn rng_version(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(448usize) as _) } + } + #[doc = "Collected BIST results."] + #[inline(always)] + pub const fn rng_bist_cntr_0( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(480usize) as _) } + } + #[doc = "Collected BIST results."] + #[inline(always)] + pub const fn rng_bist_cntr_1( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(484usize) as _) } + } + #[doc = "Collected BIST results."] + #[inline(always)] + pub const fn rng_bist_cntr_2( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(488usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/trng/regs.rs b/src/rp2350/trng/regs.rs new file mode 100644 index 00000000..fdb174e3 --- /dev/null +++ b/src/rp2350/trng/regs.rs @@ -0,0 +1,753 @@ +#[doc = "Statistic about Autocorrelation test activations."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AutocorrStatistic(pub u32); +impl AutocorrStatistic { + #[doc = "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."] + #[inline(always)] + pub const fn autocorr_trys(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x3fff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_autocorr_trys(&mut self, val: u16) { + self.0 = (self.0 & !(0x3fff << 0usize)) | (((val as u32) & 0x3fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn autocorr_fails(&self) -> u8 { + let val = (self.0 >> 14usize) & 0xff; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_autocorr_fails(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 14usize)) | (((val as u32) & 0xff) << 14usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u16 { + let val = (self.0 >> 22usize) & 0x03ff; + val as u16 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 22usize)) | (((val as u32) & 0x03ff) << 22usize); + } +} +impl Default for AutocorrStatistic { + #[inline(always)] + fn default() -> AutocorrStatistic { + AutocorrStatistic(0) + } +} +#[doc = "Enable signal for the random source."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RndSourceEnable(pub u32); +impl RndSourceEnable { + #[doc = "* 1'b1 - entropy source is enabled. *1'b0 - entropy source is disabled"] + #[inline(always)] + pub const fn rnd_src_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - entropy source is enabled. *1'b0 - entropy source is disabled"] + #[inline(always)] + pub fn set_rnd_src_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 1usize) & 0x7fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x7fff_ffff << 1usize)) | (((val as u32) & 0x7fff_ffff) << 1usize); + } +} +impl Default for RndSourceEnable { + #[inline(always)] + fn default() -> RndSourceEnable { + RndSourceEnable(0) + } +} +#[doc = "Collected BIST results."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngBistCntr0(pub u32); +impl RngBistCntr0 { + #[doc = "Reflects the results of RNG BIST counter."] + #[inline(always)] + pub const fn rosc_cntr_val(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x003f_ffff; + val as u32 + } + #[doc = "Reflects the results of RNG BIST counter."] + #[inline(always)] + pub fn set_rosc_cntr_val(&mut self, val: u32) { + self.0 = (self.0 & !(0x003f_ffff << 0usize)) | (((val as u32) & 0x003f_ffff) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u16 { + let val = (self.0 >> 22usize) & 0x03ff; + val as u16 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 22usize)) | (((val as u32) & 0x03ff) << 22usize); + } +} +impl Default for RngBistCntr0 { + #[inline(always)] + fn default() -> RngBistCntr0 { + RngBistCntr0(0) + } +} +#[doc = "Collected BIST results."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngBistCntr1(pub u32); +impl RngBistCntr1 { + #[doc = "Reflects the results of RNG BIST counter."] + #[inline(always)] + pub const fn rosc_cntr_val(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x003f_ffff; + val as u32 + } + #[doc = "Reflects the results of RNG BIST counter."] + #[inline(always)] + pub fn set_rosc_cntr_val(&mut self, val: u32) { + self.0 = (self.0 & !(0x003f_ffff << 0usize)) | (((val as u32) & 0x003f_ffff) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u16 { + let val = (self.0 >> 22usize) & 0x03ff; + val as u16 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 22usize)) | (((val as u32) & 0x03ff) << 22usize); + } +} +impl Default for RngBistCntr1 { + #[inline(always)] + fn default() -> RngBistCntr1 { + RngBistCntr1(0) + } +} +#[doc = "Collected BIST results."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngBistCntr2(pub u32); +impl RngBistCntr2 { + #[doc = "Reflects the results of RNG BIST counter."] + #[inline(always)] + pub const fn rosc_cntr_val(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x003f_ffff; + val as u32 + } + #[doc = "Reflects the results of RNG BIST counter."] + #[inline(always)] + pub fn set_rosc_cntr_val(&mut self, val: u32) { + self.0 = (self.0 & !(0x003f_ffff << 0usize)) | (((val as u32) & 0x003f_ffff) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u16 { + let val = (self.0 >> 22usize) & 0x03ff; + val as u16 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 22usize)) | (((val as u32) & 0x03ff) << 22usize); + } +} +impl Default for RngBistCntr2 { + #[inline(always)] + fn default() -> RngBistCntr2 { + RngBistCntr2(0) + } +} +#[doc = "Enable the RNG debug mode"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngDebugEnInput(pub u32); +impl RngDebugEnInput { + #[doc = "* 1'b1 - debug mode is enabled. *1'b0 - debug mode is disabled"] + #[inline(always)] + pub const fn rng_debug_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - debug mode is enabled. *1'b0 - debug mode is disabled"] + #[inline(always)] + pub fn set_rng_debug_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 1usize) & 0x7fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x7fff_ffff << 1usize)) | (((val as u32) & 0x7fff_ffff) << 1usize); + } +} +impl Default for RngDebugEnInput { + #[inline(always)] + fn default() -> RngDebugEnInput { + RngDebugEnInput(0) + } +} +#[doc = "Interrupt/status bit clear Register."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngIcr(pub u32); +impl RngIcr { + #[doc = "Write 1'b1 - clear corresponding bit in RNG_ISR."] + #[inline(always)] + pub const fn ehr_valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Write 1'b1 - clear corresponding bit in RNG_ISR."] + #[inline(always)] + pub fn set_ehr_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Cannot be cleared by SW! Only RNG reset clears this bit."] + #[inline(always)] + pub const fn autocorr_err(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Cannot be cleared by SW! Only RNG reset clears this bit."] + #[inline(always)] + pub fn set_autocorr_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Write 1'b1 - clear corresponding bit in RNG_ISR."] + #[inline(always)] + pub const fn crngt_err(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Write 1'b1 - clear corresponding bit in RNG_ISR."] + #[inline(always)] + pub fn set_crngt_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Write 1'b1 - clear corresponding bit in RNG_ISR."] + #[inline(always)] + pub const fn vn_err(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Write 1'b1 - clear corresponding bit in RNG_ISR."] + #[inline(always)] + pub fn set_vn_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 4usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 4usize)) | (((val as u32) & 0x0fff_ffff) << 4usize); + } +} +impl Default for RngIcr { + #[inline(always)] + fn default() -> RngIcr { + RngIcr(0) + } +} +#[doc = "Interrupt masking."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngImr(pub u32); +impl RngImr { + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub const fn ehr_valid_int_mask(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub fn set_ehr_valid_int_mask(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub const fn autocorr_err_int_mask(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub fn set_autocorr_err_int_mask(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub const fn crngt_err_int_mask(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub fn set_crngt_err_int_mask(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub const fn vn_err_int_mask(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt."] + #[inline(always)] + pub fn set_vn_err_int_mask(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 4usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 4usize)) | (((val as u32) & 0x0fff_ffff) << 4usize); + } +} +impl Default for RngImr { + #[inline(always)] + fn default() -> RngImr { + RngImr(0) + } +} +#[doc = "RNG status register. If corresponding RNG_IMR bit is unmasked, an interrupt will be generated."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngIsr(pub u32); +impl RngIsr { + #[doc = "1'b1 indicates that 192 bits have been collected in the RNG, and are ready to be read."] + #[inline(always)] + pub const fn ehr_valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "1'b1 indicates that 192 bits have been collected in the RNG, and are ready to be read."] + #[inline(always)] + pub fn set_ehr_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "1'b1 indicates Autocorrelation test failed four times in a row. When set, RNG cease from functioning until next reset."] + #[inline(always)] + pub const fn autocorr_err(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "1'b1 indicates Autocorrelation test failed four times in a row. When set, RNG cease from functioning until next reset."] + #[inline(always)] + pub fn set_autocorr_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "1'b1 indicates CRNGT in the RNG test failed. Failure occurs when two consecutive blocks of 16 collected bits are equal."] + #[inline(always)] + pub const fn crngt_err(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "1'b1 indicates CRNGT in the RNG test failed. Failure occurs when two consecutive blocks of 16 collected bits are equal."] + #[inline(always)] + pub fn set_crngt_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "1'b1 indicates Von Neuman error. Error in von Neuman occurs if 32 consecutive collected bits are identical, ZERO or ONE."] + #[inline(always)] + pub const fn vn_err(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "1'b1 indicates Von Neuman error. Error in von Neuman occurs if 32 consecutive collected bits are identical, ZERO or ONE."] + #[inline(always)] + pub fn set_vn_err(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 4usize) & 0x0fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x0fff_ffff << 4usize)) | (((val as u32) & 0x0fff_ffff) << 4usize); + } +} +impl Default for RngIsr { + #[inline(always)] + fn default() -> RngIsr { + RngIsr(0) + } +} +#[doc = "Displays the version settings of the TRNG."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RngVersion(pub u32); +impl RngVersion { + #[doc = "* 1'b1 - 192-bit EHR. *1'b0 - 128-bit EHR"] + #[inline(always)] + pub const fn ehr_width_192(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - 192-bit EHR. *1'b0 - 128-bit EHR"] + #[inline(always)] + pub fn set_ehr_width_192(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub const fn crngt_exists(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub fn set_crngt_exists(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub const fn autocorr_exists(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub fn set_autocorr_exists(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub const fn trng_tests_bypass_en(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub fn set_trng_tests_bypass_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub const fn prng_exists(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub fn set_prng_exists(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub const fn kat_exists(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub fn set_kat_exists(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub const fn reseeding_exists(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - Exists. *1'b0 - Does not exist"] + #[inline(always)] + pub fn set_reseeding_exists(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "* 1'b1 - 5 SBOX AES. *1'b0 - 20 SBOX AES"] + #[inline(always)] + pub const fn rng_use_5_sboxes(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "* 1'b1 - 5 SBOX AES. *1'b0 - 20 SBOX AES"] + #[inline(always)] + pub fn set_rng_use_5_sboxes(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 8usize) & 0x00ff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 8usize)) | (((val as u32) & 0x00ff_ffff) << 8usize); + } +} +impl Default for RngVersion { + #[inline(always)] + fn default() -> RngVersion { + RngVersion(0) + } +} +#[doc = "Reset the counter of collected bits in the RNG."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct RstBitsCounter(pub u32); +impl RstBitsCounter { + #[doc = "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."] + #[inline(always)] + pub const fn rst_bits_counter(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rst_bits_counter(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 1usize) & 0x7fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x7fff_ffff << 1usize)) | (((val as u32) & 0x7fff_ffff) << 1usize); + } +} +impl Default for RstBitsCounter { + #[inline(always)] + fn default() -> RstBitsCounter { + RstBitsCounter(0) + } +} +#[doc = "RNG Busy indication."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrngBusy(pub u32); +impl TrngBusy { + #[doc = "Reflects rng_busy status."] + #[inline(always)] + pub const fn trng_busy(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Reflects rng_busy status."] + #[inline(always)] + pub fn set_trng_busy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 1usize) & 0x7fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x7fff_ffff << 1usize)) | (((val as u32) & 0x7fff_ffff) << 1usize); + } +} +impl Default for TrngBusy { + #[inline(always)] + fn default() -> TrngBusy { + TrngBusy(0) + } +} +#[doc = "Selecting the inverter-chain length."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrngConfig(pub u32); +impl TrngConfig { + #[doc = "Selects the number of inverters (out of four possible selections) in the ring oscillator (the entropy source)."] + #[inline(always)] + pub const fn rnd_src_sel(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[doc = "Selects the number of inverters (out of four possible selections) in the ring oscillator (the entropy source)."] + #[inline(always)] + pub fn set_rnd_src_sel(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 2usize) & 0x3fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x3fff_ffff << 2usize)) | (((val as u32) & 0x3fff_ffff) << 2usize); + } +} +impl Default for TrngConfig { + #[inline(always)] + fn default() -> TrngConfig { + TrngConfig(0) + } +} +#[doc = "Debug register."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrngDebugControl(pub u32); +impl TrngDebugControl { + #[doc = "N/A"] + #[inline(always)] + pub const fn reserved(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "N/A"] + #[inline(always)] + pub fn set_reserved(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "When set, the Von-Neuman balancer is bypassed (including the 32 consecutive bits test)."] + #[inline(always)] + pub const fn vnc_bypass(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "When set, the Von-Neuman balancer is bypassed (including the 32 consecutive bits test)."] + #[inline(always)] + pub fn set_vnc_bypass(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "When set, the CRNGT test in the RNG is bypassed."] + #[inline(always)] + pub const fn trng_crngt_bypass(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "When set, the CRNGT test in the RNG is bypassed."] + #[inline(always)] + pub fn set_trng_crngt_bypass(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "When set, the autocorrelation test in the TRNG module is bypassed."] + #[inline(always)] + pub const fn auto_correlate_bypass(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "When set, the autocorrelation test in the TRNG module is bypassed."] + #[inline(always)] + pub fn set_auto_correlate_bypass(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for TrngDebugControl { + #[inline(always)] + fn default() -> TrngDebugControl { + TrngDebugControl(0) + } +} +#[doc = "Generate internal SW reset within the RNG block."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrngSwReset(pub u32); +impl TrngSwReset { + #[doc = "Writing 1'b1 to this register causes an internal RNG reset."] + #[inline(always)] + pub const fn trng_sw_reset(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Writing 1'b1 to this register causes an internal RNG reset."] + #[inline(always)] + pub fn set_trng_sw_reset(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 1usize) & 0x7fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x7fff_ffff << 1usize)) | (((val as u32) & 0x7fff_ffff) << 1usize); + } +} +impl Default for TrngSwReset { + #[inline(always)] + fn default() -> TrngSwReset { + TrngSwReset(0) + } +} +#[doc = "192 bit collection indication."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct TrngValid(pub u32); +impl TrngValid { + #[doc = "1'b1 indicates that collection of bits in the RNG is completed, and data can be read from EHR_DATA register."] + #[inline(always)] + pub const fn ehr_valid(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "1'b1 indicates that collection of bits in the RNG is completed, and data can be read from EHR_DATA register."] + #[inline(always)] + pub fn set_ehr_valid(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "RESERVED"] + #[inline(always)] + pub const fn reserved(&self) -> u32 { + let val = (self.0 >> 1usize) & 0x7fff_ffff; + val as u32 + } + #[doc = "RESERVED"] + #[inline(always)] + pub fn set_reserved(&mut self, val: u32) { + self.0 = (self.0 & !(0x7fff_ffff << 1usize)) | (((val as u32) & 0x7fff_ffff) << 1usize); + } +} +impl Default for TrngValid { + #[inline(always)] + fn default() -> TrngValid { + TrngValid(0) + } +} diff --git a/src/rp2350/uart.rs b/src/rp2350/uart.rs new file mode 100644 index 00000000..078cce38 --- /dev/null +++ b/src/rp2350/uart.rs @@ -0,0 +1,127 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uart { + ptr: *mut u8, +} +unsafe impl Send for Uart {} +unsafe impl Sync for Uart {} +impl Uart { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Data Register, UARTDR"] + #[inline(always)] + pub const fn uartdr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Receive Status Register/Error Clear Register, UARTRSR/UARTECR"] + #[inline(always)] + pub const fn uartrsr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Flag Register, UARTFR"] + #[inline(always)] + pub const fn uartfr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "IrDA Low-Power Counter Register, UARTILPR"] + #[inline(always)] + pub const fn uartilpr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Integer Baud Rate Register, UARTIBRD"] + #[inline(always)] + pub const fn uartibrd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Fractional Baud Rate Register, UARTFBRD"] + #[inline(always)] + pub const fn uartfbrd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } + #[doc = "Line Control Register, UARTLCR_H"] + #[inline(always)] + pub const fn uartlcr_h(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(44usize) as _) } + } + #[doc = "Control Register, UARTCR"] + #[inline(always)] + pub const fn uartcr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(48usize) as _) } + } + #[doc = "Interrupt FIFO Level Select Register, UARTIFLS"] + #[inline(always)] + pub const fn uartifls(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(52usize) as _) } + } + #[doc = "Interrupt Mask Set/Clear Register, UARTIMSC"] + #[inline(always)] + pub const fn uartimsc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(56usize) as _) } + } + #[doc = "Raw Interrupt Status Register, UARTRIS"] + #[inline(always)] + pub const fn uartris(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(60usize) as _) } + } + #[doc = "Masked Interrupt Status Register, UARTMIS"] + #[inline(always)] + pub const fn uartmis(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "Interrupt Clear Register, UARTICR"] + #[inline(always)] + pub const fn uarticr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "DMA Control Register, UARTDMACR"] + #[inline(always)] + pub const fn uartdmacr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "UARTPeriphID0 Register"] + #[inline(always)] + pub const fn uartperiphid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4064usize) as _) } + } + #[doc = "UARTPeriphID1 Register"] + #[inline(always)] + pub const fn uartperiphid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4068usize) as _) } + } + #[doc = "UARTPeriphID2 Register"] + #[inline(always)] + pub const fn uartperiphid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4072usize) as _) } + } + #[doc = "UARTPeriphID3 Register"] + #[inline(always)] + pub const fn uartperiphid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4076usize) as _) } + } + #[doc = "UARTPCellID0 Register"] + #[inline(always)] + pub const fn uartpcellid0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4080usize) as _) } + } + #[doc = "UARTPCellID1 Register"] + #[inline(always)] + pub const fn uartpcellid1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4084usize) as _) } + } + #[doc = "UARTPCellID2 Register"] + #[inline(always)] + pub const fn uartpcellid2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4088usize) as _) } + } + #[doc = "UARTPCellID3 Register"] + #[inline(always)] + pub const fn uartpcellid3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4092usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/uart/regs.rs b/src/rp2350/uart/regs.rs new file mode 100644 index 00000000..048d8929 --- /dev/null +++ b/src/rp2350/uart/regs.rs @@ -0,0 +1,1353 @@ +#[doc = "Control Register, UARTCR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartcr(pub u32); +impl Uartcr { + #[doc = "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."] + #[inline(always)] + pub const fn uarten(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_uarten(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn siren(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_siren(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sirlp(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sirlp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn lbe(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_lbe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txe(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxe(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dtr(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dtr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rts(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rts(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "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)."] + #[inline(always)] + pub const fn out1(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_out1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "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)."] + #[inline(always)] + pub const fn out2(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_out2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rtsen(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rtsen(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ctsen(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ctsen(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } +} +impl Default for Uartcr { + #[inline(always)] + fn default() -> Uartcr { + Uartcr(0) + } +} +#[doc = "DMA Control Register, UARTDMACR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartdmacr(pub u32); +impl Uartdmacr { + #[doc = "Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled."] + #[inline(always)] + pub const fn rxdmae(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled."] + #[inline(always)] + pub fn set_rxdmae(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled."] + #[inline(always)] + pub const fn txdmae(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled."] + #[inline(always)] + pub fn set_txdmae(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dmaonerr(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dmaonerr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for Uartdmacr { + #[inline(always)] + fn default() -> Uartdmacr { + Uartdmacr(0) + } +} +#[doc = "Data Register, UARTDR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartdr(pub u32); +impl Uartdr { + #[doc = "Receive (read) data character. Transmit (write) data character."] + #[inline(always)] + pub const fn data(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "Receive (read) data character. Transmit (write) data character."] + #[inline(always)] + pub fn set_data(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fe(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn pe(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_pe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn be(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_be(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn oe(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_oe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Uartdr { + #[inline(always)] + fn default() -> Uartdr { + Uartdr(0) + } +} +#[doc = "Fractional Baud Rate Register, UARTFBRD"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartfbrd(pub u32); +impl Uartfbrd { + #[doc = "The fractional baud rate divisor. These bits are cleared to 0 on reset."] + #[inline(always)] + pub const fn baud_divfrac(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x3f; + val as u8 + } + #[doc = "The fractional baud rate divisor. These bits are cleared to 0 on reset."] + #[inline(always)] + pub fn set_baud_divfrac(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 0usize)) | (((val as u32) & 0x3f) << 0usize); + } +} +impl Default for Uartfbrd { + #[inline(always)] + fn default() -> Uartfbrd { + Uartfbrd(0) + } +} +#[doc = "Flag Register, UARTFR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartfr(pub u32); +impl Uartfr { + #[doc = "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."] + #[inline(always)] + pub const fn cts(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_cts(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dsr(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dsr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dcd(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dcd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn busy(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_busy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxfe(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxfe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txff(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxff(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txfe(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txfe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ri(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ri(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } +} +impl Default for Uartfr { + #[inline(always)] + fn default() -> Uartfr { + Uartfr(0) + } +} +#[doc = "Integer Baud Rate Register, UARTIBRD"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartibrd(pub u32); +impl Uartibrd { + #[doc = "The integer baud rate divisor. These bits are cleared to 0 on reset."] + #[inline(always)] + pub const fn baud_divint(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "The integer baud rate divisor. These bits are cleared to 0 on reset."] + #[inline(always)] + pub fn set_baud_divint(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Uartibrd { + #[inline(always)] + fn default() -> Uartibrd { + Uartibrd(0) + } +} +#[doc = "Interrupt Clear Register, UARTICR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uarticr(pub u32); +impl Uarticr { + #[doc = "nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt."] + #[inline(always)] + pub const fn rimic(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt."] + #[inline(always)] + pub fn set_rimic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt."] + #[inline(always)] + pub const fn ctsmic(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt."] + #[inline(always)] + pub fn set_ctsmic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt."] + #[inline(always)] + pub const fn dcdmic(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt."] + #[inline(always)] + pub fn set_dcdmic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt."] + #[inline(always)] + pub const fn dsrmic(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt."] + #[inline(always)] + pub fn set_dsrmic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Receive interrupt clear. Clears the UARTRXINTR interrupt."] + #[inline(always)] + pub const fn rxic(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Receive interrupt clear. Clears the UARTRXINTR interrupt."] + #[inline(always)] + pub fn set_rxic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Transmit interrupt clear. Clears the UARTTXINTR interrupt."] + #[inline(always)] + pub const fn txic(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "Transmit interrupt clear. Clears the UARTTXINTR interrupt."] + #[inline(always)] + pub fn set_txic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "Receive timeout interrupt clear. Clears the UARTRTINTR interrupt."] + #[inline(always)] + pub const fn rtic(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Receive timeout interrupt clear. Clears the UARTRTINTR interrupt."] + #[inline(always)] + pub fn set_rtic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Framing error interrupt clear. Clears the UARTFEINTR interrupt."] + #[inline(always)] + pub const fn feic(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Framing error interrupt clear. Clears the UARTFEINTR interrupt."] + #[inline(always)] + pub fn set_feic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Parity error interrupt clear. Clears the UARTPEINTR interrupt."] + #[inline(always)] + pub const fn peic(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Parity error interrupt clear. Clears the UARTPEINTR interrupt."] + #[inline(always)] + pub fn set_peic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Break error interrupt clear. Clears the UARTBEINTR interrupt."] + #[inline(always)] + pub const fn beic(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Break error interrupt clear. Clears the UARTBEINTR interrupt."] + #[inline(always)] + pub fn set_beic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Overrun error interrupt clear. Clears the UARTOEINTR interrupt."] + #[inline(always)] + pub const fn oeic(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Overrun error interrupt clear. Clears the UARTOEINTR interrupt."] + #[inline(always)] + pub fn set_oeic(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Uarticr { + #[inline(always)] + fn default() -> Uarticr { + Uarticr(0) + } +} +#[doc = "Interrupt FIFO Level Select Register, UARTIFLS"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartifls(pub u32); +impl Uartifls { + #[doc = "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."] + #[inline(always)] + pub const fn txiflsel(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txiflsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 0usize)) | (((val as u32) & 0x07) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxiflsel(&self) -> u8 { + let val = (self.0 >> 3usize) & 0x07; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxiflsel(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 3usize)) | (((val as u32) & 0x07) << 3usize); + } +} +impl Default for Uartifls { + #[inline(always)] + fn default() -> Uartifls { + Uartifls(0) + } +} +#[doc = "IrDA Low-Power Counter Register, UARTILPR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartilpr(pub u32); +impl Uartilpr { + #[doc = "8-bit low-power divisor value. These bits are cleared to 0 at reset."] + #[inline(always)] + pub const fn ilpdvsr(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "8-bit low-power divisor value. These bits are cleared to 0 at reset."] + #[inline(always)] + pub fn set_ilpdvsr(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartilpr { + #[inline(always)] + fn default() -> Uartilpr { + Uartilpr(0) + } +} +#[doc = "Interrupt Mask Set/Clear Register, UARTIMSC"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartimsc(pub u32); +impl Uartimsc { + #[doc = "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."] + #[inline(always)] + pub const fn rimim(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rimim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn ctsmim(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_ctsmim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dcdmim(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dcdmim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dsrmim(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dsrmim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rxim(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rxim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn txim(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_txim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rtim(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rtim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn feim(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_feim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn peim(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_peim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn beim(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_beim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn oeim(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_oeim(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Uartimsc { + #[inline(always)] + fn default() -> Uartimsc { + Uartimsc(0) + } +} +#[doc = "Line Control Register, UARTLCR_H"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UartlcrH(pub u32); +impl UartlcrH { + #[doc = "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."] + #[inline(always)] + pub const fn brk(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_brk(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled."] + #[inline(always)] + pub const fn pen(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled."] + #[inline(always)] + pub fn set_pen(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn eps(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_eps(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn stp2(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_stp2(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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)."] + #[inline(always)] + pub const fn fen(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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)."] + #[inline(always)] + pub fn set_fen(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn wlen(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x03; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_wlen(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 5usize)) | (((val as u32) & 0x03) << 5usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn sps(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_sps(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } +} +impl Default for UartlcrH { + #[inline(always)] + fn default() -> UartlcrH { + UartlcrH(0) + } +} +#[doc = "Masked Interrupt Status Register, UARTMIS"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartmis(pub u32); +impl Uartmis { + #[doc = "nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt."] + #[inline(always)] + pub const fn rimmis(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt."] + #[inline(always)] + pub fn set_rimmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt."] + #[inline(always)] + pub const fn ctsmmis(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt."] + #[inline(always)] + pub fn set_ctsmmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt."] + #[inline(always)] + pub const fn dcdmmis(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt."] + #[inline(always)] + pub fn set_dcdmmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt."] + #[inline(always)] + pub const fn dsrmmis(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt."] + #[inline(always)] + pub fn set_dsrmmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt."] + #[inline(always)] + pub const fn rxmis(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt."] + #[inline(always)] + pub fn set_rxmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt."] + #[inline(always)] + pub const fn txmis(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt."] + #[inline(always)] + pub fn set_txmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt."] + #[inline(always)] + pub const fn rtmis(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt."] + #[inline(always)] + pub fn set_rtmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt."] + #[inline(always)] + pub const fn femis(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt."] + #[inline(always)] + pub fn set_femis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt."] + #[inline(always)] + pub const fn pemis(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt."] + #[inline(always)] + pub fn set_pemis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt."] + #[inline(always)] + pub const fn bemis(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt."] + #[inline(always)] + pub fn set_bemis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt."] + #[inline(always)] + pub const fn oemis(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt."] + #[inline(always)] + pub fn set_oemis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Uartmis { + #[inline(always)] + fn default() -> Uartmis { + Uartmis(0) + } +} +#[doc = "UARTPCellID0 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartpcellid0(pub u32); +impl Uartpcellid0 { + #[doc = "These bits read back as 0x0D"] + #[inline(always)] + pub const fn uartpcellid0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x0D"] + #[inline(always)] + pub fn set_uartpcellid0(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartpcellid0 { + #[inline(always)] + fn default() -> Uartpcellid0 { + Uartpcellid0(0) + } +} +#[doc = "UARTPCellID1 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartpcellid1(pub u32); +impl Uartpcellid1 { + #[doc = "These bits read back as 0xF0"] + #[inline(always)] + pub const fn uartpcellid1(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0xF0"] + #[inline(always)] + pub fn set_uartpcellid1(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartpcellid1 { + #[inline(always)] + fn default() -> Uartpcellid1 { + Uartpcellid1(0) + } +} +#[doc = "UARTPCellID2 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartpcellid2(pub u32); +impl Uartpcellid2 { + #[doc = "These bits read back as 0x05"] + #[inline(always)] + pub const fn uartpcellid2(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x05"] + #[inline(always)] + pub fn set_uartpcellid2(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartpcellid2 { + #[inline(always)] + fn default() -> Uartpcellid2 { + Uartpcellid2(0) + } +} +#[doc = "UARTPCellID3 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartpcellid3(pub u32); +impl Uartpcellid3 { + #[doc = "These bits read back as 0xB1"] + #[inline(always)] + pub const fn uartpcellid3(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0xB1"] + #[inline(always)] + pub fn set_uartpcellid3(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartpcellid3 { + #[inline(always)] + fn default() -> Uartpcellid3 { + Uartpcellid3(0) + } +} +#[doc = "UARTPeriphID0 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartperiphid0(pub u32); +impl Uartperiphid0 { + #[doc = "These bits read back as 0x11"] + #[inline(always)] + pub const fn partnumber0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x11"] + #[inline(always)] + pub fn set_partnumber0(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartperiphid0 { + #[inline(always)] + fn default() -> Uartperiphid0 { + Uartperiphid0(0) + } +} +#[doc = "UARTPeriphID1 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartperiphid1(pub u32); +impl Uartperiphid1 { + #[doc = "These bits read back as 0x0"] + #[inline(always)] + pub const fn partnumber1(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "These bits read back as 0x0"] + #[inline(always)] + pub fn set_partnumber1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "These bits read back as 0x1"] + #[inline(always)] + pub const fn designer0(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "These bits read back as 0x1"] + #[inline(always)] + pub fn set_designer0(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } +} +impl Default for Uartperiphid1 { + #[inline(always)] + fn default() -> Uartperiphid1 { + Uartperiphid1(0) + } +} +#[doc = "UARTPeriphID2 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartperiphid2(pub u32); +impl Uartperiphid2 { + #[doc = "These bits read back as 0x4"] + #[inline(always)] + pub const fn designer1(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x0f; + val as u8 + } + #[doc = "These bits read back as 0x4"] + #[inline(always)] + pub fn set_designer1(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 0usize)) | (((val as u32) & 0x0f) << 0usize); + } + #[doc = "This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3"] + #[inline(always)] + pub const fn revision(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x0f; + val as u8 + } + #[doc = "This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3"] + #[inline(always)] + pub fn set_revision(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 4usize)) | (((val as u32) & 0x0f) << 4usize); + } +} +impl Default for Uartperiphid2 { + #[inline(always)] + fn default() -> Uartperiphid2 { + Uartperiphid2(0) + } +} +#[doc = "UARTPeriphID3 Register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartperiphid3(pub u32); +impl Uartperiphid3 { + #[doc = "These bits read back as 0x00"] + #[inline(always)] + pub const fn configuration(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[doc = "These bits read back as 0x00"] + #[inline(always)] + pub fn set_configuration(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } +} +impl Default for Uartperiphid3 { + #[inline(always)] + fn default() -> Uartperiphid3 { + Uartperiphid3(0) + } +} +#[doc = "Raw Interrupt Status Register, UARTRIS"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartris(pub u32); +impl Uartris { + #[doc = "nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt."] + #[inline(always)] + pub const fn rirmis(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt."] + #[inline(always)] + pub fn set_rirmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt."] + #[inline(always)] + pub const fn ctsrmis(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt."] + #[inline(always)] + pub fn set_ctsrmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt."] + #[inline(always)] + pub const fn dcdrmis(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt."] + #[inline(always)] + pub fn set_dcdrmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt."] + #[inline(always)] + pub const fn dsrrmis(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt."] + #[inline(always)] + pub fn set_dsrrmis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt."] + #[inline(always)] + pub const fn rxris(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt."] + #[inline(always)] + pub fn set_rxris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt."] + #[inline(always)] + pub const fn txris(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt."] + #[inline(always)] + pub fn set_txris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a"] + #[inline(always)] + pub const fn rtris(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a"] + #[inline(always)] + pub fn set_rtris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt."] + #[inline(always)] + pub const fn feris(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt."] + #[inline(always)] + pub fn set_feris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt."] + #[inline(always)] + pub const fn peris(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt."] + #[inline(always)] + pub fn set_peris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt."] + #[inline(always)] + pub const fn beris(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt."] + #[inline(always)] + pub fn set_beris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt."] + #[inline(always)] + pub const fn oeris(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt."] + #[inline(always)] + pub fn set_oeris(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } +} +impl Default for Uartris { + #[inline(always)] + fn default() -> Uartris { + Uartris(0) + } +} +#[doc = "Receive Status Register/Error Clear Register, UARTRSR/UARTECR"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Uartrsr(pub u32); +impl Uartrsr { + #[doc = "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."] + #[inline(always)] + pub const fn fe(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn pe(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_pe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn be(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_be(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn oe(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_oe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } +} +impl Default for Uartrsr { + #[inline(always)] + fn default() -> Uartrsr { + Uartrsr(0) + } +} diff --git a/src/rp2350/usb.rs b/src/rp2350/usb.rs new file mode 100644 index 00000000..388e7a5f --- /dev/null +++ b/src/rp2350/usb.rs @@ -0,0 +1,190 @@ +#[doc = "USB FS/LS controller device registers"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Usb { + ptr: *mut u8, +} +unsafe impl Send for Usb {} +unsafe impl Sync for Usb {} +impl Usb { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Device address and endpoint control"] + #[inline(always)] + pub const fn addr_endp(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Interrupt endpoint 1. Only valid for HOST mode."] + #[inline(always)] + pub const fn addr_endp_x( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 15usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize + n * 4usize) as _) } + } + #[doc = "Main control register"] + #[inline(always)] + pub const fn main_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(64usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sof_wr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(68usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn sof_rd(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(72usize) as _) } + } + #[doc = "SIE control register"] + #[inline(always)] + pub const fn sie_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(76usize) as _) } + } + #[doc = "SIE status register"] + #[inline(always)] + pub const fn sie_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(80usize) as _) } + } + #[doc = "interrupt endpoint control register"] + #[inline(always)] + pub const fn int_ep_ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(84usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn buff_status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(88usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn buff_cpu_should_handle( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(92usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ep_abort(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(96usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ep_abort_done(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(100usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ep_stall_arm(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(104usize) as _) } + } + #[doc = "Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK."] + #[inline(always)] + pub const fn nak_poll(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(108usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn ep_status_stall_nak( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(112usize) as _) } + } + #[doc = "Where to connect the USB controller. Should be to_phy by default."] + #[inline(always)] + pub const fn usb_muxing(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(116usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn usb_pwr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(120usize) as _) } + } + #[doc = "This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit."] + #[inline(always)] + pub const fn usbphy_direct(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(124usize) as _) } + } + #[doc = "Override enable for each control in usbphy_direct"] + #[inline(always)] + pub const fn usbphy_direct_override( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize) as _) } + } + #[doc = "Used to adjust trim values of USB phy pull down resistors."] + #[inline(always)] + pub const fn usbphy_trim(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize) as _) } + } + #[doc = "Used for debug only."] + #[inline(always)] + pub const fn linestate_tuning( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(136usize) as _) } + } + #[doc = "Raw Interrupts"] + #[inline(always)] + pub const fn intr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(140usize) as _) } + } + #[doc = "Interrupt Enable"] + #[inline(always)] + pub const fn inte(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(144usize) as _) } + } + #[doc = "Interrupt Force"] + #[inline(always)] + pub const fn intf(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(148usize) as _) } + } + #[doc = "Interrupt status after masking & forcing"] + #[inline(always)] + pub const fn ints(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(152usize) as _) } + } + #[doc = "Device only. Raw value of free-running PHY clock counter @48MHz. Used to calculate time between SOF events."] + #[inline(always)] + pub const fn sof_timestamp_raw( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(256usize) as _) } + } + #[doc = "Device only. Value of free-running PHY clock counter @48MHz when last SOF event occurred."] + #[inline(always)] + pub const fn sof_timestamp_last( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(260usize) as _) } + } + #[inline(always)] + pub const fn sm_state(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(264usize) as _) } + } + #[doc = "TX error count for each endpoint. Write to each field to reset the counter to 0."] + #[inline(always)] + pub const fn ep_tx_error(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(268usize) as _) } + } + #[doc = "RX error count for each endpoint. Write to each field to reset the counter to 0."] + #[inline(always)] + pub const fn ep_rx_error(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(272usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn dev_sm_watchdog( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(276usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/usb/regs.rs b/src/rp2350/usb/regs.rs new file mode 100644 index 00000000..590e2c74 --- /dev/null +++ b/src/rp2350/usb/regs.rs @@ -0,0 +1,2610 @@ +#[doc = "Device address and endpoint control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AddrEndp(pub u32); +impl AddrEndp { + #[doc = "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."] + #[inline(always)] + pub const fn address(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x7f; + val as u8 + } + #[doc = "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."] + #[inline(always)] + pub fn set_address(&mut self, val: u8) { + self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize); + } + #[doc = "Device endpoint to send data to. Only valid for HOST mode."] + #[inline(always)] + pub const fn endpoint(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "Device endpoint to send data to. Only valid for HOST mode."] + #[inline(always)] + pub fn set_endpoint(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } +} +impl Default for AddrEndp { + #[inline(always)] + fn default() -> AddrEndp { + AddrEndp(0) + } +} +#[doc = "Interrupt endpoint 4. Only valid for HOST mode."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct AddrEndpX(pub u32); +impl AddrEndpX { + #[doc = "Device address"] + #[inline(always)] + pub const fn address(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x7f; + val as u8 + } + #[doc = "Device address"] + #[inline(always)] + pub fn set_address(&mut self, val: u8) { + self.0 = (self.0 & !(0x7f << 0usize)) | (((val as u32) & 0x7f) << 0usize); + } + #[doc = "Endpoint number of the interrupt endpoint"] + #[inline(always)] + pub const fn endpoint(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x0f; + val as u8 + } + #[doc = "Endpoint number of the interrupt endpoint"] + #[inline(always)] + pub fn set_endpoint(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 16usize)) | (((val as u32) & 0x0f) << 16usize); + } + #[doc = "Direction of the interrupt endpoint. In=0, Out=1"] + #[inline(always)] + pub const fn intep_dir(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Direction of the interrupt endpoint. In=0, Out=1"] + #[inline(always)] + pub fn set_intep_dir(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "Interrupt EP requires preamble (is a low speed device on a full speed hub)"] + #[inline(always)] + pub const fn intep_preamble(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "Interrupt EP requires preamble (is a low speed device on a full speed hub)"] + #[inline(always)] + pub fn set_intep_preamble(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } +} +impl Default for AddrEndpX { + #[inline(always)] + fn default() -> AddrEndpX { + AddrEndpX(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BuffCpuShouldHandle(pub u32); +impl BuffCpuShouldHandle { + #[inline(always)] + pub const fn ep_in(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_in(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn ep_out(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_out(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for BuffCpuShouldHandle { + #[inline(always)] + fn default() -> BuffCpuShouldHandle { + BuffCpuShouldHandle(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct BuffStatus(pub u32); +impl BuffStatus { + #[inline(always)] + pub const fn ep_in(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_in(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn ep_out(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_out(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for BuffStatus { + #[inline(always)] + fn default() -> BuffStatus { + BuffStatus(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct DevSmWatchdog(pub u32); +impl DevSmWatchdog { + #[inline(always)] + pub const fn limit(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x0003_ffff; + val as u32 + } + #[inline(always)] + pub fn set_limit(&mut self, val: u32) { + self.0 = (self.0 & !(0x0003_ffff << 0usize)) | (((val as u32) & 0x0003_ffff) << 0usize); + } + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "Set to 1 to forcibly reset the device state machine on watchdog expiry"] + #[inline(always)] + pub const fn reset(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "Set to 1 to forcibly reset the device state machine on watchdog expiry"] + #[inline(always)] + pub fn set_reset(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn fired(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_fired(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } +} +impl Default for DevSmWatchdog { + #[inline(always)] + fn default() -> DevSmWatchdog { + DevSmWatchdog(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpAbort(pub u32); +impl EpAbort { + #[inline(always)] + pub const fn ep_in(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_in(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn ep_out(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_out(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for EpAbort { + #[inline(always)] + fn default() -> EpAbort { + EpAbort(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpAbortDone(pub u32); +impl EpAbortDone { + #[inline(always)] + pub const fn ep_in(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_in(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn ep_out(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_out(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for EpAbortDone { + #[inline(always)] + fn default() -> EpAbortDone { + EpAbortDone(0) + } +} +#[doc = "RX error count for each endpoint. Write to each field to reset the counter to 0."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpRxError(pub u32); +impl EpRxError { + #[inline(always)] + pub const fn ep0_transaction(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep0_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ep0_seq(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep0_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn ep1_transaction(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep1_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn ep1_seq(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep1_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn ep2_transaction(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep2_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn ep2_seq(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep2_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn ep3_transaction(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep3_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn ep3_seq(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep3_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn ep4_transaction(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep4_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn ep4_seq(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep4_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn ep5_transaction(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep5_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn ep5_seq(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep5_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn ep6_transaction(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep6_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn ep6_seq(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep6_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[inline(always)] + pub const fn ep7_transaction(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep7_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[inline(always)] + pub const fn ep7_seq(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep7_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn ep8_transaction(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep8_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn ep8_seq(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep8_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn ep9_transaction(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep9_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[inline(always)] + pub const fn ep9_seq(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep9_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[inline(always)] + pub const fn ep10_transaction(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep10_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[inline(always)] + pub const fn ep10_seq(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep10_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[inline(always)] + pub const fn ep11_transaction(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep11_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[inline(always)] + pub const fn ep11_seq(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep11_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[inline(always)] + pub const fn ep12_transaction(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep12_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[inline(always)] + pub const fn ep12_seq(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep12_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[inline(always)] + pub const fn ep13_transaction(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep13_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[inline(always)] + pub const fn ep13_seq(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep13_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[inline(always)] + pub const fn ep14_transaction(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep14_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[inline(always)] + pub const fn ep14_seq(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep14_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[inline(always)] + pub const fn ep15_transaction(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep15_transaction(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[inline(always)] + pub const fn ep15_seq(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep15_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for EpRxError { + #[inline(always)] + fn default() -> EpRxError { + EpRxError(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpStallArm(pub u32); +impl EpStallArm { + #[inline(always)] + pub const fn ep0_in(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep0_in(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn ep0_out(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep0_out(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for EpStallArm { + #[inline(always)] + fn default() -> EpStallArm { + EpStallArm(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpStatusStallNak(pub u32); +impl EpStatusStallNak { + #[inline(always)] + pub const fn ep_in(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_in(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 0usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[inline(always)] + pub const fn ep_out(&self, n: usize) -> bool { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_ep_out(&mut self, n: usize, val: bool) { + assert!(n < 16usize); + let offs = 1usize + n * 2usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } +} +impl Default for EpStatusStallNak { + #[inline(always)] + fn default() -> EpStatusStallNak { + EpStatusStallNak(0) + } +} +#[doc = "TX error count for each endpoint. Write to each field to reset the counter to 0."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpTxError(pub u32); +impl EpTxError { + #[inline(always)] + pub const fn ep0(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep0(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val as u32) & 0x03) << 0usize); + } + #[inline(always)] + pub const fn ep1(&self) -> u8 { + let val = (self.0 >> 2usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep1(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); + } + #[inline(always)] + pub const fn ep2(&self) -> u8 { + let val = (self.0 >> 4usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep2(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 4usize)) | (((val as u32) & 0x03) << 4usize); + } + #[inline(always)] + pub const fn ep3(&self) -> u8 { + let val = (self.0 >> 6usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep3(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 6usize)) | (((val as u32) & 0x03) << 6usize); + } + #[inline(always)] + pub const fn ep4(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep4(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); + } + #[inline(always)] + pub const fn ep5(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep5(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 10usize)) | (((val as u32) & 0x03) << 10usize); + } + #[inline(always)] + pub const fn ep6(&self) -> u8 { + let val = (self.0 >> 12usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep6(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 12usize)) | (((val as u32) & 0x03) << 12usize); + } + #[inline(always)] + pub const fn ep7(&self) -> u8 { + let val = (self.0 >> 14usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep7(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 14usize)) | (((val as u32) & 0x03) << 14usize); + } + #[inline(always)] + pub const fn ep8(&self) -> u8 { + let val = (self.0 >> 16usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep8(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val as u32) & 0x03) << 16usize); + } + #[inline(always)] + pub const fn ep9(&self) -> u8 { + let val = (self.0 >> 18usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep9(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 18usize)) | (((val as u32) & 0x03) << 18usize); + } + #[inline(always)] + pub const fn ep10(&self) -> u8 { + let val = (self.0 >> 20usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep10(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 20usize)) | (((val as u32) & 0x03) << 20usize); + } + #[inline(always)] + pub const fn ep11(&self) -> u8 { + let val = (self.0 >> 22usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep11(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 22usize)) | (((val as u32) & 0x03) << 22usize); + } + #[inline(always)] + pub const fn ep12(&self) -> u8 { + let val = (self.0 >> 24usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep12(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 24usize)) | (((val as u32) & 0x03) << 24usize); + } + #[inline(always)] + pub const fn ep13(&self) -> u8 { + let val = (self.0 >> 26usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep13(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 26usize)) | (((val as u32) & 0x03) << 26usize); + } + #[inline(always)] + pub const fn ep14(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep14(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 28usize)) | (((val as u32) & 0x03) << 28usize); + } + #[inline(always)] + pub const fn ep15(&self) -> u8 { + let val = (self.0 >> 30usize) & 0x03; + val as u8 + } + #[inline(always)] + pub fn set_ep15(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 30usize)) | (((val as u32) & 0x03) << 30usize); + } +} +impl Default for EpTxError { + #[inline(always)] + fn default() -> EpTxError { + EpTxError(0) + } +} +#[doc = "Raw Interrupts"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Int(pub u32); +impl Int { + #[doc = "Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED"] + #[inline(always)] + pub const fn host_conn_dis(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED"] + #[inline(always)] + pub fn set_host_conn_dis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME"] + #[inline(always)] + pub const fn host_resume(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME"] + #[inline(always)] + pub fn set_host_resume(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD"] + #[inline(always)] + pub const fn host_sof(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD"] + #[inline(always)] + pub fn set_host_sof(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit."] + #[inline(always)] + pub const fn trans_complete(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit."] + #[inline(always)] + pub fn set_trans_complete(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS."] + #[inline(always)] + pub const fn buff_status(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS."] + #[inline(always)] + pub fn set_buff_status(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Source: SIE_STATUS.DATA_SEQ_ERROR"] + #[inline(always)] + pub const fn error_data_seq(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.DATA_SEQ_ERROR"] + #[inline(always)] + pub fn set_error_data_seq(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "Source: SIE_STATUS.RX_TIMEOUT"] + #[inline(always)] + pub const fn error_rx_timeout(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.RX_TIMEOUT"] + #[inline(always)] + pub fn set_error_rx_timeout(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Source: SIE_STATUS.RX_OVERFLOW"] + #[inline(always)] + pub const fn error_rx_overflow(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.RX_OVERFLOW"] + #[inline(always)] + pub fn set_error_rx_overflow(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "Source: SIE_STATUS.BIT_STUFF_ERROR"] + #[inline(always)] + pub const fn error_bit_stuff(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.BIT_STUFF_ERROR"] + #[inline(always)] + pub fn set_error_bit_stuff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Source: SIE_STATUS.CRC_ERROR"] + #[inline(always)] + pub const fn error_crc(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.CRC_ERROR"] + #[inline(always)] + pub fn set_error_crc(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Source: SIE_STATUS.STALL_REC"] + #[inline(always)] + pub const fn stall(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.STALL_REC"] + #[inline(always)] + pub fn set_stall(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Source: SIE_STATUS.VBUS_DETECTED"] + #[inline(always)] + pub const fn vbus_detect(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.VBUS_DETECTED"] + #[inline(always)] + pub fn set_vbus_detect(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "Source: SIE_STATUS.BUS_RESET"] + #[inline(always)] + pub const fn bus_reset(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.BUS_RESET"] + #[inline(always)] + pub fn set_bus_reset(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED"] + #[inline(always)] + pub const fn dev_conn_dis(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED"] + #[inline(always)] + pub fn set_dev_conn_dis(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED"] + #[inline(always)] + pub const fn dev_suspend(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED"] + #[inline(always)] + pub fn set_dev_suspend(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[doc = "Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME"] + #[inline(always)] + pub const fn dev_resume_from_host(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME"] + #[inline(always)] + pub fn set_dev_resume_from_host(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "Device. Source: SIE_STATUS.SETUP_REC"] + #[inline(always)] + pub const fn setup_req(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Device. Source: SIE_STATUS.SETUP_REC"] + #[inline(always)] + pub fn set_setup_req(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD"] + #[inline(always)] + pub const fn dev_sof(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD"] + #[inline(always)] + pub fn set_dev_sof(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE."] + #[inline(always)] + pub const fn abort_done(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE."] + #[inline(always)] + pub fn set_abort_done(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK."] + #[inline(always)] + pub const fn ep_stall_nak(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK."] + #[inline(always)] + pub fn set_ep_stall_nak(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "Source: SIE_STATUS.RX_SHORT_PACKET"] + #[inline(always)] + pub const fn rx_short_packet(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.RX_SHORT_PACKET"] + #[inline(always)] + pub fn set_rx_short_packet(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "Source: SIE_STATUS.ENDPOINT_ERROR"] + #[inline(always)] + pub const fn endpoint_error(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[doc = "Source: SIE_STATUS.ENDPOINT_ERROR"] + #[inline(always)] + pub fn set_endpoint_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[doc = "Source: DEV_SM_WATCHDOG.FIRED"] + #[inline(always)] + pub const fn dev_sm_watchdog_fired(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[doc = "Source: DEV_SM_WATCHDOG.FIRED"] + #[inline(always)] + pub fn set_dev_sm_watchdog_fired(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[doc = "Source: NAK_POLL.EPX_STOPPED_ON_NAK"] + #[inline(always)] + pub const fn epx_stopped_on_nak(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "Source: NAK_POLL.EPX_STOPPED_ON_NAK"] + #[inline(always)] + pub fn set_epx_stopped_on_nak(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } +} +impl Default for Int { + #[inline(always)] + fn default() -> Int { + Int(0) + } +} +#[doc = "interrupt endpoint control register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct IntEpCtrl(pub u32); +impl IntEpCtrl { + #[doc = "Host: Enable interrupt endpoint 1 -> 15"] + #[inline(always)] + pub const fn int_ep_active(&self) -> u16 { + let val = (self.0 >> 1usize) & 0x7fff; + val as u16 + } + #[doc = "Host: Enable interrupt endpoint 1 -> 15"] + #[inline(always)] + pub fn set_int_ep_active(&mut self, val: u16) { + self.0 = (self.0 & !(0x7fff << 1usize)) | (((val as u32) & 0x7fff) << 1usize); + } +} +impl Default for IntEpCtrl { + #[inline(always)] + fn default() -> IntEpCtrl { + IntEpCtrl(0) + } +} +#[doc = "Used for debug only."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct LinestateTuning(pub u32); +impl LinestateTuning { + #[doc = "Device - register the received data to account for hub bit dribble before EOP. Only affects certain hubs."] + #[inline(always)] + pub const fn rcv_delay(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Device - register the received data to account for hub bit dribble before EOP. Only affects certain hubs."] + #[inline(always)] + pub fn set_rcv_delay(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Device/Host - add an extra 1-bit debounce of linestate sampling."] + #[inline(always)] + pub const fn linestate_delay(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Device/Host - add an extra 1-bit debounce of linestate sampling."] + #[inline(always)] + pub fn set_linestate_delay(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Host - increase inter-packet and turnaround timeouts to accommodate worst-case hub delays."] + #[inline(always)] + pub const fn multi_hub_fix(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Host - increase inter-packet and turnaround timeouts to accommodate worst-case hub delays."] + #[inline(always)] + pub fn set_multi_hub_fix(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dev_buff_control_double_read_fix(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dev_buff_control_double_read_fix(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "RX - when a bitstuff error is signalled by rx_dasm, unconditionally terminate RX decode to avoid a hang during certain packet phases."] + #[inline(always)] + pub const fn sie_rx_bitstuff_fix(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "RX - when a bitstuff error is signalled by rx_dasm, unconditionally terminate RX decode to avoid a hang during certain packet phases."] + #[inline(always)] + pub fn set_sie_rx_bitstuff_fix(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "RX - when recovering from line chatter or bitstuff errors, treat SE0 as the end of chatter as well as 8 consecutive idle bits."] + #[inline(always)] + pub const fn sie_rx_chatter_se0_fix(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "RX - when recovering from line chatter or bitstuff errors, treat SE0 as the end of chatter as well as 8 consecutive idle bits."] + #[inline(always)] + pub fn set_sie_rx_chatter_se0_fix(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "Device - suppress repeated errors until the device FSM is next in the process of decoding an inbound packet."] + #[inline(always)] + pub const fn dev_rx_err_quiesce(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Device - suppress repeated errors until the device FSM is next in the process of decoding an inbound packet."] + #[inline(always)] + pub fn set_dev_rx_err_quiesce(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Device - exit suspend on any non-idle signalling, not qualified with a 1ms timer"] + #[inline(always)] + pub const fn dev_ls_wake_fix(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "Device - exit suspend on any non-idle signalling, not qualified with a 1ms timer"] + #[inline(always)] + pub fn set_dev_ls_wake_fix(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn spare_fix(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_spare_fix(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } +} +impl Default for LinestateTuning { + #[inline(always)] + fn default() -> LinestateTuning { + LinestateTuning(0) + } +} +#[doc = "Main control register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct MainCtrl(pub u32); +impl MainCtrl { + #[doc = "Enable controller"] + #[inline(always)] + pub const fn controller_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Enable controller"] + #[inline(always)] + pub fn set_controller_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Device mode = 0, Host mode = 1"] + #[inline(always)] + pub const fn host_ndevice(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Device mode = 0, Host mode = 1"] + #[inline(always)] + pub fn set_host_ndevice(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Isolates USB phy after controller power-up Remove isolation once software has configured the controller Not isolated = 0, Isolated = 1"] + #[inline(always)] + pub const fn phy_iso(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Isolates USB phy after controller power-up Remove isolation once software has configured the controller Not isolated = 0, Isolated = 1"] + #[inline(always)] + pub fn set_phy_iso(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Reduced timings for simulation"] + #[inline(always)] + pub const fn sim_timing(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "Reduced timings for simulation"] + #[inline(always)] + pub fn set_sim_timing(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for MainCtrl { + #[inline(always)] + fn default() -> MainCtrl { + MainCtrl(0) + } +} +#[doc = "Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct NakPoll(pub u32); +impl NakPoll { + #[doc = "NAK polling interval for a low speed device"] + #[inline(always)] + pub const fn delay_ls(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x03ff; + val as u16 + } + #[doc = "NAK polling interval for a low speed device"] + #[inline(always)] + pub fn set_delay_ls(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 0usize)) | (((val as u32) & 0x03ff) << 0usize); + } + #[doc = "Bits 5:0 of nak_retry_count"] + #[inline(always)] + pub const fn retry_count_lo(&self) -> u8 { + let val = (self.0 >> 10usize) & 0x3f; + val as u8 + } + #[doc = "Bits 5:0 of nak_retry_count"] + #[inline(always)] + pub fn set_retry_count_lo(&mut self, val: u8) { + self.0 = (self.0 & !(0x3f << 10usize)) | (((val as u32) & 0x3f) << 10usize); + } + #[doc = "NAK polling interval for a full speed device"] + #[inline(always)] + pub const fn delay_fs(&self) -> u16 { + let val = (self.0 >> 16usize) & 0x03ff; + val as u16 + } + #[doc = "NAK polling interval for a full speed device"] + #[inline(always)] + pub fn set_delay_fs(&mut self, val: u16) { + self.0 = (self.0 & !(0x03ff << 16usize)) | (((val as u32) & 0x03ff) << 16usize); + } + #[doc = "Stop polling epx when a nak is received"] + #[inline(always)] + pub const fn stop_epx_on_nak(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "Stop polling epx when a nak is received"] + #[inline(always)] + pub fn set_stop_epx_on_nak(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[doc = "EPX polling has stopped because a nak was received"] + #[inline(always)] + pub const fn epx_stopped_on_nak(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[doc = "EPX polling has stopped because a nak was received"] + #[inline(always)] + pub fn set_epx_stopped_on_nak(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[doc = "Bits 9:6 of nak_retry count"] + #[inline(always)] + pub const fn retry_count_hi(&self) -> u8 { + let val = (self.0 >> 28usize) & 0x0f; + val as u8 + } + #[doc = "Bits 9:6 of nak_retry count"] + #[inline(always)] + pub fn set_retry_count_hi(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 28usize)) | (((val as u32) & 0x0f) << 28usize); + } +} +impl Default for NakPoll { + #[inline(always)] + fn default() -> NakPoll { + NakPoll(0) + } +} +#[doc = "SIE control register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SieCtrl(pub u32); +impl SieCtrl { + #[doc = "Host: Start transaction"] + #[inline(always)] + pub const fn start_trans(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Host: Start transaction"] + #[inline(always)] + pub fn set_start_trans(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "Host: Send Setup packet"] + #[inline(always)] + pub const fn send_setup(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "Host: Send Setup packet"] + #[inline(always)] + pub fn set_send_setup(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "Host: Send transaction (OUT from host)"] + #[inline(always)] + pub const fn send_data(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "Host: Send transaction (OUT from host)"] + #[inline(always)] + pub fn set_send_data(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Host: Receive transaction (IN to host)"] + #[inline(always)] + pub const fn receive_data(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "Host: Receive transaction (IN to host)"] + #[inline(always)] + pub fn set_receive_data(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Host: Stop transaction"] + #[inline(always)] + pub const fn stop_trans(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Host: Stop transaction"] + #[inline(always)] + pub fn set_stop_trans(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Host: Preable enable for LS device on FS hub"] + #[inline(always)] + pub const fn preamble_en(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "Host: Preable enable for LS device on FS hub"] + #[inline(always)] + pub fn set_preamble_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "Host: Delay packet(s) until after SOF"] + #[inline(always)] + pub const fn sof_sync(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "Host: Delay packet(s) until after SOF"] + #[inline(always)] + pub fn set_sof_sync(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Host: Enable SOF generation (for full speed bus)"] + #[inline(always)] + pub const fn sof_en(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Host: Enable SOF generation (for full speed bus)"] + #[inline(always)] + pub fn set_sof_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "Host: Enable keep alive packet (for low speed bus)"] + #[inline(always)] + pub const fn keep_alive_en(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "Host: Enable keep alive packet (for low speed bus)"] + #[inline(always)] + pub fn set_keep_alive_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Host: Enable VBUS"] + #[inline(always)] + pub const fn vbus_en(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Host: Enable VBUS"] + #[inline(always)] + pub fn set_vbus_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "Device: Remote wakeup. Device can initiate its own resume after suspend."] + #[inline(always)] + pub const fn resume(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Device: Remote wakeup. Device can initiate its own resume after suspend."] + #[inline(always)] + pub fn set_resume(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "Host: Reset bus"] + #[inline(always)] + pub const fn reset_bus(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "Host: Reset bus"] + #[inline(always)] + pub fn set_reset_bus(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "Host: Enable pull down resistors"] + #[inline(always)] + pub const fn pulldown_en(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "Host: Enable pull down resistors"] + #[inline(always)] + pub fn set_pulldown_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "Device: Enable pull up resistor"] + #[inline(always)] + pub const fn pullup_en(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Device: Enable pull up resistor"] + #[inline(always)] + pub fn set_pullup_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Device: Pull-up strength (0=1K2, 1=2k3)"] + #[inline(always)] + pub const fn rpu_opt(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Device: Pull-up strength (0=1K2, 1=2k3)"] + #[inline(always)] + pub fn set_rpu_opt(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "Power down bus transceiver"] + #[inline(always)] + pub const fn transceiver_pd(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "Power down bus transceiver"] + #[inline(always)] + pub fn set_transceiver_pd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "Device: Stop EP0 on a short packet."] + #[inline(always)] + pub const fn ep0_stop_on_short_packet(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "Device: Stop EP0 on a short packet."] + #[inline(always)] + pub fn set_ep0_stop_on_short_packet(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "Direct control of DM"] + #[inline(always)] + pub const fn direct_dm(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "Direct control of DM"] + #[inline(always)] + pub fn set_direct_dm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Direct control of DP"] + #[inline(always)] + pub const fn direct_dp(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Direct control of DP"] + #[inline(always)] + pub fn set_direct_dp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "Direct bus drive enable"] + #[inline(always)] + pub const fn direct_en(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "Direct bus drive enable"] + #[inline(always)] + pub fn set_direct_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[doc = "Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK"] + #[inline(always)] + pub const fn ep0_int_nak(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[doc = "Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK"] + #[inline(always)] + pub fn set_ep0_int_nak(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[doc = "Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0"] + #[inline(always)] + pub const fn ep0_int_2buf(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0"] + #[inline(always)] + pub fn set_ep0_int_2buf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[doc = "Device: Set bit in BUFF_STATUS for every buffer completed on EP0"] + #[inline(always)] + pub const fn ep0_int_1buf(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "Device: Set bit in BUFF_STATUS for every buffer completed on EP0"] + #[inline(always)] + pub fn set_ep0_int_1buf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "Device: EP0 single buffered = 0, double buffered = 1"] + #[inline(always)] + pub const fn ep0_double_buf(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "Device: EP0 single buffered = 0, double buffered = 1"] + #[inline(always)] + pub fn set_ep0_double_buf(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL"] + #[inline(always)] + pub const fn ep0_int_stall(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL"] + #[inline(always)] + pub fn set_ep0_int_stall(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for SieCtrl { + #[inline(always)] + fn default() -> SieCtrl { + SieCtrl(0) + } +} +#[doc = "SIE status register"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SieStatus(pub u32); +impl SieStatus { + #[doc = "Device: VBUS Detected"] + #[inline(always)] + pub const fn vbus_detected(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Device: VBUS Detected"] + #[inline(always)] + pub fn set_vbus_detected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "USB bus line state"] + #[inline(always)] + pub const fn line_state(&self) -> u8 { + let val = (self.0 >> 2usize) & 0x03; + val as u8 + } + #[doc = "USB bus line state"] + #[inline(always)] + pub fn set_line_state(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 2usize)) | (((val as u32) & 0x03) << 2usize); + } + #[doc = "Bus in suspended state. Valid for device. Device will go into suspend if neither Keep Alive / SOF frames are enabled."] + #[inline(always)] + pub const fn suspended(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Bus in suspended state. Valid for device. Device will go into suspend if neither Keep Alive / SOF frames are enabled."] + #[inline(always)] + pub fn set_suspended(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "Host: device speed. Disconnected = 00, LS = 01, FS = 10"] + #[inline(always)] + pub const fn speed(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x03; + val as u8 + } + #[doc = "Host: device speed. Disconnected = 00, LS = 01, FS = 10"] + #[inline(always)] + pub fn set_speed(&mut self, val: u8) { + self.0 = (self.0 & !(0x03 << 8usize)) | (((val as u32) & 0x03) << 8usize); + } + #[doc = "VBUS over current detected"] + #[inline(always)] + pub const fn vbus_over_curr(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "VBUS over current detected"] + #[inline(always)] + pub fn set_vbus_over_curr(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Host: Device has initiated a remote resume. Device: host has initiated a resume."] + #[inline(always)] + pub const fn resume(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Host: Device has initiated a remote resume. Device: host has initiated a resume."] + #[inline(always)] + pub fn set_resume(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rx_short_packet(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rx_short_packet(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "Device: connected"] + #[inline(always)] + pub const fn connected(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Device: connected"] + #[inline(always)] + pub fn set_connected(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Device: Setup packet received"] + #[inline(always)] + pub const fn setup_rec(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Device: Setup packet received"] + #[inline(always)] + pub fn set_setup_rec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn trans_complete(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_trans_complete(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "Device: bus reset received"] + #[inline(always)] + pub const fn bus_reset(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "Device: bus reset received"] + #[inline(always)] + pub fn set_bus_reset(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "An endpoint has encountered an error. Read the ep_rx_error and ep_tx_error registers to find out which endpoint had an error."] + #[inline(always)] + pub const fn endpoint_error(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "An endpoint has encountered an error. Read the ep_rx_error and ep_tx_error registers to find out which endpoint had an error."] + #[inline(always)] + pub fn set_endpoint_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "CRC Error. Raised by the Serial RX engine."] + #[inline(always)] + pub const fn crc_error(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "CRC Error. Raised by the Serial RX engine."] + #[inline(always)] + pub fn set_crc_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Bit Stuff Error. Raised by the Serial RX engine."] + #[inline(always)] + pub const fn bit_stuff_error(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Bit Stuff Error. Raised by the Serial RX engine."] + #[inline(always)] + pub fn set_bit_stuff_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "RX overflow is raised by the Serial RX engine if the incoming data is too fast."] + #[inline(always)] + pub const fn rx_overflow(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "RX overflow is raised by the Serial RX engine if the incoming data is too fast."] + #[inline(always)] + pub fn set_rx_overflow(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn rx_timeout(&self) -> bool { + let val = (self.0 >> 27usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_rx_timeout(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize); + } + #[doc = "Host: NAK received"] + #[inline(always)] + pub const fn nak_rec(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Host: NAK received"] + #[inline(always)] + pub fn set_nak_rec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[doc = "Host: STALL received"] + #[inline(always)] + pub const fn stall_rec(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "Host: STALL received"] + #[inline(always)] + pub fn set_stall_rec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "ACK received. Raised by both host and device."] + #[inline(always)] + pub const fn ack_rec(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "ACK received. Raised by both host and device."] + #[inline(always)] + pub fn set_ack_rec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn data_seq_error(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_data_seq_error(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for SieStatus { + #[inline(always)] + fn default() -> SieStatus { + SieStatus(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SmState(pub u32); +impl SmState { + #[inline(always)] + pub const fn state(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[inline(always)] + pub fn set_state(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[inline(always)] + pub const fn bc_state(&self) -> u8 { + let val = (self.0 >> 5usize) & 0x07; + val as u8 + } + #[inline(always)] + pub fn set_bc_state(&mut self, val: u8) { + self.0 = (self.0 & !(0x07 << 5usize)) | (((val as u32) & 0x07) << 5usize); + } + #[inline(always)] + pub const fn rx_dasm(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x0f; + val as u8 + } + #[inline(always)] + pub fn set_rx_dasm(&mut self, val: u8) { + self.0 = (self.0 & !(0x0f << 8usize)) | (((val as u32) & 0x0f) << 8usize); + } +} +impl Default for SmState { + #[inline(always)] + fn default() -> SmState { + SmState(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SofRd(pub u32); +impl SofRd { + #[inline(always)] + pub const fn count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x07ff; + val as u16 + } + #[inline(always)] + pub fn set_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 0usize)) | (((val as u32) & 0x07ff) << 0usize); + } +} +impl Default for SofRd { + #[inline(always)] + fn default() -> SofRd { + SofRd(0) + } +} +#[doc = "Device only. Value of free-running PHY clock counter @48MHz when last SOF event occurred."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SofTimestampLast(pub u32); +impl SofTimestampLast { + #[inline(always)] + pub const fn sof_timestamp_last(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x001f_ffff; + val as u32 + } + #[inline(always)] + pub fn set_sof_timestamp_last(&mut self, val: u32) { + self.0 = (self.0 & !(0x001f_ffff << 0usize)) | (((val as u32) & 0x001f_ffff) << 0usize); + } +} +impl Default for SofTimestampLast { + #[inline(always)] + fn default() -> SofTimestampLast { + SofTimestampLast(0) + } +} +#[doc = "Device only. Raw value of free-running PHY clock counter @48MHz. Used to calculate time between SOF events."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SofTimestampRaw(pub u32); +impl SofTimestampRaw { + #[inline(always)] + pub const fn sof_timestamp_raw(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x001f_ffff; + val as u32 + } + #[inline(always)] + pub fn set_sof_timestamp_raw(&mut self, val: u32) { + self.0 = (self.0 & !(0x001f_ffff << 0usize)) | (((val as u32) & 0x001f_ffff) << 0usize); + } +} +impl Default for SofTimestampRaw { + #[inline(always)] + fn default() -> SofTimestampRaw { + SofTimestampRaw(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SofWr(pub u32); +impl SofWr { + #[inline(always)] + pub const fn count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x07ff; + val as u16 + } + #[inline(always)] + pub fn set_count(&mut self, val: u16) { + self.0 = (self.0 & !(0x07ff << 0usize)) | (((val as u32) & 0x07ff) << 0usize); + } +} +impl Default for SofWr { + #[inline(always)] + fn default() -> SofWr { + SofWr(0) + } +} +#[doc = "Where to connect the USB controller. Should be to_phy by default."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbMuxing(pub u32); +impl UsbMuxing { + #[inline(always)] + pub const fn to_phy(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_to_phy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn to_extphy(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_to_extphy(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn to_digital_pad(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_to_digital_pad(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn softcon(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_softcon(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "Use the usb DP and DM pins as GPIO pins instead of connecting them to the USB controller."] + #[inline(always)] + pub const fn usbphy_as_gpio(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Use the usb DP and DM pins as GPIO pins instead of connecting them to the USB controller."] + #[inline(always)] + pub fn set_usbphy_as_gpio(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn swap_dpdm(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_swap_dpdm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for UsbMuxing { + #[inline(always)] + fn default() -> UsbMuxing { + UsbMuxing(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbPwr(pub u32); +impl UsbPwr { + #[inline(always)] + pub const fn vbus_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vbus_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn vbus_en_override_en(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vbus_en_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn vbus_detect(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vbus_detect(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn vbus_detect_override_en(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_vbus_detect_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn overcurr_detect(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_overcurr_detect(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn overcurr_detect_en(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_overcurr_detect_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } +} +impl Default for UsbPwr { + #[inline(always)] + fn default() -> UsbPwr { + UsbPwr(0) + } +} +#[doc = "This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbphyDirect(pub u32); +impl UsbphyDirect { + #[doc = "Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[inline(always)] + pub const fn dp_pullup_hisel(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[inline(always)] + pub fn set_dp_pullup_hisel(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "DP pull up enable"] + #[inline(always)] + pub const fn dp_pullup_en(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "DP pull up enable"] + #[inline(always)] + pub fn set_dp_pullup_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "DP pull down enable"] + #[inline(always)] + pub const fn dp_pulldn_en(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "DP pull down enable"] + #[inline(always)] + pub fn set_dp_pulldn_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[doc = "Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[inline(always)] + pub const fn dm_pullup_hisel(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2"] + #[inline(always)] + pub fn set_dm_pullup_hisel(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "DM pull up enable"] + #[inline(always)] + pub const fn dm_pullup_en(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "DM pull up enable"] + #[inline(always)] + pub fn set_dm_pullup_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "DM pull down enable"] + #[inline(always)] + pub const fn dm_pulldn_en(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "DM pull down enable"] + #[inline(always)] + pub fn set_dm_pulldn_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tx_dp_oe(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tx_dp_oe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "Output enable. If TX_DIFFMODE=1, Ignored. If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving"] + #[inline(always)] + pub const fn tx_dm_oe(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "Output enable. If TX_DIFFMODE=1, Ignored. If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving"] + #[inline(always)] + pub fn set_tx_dm_oe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn tx_dp(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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"] + #[inline(always)] + pub fn set_tx_dp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "Output data. TX_DIFFMODE=1, Ignored TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM"] + #[inline(always)] + pub const fn tx_dm(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Output data. TX_DIFFMODE=1, Ignored TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM"] + #[inline(always)] + pub fn set_tx_dm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "RX power down override (if override enable is set). 1 = powered down."] + #[inline(always)] + pub const fn rx_pd(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "RX power down override (if override enable is set). 1 = powered down."] + #[inline(always)] + pub fn set_rx_pd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "TX power down override (if override enable is set). 1 = powered down."] + #[inline(always)] + pub const fn tx_pd(&self) -> bool { + let val = (self.0 >> 13usize) & 0x01; + val != 0 + } + #[doc = "TX power down override (if override enable is set). 1 = powered down."] + #[inline(always)] + pub fn set_tx_pd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize); + } + #[doc = "TX_FSSLEW=0: Low speed slew rate TX_FSSLEW=1: Full speed slew rate"] + #[inline(always)] + pub const fn tx_fsslew(&self) -> bool { + let val = (self.0 >> 14usize) & 0x01; + val != 0 + } + #[doc = "TX_FSSLEW=0: Low speed slew rate TX_FSSLEW=1: Full speed slew rate"] + #[inline(always)] + pub fn set_tx_fsslew(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize); + } + #[doc = "TX_DIFFMODE=0: Single ended mode TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored)"] + #[inline(always)] + pub const fn tx_diffmode(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[doc = "TX_DIFFMODE=0: Single ended mode TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored)"] + #[inline(always)] + pub fn set_tx_diffmode(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[doc = "Differential RX"] + #[inline(always)] + pub const fn rx_dd(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Differential RX"] + #[inline(always)] + pub fn set_rx_dd(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "DPP pin state"] + #[inline(always)] + pub const fn rx_dp(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "DPP pin state"] + #[inline(always)] + pub fn set_rx_dp(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[doc = "DPM pin state"] + #[inline(always)] + pub const fn rx_dm(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "DPM pin state"] + #[inline(always)] + pub fn set_rx_dm(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "DP overcurrent"] + #[inline(always)] + pub const fn dp_ovcn(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "DP overcurrent"] + #[inline(always)] + pub fn set_dp_ovcn(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "DM overcurrent"] + #[inline(always)] + pub const fn dm_ovcn(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "DM overcurrent"] + #[inline(always)] + pub fn set_dm_ovcn(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } + #[doc = "DP over voltage"] + #[inline(always)] + pub const fn dp_ovv(&self) -> bool { + let val = (self.0 >> 21usize) & 0x01; + val != 0 + } + #[doc = "DP over voltage"] + #[inline(always)] + pub fn set_dp_ovv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize); + } + #[doc = "DM over voltage"] + #[inline(always)] + pub const fn dm_ovv(&self) -> bool { + let val = (self.0 >> 22usize) & 0x01; + val != 0 + } + #[doc = "DM over voltage"] + #[inline(always)] + pub fn set_dm_ovv(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize); + } + #[doc = "Override rx_dd value into controller"] + #[inline(always)] + pub const fn rx_dd_override(&self) -> bool { + let val = (self.0 >> 23usize) & 0x01; + val != 0 + } + #[doc = "Override rx_dd value into controller"] + #[inline(always)] + pub fn set_rx_dd_override(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize); + } + #[doc = "Override rx_dp value into controller"] + #[inline(always)] + pub const fn rx_dp_override(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "Override rx_dp value into controller"] + #[inline(always)] + pub fn set_rx_dp_override(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Override rx_dm value into controller"] + #[inline(always)] + pub const fn rx_dm_override(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Override rx_dm value into controller"] + #[inline(always)] + pub fn set_rx_dm_override(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } +} +impl Default for UsbphyDirect { + #[inline(always)] + fn default() -> UsbphyDirect { + UsbphyDirect(0) + } +} +#[doc = "Override enable for each control in usbphy_direct"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbphyDirectOverride(pub u32); +impl UsbphyDirectOverride { + #[inline(always)] + pub const fn dp_pullup_hisel_override_en(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dp_pullup_hisel_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn dm_pullup_hisel_override_en(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dm_pullup_hisel_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[inline(always)] + pub const fn dp_pullup_en_override_en(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dp_pullup_en_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } + #[inline(always)] + pub const fn dp_pulldn_en_override_en(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dp_pulldn_en_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[inline(always)] + pub const fn dm_pulldn_en_override_en(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dm_pulldn_en_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[inline(always)] + pub const fn tx_dp_oe_override_en(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_dp_oe_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[inline(always)] + pub const fn tx_dm_oe_override_en(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_dm_oe_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[inline(always)] + pub const fn tx_dp_override_en(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_dp_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[inline(always)] + pub const fn tx_dm_override_en(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_dm_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[inline(always)] + pub const fn rx_pd_override_en(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rx_pd_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[inline(always)] + pub const fn tx_pd_override_en(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_pd_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[inline(always)] + pub const fn tx_fsslew_override_en(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_fsslew_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[inline(always)] + pub const fn dm_pullup_override_en(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_dm_pullup_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[inline(always)] + pub const fn tx_diffmode_override_en(&self) -> bool { + let val = (self.0 >> 15usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_tx_diffmode_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize); + } + #[inline(always)] + pub const fn rx_dd_override_en(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rx_dd_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[inline(always)] + pub const fn rx_dp_override_en(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rx_dp_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn rx_dm_override_en(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_rx_dm_override_en(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } +} +impl Default for UsbphyDirectOverride { + #[inline(always)] + fn default() -> UsbphyDirectOverride { + UsbphyDirectOverride(0) + } +} +#[doc = "Used to adjust trim values of USB phy pull down resistors."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbphyTrim(pub u32); +impl UsbphyTrim { + #[doc = "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"] + #[inline(always)] + pub const fn dp_pulldn_trim(&self) -> u8 { + let val = (self.0 >> 0usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_dp_pulldn_trim(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 0usize)) | (((val as u32) & 0x1f) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn dm_pulldn_trim(&self) -> u8 { + let val = (self.0 >> 8usize) & 0x1f; + val as u8 + } + #[doc = "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"] + #[inline(always)] + pub fn set_dm_pulldn_trim(&mut self, val: u8) { + self.0 = (self.0 & !(0x1f << 8usize)) | (((val as u32) & 0x1f) << 8usize); + } +} +impl Default for UsbphyTrim { + #[inline(always)] + fn default() -> UsbphyTrim { + UsbphyTrim(0) + } +} diff --git a/src/rp2350/usb_dpram.rs b/src/rp2350/usb_dpram.rs new file mode 100644 index 00000000..ec3eec2a --- /dev/null +++ b/src/rp2350/usb_dpram.rs @@ -0,0 +1,67 @@ +#[doc = "DPRAM layout for USB device."] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct UsbDpram { + ptr: *mut u8, +} +unsafe impl Send for UsbDpram {} +unsafe impl Sync for UsbDpram {} +impl UsbDpram { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Bytes 0-3 of the SETUP packet from the host."] + #[inline(always)] + pub const fn setup_packet_low( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Bytes 4-7 of the setup packet from the host."] + #[inline(always)] + pub const fn setup_packet_high( + self, + ) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[inline(always)] + pub const fn ep_in_control( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 15usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize + n * 8usize) as _) } + } + #[inline(always)] + pub const fn ep_out_control( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 15usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize + n * 8usize) as _) } + } + #[doc = "Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode."] + #[inline(always)] + pub const fn ep_in_buffer_control( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 16usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(128usize + n * 8usize) as _) } + } + #[doc = "Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode."] + #[inline(always)] + pub const fn ep_out_buffer_control( + self, + n: usize, + ) -> crate::common::Reg { + assert!(n < 16usize); + unsafe { crate::common::Reg::from_ptr(self.ptr.add(132usize + n * 8usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/usb_dpram/regs.rs b/src/rp2350/usb_dpram/regs.rs new file mode 100644 index 00000000..f249c875 --- /dev/null +++ b/src/rp2350/usb_dpram/regs.rs @@ -0,0 +1,291 @@ +#[doc = "Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpBufferControl(pub u32); +impl EpBufferControl { + #[doc = "The length of the data in buffer 1."] + #[inline(always)] + pub const fn length(&self, n: usize) -> u16 { + assert!(n < 2usize); + let offs = 0usize + n * 16usize; + let val = (self.0 >> offs) & 0x03ff; + val as u16 + } + #[doc = "The length of the data in buffer 1."] + #[inline(always)] + pub fn set_length(&mut self, n: usize, val: u16) { + assert!(n < 2usize); + let offs = 0usize + n * 16usize; + self.0 = (self.0 & !(0x03ff << offs)) | (((val as u32) & 0x03ff) << offs); + } + #[doc = "Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back."] + #[inline(always)] + pub const fn available(&self, n: usize) -> bool { + assert!(n < 2usize); + let offs = 10usize + n * 16usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[doc = "Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back."] + #[inline(always)] + pub fn set_available(&mut self, n: usize, val: bool) { + assert!(n < 2usize); + let offs = 10usize + n * 16usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[doc = "Reply with a stall (valid for both buffers)."] + #[inline(always)] + pub const fn stall(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "Reply with a stall (valid for both buffers)."] + #[inline(always)] + pub fn set_stall(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } + #[doc = "Reset the buffer selector to buffer 0."] + #[inline(always)] + pub const fn reset(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Reset the buffer selector to buffer 0."] + #[inline(always)] + pub fn set_reset(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "The data pid of buffer 0."] + #[inline(always)] + pub const fn pid(&self, n: usize) -> bool { + assert!(n < 2usize); + let offs = 13usize + n * 16usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[doc = "The data pid of buffer 0."] + #[inline(always)] + pub fn set_pid(&mut self, n: usize, val: bool) { + assert!(n < 2usize); + let offs = 13usize + n * 16usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[doc = "Buffer 0 is the last buffer of the transfer."] + #[inline(always)] + pub const fn last(&self, n: usize) -> bool { + assert!(n < 2usize); + let offs = 14usize + n * 16usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[doc = "Buffer 0 is the last buffer of the transfer."] + #[inline(always)] + pub fn set_last(&mut self, n: usize, val: bool) { + assert!(n < 2usize); + let offs = 14usize + n * 16usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[doc = "Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data."] + #[inline(always)] + pub const fn full(&self, n: usize) -> bool { + assert!(n < 2usize); + let offs = 15usize + n * 16usize; + let val = (self.0 >> offs) & 0x01; + val != 0 + } + #[doc = "Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data."] + #[inline(always)] + pub fn set_full(&mut self, n: usize, val: bool) { + assert!(n < 2usize); + let offs = 15usize + n * 16usize; + self.0 = (self.0 & !(0x01 << offs)) | (((val as u32) & 0x01) << offs); + } + #[doc = "The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. For a non Isochronous endpoint the offset is always 64 bytes."] + #[inline(always)] + pub const fn double_buffer_iso_offset( + &self, + ) -> super::vals::EpBufferControlDoubleBufferIsoOffset { + let val = (self.0 >> 27usize) & 0x03; + super::vals::EpBufferControlDoubleBufferIsoOffset::from_bits(val as u8) + } + #[doc = "The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. For a non Isochronous endpoint the offset is always 64 bytes."] + #[inline(always)] + pub fn set_double_buffer_iso_offset( + &mut self, + val: super::vals::EpBufferControlDoubleBufferIsoOffset, + ) { + self.0 = (self.0 & !(0x03 << 27usize)) | (((val.to_bits() as u32) & 0x03) << 27usize); + } +} +impl Default for EpBufferControl { + #[inline(always)] + fn default() -> EpBufferControl { + EpBufferControl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EpControl(pub u32); +impl EpControl { + #[doc = "64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM."] + #[inline(always)] + pub const fn buffer_address(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM."] + #[inline(always)] + pub fn set_buffer_address(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "Trigger an interrupt if a NAK is sent. Intended for debug only."] + #[inline(always)] + pub const fn interrupt_on_nak(&self) -> bool { + let val = (self.0 >> 16usize) & 0x01; + val != 0 + } + #[doc = "Trigger an interrupt if a NAK is sent. Intended for debug only."] + #[inline(always)] + pub fn set_interrupt_on_nak(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize); + } + #[doc = "Trigger an interrupt if a STALL is sent. Intended for debug only."] + #[inline(always)] + pub const fn interrupt_on_stall(&self) -> bool { + let val = (self.0 >> 17usize) & 0x01; + val != 0 + } + #[doc = "Trigger an interrupt if a STALL is sent. Intended for debug only."] + #[inline(always)] + pub fn set_interrupt_on_stall(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize); + } + #[inline(always)] + pub const fn endpoint_type(&self) -> super::vals::EpControlEndpointType { + let val = (self.0 >> 26usize) & 0x03; + super::vals::EpControlEndpointType::from_bits(val as u8) + } + #[inline(always)] + pub fn set_endpoint_type(&mut self, val: super::vals::EpControlEndpointType) { + self.0 = (self.0 & !(0x03 << 26usize)) | (((val.to_bits() as u32) & 0x03) << 26usize); + } + #[doc = "Trigger an interrupt each time both buffers are done. Only valid in double buffered mode."] + #[inline(always)] + pub const fn interrupt_per_double_buff(&self) -> bool { + let val = (self.0 >> 28usize) & 0x01; + val != 0 + } + #[doc = "Trigger an interrupt each time both buffers are done. Only valid in double buffered mode."] + #[inline(always)] + pub fn set_interrupt_per_double_buff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize); + } + #[doc = "Trigger an interrupt each time a buffer is done."] + #[inline(always)] + pub const fn interrupt_per_buff(&self) -> bool { + let val = (self.0 >> 29usize) & 0x01; + val != 0 + } + #[doc = "Trigger an interrupt each time a buffer is done."] + #[inline(always)] + pub fn set_interrupt_per_buff(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize); + } + #[doc = "This endpoint is double buffered."] + #[inline(always)] + pub const fn double_buffered(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "This endpoint is double buffered."] + #[inline(always)] + pub fn set_double_buffered(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set."] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set."] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for EpControl { + #[inline(always)] + fn default() -> EpControl { + EpControl(0) + } +} +#[doc = "Bytes 4-7 of the setup packet from the host."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SetupPacketHigh(pub u32); +impl SetupPacketHigh { + #[inline(always)] + pub const fn windex(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_windex(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[inline(always)] + pub const fn wlength(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_wlength(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for SetupPacketHigh { + #[inline(always)] + fn default() -> SetupPacketHigh { + SetupPacketHigh(0) + } +} +#[doc = "Bytes 0-3 of the SETUP packet from the host."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SetupPacketLow(pub u32); +impl SetupPacketLow { + #[inline(always)] + pub const fn bmrequesttype(&self) -> u8 { + let val = (self.0 >> 0usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_bmrequesttype(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 0usize)) | (((val as u32) & 0xff) << 0usize); + } + #[inline(always)] + pub const fn brequest(&self) -> u8 { + let val = (self.0 >> 8usize) & 0xff; + val as u8 + } + #[inline(always)] + pub fn set_brequest(&mut self, val: u8) { + self.0 = (self.0 & !(0xff << 8usize)) | (((val as u32) & 0xff) << 8usize); + } + #[inline(always)] + pub const fn wvalue(&self) -> u16 { + let val = (self.0 >> 16usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_wvalue(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 16usize)) | (((val as u32) & 0xffff) << 16usize); + } +} +impl Default for SetupPacketLow { + #[inline(always)] + fn default() -> SetupPacketLow { + SetupPacketLow(0) + } +} diff --git a/src/rp2350/usb_dpram/vals.rs b/src/rp2350/usb_dpram/vals.rs new file mode 100644 index 00000000..d0e39228 --- /dev/null +++ b/src/rp2350/usb_dpram/vals.rs @@ -0,0 +1,60 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum EpBufferControlDoubleBufferIsoOffset { + _128 = 0, + _256 = 0x01, + _512 = 0x02, + _1024 = 0x03, +} +impl EpBufferControlDoubleBufferIsoOffset { + #[inline(always)] + pub const fn from_bits(val: u8) -> EpBufferControlDoubleBufferIsoOffset { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for EpBufferControlDoubleBufferIsoOffset { + #[inline(always)] + fn from(val: u8) -> EpBufferControlDoubleBufferIsoOffset { + EpBufferControlDoubleBufferIsoOffset::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: EpBufferControlDoubleBufferIsoOffset) -> u8 { + EpBufferControlDoubleBufferIsoOffset::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum EpControlEndpointType { + CONTROL = 0, + ISOCHRONOUS = 0x01, + BULK = 0x02, + INTERRUPT = 0x03, +} +impl EpControlEndpointType { + #[inline(always)] + pub const fn from_bits(val: u8) -> EpControlEndpointType { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for EpControlEndpointType { + #[inline(always)] + fn from(val: u8) -> EpControlEndpointType { + EpControlEndpointType::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: EpControlEndpointType) -> u8 { + EpControlEndpointType::to_bits(val) + } +} diff --git a/src/rp2350/watchdog.rs b/src/rp2350/watchdog.rs new file mode 100644 index 00000000..4c60649e --- /dev/null +++ b/src/rp2350/watchdog.rs @@ -0,0 +1,72 @@ +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Watchdog { + ptr: *mut u8, +} +unsafe impl Send for Watchdog {} +unsafe impl Sync for Watchdog {} +impl Watchdog { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Watchdog control The rst_wdsel register determines which subsystems are reset when the watchdog is triggered. The watchdog can be triggered in software."] + #[inline(always)] + pub const fn ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Load the watchdog timer. The maximum setting is 0xffffff which corresponds to approximately 16 seconds."] + #[inline(always)] + pub const fn load(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn reason(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch0(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch1(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch2(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch3(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch4(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch5(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(32usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch6(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(36usize) as _) } + } + #[doc = "Scratch register. Information persists through soft reset of the chip."] + #[inline(always)] + pub const fn scratch7(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(40usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/watchdog/regs.rs b/src/rp2350/watchdog/regs.rs new file mode 100644 index 00000000..31eab793 --- /dev/null +++ b/src/rp2350/watchdog/regs.rs @@ -0,0 +1,129 @@ +#[doc = "Watchdog control The rst_wdsel register determines which subsystems are reset when the watchdog is triggered. The watchdog can be triggered in software."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ctrl(pub u32); +impl Ctrl { + #[doc = "Indicates the time in usec before a watchdog reset will be triggered"] + #[inline(always)] + pub const fn time(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[doc = "Indicates the time in usec before a watchdog reset will be triggered"] + #[inline(always)] + pub fn set_time(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } + #[doc = "Pause the watchdog timer when JTAG is accessing the bus fabric"] + #[inline(always)] + pub const fn pause_jtag(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "Pause the watchdog timer when JTAG is accessing the bus fabric"] + #[inline(always)] + pub fn set_pause_jtag(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Pause the watchdog timer when processor 0 is in debug mode"] + #[inline(always)] + pub const fn pause_dbg0(&self) -> bool { + let val = (self.0 >> 25usize) & 0x01; + val != 0 + } + #[doc = "Pause the watchdog timer when processor 0 is in debug mode"] + #[inline(always)] + pub fn set_pause_dbg0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize); + } + #[doc = "Pause the watchdog timer when processor 1 is in debug mode"] + #[inline(always)] + pub const fn pause_dbg1(&self) -> bool { + let val = (self.0 >> 26usize) & 0x01; + val != 0 + } + #[doc = "Pause the watchdog timer when processor 1 is in debug mode"] + #[inline(always)] + pub fn set_pause_dbg1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize); + } + #[doc = "When not enabled the watchdog timer is paused"] + #[inline(always)] + pub const fn enable(&self) -> bool { + let val = (self.0 >> 30usize) & 0x01; + val != 0 + } + #[doc = "When not enabled the watchdog timer is paused"] + #[inline(always)] + pub fn set_enable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize); + } + #[doc = "Trigger a watchdog reset"] + #[inline(always)] + pub const fn trigger(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "Trigger a watchdog reset"] + #[inline(always)] + pub fn set_trigger(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for Ctrl { + #[inline(always)] + fn default() -> Ctrl { + Ctrl(0) + } +} +#[doc = "Load the watchdog timer. The maximum setting is 0xffffff which corresponds to approximately 16 seconds."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Load(pub u32); +impl Load { + #[inline(always)] + pub const fn load(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x00ff_ffff; + val as u32 + } + #[inline(always)] + pub fn set_load(&mut self, val: u32) { + self.0 = (self.0 & !(0x00ff_ffff << 0usize)) | (((val as u32) & 0x00ff_ffff) << 0usize); + } +} +impl Default for Load { + #[inline(always)] + fn default() -> Load { + Load(0) + } +} +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Reason(pub u32); +impl Reason { + #[inline(always)] + pub const fn timer(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_timer(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[inline(always)] + pub const fn force(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[inline(always)] + pub fn set_force(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } +} +impl Default for Reason { + #[inline(always)] + fn default() -> Reason { + Reason(0) + } +} diff --git a/src/rp2350/xip_aux.rs b/src/rp2350/xip_aux.rs new file mode 100644 index 00000000..e81beae5 --- /dev/null +++ b/src/rp2350/xip_aux.rs @@ -0,0 +1,34 @@ +#[doc = "Auxiliary DMA access to XIP FIFOs, via fast AHB bus access"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XipAux { + ptr: *mut u8, +} +unsafe impl Send for XipAux {} +unsafe impl Sync for XipAux {} +impl XipAux { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Read the XIP stream FIFO (fast bus access to XIP_CTRL_STREAM_FIFO)"] + #[inline(always)] + pub const fn stream(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Write to the QMI direct-mode TX FIFO (fast bus access to QMI_DIRECT_TX)"] + #[inline(always)] + pub const fn qmi_direct_tx(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Read from the QMI direct-mode RX FIFO (fast bus access to QMI_DIRECT_RX)"] + #[inline(always)] + pub const fn qmi_direct_rx(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/xip_aux/regs.rs b/src/rp2350/xip_aux/regs.rs new file mode 100644 index 00000000..f0dc0f1d --- /dev/null +++ b/src/rp2350/xip_aux/regs.rs @@ -0,0 +1,90 @@ +#[doc = "Read from the QMI direct-mode RX FIFO (fast bus access to QMI_DIRECT_RX)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct QmiDirectRx(pub u32); +impl QmiDirectRx { + #[doc = "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."] + #[inline(always)] + pub const fn qmi_direct_rx(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_qmi_direct_rx(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for QmiDirectRx { + #[inline(always)] + fn default() -> QmiDirectRx { + QmiDirectRx(0) + } +} +#[doc = "Write to the QMI direct-mode TX FIFO (fast bus access to QMI_DIRECT_TX)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct QmiDirectTx(pub u32); +impl QmiDirectTx { + #[doc = "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."] + #[inline(always)] + pub const fn data(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[doc = "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."] + #[inline(always)] + pub fn set_data(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } + #[doc = "Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely."] + #[inline(always)] + pub const fn iwidth(&self) -> super::vals::Iwidth { + let val = (self.0 >> 16usize) & 0x03; + super::vals::Iwidth::from_bits(val as u8) + } + #[doc = "Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely."] + #[inline(always)] + pub fn set_iwidth(&mut self, val: super::vals::Iwidth) { + self.0 = (self.0 & !(0x03 << 16usize)) | (((val.to_bits() as u32) & 0x03) << 16usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn dwidth(&self) -> bool { + let val = (self.0 >> 18usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_dwidth(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn oe(&self) -> bool { + let val = (self.0 >> 19usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_oe(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn nopush(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_nopush(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } +} +impl Default for QmiDirectTx { + #[inline(always)] + fn default() -> QmiDirectTx { + QmiDirectTx(0) + } +} diff --git a/src/rp2350/xip_aux/vals.rs b/src/rp2350/xip_aux/vals.rs new file mode 100644 index 00000000..d49136f2 --- /dev/null +++ b/src/rp2350/xip_aux/vals.rs @@ -0,0 +1,33 @@ +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum Iwidth { + #[doc = "Single width"] + S = 0, + #[doc = "Dual width"] + D = 0x01, + #[doc = "Quad width"] + Q = 0x02, + _RESERVED_3 = 0x03, +} +impl Iwidth { + #[inline(always)] + pub const fn from_bits(val: u8) -> Iwidth { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for Iwidth { + #[inline(always)] + fn from(val: u8) -> Iwidth { + Iwidth::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: Iwidth) -> u8 { + Iwidth::to_bits(val) + } +} diff --git a/src/rp2350/xip_ctrl.rs b/src/rp2350/xip_ctrl.rs new file mode 100644 index 00000000..bce3a5b3 --- /dev/null +++ b/src/rp2350/xip_ctrl.rs @@ -0,0 +1,52 @@ +#[doc = "QSPI flash execute-in-place block"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct XipCtrl { + ptr: *mut u8, +} +unsafe impl Send for XipCtrl {} +unsafe impl Sync for XipCtrl {} +impl XipCtrl { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Cache control register. Read-only from a Non-secure context."] + #[inline(always)] + pub const fn ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[inline(always)] + pub const fn stat(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Cache Hit counter"] + #[inline(always)] + pub const fn ctr_hit(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "Cache Access counter"] + #[inline(always)] + pub const fn ctr_acc(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } + #[doc = "FIFO stream address"] + #[inline(always)] + pub const fn stream_addr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(20usize) as _) } + } + #[doc = "FIFO stream control"] + #[inline(always)] + pub const fn stream_ctr(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(24usize) as _) } + } + #[doc = "FIFO stream data"] + #[inline(always)] + pub const fn stream_fifo(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(28usize) as _) } + } +} +pub mod regs; diff --git a/src/rp2350/xip_ctrl/regs.rs b/src/rp2350/xip_ctrl/regs.rs new file mode 100644 index 00000000..07f0c822 --- /dev/null +++ b/src/rp2350/xip_ctrl/regs.rs @@ -0,0 +1,212 @@ +#[doc = "Cache control register. Read-only from a Non-secure context."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ctrl(pub u32); +impl Ctrl { + #[doc = "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."] + #[inline(always)] + pub const fn en_secure(&self) -> bool { + let val = (self.0 >> 0usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en_secure(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn en_nonsecure(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_en_nonsecure(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn power_down(&self) -> bool { + let val = (self.0 >> 3usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_power_down(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn no_uncached_sec(&self) -> bool { + let val = (self.0 >> 4usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_no_uncached_sec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn no_uncached_nonsec(&self) -> bool { + let val = (self.0 >> 5usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_no_uncached_nonsec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize); + } + #[doc = "When 1, Secure accesses to the uncached, untranslated window (addr\\[27:26\\] == 3) will generate a bus error."] + #[inline(always)] + pub const fn no_untranslated_sec(&self) -> bool { + let val = (self.0 >> 6usize) & 0x01; + val != 0 + } + #[doc = "When 1, Secure accesses to the uncached, untranslated window (addr\\[27:26\\] == 3) will generate a bus error."] + #[inline(always)] + pub fn set_no_untranslated_sec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize); + } + #[doc = "When 1, Non-secure accesses to the uncached, untranslated window (addr\\[27:26\\] == 3) will generate a bus error."] + #[inline(always)] + pub const fn no_untranslated_nonsec(&self) -> bool { + let val = (self.0 >> 7usize) & 0x01; + val != 0 + } + #[doc = "When 1, Non-secure accesses to the uncached, untranslated window (addr\\[27:26\\] == 3) will generate a bus error."] + #[inline(always)] + pub fn set_no_untranslated_nonsec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn maint_nonsec(&self) -> bool { + let val = (self.0 >> 8usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_maint_nonsec(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn split_ways(&self) -> bool { + let val = (self.0 >> 9usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_split_ways(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn writable_m0(&self) -> bool { + let val = (self.0 >> 10usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_writable_m0(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn writable_m1(&self) -> bool { + let val = (self.0 >> 11usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_writable_m1(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize); + } +} +impl Default for Ctrl { + #[inline(always)] + fn default() -> Ctrl { + Ctrl(0) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Stat(pub u32); +impl Stat { + #[doc = "When 1, indicates the XIP streaming FIFO is completely empty."] + #[inline(always)] + pub const fn fifo_empty(&self) -> bool { + let val = (self.0 >> 1usize) & 0x01; + val != 0 + } + #[doc = "When 1, indicates the XIP streaming FIFO is completely empty."] + #[inline(always)] + pub fn set_fifo_empty(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn fifo_full(&self) -> bool { + let val = (self.0 >> 2usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_fifo_full(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize); + } +} +impl Default for Stat { + #[inline(always)] + fn default() -> Stat { + Stat(0) + } +} +#[doc = "FIFO stream address"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct StreamAddr(pub u32); +impl StreamAddr { + #[doc = "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."] + #[inline(always)] + pub const fn stream_addr(&self) -> u32 { + let val = (self.0 >> 2usize) & 0x3fff_ffff; + val as u32 + } + #[doc = "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."] + #[inline(always)] + pub fn set_stream_addr(&mut self, val: u32) { + self.0 = (self.0 & !(0x3fff_ffff << 2usize)) | (((val as u32) & 0x3fff_ffff) << 2usize); + } +} +impl Default for StreamAddr { + #[inline(always)] + fn default() -> StreamAddr { + StreamAddr(0) + } +} +#[doc = "FIFO stream control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct StreamCtr(pub u32); +impl StreamCtr { + #[doc = "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)"] + #[inline(always)] + pub const fn stream_ctr(&self) -> u32 { + let val = (self.0 >> 0usize) & 0x003f_ffff; + val as u32 + } + #[doc = "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)"] + #[inline(always)] + pub fn set_stream_ctr(&mut self, val: u32) { + self.0 = (self.0 & !(0x003f_ffff << 0usize)) | (((val as u32) & 0x003f_ffff) << 0usize); + } +} +impl Default for StreamCtr { + #[inline(always)] + fn default() -> StreamCtr { + StreamCtr(0) + } +} diff --git a/src/rp2350/xosc.rs b/src/rp2350/xosc.rs new file mode 100644 index 00000000..95054801 --- /dev/null +++ b/src/rp2350/xosc.rs @@ -0,0 +1,44 @@ +#[doc = "Controls the crystal oscillator"] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Xosc { + ptr: *mut u8, +} +unsafe impl Send for Xosc {} +unsafe impl Sync for Xosc {} +impl Xosc { + #[inline(always)] + pub const unsafe fn from_ptr(ptr: *mut ()) -> Self { + Self { ptr: ptr as _ } + } + #[inline(always)] + pub const fn as_ptr(&self) -> *mut () { + self.ptr as _ + } + #[doc = "Crystal Oscillator Control"] + #[inline(always)] + pub const fn ctrl(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(0usize) as _) } + } + #[doc = "Crystal Oscillator Status"] + #[inline(always)] + pub const fn status(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(4usize) as _) } + } + #[doc = "Crystal Oscillator pause control"] + #[inline(always)] + pub const fn dormant(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(8usize) as _) } + } + #[doc = "Controls the startup delay"] + #[inline(always)] + pub const fn startup(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(12usize) as _) } + } + #[doc = "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."] + #[inline(always)] + pub const fn count(self) -> crate::common::Reg { + unsafe { crate::common::Reg::from_ptr(self.ptr.add(16usize) as _) } + } +} +pub mod regs; +pub mod vals; diff --git a/src/rp2350/xosc/regs.rs b/src/rp2350/xosc/regs.rs new file mode 100644 index 00000000..8d2cd482 --- /dev/null +++ b/src/rp2350/xosc/regs.rs @@ -0,0 +1,169 @@ +#[doc = "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."] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Count(pub u32); +impl Count { + #[inline(always)] + pub const fn count(&self) -> u16 { + let val = (self.0 >> 0usize) & 0xffff; + val as u16 + } + #[inline(always)] + pub fn set_count(&mut self, val: u16) { + self.0 = (self.0 & !(0xffff << 0usize)) | (((val as u32) & 0xffff) << 0usize); + } +} +impl Default for Count { + #[inline(always)] + fn default() -> Count { + Count(0) + } +} +#[doc = "Crystal Oscillator Control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Ctrl(pub u32); +impl Ctrl { + #[doc = "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"] + #[inline(always)] + pub const fn freq_range(&self) -> super::vals::CtrlFreqRange { + let val = (self.0 >> 0usize) & 0x0fff; + super::vals::CtrlFreqRange::from_bits(val as u16) + } + #[doc = "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"] + #[inline(always)] + pub fn set_freq_range(&mut self, val: super::vals::CtrlFreqRange) { + self.0 = (self.0 & !(0x0fff << 0usize)) | (((val.to_bits() as u32) & 0x0fff) << 0usize); + } + #[doc = "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"] + #[inline(always)] + pub const fn enable(&self) -> super::vals::Enable { + let val = (self.0 >> 12usize) & 0x0fff; + super::vals::Enable::from_bits(val as u16) + } + #[doc = "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"] + #[inline(always)] + pub fn set_enable(&mut self, val: super::vals::Enable) { + self.0 = (self.0 & !(0x0fff << 12usize)) | (((val.to_bits() as u32) & 0x0fff) << 12usize); + } +} +impl Default for Ctrl { + #[inline(always)] + fn default() -> Ctrl { + Ctrl(0) + } +} +#[doc = "Crystal Oscillator pause control"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Dormant(pub u32); +impl Dormant { + #[doc = "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"] + #[inline(always)] + pub const fn dormant(&self) -> super::vals::Dormant { + let val = (self.0 >> 0usize) & 0xffff_ffff; + super::vals::Dormant::from_bits(val as u32) + } + #[doc = "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"] + #[inline(always)] + pub fn set_dormant(&mut self, val: super::vals::Dormant) { + self.0 = (self.0 & !(0xffff_ffff << 0usize)) + | (((val.to_bits() as u32) & 0xffff_ffff) << 0usize); + } +} +impl Default for Dormant { + #[inline(always)] + fn default() -> Dormant { + Dormant(0) + } +} +#[doc = "Controls the startup delay"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Startup(pub u32); +impl Startup { + #[doc = "in multiples of 256*xtal_period. The reset value of 0xc4 corresponds to approx 50 000 cycles."] + #[inline(always)] + pub const fn delay(&self) -> u16 { + let val = (self.0 >> 0usize) & 0x3fff; + val as u16 + } + #[doc = "in multiples of 256*xtal_period. The reset value of 0xc4 corresponds to approx 50 000 cycles."] + #[inline(always)] + pub fn set_delay(&mut self, val: u16) { + self.0 = (self.0 & !(0x3fff << 0usize)) | (((val as u32) & 0x3fff) << 0usize); + } + #[doc = "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."] + #[inline(always)] + pub const fn x4(&self) -> bool { + let val = (self.0 >> 20usize) & 0x01; + val != 0 + } + #[doc = "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."] + #[inline(always)] + pub fn set_x4(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize); + } +} +impl Default for Startup { + #[inline(always)] + fn default() -> Startup { + Startup(0) + } +} +#[doc = "Crystal Oscillator Status"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct Status(pub u32); +impl Status { + #[doc = "The current frequency range setting"] + #[inline(always)] + pub const fn freq_range(&self) -> super::vals::StatusFreqRange { + let val = (self.0 >> 0usize) & 0x03; + super::vals::StatusFreqRange::from_bits(val as u8) + } + #[doc = "The current frequency range setting"] + #[inline(always)] + pub fn set_freq_range(&mut self, val: super::vals::StatusFreqRange) { + self.0 = (self.0 & !(0x03 << 0usize)) | (((val.to_bits() as u32) & 0x03) << 0usize); + } + #[doc = "Oscillator is enabled but not necessarily running and stable, resets to 0"] + #[inline(always)] + pub const fn enabled(&self) -> bool { + let val = (self.0 >> 12usize) & 0x01; + val != 0 + } + #[doc = "Oscillator is enabled but not necessarily running and stable, resets to 0"] + #[inline(always)] + pub fn set_enabled(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize); + } + #[doc = "An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT"] + #[inline(always)] + pub const fn badwrite(&self) -> bool { + let val = (self.0 >> 24usize) & 0x01; + val != 0 + } + #[doc = "An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT"] + #[inline(always)] + pub fn set_badwrite(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize); + } + #[doc = "Oscillator is running and stable"] + #[inline(always)] + pub const fn stable(&self) -> bool { + let val = (self.0 >> 31usize) & 0x01; + val != 0 + } + #[doc = "Oscillator is running and stable"] + #[inline(always)] + pub fn set_stable(&mut self, val: bool) { + self.0 = (self.0 & !(0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize); + } +} +impl Default for Status { + #[inline(always)] + fn default() -> Status { + Status(0) + } +} diff --git a/src/rp2350/xosc/vals.rs b/src/rp2350/xosc/vals.rs new file mode 100644 index 00000000..06a57082 --- /dev/null +++ b/src/rp2350/xosc/vals.rs @@ -0,0 +1,113 @@ +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct CtrlFreqRange(pub u16); +impl CtrlFreqRange { + pub const _1_15MHZ: Self = Self(0x0aa0); + pub const _10_30MHZ: Self = Self(0x0aa1); + pub const _25_60MHZ: Self = Self(0x0aa2); + pub const _40_100MHZ: Self = Self(0x0aa3); +} +impl CtrlFreqRange { + pub const fn from_bits(val: u16) -> CtrlFreqRange { + Self(val & 0x0fff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for CtrlFreqRange { + #[inline(always)] + fn from(val: u16) -> CtrlFreqRange { + CtrlFreqRange::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: CtrlFreqRange) -> u16 { + CtrlFreqRange::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Dormant(pub u32); +impl Dormant { + pub const DORMANT: Self = Self(0x636f_6d61); + pub const WAKE: Self = Self(0x7761_6b65); +} +impl Dormant { + pub const fn from_bits(val: u32) -> Dormant { + Self(val & 0xffff_ffff) + } + pub const fn to_bits(self) -> u32 { + self.0 + } +} +impl From for Dormant { + #[inline(always)] + fn from(val: u32) -> Dormant { + Dormant::from_bits(val) + } +} +impl From for u32 { + #[inline(always)] + fn from(val: Dormant) -> u32 { + Dormant::to_bits(val) + } +} +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub struct Enable(pub u16); +impl Enable { + pub const DISABLE: Self = Self(0x0d1e); + pub const ENABLE: Self = Self(0x0fab); +} +impl Enable { + pub const fn from_bits(val: u16) -> Enable { + Self(val & 0x0fff) + } + pub const fn to_bits(self) -> u16 { + self.0 + } +} +impl From for Enable { + #[inline(always)] + fn from(val: u16) -> Enable { + Enable::from_bits(val) + } +} +impl From for u16 { + #[inline(always)] + fn from(val: Enable) -> u16 { + Enable::to_bits(val) + } +} +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +pub enum StatusFreqRange { + _1_15MHZ = 0, + _10_30MHZ = 0x01, + _25_60MHZ = 0x02, + _40_100MHZ = 0x03, +} +impl StatusFreqRange { + #[inline(always)] + pub const fn from_bits(val: u8) -> StatusFreqRange { + unsafe { core::mem::transmute(val & 0x03) } + } + #[inline(always)] + pub const fn to_bits(self) -> u8 { + unsafe { core::mem::transmute(self) } + } +} +impl From for StatusFreqRange { + #[inline(always)] + fn from(val: u8) -> StatusFreqRange { + StatusFreqRange::from_bits(val) + } +} +impl From for u8 { + #[inline(always)] + fn from(val: StatusFreqRange) -> u8 { + StatusFreqRange::to_bits(val) + } +} diff --git a/svd/RP2040.svd b/svd/RP2040.svd new file mode 100644 index 00000000..454f4890 --- /dev/null +++ b/svd/RP2040.svd @@ -0,0 +1,51055 @@ + + + + Raspberry Pi + RP2040 + RP + 0.1 + + Dual-core Arm Cortex-M0+ processor, flexible clock running up to 133 MHz + 264KB on-chip SRAM + 2 x UART, 2 x SPI controllers, 2 x I2C controllers, 16 x PWM channels + 1 x USB 1.1 controller and PHY, with host and device support + 8 x Programmable I/O (PIO) state machines for custom peripheral support + Supported input power 1.8-5.5V DC + Operating temperature -20C to +85C + Drag-and-drop programming using mass storage over USB + Low-power sleep and dormant modes + Accurate on-chip clock + Temperature sensor + Accelerated integer and floating-point libraries on-chip + + 32 + 32 + 0xffffffff + 0x00000000 + read-write + + Copyright (c) 2024 Raspberry Pi Ltd. + + SPDX-License-Identifier: BSD-3-Clause + + + CM0PLUS + r0p1 + little + true + false + 1 + 2 + false + 26 + + 8 + + + RESETS + 0x4000c000 + + 0 + 12 + registers + + + + RESET + 0x00000000 + Reset control. If a bit is set it means the peripheral is in reset. 0 means the peripheral's reset is deasserted. + 0x01ffffff + + + USBCTRL + [24:24] + read-write + + + UART1 + [23:23] + read-write + + + UART0 + [22:22] + read-write + + + TIMER + [21:21] + read-write + + + TBMAN + [20:20] + read-write + + + SYSINFO + [19:19] + read-write + + + SYSCFG + [18:18] + read-write + + + SPI1 + [17:17] + read-write + + + SPI0 + [16:16] + read-write + + + RTC + [15:15] + read-write + + + PWM + [14:14] + read-write + + + PLL_USB + [13:13] + read-write + + + PLL_SYS + [12:12] + read-write + + + PIO1 + [11:11] + read-write + + + PIO0 + [10:10] + read-write + + + PADS_QSPI + [9:9] + read-write + + + PADS_BANK0 + [8:8] + read-write + + + JTAG + [7:7] + read-write + + + IO_QSPI + [6:6] + read-write + + + IO_BANK0 + [5:5] + read-write + + + I2C1 + [4:4] + read-write + + + I2C0 + [3:3] + read-write + + + DMA + [2:2] + read-write + + + BUSCTRL + [1:1] + read-write + + + ADC + [0:0] + read-write + + + + + WDSEL + 0x00000004 + Watchdog select. If a bit is set then the watchdog will reset this peripheral when the watchdog fires. + 0x00000000 + + + USBCTRL + [24:24] + read-write + + + UART1 + [23:23] + read-write + + + UART0 + [22:22] + read-write + + + TIMER + [21:21] + read-write + + + TBMAN + [20:20] + read-write + + + SYSINFO + [19:19] + read-write + + + SYSCFG + [18:18] + read-write + + + SPI1 + [17:17] + read-write + + + SPI0 + [16:16] + read-write + + + RTC + [15:15] + read-write + + + PWM + [14:14] + read-write + + + PLL_USB + [13:13] + read-write + + + PLL_SYS + [12:12] + read-write + + + PIO1 + [11:11] + read-write + + + PIO0 + [10:10] + read-write + + + PADS_QSPI + [9:9] + read-write + + + PADS_BANK0 + [8:8] + read-write + + + JTAG + [7:7] + read-write + + + IO_QSPI + [6:6] + read-write + + + IO_BANK0 + [5:5] + read-write + + + I2C1 + [4:4] + read-write + + + I2C0 + [3:3] + read-write + + + DMA + [2:2] + read-write + + + BUSCTRL + [1:1] + read-write + + + ADC + [0:0] + read-write + + + + + RESET_DONE + 0x00000008 + Reset done. If a bit is set then a reset done signal has been returned by the peripheral. This indicates that the peripheral's registers are ready to be accessed. + 0x00000000 + + + USBCTRL + [24:24] + read-only + + + UART1 + [23:23] + read-only + + + UART0 + [22:22] + read-only + + + TIMER + [21:21] + read-only + + + TBMAN + [20:20] + read-only + + + SYSINFO + [19:19] + read-only + + + SYSCFG + [18:18] + read-only + + + SPI1 + [17:17] + read-only + + + SPI0 + [16:16] + read-only + + + RTC + [15:15] + read-only + + + PWM + [14:14] + read-only + + + PLL_USB + [13:13] + read-only + + + PLL_SYS + [12:12] + read-only + + + PIO1 + [11:11] + read-only + + + PIO0 + [10:10] + read-only + + + PADS_QSPI + [9:9] + read-only + + + PADS_BANK0 + [8:8] + read-only + + + JTAG + [7:7] + read-only + + + IO_QSPI + [6:6] + read-only + + + IO_BANK0 + [5:5] + read-only + + + I2C1 + [4:4] + read-only + + + I2C0 + [3:3] + read-only + + + DMA + [2:2] + read-only + + + BUSCTRL + [1:1] + read-only + + + ADC + [0:0] + read-only + + + + + + + PSM + 0x40010000 + + 0 + 16 + registers + + + + FRCE_ON + 0x00000000 + Force block out of reset (i.e. power it on) + 0x00000000 + + + PROC1 + [16:16] + read-write + + + PROC0 + [15:15] + read-write + + + SIO + [14:14] + read-write + + + VREG_AND_CHIP_RESET + [13:13] + read-write + + + XIP + [12:12] + read-write + + + SRAM5 + [11:11] + read-write + + + SRAM4 + [10:10] + read-write + + + SRAM3 + [9:9] + read-write + + + SRAM2 + [8:8] + read-write + + + SRAM1 + [7:7] + read-write + + + SRAM0 + [6:6] + read-write + + + ROM + [5:5] + read-write + + + BUSFABRIC + [4:4] + read-write + + + RESETS + [3:3] + read-write + + + CLOCKS + [2:2] + read-write + + + XOSC + [1:1] + read-write + + + ROSC + [0:0] + read-write + + + + + FRCE_OFF + 0x00000004 + Force into reset (i.e. power it off) + 0x00000000 + + + PROC1 + [16:16] + read-write + + + PROC0 + [15:15] + read-write + + + SIO + [14:14] + read-write + + + VREG_AND_CHIP_RESET + [13:13] + read-write + + + XIP + [12:12] + read-write + + + SRAM5 + [11:11] + read-write + + + SRAM4 + [10:10] + read-write + + + SRAM3 + [9:9] + read-write + + + SRAM2 + [8:8] + read-write + + + SRAM1 + [7:7] + read-write + + + SRAM0 + [6:6] + read-write + + + ROM + [5:5] + read-write + + + BUSFABRIC + [4:4] + read-write + + + RESETS + [3:3] + read-write + + + CLOCKS + [2:2] + read-write + + + XOSC + [1:1] + read-write + + + ROSC + [0:0] + read-write + + + + + WDSEL + 0x00000008 + Set to 1 if this peripheral should be reset when the watchdog fires. + 0x00000000 + + + PROC1 + [16:16] + read-write + + + PROC0 + [15:15] + read-write + + + SIO + [14:14] + read-write + + + VREG_AND_CHIP_RESET + [13:13] + read-write + + + XIP + [12:12] + read-write + + + SRAM5 + [11:11] + read-write + + + SRAM4 + [10:10] + read-write + + + SRAM3 + [9:9] + read-write + + + SRAM2 + [8:8] + read-write + + + SRAM1 + [7:7] + read-write + + + SRAM0 + [6:6] + read-write + + + ROM + [5:5] + read-write + + + BUSFABRIC + [4:4] + read-write + + + RESETS + [3:3] + read-write + + + CLOCKS + [2:2] + read-write + + + XOSC + [1:1] + read-write + + + ROSC + [0:0] + read-write + + + + + DONE + 0x0000000c + Indicates the peripheral's registers are ready to access. + 0x00000000 + + + PROC1 + [16:16] + read-only + + + PROC0 + [15:15] + read-only + + + SIO + [14:14] + read-only + + + VREG_AND_CHIP_RESET + [13:13] + read-only + + + XIP + [12:12] + read-only + + + SRAM5 + [11:11] + read-only + + + SRAM4 + [10:10] + read-only + + + SRAM3 + [9:9] + read-only + + + SRAM2 + [8:8] + read-only + + + SRAM1 + [7:7] + read-only + + + SRAM0 + [6:6] + read-only + + + ROM + [5:5] + read-only + + + BUSFABRIC + [4:4] + read-only + + + RESETS + [3:3] + read-only + + + CLOCKS + [2:2] + read-only + + + XOSC + [1:1] + read-only + + + ROSC + [0:0] + read-only + + + + + + + CLOCKS + 0x40008000 + + 0 + 200 + registers + + + CLOCKS_IRQ + 17 + + + + CLK_GPOUT0_CTRL + 0x00000000 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + + + + + CLK_GPOUT0_DIV + 0x00000004 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_GPOUT0_SELECTED + 0x00000008 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_GPOUT0_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_GPOUT1_CTRL + 0x0000000c + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + + + + + CLK_GPOUT1_DIV + 0x00000010 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_GPOUT1_SELECTED + 0x00000014 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_GPOUT1_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_GPOUT2_CTRL + 0x00000018 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + + + + + CLK_GPOUT2_DIV + 0x0000001c + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_GPOUT2_SELECTED + 0x00000020 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_GPOUT2_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_GPOUT3_CTRL + 0x00000024 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + + + + + CLK_GPOUT3_DIV + 0x00000028 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_GPOUT3_SELECTED + 0x0000002c + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_GPOUT3_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_REF_CTRL + 0x00000030 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [6:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + + + SRC + Selects the clock source glitchlessly, can be changed on-the-fly + [1:0] + read-write + + + rosc_clksrc_ph + 0 + + + clksrc_clk_ref_aux + 1 + + + xosc_clksrc + 2 + + + + + + + CLK_REF_DIV + 0x00000034 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [9:8] + read-write + + + + + CLK_REF_SELECTED + 0x00000038 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_REF_SELECTED + The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s. + [31:0] + read-only + + + + + CLK_SYS_CTRL + 0x0000003c + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_pll_usb + 1 + + + rosc_clksrc + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + SRC + Selects the clock source glitchlessly, can be changed on-the-fly + [0:0] + read-write + + + clk_ref + 0 + + + clksrc_clk_sys_aux + 1 + + + + + + + CLK_SYS_DIV + 0x00000040 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_SYS_SELECTED + 0x00000044 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_SYS_SELECTED + The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s. + [31:0] + read-only + + + + + CLK_PERI_CTRL + 0x00000048 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clk_sys + 0 + + + clksrc_pll_sys + 1 + + + clksrc_pll_usb + 2 + + + rosc_clksrc_ph + 3 + + + xosc_clksrc + 4 + + + clksrc_gpin0 + 5 + + + clksrc_gpin1 + 6 + + + + + + + CLK_PERI_DIV + 0x0000004c + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_PERI_SELECTED + 0x00000050 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_PERI_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_USB_CTRL + 0x00000054 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + + + CLK_USB_DIV + 0x00000058 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [9:8] + read-write + + + + + CLK_USB_SELECTED + 0x0000005c + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_USB_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_ADC_CTRL + 0x00000060 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + + + CLK_ADC_DIV + 0x00000064 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [9:8] + read-write + + + + + CLK_ADC_SELECTED + 0x00000068 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_ADC_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_RTC_CTRL + 0x0000006c + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + + + CLK_RTC_DIV + 0x00000070 + Clock divisor, can be changed on-the-fly + 0x00000100 + + + INT + Integer component of the divisor, 0 -> divide by 2^16 + [31:8] + read-write + + + FRAC + Fractional component of the divisor + [7:0] + read-write + + + + + CLK_RTC_SELECTED + 0x00000074 + Indicates which SRC is currently selected by the glitchless mux (one-hot). + 0x00000001 + + + CLK_RTC_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [31:0] + read-only + + + + + CLK_SYS_RESUS_CTRL + 0x00000078 + 0x000000ff + + + CLEAR + For clearing the resus after the fault that triggered it has been corrected + [16:16] + read-write + + + FRCE + Force a resus, for test purposes only + [12:12] + read-write + + + ENABLE + Enable resus + [8:8] + read-write + + + TIMEOUT + This is expressed as a number of clk_ref cycles + and must be >= 2x clk_ref_freq/min_clk_tst_freq + [7:0] + read-write + + + + + CLK_SYS_RESUS_STATUS + 0x0000007c + 0x00000000 + + + RESUSSED + Clock has been resuscitated, correct the error then send ctrl_clear=1 + [0:0] + read-only + + + + + FC0_REF_KHZ + 0x00000080 + Reference clock frequency in kHz + 0x00000000 + + + FC0_REF_KHZ + [19:0] + read-write + + + + + FC0_MIN_KHZ + 0x00000084 + Minimum pass frequency in kHz. This is optional. Set to 0 if you are not using the pass/fail flags + 0x00000000 + + + FC0_MIN_KHZ + [24:0] + read-write + + + + + FC0_MAX_KHZ + 0x00000088 + Maximum pass frequency in kHz. This is optional. Set to 0x1ffffff if you are not using the pass/fail flags + 0x01ffffff + + + FC0_MAX_KHZ + [24:0] + read-write + + + + + FC0_DELAY + 0x0000008c + Delays the start of frequency counting to allow the mux to settle + Delay is measured in multiples of the reference clock period + 0x00000001 + + + FC0_DELAY + [2:0] + read-write + + + + + FC0_INTERVAL + 0x00000090 + The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval + The default gives a test interval of 250us + 0x00000008 + + + FC0_INTERVAL + [3:0] + read-write + + + + + FC0_SRC + 0x00000094 + Clock sent to frequency counter, set to 0 when not required + Writing to this register initiates the frequency count + 0x00000000 + + + FC0_SRC + [7:0] + read-write + + + NULL + 0 + + + pll_sys_clksrc_primary + 1 + + + pll_usb_clksrc_primary + 2 + + + rosc_clksrc + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clksrc_gpin0 + 6 + + + clksrc_gpin1 + 7 + + + clk_ref + 8 + + + clk_sys + 9 + + + clk_peri + 10 + + + clk_usb + 11 + + + clk_adc + 12 + + + clk_rtc + 13 + + + + + + + FC0_STATUS + 0x00000098 + Frequency counter status + 0x00000000 + + + DIED + Test clock stopped during test + [28:28] + read-only + + + FAST + Test clock faster than expected, only valid when status_done=1 + [24:24] + read-only + + + SLOW + Test clock slower than expected, only valid when status_done=1 + [20:20] + read-only + + + FAIL + Test failed + [16:16] + read-only + + + WAITING + Waiting for test clock to start + [12:12] + read-only + + + RUNNING + Test running + [8:8] + read-only + + + DONE + Test complete + [4:4] + read-only + + + PASS + Test passed + [0:0] + read-only + + + + + FC0_RESULT + 0x0000009c + Result of frequency measurement, only valid when status_done=1 + 0x00000000 + + + KHZ + [29:5] + read-only + + + FRAC + [4:0] + read-only + + + + + WAKE_EN0 + 0x000000a0 + enable clock in wake mode + 0xffffffff + + + CLK_SYS_SRAM3 + [31:31] + read-write + + + CLK_SYS_SRAM2 + [30:30] + read-write + + + CLK_SYS_SRAM1 + [29:29] + read-write + + + CLK_SYS_SRAM0 + [28:28] + read-write + + + CLK_SYS_SPI1 + [27:27] + read-write + + + CLK_PERI_SPI1 + [26:26] + read-write + + + CLK_SYS_SPI0 + [25:25] + read-write + + + CLK_PERI_SPI0 + [24:24] + read-write + + + CLK_SYS_SIO + [23:23] + read-write + + + CLK_SYS_RTC + [22:22] + read-write + + + CLK_RTC_RTC + [21:21] + read-write + + + CLK_SYS_ROSC + [20:20] + read-write + + + CLK_SYS_ROM + [19:19] + read-write + + + CLK_SYS_RESETS + [18:18] + read-write + + + CLK_SYS_PWM + [17:17] + read-write + + + CLK_SYS_PSM + [16:16] + read-write + + + CLK_SYS_PLL_USB + [15:15] + read-write + + + CLK_SYS_PLL_SYS + [14:14] + read-write + + + CLK_SYS_PIO1 + [13:13] + read-write + + + CLK_SYS_PIO0 + [12:12] + read-write + + + CLK_SYS_PADS + [11:11] + read-write + + + CLK_SYS_VREG_AND_CHIP_RESET + [10:10] + read-write + + + CLK_SYS_JTAG + [9:9] + read-write + + + CLK_SYS_IO + [8:8] + read-write + + + CLK_SYS_I2C1 + [7:7] + read-write + + + CLK_SYS_I2C0 + [6:6] + read-write + + + CLK_SYS_DMA + [5:5] + read-write + + + CLK_SYS_BUSFABRIC + [4:4] + read-write + + + CLK_SYS_BUSCTRL + [3:3] + read-write + + + CLK_SYS_ADC + [2:2] + read-write + + + CLK_ADC_ADC + [1:1] + read-write + + + CLK_SYS_CLOCKS + [0:0] + read-write + + + + + WAKE_EN1 + 0x000000a4 + enable clock in wake mode + 0x00007fff + + + CLK_SYS_XOSC + [14:14] + read-write + + + CLK_SYS_XIP + [13:13] + read-write + + + CLK_SYS_WATCHDOG + [12:12] + read-write + + + CLK_USB_USBCTRL + [11:11] + read-write + + + CLK_SYS_USBCTRL + [10:10] + read-write + + + CLK_SYS_UART1 + [9:9] + read-write + + + CLK_PERI_UART1 + [8:8] + read-write + + + CLK_SYS_UART0 + [7:7] + read-write + + + CLK_PERI_UART0 + [6:6] + read-write + + + CLK_SYS_TIMER + [5:5] + read-write + + + CLK_SYS_TBMAN + [4:4] + read-write + + + CLK_SYS_SYSINFO + [3:3] + read-write + + + CLK_SYS_SYSCFG + [2:2] + read-write + + + CLK_SYS_SRAM5 + [1:1] + read-write + + + CLK_SYS_SRAM4 + [0:0] + read-write + + + + + SLEEP_EN0 + 0x000000a8 + enable clock in sleep mode + 0xffffffff + + + CLK_SYS_SRAM3 + [31:31] + read-write + + + CLK_SYS_SRAM2 + [30:30] + read-write + + + CLK_SYS_SRAM1 + [29:29] + read-write + + + CLK_SYS_SRAM0 + [28:28] + read-write + + + CLK_SYS_SPI1 + [27:27] + read-write + + + CLK_PERI_SPI1 + [26:26] + read-write + + + CLK_SYS_SPI0 + [25:25] + read-write + + + CLK_PERI_SPI0 + [24:24] + read-write + + + CLK_SYS_SIO + [23:23] + read-write + + + CLK_SYS_RTC + [22:22] + read-write + + + CLK_RTC_RTC + [21:21] + read-write + + + CLK_SYS_ROSC + [20:20] + read-write + + + CLK_SYS_ROM + [19:19] + read-write + + + CLK_SYS_RESETS + [18:18] + read-write + + + CLK_SYS_PWM + [17:17] + read-write + + + CLK_SYS_PSM + [16:16] + read-write + + + CLK_SYS_PLL_USB + [15:15] + read-write + + + CLK_SYS_PLL_SYS + [14:14] + read-write + + + CLK_SYS_PIO1 + [13:13] + read-write + + + CLK_SYS_PIO0 + [12:12] + read-write + + + CLK_SYS_PADS + [11:11] + read-write + + + CLK_SYS_VREG_AND_CHIP_RESET + [10:10] + read-write + + + CLK_SYS_JTAG + [9:9] + read-write + + + CLK_SYS_IO + [8:8] + read-write + + + CLK_SYS_I2C1 + [7:7] + read-write + + + CLK_SYS_I2C0 + [6:6] + read-write + + + CLK_SYS_DMA + [5:5] + read-write + + + CLK_SYS_BUSFABRIC + [4:4] + read-write + + + CLK_SYS_BUSCTRL + [3:3] + read-write + + + CLK_SYS_ADC + [2:2] + read-write + + + CLK_ADC_ADC + [1:1] + read-write + + + CLK_SYS_CLOCKS + [0:0] + read-write + + + + + SLEEP_EN1 + 0x000000ac + enable clock in sleep mode + 0x00007fff + + + CLK_SYS_XOSC + [14:14] + read-write + + + CLK_SYS_XIP + [13:13] + read-write + + + CLK_SYS_WATCHDOG + [12:12] + read-write + + + CLK_USB_USBCTRL + [11:11] + read-write + + + CLK_SYS_USBCTRL + [10:10] + read-write + + + CLK_SYS_UART1 + [9:9] + read-write + + + CLK_PERI_UART1 + [8:8] + read-write + + + CLK_SYS_UART0 + [7:7] + read-write + + + CLK_PERI_UART0 + [6:6] + read-write + + + CLK_SYS_TIMER + [5:5] + read-write + + + CLK_SYS_TBMAN + [4:4] + read-write + + + CLK_SYS_SYSINFO + [3:3] + read-write + + + CLK_SYS_SYSCFG + [2:2] + read-write + + + CLK_SYS_SRAM5 + [1:1] + read-write + + + CLK_SYS_SRAM4 + [0:0] + read-write + + + + + ENABLED0 + 0x000000b0 + indicates the state of the clock enable + 0x00000000 + + + CLK_SYS_SRAM3 + [31:31] + read-only + + + CLK_SYS_SRAM2 + [30:30] + read-only + + + CLK_SYS_SRAM1 + [29:29] + read-only + + + CLK_SYS_SRAM0 + [28:28] + read-only + + + CLK_SYS_SPI1 + [27:27] + read-only + + + CLK_PERI_SPI1 + [26:26] + read-only + + + CLK_SYS_SPI0 + [25:25] + read-only + + + CLK_PERI_SPI0 + [24:24] + read-only + + + CLK_SYS_SIO + [23:23] + read-only + + + CLK_SYS_RTC + [22:22] + read-only + + + CLK_RTC_RTC + [21:21] + read-only + + + CLK_SYS_ROSC + [20:20] + read-only + + + CLK_SYS_ROM + [19:19] + read-only + + + CLK_SYS_RESETS + [18:18] + read-only + + + CLK_SYS_PWM + [17:17] + read-only + + + CLK_SYS_PSM + [16:16] + read-only + + + CLK_SYS_PLL_USB + [15:15] + read-only + + + CLK_SYS_PLL_SYS + [14:14] + read-only + + + CLK_SYS_PIO1 + [13:13] + read-only + + + CLK_SYS_PIO0 + [12:12] + read-only + + + CLK_SYS_PADS + [11:11] + read-only + + + CLK_SYS_VREG_AND_CHIP_RESET + [10:10] + read-only + + + CLK_SYS_JTAG + [9:9] + read-only + + + CLK_SYS_IO + [8:8] + read-only + + + CLK_SYS_I2C1 + [7:7] + read-only + + + CLK_SYS_I2C0 + [6:6] + read-only + + + CLK_SYS_DMA + [5:5] + read-only + + + CLK_SYS_BUSFABRIC + [4:4] + read-only + + + CLK_SYS_BUSCTRL + [3:3] + read-only + + + CLK_SYS_ADC + [2:2] + read-only + + + CLK_ADC_ADC + [1:1] + read-only + + + CLK_SYS_CLOCKS + [0:0] + read-only + + + + + ENABLED1 + 0x000000b4 + indicates the state of the clock enable + 0x00000000 + + + CLK_SYS_XOSC + [14:14] + read-only + + + CLK_SYS_XIP + [13:13] + read-only + + + CLK_SYS_WATCHDOG + [12:12] + read-only + + + CLK_USB_USBCTRL + [11:11] + read-only + + + CLK_SYS_USBCTRL + [10:10] + read-only + + + CLK_SYS_UART1 + [9:9] + read-only + + + CLK_PERI_UART1 + [8:8] + read-only + + + CLK_SYS_UART0 + [7:7] + read-only + + + CLK_PERI_UART0 + [6:6] + read-only + + + CLK_SYS_TIMER + [5:5] + read-only + + + CLK_SYS_TBMAN + [4:4] + read-only + + + CLK_SYS_SYSINFO + [3:3] + read-only + + + CLK_SYS_SYSCFG + [2:2] + read-only + + + CLK_SYS_SRAM5 + [1:1] + read-only + + + CLK_SYS_SRAM4 + [0:0] + read-only + + + + + INTR + 0x000000b8 + Raw Interrupts + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-only + + + + + INTE + 0x000000bc + Interrupt Enable + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-write + + + + + INTF + 0x000000c0 + Interrupt Force + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-write + + + + + INTS + 0x000000c4 + Interrupt status after masking & forcing + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-only + + + + + + + PADS_BANK0 + 0x4001c000 + + 0 + 132 + registers + + + + VOLTAGE_SELECT + 0x00000000 + Voltage select. Per bank control + 0x00000000 + + + VOLTAGE_SELECT + [0:0] + read-write + + + 3v3 + 0 + Set voltage to 3.3V (DVDD >= 2V5) + + + 1v8 + 1 + Set voltage to 1.8V (DVDD <= 1V8) + + + + + + + GPIO0 + 0x00000004 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO1 + 0x00000008 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO2 + 0x0000000c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO3 + 0x00000010 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO4 + 0x00000014 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO5 + 0x00000018 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO6 + 0x0000001c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO7 + 0x00000020 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO8 + 0x00000024 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO9 + 0x00000028 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO10 + 0x0000002c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO11 + 0x00000030 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO12 + 0x00000034 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO13 + 0x00000038 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO14 + 0x0000003c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO15 + 0x00000040 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO16 + 0x00000044 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO17 + 0x00000048 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO18 + 0x0000004c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO19 + 0x00000050 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO20 + 0x00000054 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO21 + 0x00000058 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO22 + 0x0000005c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO23 + 0x00000060 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO24 + 0x00000064 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO25 + 0x00000068 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO26 + 0x0000006c + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO27 + 0x00000070 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO28 + 0x00000074 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO29 + 0x00000078 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + SWCLK + 0x0000007c + Pad control register + 0x000000da + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + SWD + 0x00000080 + Pad control register + 0x0000005a + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + + + PADS_QSPI + 0x40020000 + + 0 + 28 + registers + + + + VOLTAGE_SELECT + 0x00000000 + Voltage select. Per bank control + 0x00000000 + + + VOLTAGE_SELECT + [0:0] + read-write + + + 3v3 + 0 + Set voltage to 3.3V (DVDD >= 2V5) + + + 1v8 + 1 + Set voltage to 1.8V (DVDD <= 1V8) + + + + + + + GPIO_QSPI_SCLK + 0x00000004 + Pad control register + 0x00000056 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD0 + 0x00000008 + Pad control register + 0x00000052 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD1 + 0x0000000c + Pad control register + 0x00000052 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD2 + 0x00000010 + Pad control register + 0x00000052 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD3 + 0x00000014 + Pad control register + 0x00000052 + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SS + 0x00000018 + Pad control register + 0x0000005a + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + + + IO_QSPI + 0x40018000 + + 0 + 88 + registers + + + IO_IRQ_QSPI + 14 + + + + GPIO_QSPI_SCLK_STATUS + 0x00000000 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO_QSPI_SCLK_CTRL + 0x00000004 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sclk + 0 + + + sio_30 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SS_STATUS + 0x00000008 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO_QSPI_SS_CTRL + 0x0000000c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_ss_n + 0 + + + sio_31 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SD0_STATUS + 0x00000010 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO_QSPI_SD0_CTRL + 0x00000014 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd0 + 0 + + + sio_32 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SD1_STATUS + 0x00000018 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO_QSPI_SD1_CTRL + 0x0000001c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd1 + 0 + + + sio_33 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SD2_STATUS + 0x00000020 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO_QSPI_SD2_CTRL + 0x00000024 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd2 + 0 + + + sio_34 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SD3_STATUS + 0x00000028 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO_QSPI_SD3_CTRL + 0x0000002c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd3 + 0 + + + sio_35 + 5 + + + null + 31 + + + + + + + INTR + 0x00000030 + Raw Interrupts + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTE + 0x00000034 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF + 0x00000038 + Interrupt Force for proc0 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTS + 0x0000003c + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-only + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-only + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-only + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-only + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-only + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-only + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-only + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-only + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-only + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-only + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-only + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-only + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTE + 0x00000040 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF + 0x00000044 + Interrupt Force for proc1 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTS + 0x00000048 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-only + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-only + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-only + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-only + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-only + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-only + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-only + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-only + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-only + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-only + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-only + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-only + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTE + 0x0000004c + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF + 0x00000050 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTS + 0x00000054 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [23:23] + read-only + + + GPIO_QSPI_SD3_EDGE_LOW + [22:22] + read-only + + + GPIO_QSPI_SD3_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [19:19] + read-only + + + GPIO_QSPI_SD2_EDGE_LOW + [18:18] + read-only + + + GPIO_QSPI_SD2_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [15:15] + read-only + + + GPIO_QSPI_SD1_EDGE_LOW + [14:14] + read-only + + + GPIO_QSPI_SD1_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [11:11] + read-only + + + GPIO_QSPI_SD0_EDGE_LOW + [10:10] + read-only + + + GPIO_QSPI_SD0_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [8:8] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [7:7] + read-only + + + GPIO_QSPI_SS_EDGE_LOW + [6:6] + read-only + + + GPIO_QSPI_SS_LEVEL_HIGH + [5:5] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [4:4] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [3:3] + read-only + + + GPIO_QSPI_SCLK_EDGE_LOW + [2:2] + read-only + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [1:1] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [0:0] + read-only + + + + + + + IO_BANK0 + 0x40014000 + + 0 + 400 + registers + + + IO_IRQ_BANK0 + 13 + + + + GPIO0_STATUS + 0x00000000 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO0_CTRL + 0x00000004 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tck + 0 + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_0 + 4 + + + sio_0 + 5 + + + pio0_0 + 6 + + + pio1_0 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO1_STATUS + 0x00000008 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO1_CTRL + 0x0000000c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tms + 0 + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_0 + 4 + + + sio_1 + 5 + + + pio0_1 + 6 + + + pio1_1 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO2_STATUS + 0x00000010 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO2_CTRL + 0x00000014 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tdi + 0 + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_1 + 4 + + + sio_2 + 5 + + + pio0_2 + 6 + + + pio1_2 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO3_STATUS + 0x00000018 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO3_CTRL + 0x0000001c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tdo + 0 + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_1 + 4 + + + sio_3 + 5 + + + pio0_3 + 6 + + + pio1_3 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO4_STATUS + 0x00000020 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO4_CTRL + 0x00000024 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_2 + 4 + + + sio_4 + 5 + + + pio0_4 + 6 + + + pio1_4 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO5_STATUS + 0x00000028 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO5_CTRL + 0x0000002c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_2 + 4 + + + sio_5 + 5 + + + pio0_5 + 6 + + + pio1_5 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO6_STATUS + 0x00000030 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO6_CTRL + 0x00000034 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_3 + 4 + + + sio_6 + 5 + + + pio0_6 + 6 + + + pio1_6 + 7 + + + usb_muxing_extphy_softcon + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO7_STATUS + 0x00000038 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO7_CTRL + 0x0000003c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_3 + 4 + + + sio_7 + 5 + + + pio0_7 + 6 + + + pio1_7 + 7 + + + usb_muxing_extphy_oe_n + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO8_STATUS + 0x00000040 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO8_CTRL + 0x00000044 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_4 + 4 + + + sio_8 + 5 + + + pio0_8 + 6 + + + pio1_8 + 7 + + + usb_muxing_extphy_rcv + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO9_STATUS + 0x00000048 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO9_CTRL + 0x0000004c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_4 + 4 + + + sio_9 + 5 + + + pio0_9 + 6 + + + pio1_9 + 7 + + + usb_muxing_extphy_vp + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO10_STATUS + 0x00000050 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO10_CTRL + 0x00000054 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_5 + 4 + + + sio_10 + 5 + + + pio0_10 + 6 + + + pio1_10 + 7 + + + usb_muxing_extphy_vm + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO11_STATUS + 0x00000058 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO11_CTRL + 0x0000005c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_5 + 4 + + + sio_11 + 5 + + + pio0_11 + 6 + + + pio1_11 + 7 + + + usb_muxing_extphy_suspnd + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO12_STATUS + 0x00000060 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO12_CTRL + 0x00000064 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_6 + 4 + + + sio_12 + 5 + + + pio0_12 + 6 + + + pio1_12 + 7 + + + usb_muxing_extphy_speed + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO13_STATUS + 0x00000068 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO13_CTRL + 0x0000006c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_6 + 4 + + + sio_13 + 5 + + + pio0_13 + 6 + + + pio1_13 + 7 + + + usb_muxing_extphy_vpo + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO14_STATUS + 0x00000070 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO14_CTRL + 0x00000074 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_7 + 4 + + + sio_14 + 5 + + + pio0_14 + 6 + + + pio1_14 + 7 + + + usb_muxing_extphy_vmo + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO15_STATUS + 0x00000078 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO15_CTRL + 0x0000007c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_7 + 4 + + + sio_15 + 5 + + + pio0_15 + 6 + + + pio1_15 + 7 + + + usb_muxing_digital_dp + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO16_STATUS + 0x00000080 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO16_CTRL + 0x00000084 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_0 + 4 + + + sio_16 + 5 + + + pio0_16 + 6 + + + pio1_16 + 7 + + + usb_muxing_digital_dm + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO17_STATUS + 0x00000088 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO17_CTRL + 0x0000008c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_0 + 4 + + + sio_17 + 5 + + + pio0_17 + 6 + + + pio1_17 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO18_STATUS + 0x00000090 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO18_CTRL + 0x00000094 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_1 + 4 + + + sio_18 + 5 + + + pio0_18 + 6 + + + pio1_18 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO19_STATUS + 0x00000098 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO19_CTRL + 0x0000009c + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_1 + 4 + + + sio_19 + 5 + + + pio0_19 + 6 + + + pio1_19 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO20_STATUS + 0x000000a0 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO20_CTRL + 0x000000a4 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_2 + 4 + + + sio_20 + 5 + + + pio0_20 + 6 + + + pio1_20 + 7 + + + clocks_gpin_0 + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO21_STATUS + 0x000000a8 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO21_CTRL + 0x000000ac + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_2 + 4 + + + sio_21 + 5 + + + pio0_21 + 6 + + + pio1_21 + 7 + + + clocks_gpout_0 + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO22_STATUS + 0x000000b0 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO22_CTRL + 0x000000b4 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_3 + 4 + + + sio_22 + 5 + + + pio0_22 + 6 + + + pio1_22 + 7 + + + clocks_gpin_1 + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO23_STATUS + 0x000000b8 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO23_CTRL + 0x000000bc + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_3 + 4 + + + sio_23 + 5 + + + pio0_23 + 6 + + + pio1_23 + 7 + + + clocks_gpout_1 + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO24_STATUS + 0x000000c0 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO24_CTRL + 0x000000c4 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_4 + 4 + + + sio_24 + 5 + + + pio0_24 + 6 + + + pio1_24 + 7 + + + clocks_gpout_2 + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO25_STATUS + 0x000000c8 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO25_CTRL + 0x000000cc + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_4 + 4 + + + sio_25 + 5 + + + pio0_25 + 6 + + + pio1_25 + 7 + + + clocks_gpout_3 + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO26_STATUS + 0x000000d0 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO26_CTRL + 0x000000d4 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_5 + 4 + + + sio_26 + 5 + + + pio0_26 + 6 + + + pio1_26 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + GPIO27_STATUS + 0x000000d8 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO27_CTRL + 0x000000dc + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_5 + 4 + + + sio_27 + 5 + + + pio0_27 + 6 + + + pio1_27 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + + + + + GPIO28_STATUS + 0x000000e0 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO28_CTRL + 0x000000e4 + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_6 + 4 + + + sio_28 + 5 + + + pio0_28 + 6 + + + pio1_28 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + + + + + GPIO29_STATUS + 0x000000e8 + GPIO status + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + IRQFROMPAD + interrupt from pad before override is applied + [24:24] + read-only + + + INTOPERI + input signal to peripheral, after override is applied + [19:19] + read-only + + + INFROMPAD + input signal from pad, before override is applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OEFROMPERI + output enable from selected peripheral, before register override is applied + [12:12] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + OUTFROMPERI + output signal from selected peripheral, before register override is applied + [8:8] + read-only + + + + + GPIO29_CTRL + 0x000000ec + GPIO control including function select and overrides. + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [13:12] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [9:8] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_6 + 4 + + + sio_29 + 5 + + + pio0_29 + 6 + + + pio1_29 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + + + + + INTR0 + 0x000000f0 + Raw Interrupts + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO7_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO6_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO5_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO4_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO3_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO2_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO1_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO0_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + INTR1 + 0x000000f4 + Raw Interrupts + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO15_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO14_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO13_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO12_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO11_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO10_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO9_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO8_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + INTR2 + 0x000000f8 + Raw Interrupts + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO23_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO22_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO21_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO20_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO19_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO18_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO17_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO16_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + INTR3 + 0x000000fc + Raw Interrupts + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO29_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO28_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO27_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO26_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO25_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO24_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTE0 + 0x00000100 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE1 + 0x00000104 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE2 + 0x00000108 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE3 + 0x0000010c + Interrupt Enable for proc0 + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF0 + 0x00000110 + Interrupt Force for proc0 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF1 + 0x00000114 + Interrupt Force for proc0 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF2 + 0x00000118 + Interrupt Force for proc0 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF3 + 0x0000011c + Interrupt Force for proc0 + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTS0 + 0x00000120 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-only + + + GPIO7_EDGE_LOW + [30:30] + read-only + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-only + + + GPIO6_EDGE_LOW + [26:26] + read-only + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-only + + + GPIO5_EDGE_LOW + [22:22] + read-only + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-only + + + GPIO4_EDGE_LOW + [18:18] + read-only + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-only + + + GPIO3_EDGE_LOW + [14:14] + read-only + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-only + + + GPIO2_EDGE_LOW + [10:10] + read-only + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-only + + + GPIO1_EDGE_LOW + [6:6] + read-only + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-only + + + GPIO0_EDGE_LOW + [2:2] + read-only + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS1 + 0x00000124 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-only + + + GPIO15_EDGE_LOW + [30:30] + read-only + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-only + + + GPIO14_EDGE_LOW + [26:26] + read-only + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-only + + + GPIO13_EDGE_LOW + [22:22] + read-only + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-only + + + GPIO12_EDGE_LOW + [18:18] + read-only + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-only + + + GPIO11_EDGE_LOW + [14:14] + read-only + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-only + + + GPIO10_EDGE_LOW + [10:10] + read-only + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-only + + + GPIO9_EDGE_LOW + [6:6] + read-only + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-only + + + GPIO8_EDGE_LOW + [2:2] + read-only + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS2 + 0x00000128 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-only + + + GPIO23_EDGE_LOW + [30:30] + read-only + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-only + + + GPIO22_EDGE_LOW + [26:26] + read-only + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-only + + + GPIO21_EDGE_LOW + [22:22] + read-only + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-only + + + GPIO20_EDGE_LOW + [18:18] + read-only + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-only + + + GPIO19_EDGE_LOW + [14:14] + read-only + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-only + + + GPIO18_EDGE_LOW + [10:10] + read-only + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-only + + + GPIO17_EDGE_LOW + [6:6] + read-only + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-only + + + GPIO16_EDGE_LOW + [2:2] + read-only + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS3 + 0x0000012c + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-only + + + GPIO29_EDGE_LOW + [22:22] + read-only + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-only + + + GPIO28_EDGE_LOW + [18:18] + read-only + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-only + + + GPIO27_EDGE_LOW + [14:14] + read-only + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-only + + + GPIO26_EDGE_LOW + [10:10] + read-only + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-only + + + GPIO25_EDGE_LOW + [6:6] + read-only + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-only + + + GPIO24_EDGE_LOW + [2:2] + read-only + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTE0 + 0x00000130 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE1 + 0x00000134 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE2 + 0x00000138 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE3 + 0x0000013c + Interrupt Enable for proc1 + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF0 + 0x00000140 + Interrupt Force for proc1 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF1 + 0x00000144 + Interrupt Force for proc1 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF2 + 0x00000148 + Interrupt Force for proc1 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF3 + 0x0000014c + Interrupt Force for proc1 + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTS0 + 0x00000150 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-only + + + GPIO7_EDGE_LOW + [30:30] + read-only + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-only + + + GPIO6_EDGE_LOW + [26:26] + read-only + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-only + + + GPIO5_EDGE_LOW + [22:22] + read-only + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-only + + + GPIO4_EDGE_LOW + [18:18] + read-only + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-only + + + GPIO3_EDGE_LOW + [14:14] + read-only + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-only + + + GPIO2_EDGE_LOW + [10:10] + read-only + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-only + + + GPIO1_EDGE_LOW + [6:6] + read-only + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-only + + + GPIO0_EDGE_LOW + [2:2] + read-only + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS1 + 0x00000154 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-only + + + GPIO15_EDGE_LOW + [30:30] + read-only + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-only + + + GPIO14_EDGE_LOW + [26:26] + read-only + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-only + + + GPIO13_EDGE_LOW + [22:22] + read-only + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-only + + + GPIO12_EDGE_LOW + [18:18] + read-only + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-only + + + GPIO11_EDGE_LOW + [14:14] + read-only + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-only + + + GPIO10_EDGE_LOW + [10:10] + read-only + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-only + + + GPIO9_EDGE_LOW + [6:6] + read-only + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-only + + + GPIO8_EDGE_LOW + [2:2] + read-only + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS2 + 0x00000158 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-only + + + GPIO23_EDGE_LOW + [30:30] + read-only + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-only + + + GPIO22_EDGE_LOW + [26:26] + read-only + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-only + + + GPIO21_EDGE_LOW + [22:22] + read-only + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-only + + + GPIO20_EDGE_LOW + [18:18] + read-only + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-only + + + GPIO19_EDGE_LOW + [14:14] + read-only + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-only + + + GPIO18_EDGE_LOW + [10:10] + read-only + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-only + + + GPIO17_EDGE_LOW + [6:6] + read-only + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-only + + + GPIO16_EDGE_LOW + [2:2] + read-only + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS3 + 0x0000015c + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-only + + + GPIO29_EDGE_LOW + [22:22] + read-only + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-only + + + GPIO28_EDGE_LOW + [18:18] + read-only + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-only + + + GPIO27_EDGE_LOW + [14:14] + read-only + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-only + + + GPIO26_EDGE_LOW + [10:10] + read-only + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-only + + + GPIO25_EDGE_LOW + [6:6] + read-only + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-only + + + GPIO24_EDGE_LOW + [2:2] + read-only + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTE0 + 0x00000160 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE1 + 0x00000164 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE2 + 0x00000168 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE3 + 0x0000016c + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF0 + 0x00000170 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF1 + 0x00000174 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF2 + 0x00000178 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF3 + 0x0000017c + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTS0 + 0x00000180 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-only + + + GPIO7_EDGE_LOW + [30:30] + read-only + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-only + + + GPIO6_EDGE_LOW + [26:26] + read-only + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-only + + + GPIO5_EDGE_LOW + [22:22] + read-only + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-only + + + GPIO4_EDGE_LOW + [18:18] + read-only + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-only + + + GPIO3_EDGE_LOW + [14:14] + read-only + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-only + + + GPIO2_EDGE_LOW + [10:10] + read-only + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-only + + + GPIO1_EDGE_LOW + [6:6] + read-only + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-only + + + GPIO0_EDGE_LOW + [2:2] + read-only + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS1 + 0x00000184 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-only + + + GPIO15_EDGE_LOW + [30:30] + read-only + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-only + + + GPIO14_EDGE_LOW + [26:26] + read-only + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-only + + + GPIO13_EDGE_LOW + [22:22] + read-only + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-only + + + GPIO12_EDGE_LOW + [18:18] + read-only + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-only + + + GPIO11_EDGE_LOW + [14:14] + read-only + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-only + + + GPIO10_EDGE_LOW + [10:10] + read-only + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-only + + + GPIO9_EDGE_LOW + [6:6] + read-only + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-only + + + GPIO8_EDGE_LOW + [2:2] + read-only + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS2 + 0x00000188 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-only + + + GPIO23_EDGE_LOW + [30:30] + read-only + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-only + + + GPIO22_EDGE_LOW + [26:26] + read-only + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-only + + + GPIO21_EDGE_LOW + [22:22] + read-only + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-only + + + GPIO20_EDGE_LOW + [18:18] + read-only + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-only + + + GPIO19_EDGE_LOW + [14:14] + read-only + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-only + + + GPIO18_EDGE_LOW + [10:10] + read-only + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-only + + + GPIO17_EDGE_LOW + [6:6] + read-only + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-only + + + GPIO16_EDGE_LOW + [2:2] + read-only + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS3 + 0x0000018c + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO29_EDGE_HIGH + [23:23] + read-only + + + GPIO29_EDGE_LOW + [22:22] + read-only + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-only + + + GPIO28_EDGE_LOW + [18:18] + read-only + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-only + + + GPIO27_EDGE_LOW + [14:14] + read-only + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-only + + + GPIO26_EDGE_LOW + [10:10] + read-only + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-only + + + GPIO25_EDGE_LOW + [6:6] + read-only + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-only + + + GPIO24_EDGE_LOW + [2:2] + read-only + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + + + SYSINFO + 0x40000000 + + 0 + 20 + registers + + + + CHIP_ID + 0x00000000 + JEDEC JEP-106 compliant chip identifier. + 0x00000000 + + + REVISION + [31:28] + read-only + + + PART + [27:12] + read-only + + + MANUFACTURER + [11:0] + read-only + + + + + PLATFORM + 0x00000004 + Platform register. Allows software to know what environment it is running in. + 0x00000000 + + + ASIC + [1:1] + read-only + + + FPGA + [0:0] + read-only + + + + + GITREF_RP2040 + 0x00000010 + Git hash of the chip source. Used to identify chip version. + 0x00000000 + + + GITREF_RP2040 + [31:0] + read-only + + + + + + + PPB + 0xe0000000 + + 0 + 60836 + registers + + + + SYST_CSR + 0x0000e010 + Use the SysTick Control and Status Register to enable the SysTick features. + 0x00000000 + + + COUNTFLAG + Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger. + [16:16] + read-only + + + CLKSOURCE + 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. + [2:2] + read-write + + + TICKINT + 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. + [1:1] + read-write + + + ENABLE + Enable SysTick counter: + 0 = Counter disabled. + 1 = Counter enabled. + [0:0] + read-write + + + + + SYST_RVR + 0x0000e014 + 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. + 0x00000000 + + + RELOAD + Value to load into the SysTick Current Value Register when the counter reaches 0. + [23:0] + read-write + + + + + SYST_CVR + 0x0000e018 + Use the SysTick Current Value Register to find the current value in the register. The reset value of this register is UNKNOWN. + 0x00000000 + + + CURRENT + 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. + [23:0] + read-write + + + + + SYST_CALIB + 0x0000e01c + Use the SysTick Calibration Value Register to enable software to scale to any required speed using divide and multiply. + 0x00000000 + + + NOREF + 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. + [31:31] + read-only + + + SKEW + If reads as 1, the calibration value for 10ms is inexact (due to clock frequency). + [30:30] + read-only + + + TENMS + 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. + [23:0] + read-only + + + + + NVIC_ISER + 0x0000e100 + Use the Interrupt Set-Enable Register to enable interrupts and determine which interrupts are currently enabled. + If a pending interrupt is enabled, the NVIC activates the interrupt based on its priority. If an interrupt is not enabled, asserting its interrupt signal changes the interrupt state to pending, but the NVIC never activates the interrupt, regardless of its priority. + 0x00000000 + + + SETENA + Interrupt set-enable bits. + Write: + 0 = No effect. + 1 = Enable interrupt. + Read: + 0 = Interrupt disabled. + 1 = Interrupt enabled. + [31:0] + read-write + + + + + NVIC_ICER + 0x0000e180 + Use the Interrupt Clear-Enable Registers to disable interrupts and determine which interrupts are currently enabled. + 0x00000000 + + + CLRENA + Interrupt clear-enable bits. + Write: + 0 = No effect. + 1 = Disable interrupt. + Read: + 0 = Interrupt disabled. + 1 = Interrupt enabled. + [31:0] + read-write + + + + + NVIC_ISPR + 0x0000e200 + The NVIC_ISPR forces interrupts into the pending state, and shows which interrupts are pending. + 0x00000000 + + + SETPEND + Interrupt set-pending bits. + Write: + 0 = No effect. + 1 = Changes interrupt state to pending. + Read: + 0 = Interrupt is not pending. + 1 = Interrupt is pending. + Note: Writing 1 to the NVIC_ISPR bit corresponding to: + An interrupt that is pending has no effect. + A disabled interrupt sets the state of that interrupt to pending. + [31:0] + read-write + + + + + NVIC_ICPR + 0x0000e280 + Use the Interrupt Clear-Pending Register to clear pending interrupts and determine which interrupts are currently pending. + 0x00000000 + + + CLRPEND + Interrupt clear-pending bits. + Write: + 0 = No effect. + 1 = Removes pending state and interrupt. + Read: + 0 = Interrupt is not pending. + 1 = Interrupt is pending. + [31:0] + read-write + + + + + NVIC_IPR0 + 0x0000e400 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + Note: Writing 1 to an NVIC_ICPR bit does not affect the active state of the corresponding interrupt. + These registers are only word-accessible + 0x00000000 + + + IP_3 + Priority of interrupt 3 + [31:30] + read-write + + + IP_2 + Priority of interrupt 2 + [23:22] + read-write + + + IP_1 + Priority of interrupt 1 + [15:14] + read-write + + + IP_0 + Priority of interrupt 0 + [7:6] + read-write + + + + + NVIC_IPR1 + 0x0000e404 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_7 + Priority of interrupt 7 + [31:30] + read-write + + + IP_6 + Priority of interrupt 6 + [23:22] + read-write + + + IP_5 + Priority of interrupt 5 + [15:14] + read-write + + + IP_4 + Priority of interrupt 4 + [7:6] + read-write + + + + + NVIC_IPR2 + 0x0000e408 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_11 + Priority of interrupt 11 + [31:30] + read-write + + + IP_10 + Priority of interrupt 10 + [23:22] + read-write + + + IP_9 + Priority of interrupt 9 + [15:14] + read-write + + + IP_8 + Priority of interrupt 8 + [7:6] + read-write + + + + + NVIC_IPR3 + 0x0000e40c + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_15 + Priority of interrupt 15 + [31:30] + read-write + + + IP_14 + Priority of interrupt 14 + [23:22] + read-write + + + IP_13 + Priority of interrupt 13 + [15:14] + read-write + + + IP_12 + Priority of interrupt 12 + [7:6] + read-write + + + + + NVIC_IPR4 + 0x0000e410 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_19 + Priority of interrupt 19 + [31:30] + read-write + + + IP_18 + Priority of interrupt 18 + [23:22] + read-write + + + IP_17 + Priority of interrupt 17 + [15:14] + read-write + + + IP_16 + Priority of interrupt 16 + [7:6] + read-write + + + + + NVIC_IPR5 + 0x0000e414 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_23 + Priority of interrupt 23 + [31:30] + read-write + + + IP_22 + Priority of interrupt 22 + [23:22] + read-write + + + IP_21 + Priority of interrupt 21 + [15:14] + read-write + + + IP_20 + Priority of interrupt 20 + [7:6] + read-write + + + + + NVIC_IPR6 + 0x0000e418 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_27 + Priority of interrupt 27 + [31:30] + read-write + + + IP_26 + Priority of interrupt 26 + [23:22] + read-write + + + IP_25 + Priority of interrupt 25 + [15:14] + read-write + + + IP_24 + Priority of interrupt 24 + [7:6] + read-write + + + + + NVIC_IPR7 + 0x0000e41c + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + 0x00000000 + + + IP_31 + Priority of interrupt 31 + [31:30] + read-write + + + IP_30 + Priority of interrupt 30 + [23:22] + read-write + + + IP_29 + Priority of interrupt 29 + [15:14] + read-write + + + IP_28 + Priority of interrupt 28 + [7:6] + read-write + + + + + CPUID + 0x0000ed00 + Read the CPU ID Base Register to determine: the ID number of the processor core, the version number of the processor core, the implementation details of the processor core. + 0x410cc601 + + + IMPLEMENTER + Implementor code: 0x41 = ARM + [31:24] + read-only + + + VARIANT + Major revision number n in the rnpm revision status: + 0x0 = Revision 0. + [23:20] + read-only + + + ARCHITECTURE + Constant that defines the architecture of the processor: + 0xC = ARMv6-M architecture. + [19:16] + read-only + + + PARTNO + Number of processor within family: 0xC60 = Cortex-M0+ + [15:4] + read-only + + + REVISION + Minor revision number m in the rnpm revision status: + 0x1 = Patch 1. + [3:0] + read-only + + + + + ICSR + 0x0000ed04 + Use the Interrupt Control State Register to set a pending Non-Maskable Interrupt (NMI), set or clear a pending PendSV, set or clear a pending SysTick, check for pending exceptions, check the vector number of the highest priority pended exception, check the vector number of the active exception. + 0x00000000 + + + NMIPENDSET + Setting this bit will activate an NMI. Since NMI is the highest priority exception, it will activate as soon as it is registered. + NMI set-pending bit. + Write: + 0 = No effect. + 1 = Changes NMI exception state to pending. + Read: + 0 = NMI exception is not pending. + 1 = NMI exception is pending. + Because NMI is the highest-priority exception, normally the processor enters the NMI + exception handler as soon as it detects a write of 1 to this bit. Entering the handler then clears + this bit to 0. This means a read of this bit by the NMI exception handler returns 1 only if the + NMI signal is reasserted while the processor is executing that handler. + [31:31] + read-write + + + PENDSVSET + PendSV set-pending bit. + Write: + 0 = No effect. + 1 = Changes PendSV exception state to pending. + Read: + 0 = PendSV exception is not pending. + 1 = PendSV exception is pending. + Writing 1 to this bit is the only way to set the PendSV exception state to pending. + [28:28] + read-write + + + PENDSVCLR + PendSV clear-pending bit. + Write: + 0 = No effect. + 1 = Removes the pending state from the PendSV exception. + [27:27] + read-write + + + PENDSTSET + SysTick exception set-pending bit. + Write: + 0 = No effect. + 1 = Changes SysTick exception state to pending. + Read: + 0 = SysTick exception is not pending. + 1 = SysTick exception is pending. + [26:26] + read-write + + + PENDSTCLR + SysTick exception clear-pending bit. + Write: + 0 = No effect. + 1 = Removes the pending state from the SysTick exception. + This bit is WO. On a register read its value is Unknown. + [25:25] + read-write + + + ISRPREEMPT + The system can only access this bit when the core is halted. It indicates that a pending interrupt is to be taken in the next running cycle. If C_MASKINTS is clear in the Debug Halting Control and Status Register, the interrupt is serviced. + [23:23] + read-only + + + ISRPENDING + External interrupt pending flag + [22:22] + read-only + + + VECTPENDING + Indicates the exception number for the highest priority pending exception: 0 = no pending exceptions. Non zero = The pending state includes the effect of memory-mapped enable and mask registers. It does not include the PRIMASK special-purpose register qualifier. + [20:12] + read-only + + + VECTACTIVE + Active exception number field. Reset clears the VECTACTIVE field. + [8:0] + read-only + + + + + VTOR + 0x0000ed08 + The VTOR holds the vector table offset address. + 0x00000000 + + + TBLOFF + Bits [31:8] of the indicate the vector table offset address. + [31:8] + read-write + + + + + AIRCR + 0x0000ed0c + 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. + 0x00000000 + + + VECTKEY + Register key: + Reads as Unknown + On writes, write 0x05FA to VECTKEY, otherwise the write is ignored. + [31:16] + read-write + + + ENDIANESS + Data endianness implemented: + 0 = Little-endian. + [15:15] + read-only + + + SYSRESETREQ + 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. + [2:2] + read-write + + + VECTCLRACTIVE + 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. + [1:1] + read-write + + + + + SCR + 0x0000ed10 + 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. + 0x00000000 + + + SEVONPEND + 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. + [4:4] + read-write + + + SLEEPDEEP + Controls whether the processor uses sleep or deep sleep as its low power mode: + 0 = Sleep. + 1 = Deep sleep. + [2:2] + read-write + + + SLEEPONEXIT + 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. + [1:1] + read-write + + + + + CCR + 0x0000ed14 + The Configuration and Control Register permanently enables stack alignment and causes unaligned accesses to result in a Hard Fault. + 0x00000000 + + + STKALIGN + Always reads as one, indicates 8-byte stack alignment on exception entry. On exception entry, the processor uses bit[9] of the stacked PSR to indicate the stack alignment. On return from the exception it uses this stacked bit to restore the correct stack alignment. + [9:9] + read-only + + + UNALIGN_TRP + Always reads as one, indicates that all unaligned accesses generate a HardFault. + [3:3] + read-only + + + + + SHPR2 + 0x0000ed1c + System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 2 to set the priority of SVCall. + 0x00000000 + + + PRI_11 + Priority of system handler 11, SVCall + [31:30] + read-write + + + + + SHPR3 + 0x0000ed20 + System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 3 to set the priority of PendSV and SysTick. + 0x00000000 + + + PRI_15 + Priority of system handler 15, SysTick + [31:30] + read-write + + + PRI_14 + Priority of system handler 14, PendSV + [23:22] + read-write + + + + + SHCSR + 0x0000ed24 + Use the System Handler Control and State Register to determine or clear the pending status of SVCall. + 0x00000000 + + + SVCALLPENDED + Reads as 1 if SVCall is Pending. Write 1 to set pending SVCall, write 0 to clear pending SVCall. + [15:15] + read-write + + + + + MPU_TYPE + 0x0000ed90 + Read the MPU Type Register to determine if the processor implements an MPU, and how many regions the MPU supports. + 0x00000800 + + + IREGION + Instruction region. Reads as zero as ARMv6-M only supports a unified MPU. + [23:16] + read-only + + + DREGION + Number of regions supported by the MPU. + [15:8] + read-only + + + SEPARATE + Indicates support for separate instruction and data address maps. Reads as 0 as ARMv6-M only supports a unified MPU. + [0:0] + read-only + + + + + MPU_CTRL + 0x0000ed94 + Use the MPU Control Register to enable and disable the MPU, and to control whether the default memory map is enabled as a background region for privileged accesses, and whether the MPU is enabled for HardFaults and NMIs. + 0x00000000 + + + PRIVDEFENA + Controls whether the default memory map is enabled as a background region for privileged accesses. This bit is ignored when ENABLE is clear. + 0 = If the MPU is enabled, disables use of the default memory map. Any memory access to a location not + covered by any enabled region causes a fault. + 1 = If the MPU is enabled, enables use of the default memory map as a background region for privileged software accesses. + When enabled, the background region acts as if it is region number -1. Any region that is defined and enabled has priority over this default map. + [2:2] + read-write + + + HFNMIENA + Controls the use of the MPU for HardFaults and NMIs. Setting this bit when ENABLE is clear results in UNPREDICTABLE behaviour. + When the MPU is enabled: + 0 = MPU is disabled during HardFault and NMI handlers, regardless of the value of the ENABLE bit. + 1 = the MPU is enabled during HardFault and NMI handlers. + [1:1] + read-write + + + ENABLE + Enables the MPU. If the MPU is disabled, privileged and unprivileged accesses use the default memory map. + 0 = MPU disabled. + 1 = MPU enabled. + [0:0] + read-write + + + + + MPU_RNR + 0x0000ed98 + Use the MPU Region Number Register to select the region currently accessed by MPU_RBAR and MPU_RASR. + 0x00000000 + + + REGION + Indicates the MPU region referenced by the MPU_RBAR and MPU_RASR registers. + The MPU supports 8 memory regions, so the permitted values of this field are 0-7. + [3:0] + read-write + + + + + MPU_RBAR + 0x0000ed9c + Read the MPU Region Base Address Register to determine the base address of the region identified by MPU_RNR. Write to update the base address of said region or that of a specified region, with whose number MPU_RNR will also be updated. + 0x00000000 + + + ADDR + Base address of the region. + [31:8] + read-write + + + VALID + On writes, indicates whether the write must update the base address of the region identified by the REGION field, updating the MPU_RNR to indicate this new region. + Write: + 0 = MPU_RNR not changed, and the processor: + Updates the base address for the region specified in the MPU_RNR. + Ignores the value of the REGION field. + 1 = The processor: + Updates the value of the MPU_RNR to the value of the REGION field. + Updates the base address for the region specified in the REGION field. + Always reads as zero. + [4:4] + read-write + + + REGION + On writes, specifies the number of the region whose base address to update provided VALID is set written as 1. On reads, returns bits [3:0] of MPU_RNR. + [3:0] + read-write + + + + + MPU_RASR + 0x0000eda0 + Use the MPU Region Attribute and Size Register to define the size, access behaviour and memory type of the region identified by MPU_RNR, and enable that region. + 0x00000000 + + + ATTRS + The MPU Region Attribute field. Use to define the region attribute control. + 28 = XN: Instruction access disable bit: + 0 = Instruction fetches enabled. + 1 = Instruction fetches disabled. + 26:24 = AP: Access permission field + 18 = S: Shareable bit + 17 = C: Cacheable bit + 16 = B: Bufferable bit + [31:16] + read-write + + + SRD + Subregion Disable. For regions of 256 bytes or larger, each bit of this field controls whether one of the eight equal subregions is enabled. + [15:8] + read-write + + + SIZE + Indicates the region size. Region size in bytes = 2^(SIZE+1). The minimum permitted value is 7 (b00111) = 256Bytes + [5:1] + read-write + + + ENABLE + Enables the region. + [0:0] + read-write + + + + + + + SSI + DW_apb_ssi has the following features: + * APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation. + * APB3 and APB4 protocol support. + * Scalable APB data bus width – Supports APB data bus widths of 8, 16, and 32 bits. + * Serial-master or serial-slave operation – Enables serial communication with serial-master or serial-slave peripheral devices. + * Programmable Dual/Quad/Octal SPI support in Master Mode. + * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation. + * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes. + * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes. + * DMA Controller Interface – Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests. + * Independent masking of interrupts – Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently. + * Multi-master contention detection – Informs the processor of multiple serial-master accesses on the serial bus. + * Bypass of meta-stability flip-flops for synchronous clocks – When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains. + * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates. + * Programmable features: + - Serial interface operation – Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire. + - Clock bit-rate – Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation. + - Data Item size (4 to 32 bits) – Item size of each data transfer under the control of the programmer. + * Configured features: + - FIFO depth – 16 words deep. The FIFO width is fixed at 32 bits. + - 1 slave select output. + - Hardware slave-select – Dedicated hardware slave-select line. + - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller. + - Interrupt polarity – active high interrupt lines. + - Serial clock polarity – low serial-clock polarity directly after reset. + - Serial clock phase – capture on first edge of serial-clock directly after reset. + 0x18000000 + + 0 + 252 + registers + + + + CTRLR0 + 0x00000000 + Control register 0 + 0x00000000 + + + SSTE + Slave select toggle enable + [24:24] + read-write + + + SPI_FRF + SPI frame format + [22:21] + read-write + + + STD + 0 + Standard 1-bit SPI frame format; 1 bit per SCK, full-duplex + + + DUAL + 1 + Dual-SPI frame format; two bits per SCK, half-duplex + + + QUAD + 2 + Quad-SPI frame format; four bits per SCK, half-duplex + + + + + DFS_32 + Data frame size in 32b transfer mode + Value of n -> n+1 clocks per frame. + [20:16] + read-write + + + CFS + Control frame size + Value of n -> n+1 clocks per frame. + [15:12] + read-write + + + SRL + Shift register loop (test mode) + [11:11] + read-write + + + SLV_OE + Slave output enable + [10:10] + read-write + + + TMOD + Transfer mode + [9:8] + read-write + + + TX_AND_RX + 0 + Both transmit and receive + + + TX_ONLY + 1 + Transmit only (not for FRF == 0, standard SPI mode) + + + RX_ONLY + 2 + Receive only (not for FRF == 0, standard SPI mode) + + + EEPROM_READ + 3 + EEPROM read mode (TX then RX; RX starts after control data TX'd) + + + + + SCPOL + Serial clock polarity + [7:7] + read-write + + + SCPH + Serial clock phase + [6:6] + read-write + + + FRF + Frame format + [5:4] + read-write + + + DFS + Data frame size + [3:0] + read-write + + + + + CTRLR1 + 0x00000004 + Master Control register 1 + 0x00000000 + + + NDF + Number of data frames + [15:0] + read-write + + + + + SSIENR + 0x00000008 + SSI Enable + 0x00000000 + + + SSI_EN + SSI enable + [0:0] + read-write + + + + + MWCR + 0x0000000c + Microwire Control + 0x00000000 + + + MHS + Microwire handshaking + [2:2] + read-write + + + MDD + Microwire control + [1:1] + read-write + + + MWMOD + Microwire transfer mode + [0:0] + read-write + + + + + SER + 0x00000010 + Slave enable + 0x00000000 + + + SER + For each bit: + 0 -> slave not selected + 1 -> slave selected + [0:0] + read-write + + + + + BAUDR + 0x00000014 + Baud rate + 0x00000000 + + + SCKDV + SSI clock divider + [15:0] + read-write + + + + + TXFTLR + 0x00000018 + TX FIFO threshold level + 0x00000000 + + + TFT + Transmit FIFO threshold + [7:0] + read-write + + + + + RXFTLR + 0x0000001c + RX FIFO threshold level + 0x00000000 + + + RFT + Receive FIFO threshold + [7:0] + read-write + + + + + TXFLR + 0x00000020 + TX FIFO level + 0x00000000 + + + TFTFL + Transmit FIFO level + [7:0] + read-only + + + + + RXFLR + 0x00000024 + RX FIFO level + 0x00000000 + + + RXTFL + Receive FIFO level + [7:0] + read-only + + + + + SR + 0x00000028 + Status register + 0x00000000 + + + DCOL + Data collision error + [6:6] + read-only + + + TXE + Transmission error + [5:5] + read-only + + + RFF + Receive FIFO full + [4:4] + read-only + + + RFNE + Receive FIFO not empty + [3:3] + read-only + + + TFE + Transmit FIFO empty + [2:2] + read-only + + + TFNF + Transmit FIFO not full + [1:1] + read-only + + + BUSY + SSI busy flag + [0:0] + read-only + + + + + IMR + 0x0000002c + Interrupt mask + 0x00000000 + + + MSTIM + Multi-master contention interrupt mask + [5:5] + read-write + + + RXFIM + Receive FIFO full interrupt mask + [4:4] + read-write + + + RXOIM + Receive FIFO overflow interrupt mask + [3:3] + read-write + + + RXUIM + Receive FIFO underflow interrupt mask + [2:2] + read-write + + + TXOIM + Transmit FIFO overflow interrupt mask + [1:1] + read-write + + + TXEIM + Transmit FIFO empty interrupt mask + [0:0] + read-write + + + + + ISR + 0x00000030 + Interrupt status + 0x00000000 + + + MSTIS + Multi-master contention interrupt status + [5:5] + read-only + + + RXFIS + Receive FIFO full interrupt status + [4:4] + read-only + + + RXOIS + Receive FIFO overflow interrupt status + [3:3] + read-only + + + RXUIS + Receive FIFO underflow interrupt status + [2:2] + read-only + + + TXOIS + Transmit FIFO overflow interrupt status + [1:1] + read-only + + + TXEIS + Transmit FIFO empty interrupt status + [0:0] + read-only + + + + + RISR + 0x00000034 + Raw interrupt status + 0x00000000 + + + MSTIR + Multi-master contention raw interrupt status + [5:5] + read-only + + + RXFIR + Receive FIFO full raw interrupt status + [4:4] + read-only + + + RXOIR + Receive FIFO overflow raw interrupt status + [3:3] + read-only + + + RXUIR + Receive FIFO underflow raw interrupt status + [2:2] + read-only + + + TXOIR + Transmit FIFO overflow raw interrupt status + [1:1] + read-only + + + TXEIR + Transmit FIFO empty raw interrupt status + [0:0] + read-only + + + + + TXOICR + 0x00000038 + TX FIFO overflow interrupt clear + 0x00000000 + + + TXOICR + Clear-on-read transmit FIFO overflow interrupt + [0:0] + read-only + + + + + RXOICR + 0x0000003c + RX FIFO overflow interrupt clear + 0x00000000 + + + RXOICR + Clear-on-read receive FIFO overflow interrupt + [0:0] + read-only + + + + + RXUICR + 0x00000040 + RX FIFO underflow interrupt clear + 0x00000000 + + + RXUICR + Clear-on-read receive FIFO underflow interrupt + [0:0] + read-only + + + + + MSTICR + 0x00000044 + Multi-master interrupt clear + 0x00000000 + + + MSTICR + Clear-on-read multi-master contention interrupt + [0:0] + read-only + + + + + ICR + 0x00000048 + Interrupt clear + 0x00000000 + + + ICR + Clear-on-read all active interrupts + [0:0] + read-only + + + + + DMACR + 0x0000004c + DMA control + 0x00000000 + + + TDMAE + Transmit DMA enable + [1:1] + read-write + + + RDMAE + Receive DMA enable + [0:0] + read-write + + + + + DMATDLR + 0x00000050 + DMA TX data level + 0x00000000 + + + DMATDL + Transmit data watermark level + [7:0] + read-write + + + + + DMARDLR + 0x00000054 + DMA RX data level + 0x00000000 + + + DMARDL + Receive data watermark level (DMARDLR+1) + [7:0] + read-write + + + + + IDR + 0x00000058 + Identification register + 0x51535049 + + + IDCODE + Peripheral dentification code + [31:0] + read-only + + + + + SSI_VERSION_ID + 0x0000005c + Version ID + 0x3430312a + + + SSI_COMP_VERSION + SNPS component version (format X.YY) + [31:0] + read-only + + + + + DR0 + 0x00000060 + Data Register 0 (of 36) + 0x00000000 + + + DR + First data register of 36 + [31:0] + read-write + + + + + RX_SAMPLE_DLY + 0x000000f0 + RX sample delay + 0x00000000 + + + RSD + RXD sample delay (in SCLK cycles) + [7:0] + read-write + + + + + SPI_CTRLR0 + 0x000000f4 + SPI control + 0x03000000 + + + XIP_CMD + SPI Command to send in XIP mode (INST_L = 8-bit) or to append to Address (INST_L = 0-bit) + [31:24] + read-write + + + SPI_RXDS_EN + Read data strobe enable + [18:18] + read-write + + + INST_DDR_EN + Instruction DDR transfer enable + [17:17] + read-write + + + SPI_DDR_EN + SPI DDR transfer enable + [16:16] + read-write + + + WAIT_CYCLES + Wait cycles between control frame transmit and data reception (in SCLK cycles) + [15:11] + read-write + + + INST_L + Instruction length (0/4/8/16b) + [9:8] + read-write + + + NONE + 0 + No instruction + + + 4B + 1 + 4-bit instruction + + + 8B + 2 + 8-bit instruction + + + 16B + 3 + 16-bit instruction + + + + + ADDR_L + Address length (0b-60b in 4b increments) + [5:2] + read-write + + + TRANS_TYPE + Address and instruction transfer format + [1:0] + read-write + + + 1C1A + 0 + Command and address both in standard SPI frame format + + + 1C2A + 1 + Command in standard SPI format, address in format specified by FRF + + + 2C2A + 2 + Command and address both in format specified by FRF (e.g. Dual-SPI) + + + + + + + TXD_DRIVE_EDGE + 0x000000f8 + TX drive edge + 0x00000000 + + + TDE + TXD drive edge + [7:0] + read-write + + + + + + + XIP_CTRL + QSPI flash execute-in-place block + 0x14000000 + + 0 + 32 + registers + + + XIP_IRQ + 6 + + + + CTRL + 0x00000000 + Cache control + 0x00000003 + + + POWER_DOWN + 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 to 0, i.e. the cache cannot + be enabled when powered down. + Cache-as-SRAM accesses will produce a bus error response when + the cache is powered down. + [3:3] + read-write + + + ERR_BADWRITE + When 1, writes to any alias other than 0x0 (caching, allocating) + will produce a bus fault. When 0, these writes are silently ignored. + In either case, writes to the 0x0 alias will deallocate on tag match, + as usual. + [1:1] + read-write + + + EN + When 1, enable the cache. When the cache is disabled, all XIP accesses + will go straight to the flash, without querying the cache. When enabled, + cacheable XIP accesses will query the cache, and the flash will + not be accessed if the tag matches and the valid bit is set. + + If the cache is enabled, cache-as-SRAM accesses have no effect on the + cache data RAM, and will produce a bus error response. + [0:0] + read-write + + + + + FLUSH + 0x00000004 + Cache Flush control + 0x00000000 + + + FLUSH + Write 1 to flush the cache. This clears the tag memory, but + the data memory retains its contents. (This means cache-as-SRAM + contents is not affected by flush or reset.) + Reading will hold the bus (stall the processor) until the flush + completes. Alternatively STAT can be polled until completion. + [0:0] + write-only + + + + + STAT + 0x00000008 + Cache Status + 0x00000002 + + + FIFO_FULL + 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. + [2:2] + read-only + + + FIFO_EMPTY + When 1, indicates the XIP streaming FIFO is completely empty. + [1:1] + read-only + + + FLUSH_READY + Reads as 0 while a cache flush is in progress, and 1 otherwise. + The cache is flushed whenever the XIP block is reset, and also + when requested via the FLUSH register. + [0:0] + read-only + + + + + CTR_HIT + 0x0000000c + Cache Hit counter + 0x00000000 + + + CTR_HIT + 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. + [31:0] + read-write + oneToClear + + + + + CTR_ACC + 0x00000010 + Cache Access counter + 0x00000000 + + + CTR_ACC + 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. + [31:0] + read-write + oneToClear + + + + + STREAM_ADDR + 0x00000014 + FIFO stream address + 0x00000000 + + + STREAM_ADDR + 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. + [31:2] + read-write + + + + + STREAM_CTR + 0x00000018 + FIFO stream control + 0x00000000 + + + STREAM_CTR + 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) + [21:0] + read-write + + + + + STREAM_FIFO + 0x0000001c + FIFO stream data + 0x00000000 + + + STREAM_FIFO + 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. + [31:0] + read-only + modify + + + + + + + SYSCFG + Register block for various chip control signals + 0x40004000 + + 0 + 28 + registers + + + + PROC0_NMI_MASK + 0x00000000 + Processor core 0 NMI source mask + 0x00000000 + + + PROC0_NMI_MASK + Set a bit high to enable NMI from that IRQ + [31:0] + read-write + + + + + PROC1_NMI_MASK + 0x00000004 + Processor core 1 NMI source mask + 0x00000000 + + + PROC1_NMI_MASK + Set a bit high to enable NMI from that IRQ + [31:0] + read-write + + + + + PROC_CONFIG + 0x00000008 + Configuration for processors + 0x10000000 + + + PROC1_DAP_INSTID + Configure proc1 DAP instance ID. + Recommend that this is NOT changed until you require debug access in multi-chip environment + WARNING: do not set to 15 as this is reserved for RescueDP + [31:28] + read-write + + + PROC0_DAP_INSTID + Configure proc0 DAP instance ID. + Recommend that this is NOT changed until you require debug access in multi-chip environment + WARNING: do not set to 15 as this is reserved for RescueDP + [27:24] + read-write + + + PROC1_HALTED + Indication that proc1 has halted + [1:1] + read-only + + + PROC0_HALTED + Indication that proc0 has halted + [0:0] + read-only + + + + + PROC_IN_SYNC_BYPASS + 0x0000000c + 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...29. + 0x00000000 + + + PROC_IN_SYNC_BYPASS + [29:0] + read-write + + + + + PROC_IN_SYNC_BYPASS_HI + 0x00000010 + 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 30...35 (the QSPI IOs). + 0x00000000 + + + PROC_IN_SYNC_BYPASS_HI + [5:0] + read-write + + + + + DBGFORCE + 0x00000014 + Directly control the SWD debug port of either processor + 0x00000066 + + + PROC1_ATTACH + Attach processor 1 debug port to syscfg controls, and disconnect it from external SWD pads. + [7:7] + read-write + + + PROC1_SWCLK + Directly drive processor 1 SWCLK, if PROC1_ATTACH is set + [6:6] + read-write + + + PROC1_SWDI + Directly drive processor 1 SWDIO input, if PROC1_ATTACH is set + [5:5] + read-write + + + PROC1_SWDO + Observe the value of processor 1 SWDIO output. + [4:4] + read-only + + + PROC0_ATTACH + Attach processor 0 debug port to syscfg controls, and disconnect it from external SWD pads. + [3:3] + read-write + + + PROC0_SWCLK + Directly drive processor 0 SWCLK, if PROC0_ATTACH is set + [2:2] + read-write + + + PROC0_SWDI + Directly drive processor 0 SWDIO input, if PROC0_ATTACH is set + [1:1] + read-write + + + PROC0_SWDO + Observe the value of processor 0 SWDIO output. + [0:0] + read-only + + + + + MEMPOWERDOWN + 0x00000018 + Control power downs to memories. Set high to power down memories. + Use with extreme caution + 0x00000000 + + + ROM + [7:7] + read-write + + + USB + [6:6] + read-write + + + SRAM5 + [5:5] + read-write + + + SRAM4 + [4:4] + read-write + + + SRAM3 + [3:3] + read-write + + + SRAM2 + [2:2] + read-write + + + SRAM1 + [1:1] + read-write + + + SRAM0 + [0:0] + read-write + + + + + + + XOSC + Controls the crystal oscillator + 0x40024000 + + 0 + 32 + registers + + + + CTRL + 0x00000000 + Crystal Oscillator Control + 0x00000000 + + + ENABLE + 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 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 enable the oscillator. + [23:12] + read-write + + + DISABLE + 3358 + + + ENABLE + 4011 + + + + + FREQ_RANGE + Frequency range. An invalid setting will retain the previous value. The actual value being used can be read from STATUS_FREQ_RANGE. This resets to 0xAA0 and cannot be changed. + [11:0] + read-write + + + 1_15MHZ + 2720 + + + RESERVED_1 + 2721 + + + RESERVED_2 + 2722 + + + RESERVED_3 + 2723 + + + + + + + STATUS + 0x00000004 + Crystal Oscillator Status + 0x00000000 + + + STABLE + Oscillator is running and stable + [31:31] + read-only + + + BADWRITE + An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT + [24:24] + read-write + oneToClear + + + ENABLED + Oscillator is enabled but not necessarily running and stable, resets to 0 + [12:12] + read-only + + + FREQ_RANGE + The current frequency range setting, always reads 0 + [1:0] + read-only + + + 1_15MHZ + 0 + + + RESERVED_1 + 1 + + + RESERVED_2 + 2 + + + RESERVED_3 + 3 + + + + + + + DORMANT + 0x00000008 + Crystal Oscillator pause control + 0x00000000 + + + DORMANT + 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 + [31:0] + read-write + + + dormant + 1668246881 + + + WAKE + 2002873189 + + + + + + + STARTUP + 0x0000000c + Controls the startup delay + 0x00000000 + + + X4 + Multiplies the startup_delay by 4. This is of little value to the user given that the delay can be programmed directly. + [20:20] + read-write + + + DELAY + in multiples of 256*xtal_period. The reset value of 0xc4 corresponds to approx 50 000 cycles. + [13:0] + read-write + + + + + COUNT + 0x0000001c + A down counter running at the xosc 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. + 0x00000000 + + + COUNT + [7:0] + read-write + + + + + + + PLL_SYS + 0x40028000 + + 0 + 16 + registers + + + + CS + 0x00000000 + Control and Status + GENERAL CONSTRAINTS: + Reference clock frequency min=5MHz, max=800MHz + Feedback divider min=16, max=320 + VCO frequency min=750MHz, max=1600MHz + 0x00000001 + + + LOCK + PLL is locked + [31:31] + read-only + + + BYPASS + 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. + [8:8] + read-write + + + REFDIV + 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. + [5:0] + read-write + + + + + PWR + 0x00000004 + Controls the PLL power modes. + 0x0000002d + + + VCOPD + PLL VCO powerdown + To save power set high when PLL output not required or bypass=1. + [5:5] + read-write + + + POSTDIVPD + PLL post divider powerdown + To save power set high when PLL output not required or bypass=1. + [3:3] + read-write + + + DSMPD + PLL DSM powerdown + Nothing is achieved by setting this low. + [2:2] + read-write + + + PD + PLL powerdown + To save power set high when PLL output not required. + [0:0] + read-write + + + + + FBDIV_INT + 0x00000008 + Feedback divisor + (note: this PLL does not support fractional division) + 0x00000000 + + + FBDIV_INT + see ctrl reg description for constraints + [11:0] + read-write + + + + + PRIM + 0x0000000c + 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 + 0x00077000 + + + POSTDIV1 + divide by 1-7 + [18:16] + read-write + + + POSTDIV2 + divide by 1-7 + [14:12] + read-write + + + + + + + PLL_USB + 0x4002c000 + + + UART0 + 0x40034000 + + 0 + 4096 + registers + + + UART0_IRQ + 20 + + + + UARTDR + 0x00000000 + Data Register, UARTDR + 0x00000000 + + + OE + 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. + [11:11] + read-only + + + BE + 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. + [10:10] + read-only + + + PE + 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. + [9:9] + read-only + + + FE + 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. + [8:8] + read-only + + + DATA + Receive (read) data character. Transmit (write) data character. + [7:0] + read-write + modify + + + + + UARTRSR + 0x00000004 + Receive Status Register/Error Clear Register, UARTRSR/UARTECR + 0x00000000 + + + OE + 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. + [3:3] + read-write + oneToClear + + + BE + 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. + [2:2] + read-write + oneToClear + + + PE + 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. + [1:1] + read-write + oneToClear + + + FE + 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. + [0:0] + read-write + oneToClear + + + + + UARTFR + 0x00000018 + Flag Register, UARTFR + 0x00000090 + + + RI + 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. + [8:8] + read-only + + + TXFE + 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. + [7:7] + read-only + + + RXFF + 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. + [6:6] + read-only + + + TXFF + 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. + [5:5] + read-only + + + RXFE + 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. + [4:4] + read-only + + + BUSY + 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. + [3:3] + read-only + + + DCD + 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. + [2:2] + read-only + + + DSR + 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. + [1:1] + read-only + + + CTS + 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. + [0:0] + read-only + + + + + UARTILPR + 0x00000020 + IrDA Low-Power Counter Register, UARTILPR + 0x00000000 + + + ILPDVSR + 8-bit low-power divisor value. These bits are cleared to 0 at reset. + [7:0] + read-write + + + + + UARTIBRD + 0x00000024 + Integer Baud Rate Register, UARTIBRD + 0x00000000 + + + BAUD_DIVINT + The integer baud rate divisor. These bits are cleared to 0 on reset. + [15:0] + read-write + + + + + UARTFBRD + 0x00000028 + Fractional Baud Rate Register, UARTFBRD + 0x00000000 + + + BAUD_DIVFRAC + The fractional baud rate divisor. These bits are cleared to 0 on reset. + [5:0] + read-write + + + + + UARTLCR_H + 0x0000002c + Line Control Register, UARTLCR_H + 0x00000000 + + + SPS + 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. + [7:7] + read-write + + + WLEN + 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. + [6:5] + read-write + + + FEN + 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). + [4:4] + read-write + + + STP2 + 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. + [3:3] + read-write + + + EPS + 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. + [2:2] + read-write + + + PEN + Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled. + [1:1] + read-write + + + BRK + 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. + [0:0] + read-write + + + + + UARTCR + 0x00000030 + Control Register, UARTCR + 0x00000300 + + + CTSEN + 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. + [15:15] + read-write + + + RTSEN + 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. + [14:14] + read-write + + + OUT2 + 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). + [13:13] + read-write + + + OUT1 + 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). + [12:12] + read-write + + + RTS + 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. + [11:11] + read-write + + + DTR + 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. + [10:10] + read-write + + + RXE + 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. + [9:9] + read-write + + + TXE + 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. + [8:8] + read-write + + + LBE + 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. + [7:7] + read-write + + + SIRLP + 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. + [2:2] + read-write + + + SIREN + 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. + [1:1] + read-write + + + UARTEN + 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. + [0:0] + read-write + + + + + UARTIFLS + 0x00000034 + Interrupt FIFO Level Select Register, UARTIFLS + 0x00000012 + + + RXIFLSEL + 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. + [5:3] + read-write + + + TXIFLSEL + 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. + [2:0] + read-write + + + + + UARTIMSC + 0x00000038 + Interrupt Mask Set/Clear Register, UARTIMSC + 0x00000000 + + + OEIM + 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. + [10:10] + read-write + + + BEIM + 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. + [9:9] + read-write + + + PEIM + 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. + [8:8] + read-write + + + FEIM + 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. + [7:7] + read-write + + + RTIM + 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. + [6:6] + read-write + + + TXIM + 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. + [5:5] + read-write + + + RXIM + 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. + [4:4] + read-write + + + DSRMIM + 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. + [3:3] + read-write + + + DCDMIM + 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. + [2:2] + read-write + + + CTSMIM + 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. + [1:1] + read-write + + + RIMIM + 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. + [0:0] + read-write + + + + + UARTRIS + 0x0000003c + Raw Interrupt Status Register, UARTRIS + 0x00000000 + + + OERIS + Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt. + [10:10] + read-only + + + BERIS + Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt. + [9:9] + read-only + + + PERIS + Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt. + [8:8] + read-only + + + FERIS + Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt. + [7:7] + read-only + + + RTRIS + Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a + [6:6] + read-only + + + TXRIS + Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt. + [5:5] + read-only + + + RXRIS + Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt. + [4:4] + read-only + + + DSRRMIS + nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt. + [3:3] + read-only + + + DCDRMIS + nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt. + [2:2] + read-only + + + CTSRMIS + nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt. + [1:1] + read-only + + + RIRMIS + nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt. + [0:0] + read-only + + + + + UARTMIS + 0x00000040 + Masked Interrupt Status Register, UARTMIS + 0x00000000 + + + OEMIS + Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt. + [10:10] + read-only + + + BEMIS + Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt. + [9:9] + read-only + + + PEMIS + Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt. + [8:8] + read-only + + + FEMIS + Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt. + [7:7] + read-only + + + RTMIS + Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt. + [6:6] + read-only + + + TXMIS + Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt. + [5:5] + read-only + + + RXMIS + Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt. + [4:4] + read-only + + + DSRMMIS + nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt. + [3:3] + read-only + + + DCDMMIS + nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt. + [2:2] + read-only + + + CTSMMIS + nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt. + [1:1] + read-only + + + RIMMIS + nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt. + [0:0] + read-only + + + + + UARTICR + 0x00000044 + Interrupt Clear Register, UARTICR + 0x00000000 + + + OEIC + Overrun error interrupt clear. Clears the UARTOEINTR interrupt. + [10:10] + read-write + oneToClear + + + BEIC + Break error interrupt clear. Clears the UARTBEINTR interrupt. + [9:9] + read-write + oneToClear + + + PEIC + Parity error interrupt clear. Clears the UARTPEINTR interrupt. + [8:8] + read-write + oneToClear + + + FEIC + Framing error interrupt clear. Clears the UARTFEINTR interrupt. + [7:7] + read-write + oneToClear + + + RTIC + Receive timeout interrupt clear. Clears the UARTRTINTR interrupt. + [6:6] + read-write + oneToClear + + + TXIC + Transmit interrupt clear. Clears the UARTTXINTR interrupt. + [5:5] + read-write + oneToClear + + + RXIC + Receive interrupt clear. Clears the UARTRXINTR interrupt. + [4:4] + read-write + oneToClear + + + DSRMIC + nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt. + [3:3] + read-write + oneToClear + + + DCDMIC + nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt. + [2:2] + read-write + oneToClear + + + CTSMIC + nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt. + [1:1] + read-write + oneToClear + + + RIMIC + nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt. + [0:0] + read-write + oneToClear + + + + + UARTDMACR + 0x00000048 + DMA Control Register, UARTDMACR + 0x00000000 + + + DMAONERR + 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. + [2:2] + read-write + + + TXDMAE + Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. + [1:1] + read-write + + + RXDMAE + Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled. + [0:0] + read-write + + + + + UARTPERIPHID0 + 0x00000fe0 + UARTPeriphID0 Register + 0x00000011 + + + PARTNUMBER0 + These bits read back as 0x11 + [7:0] + read-only + + + + + UARTPERIPHID1 + 0x00000fe4 + UARTPeriphID1 Register + 0x00000010 + + + DESIGNER0 + These bits read back as 0x1 + [7:4] + read-only + + + PARTNUMBER1 + These bits read back as 0x0 + [3:0] + read-only + + + + + UARTPERIPHID2 + 0x00000fe8 + UARTPeriphID2 Register + 0x00000034 + + + REVISION + This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3 + [7:4] + read-only + + + DESIGNER1 + These bits read back as 0x4 + [3:0] + read-only + + + + + UARTPERIPHID3 + 0x00000fec + UARTPeriphID3 Register + 0x00000000 + + + CONFIGURATION + These bits read back as 0x00 + [7:0] + read-only + + + + + UARTPCELLID0 + 0x00000ff0 + UARTPCellID0 Register + 0x0000000d + + + UARTPCELLID0 + These bits read back as 0x0D + [7:0] + read-only + + + + + UARTPCELLID1 + 0x00000ff4 + UARTPCellID1 Register + 0x000000f0 + + + UARTPCELLID1 + These bits read back as 0xF0 + [7:0] + read-only + + + + + UARTPCELLID2 + 0x00000ff8 + UARTPCellID2 Register + 0x00000005 + + + UARTPCELLID2 + These bits read back as 0x05 + [7:0] + read-only + + + + + UARTPCELLID3 + 0x00000ffc + UARTPCellID3 Register + 0x000000b1 + + + UARTPCELLID3 + These bits read back as 0xB1 + [7:0] + read-only + + + + + + + UART1 + 0x40038000 + + UART1_IRQ + 21 + + + + ROSC + 0x40060000 + + 0 + 36 + registers + + + + CTRL + 0x00000000 + Ring Oscillator control + 0x00000aa0 + + + ENABLE + 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. + [23:12] + read-write + + + DISABLE + 3358 + + + ENABLE + 4011 + + + + + FREQ_RANGE + 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 + [11:0] + read-write + + + LOW + 4004 + + + MEDIUM + 4005 + + + HIGH + 4007 + + + TOOHIGH + 4006 + + + + + + + FREQA + 0x00000004 + 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 + 0x00000000 + + + PASSWD + Set to 0x9696 to apply the settings + Any other value in this field will set all drive strengths to 0 + [31:16] + read-write + + + PASS + 38550 + + + + + DS3 + Stage 3 drive strength + [14:12] + read-write + + + DS2 + Stage 2 drive strength + [10:8] + read-write + + + DS1 + Stage 1 drive strength + [6:4] + read-write + + + DS0 + Stage 0 drive strength + [2:0] + read-write + + + + + FREQB + 0x00000008 + For a detailed description see freqa register + 0x00000000 + + + PASSWD + Set to 0x9696 to apply the settings + Any other value in this field will set all drive strengths to 0 + [31:16] + read-write + + + PASS + 38550 + + + + + DS7 + Stage 7 drive strength + [14:12] + read-write + + + DS6 + Stage 6 drive strength + [10:8] + read-write + + + DS5 + Stage 5 drive strength + [6:4] + read-write + + + DS4 + Stage 4 drive strength + [2:0] + read-write + + + + + DORMANT + 0x0000000c + Ring Oscillator pause control + 0x00000000 + + + DORMANT + 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 + [31:0] + read-write + + + dormant + 1668246881 + + + WAKE + 2002873189 + + + + + + + DIV + 0x00000010 + Controls the output divider + 0x00000000 + + + DIV + set to 0xaa0 + div where + div = 0 divides by 32 + div = 1-31 divides by div + any other value sets div=31 + this register resets to div=16 + [11:0] + read-write + + + PASS + 2720 + + + + + + + PHASE + 0x00000014 + Controls the phase shifted output + 0x00000008 + + + PASSWD + set to 0xaa + any other value enables the output with shift=0 + [11:4] + read-write + + + ENABLE + enable the phase-shifted output + this can be changed on-the-fly + [3:3] + read-write + + + FLIP + invert the phase-shifted output + this is ignored when div=1 + [2:2] + read-write + + + SHIFT + 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 + [1:0] + read-write + + + + + STATUS + 0x00000018 + Ring Oscillator Status + 0x00000000 + + + STABLE + Oscillator is running and stable + [31:31] + read-only + + + BADWRITE + An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT + [24:24] + read-write + oneToClear + + + DIV_RUNNING + post-divider is running + this resets to 0 but transitions to 1 during chip startup + [16:16] + read-only + + + ENABLED + Oscillator is enabled but not necessarily running and stable + this resets to 0 but transitions to 1 during chip startup + [12:12] + read-only + + + + + RANDOMBIT + 0x0000001c + 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 + 0x00000001 + + + RANDOMBIT + [0:0] + read-only + + + + + COUNT + 0x00000020 + 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. + 0x00000000 + + + COUNT + [7:0] + read-write + + + + + + + WATCHDOG + 0x40058000 + + 0 + 48 + registers + + + + CTRL + 0x00000000 + Watchdog control + The rst_wdsel register determines which subsystems are reset when the watchdog is triggered. + The watchdog can be triggered in software. + 0x07000000 + + + TRIGGER + Trigger a watchdog reset + [31:31] + write-only + + + ENABLE + When not enabled the watchdog timer is paused + [30:30] + read-write + + + PAUSE_DBG1 + Pause the watchdog timer when processor 1 is in debug mode + [26:26] + read-write + + + PAUSE_DBG0 + Pause the watchdog timer when processor 0 is in debug mode + [25:25] + read-write + + + PAUSE_JTAG + Pause the watchdog timer when JTAG is accessing the bus fabric + [24:24] + read-write + + + TIME + Indicates the number of ticks / 2 (see errata RP2040-E1) before a watchdog reset will be triggered + [23:0] + read-only + + + + + LOAD + 0x00000004 + Load the watchdog timer. The maximum setting is 0xffffff which corresponds to 0xffffff / 2 ticks before triggering a watchdog reset (see errata RP2040-E1). + 0x00000000 + + + LOAD + [23:0] + write-only + + + + + REASON + 0x00000008 + Logs the reason for the last reset. Both bits are zero for the case of a hardware reset. + 0x00000000 + + + FORCE + [1:1] + read-only + + + TIMER + [0:0] + read-only + + + + + SCRATCH0 + 0x0000000c + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH0 + [31:0] + read-write + + + + + SCRATCH1 + 0x00000010 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH1 + [31:0] + read-write + + + + + SCRATCH2 + 0x00000014 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH2 + [31:0] + read-write + + + + + SCRATCH3 + 0x00000018 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH3 + [31:0] + read-write + + + + + SCRATCH4 + 0x0000001c + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH4 + [31:0] + read-write + + + + + SCRATCH5 + 0x00000020 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH5 + [31:0] + read-write + + + + + SCRATCH6 + 0x00000024 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH6 + [31:0] + read-write + + + + + SCRATCH7 + 0x00000028 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH7 + [31:0] + read-write + + + + + TICK + 0x0000002c + Controls the tick generator + 0x00000200 + + + COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [19:11] + read-only + + + RUNNING + Is the tick generator running? + [10:10] + read-only + + + ENABLE + start / stop tick generation + [9:9] + read-write + + + CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + + + DMA + DMA with separate read and write masters + 0x50000000 + + 0 + 2760 + registers + + + DMA_IRQ_0 + 11 + + + DMA_IRQ_1 + 12 + + + + CH0_READ_ADDR + 0x00000000 + DMA Channel 0 Read Address pointer + 0x00000000 + + + CH0_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH0_WRITE_ADDR + 0x00000004 + DMA Channel 0 Write Address pointer + 0x00000000 + + + CH0_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH0_TRANS_COUNT + 0x00000008 + DMA Channel 0 Transfer Count + 0x00000000 + + + CH0_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH0_CTRL_TRIG + 0x0000000c + DMA Channel 0 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH0_AL1_CTRL + 0x00000010 + Alias for channel 0 CTRL register + 0x00000000 + + + CH0_AL1_CTRL + [31:0] + read-write + + + + + CH0_AL1_READ_ADDR + 0x00000014 + Alias for channel 0 READ_ADDR register + 0x00000000 + + + CH0_AL1_READ_ADDR + [31:0] + read-write + + + + + CH0_AL1_WRITE_ADDR + 0x00000018 + Alias for channel 0 WRITE_ADDR register + 0x00000000 + + + CH0_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH0_AL1_TRANS_COUNT_TRIG + 0x0000001c + 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. + 0x00000000 + + + CH0_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH0_AL2_CTRL + 0x00000020 + Alias for channel 0 CTRL register + 0x00000000 + + + CH0_AL2_CTRL + [31:0] + read-write + + + + + CH0_AL2_TRANS_COUNT + 0x00000024 + Alias for channel 0 TRANS_COUNT register + 0x00000000 + + + CH0_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH0_AL2_READ_ADDR + 0x00000028 + Alias for channel 0 READ_ADDR register + 0x00000000 + + + CH0_AL2_READ_ADDR + [31:0] + read-write + + + + + CH0_AL2_WRITE_ADDR_TRIG + 0x0000002c + 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. + 0x00000000 + + + CH0_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH0_AL3_CTRL + 0x00000030 + Alias for channel 0 CTRL register + 0x00000000 + + + CH0_AL3_CTRL + [31:0] + read-write + + + + + CH0_AL3_WRITE_ADDR + 0x00000034 + Alias for channel 0 WRITE_ADDR register + 0x00000000 + + + CH0_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH0_AL3_TRANS_COUNT + 0x00000038 + Alias for channel 0 TRANS_COUNT register + 0x00000000 + + + CH0_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH0_AL3_READ_ADDR_TRIG + 0x0000003c + 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. + 0x00000000 + + + CH0_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH1_READ_ADDR + 0x00000040 + DMA Channel 1 Read Address pointer + 0x00000000 + + + CH1_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH1_WRITE_ADDR + 0x00000044 + DMA Channel 1 Write Address pointer + 0x00000000 + + + CH1_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH1_TRANS_COUNT + 0x00000048 + DMA Channel 1 Transfer Count + 0x00000000 + + + CH1_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH1_CTRL_TRIG + 0x0000004c + DMA Channel 1 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH1_AL1_CTRL + 0x00000050 + Alias for channel 1 CTRL register + 0x00000000 + + + CH1_AL1_CTRL + [31:0] + read-write + + + + + CH1_AL1_READ_ADDR + 0x00000054 + Alias for channel 1 READ_ADDR register + 0x00000000 + + + CH1_AL1_READ_ADDR + [31:0] + read-write + + + + + CH1_AL1_WRITE_ADDR + 0x00000058 + Alias for channel 1 WRITE_ADDR register + 0x00000000 + + + CH1_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH1_AL1_TRANS_COUNT_TRIG + 0x0000005c + Alias for channel 1 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH1_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH1_AL2_CTRL + 0x00000060 + Alias for channel 1 CTRL register + 0x00000000 + + + CH1_AL2_CTRL + [31:0] + read-write + + + + + CH1_AL2_TRANS_COUNT + 0x00000064 + Alias for channel 1 TRANS_COUNT register + 0x00000000 + + + CH1_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH1_AL2_READ_ADDR + 0x00000068 + Alias for channel 1 READ_ADDR register + 0x00000000 + + + CH1_AL2_READ_ADDR + [31:0] + read-write + + + + + CH1_AL2_WRITE_ADDR_TRIG + 0x0000006c + Alias for channel 1 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH1_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH1_AL3_CTRL + 0x00000070 + Alias for channel 1 CTRL register + 0x00000000 + + + CH1_AL3_CTRL + [31:0] + read-write + + + + + CH1_AL3_WRITE_ADDR + 0x00000074 + Alias for channel 1 WRITE_ADDR register + 0x00000000 + + + CH1_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH1_AL3_TRANS_COUNT + 0x00000078 + Alias for channel 1 TRANS_COUNT register + 0x00000000 + + + CH1_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH1_AL3_READ_ADDR_TRIG + 0x0000007c + Alias for channel 1 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH1_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH2_READ_ADDR + 0x00000080 + DMA Channel 2 Read Address pointer + 0x00000000 + + + CH2_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH2_WRITE_ADDR + 0x00000084 + DMA Channel 2 Write Address pointer + 0x00000000 + + + CH2_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH2_TRANS_COUNT + 0x00000088 + DMA Channel 2 Transfer Count + 0x00000000 + + + CH2_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH2_CTRL_TRIG + 0x0000008c + DMA Channel 2 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH2_AL1_CTRL + 0x00000090 + Alias for channel 2 CTRL register + 0x00000000 + + + CH2_AL1_CTRL + [31:0] + read-write + + + + + CH2_AL1_READ_ADDR + 0x00000094 + Alias for channel 2 READ_ADDR register + 0x00000000 + + + CH2_AL1_READ_ADDR + [31:0] + read-write + + + + + CH2_AL1_WRITE_ADDR + 0x00000098 + Alias for channel 2 WRITE_ADDR register + 0x00000000 + + + CH2_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH2_AL1_TRANS_COUNT_TRIG + 0x0000009c + Alias for channel 2 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH2_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH2_AL2_CTRL + 0x000000a0 + Alias for channel 2 CTRL register + 0x00000000 + + + CH2_AL2_CTRL + [31:0] + read-write + + + + + CH2_AL2_TRANS_COUNT + 0x000000a4 + Alias for channel 2 TRANS_COUNT register + 0x00000000 + + + CH2_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH2_AL2_READ_ADDR + 0x000000a8 + Alias for channel 2 READ_ADDR register + 0x00000000 + + + CH2_AL2_READ_ADDR + [31:0] + read-write + + + + + CH2_AL2_WRITE_ADDR_TRIG + 0x000000ac + Alias for channel 2 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH2_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH2_AL3_CTRL + 0x000000b0 + Alias for channel 2 CTRL register + 0x00000000 + + + CH2_AL3_CTRL + [31:0] + read-write + + + + + CH2_AL3_WRITE_ADDR + 0x000000b4 + Alias for channel 2 WRITE_ADDR register + 0x00000000 + + + CH2_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH2_AL3_TRANS_COUNT + 0x000000b8 + Alias for channel 2 TRANS_COUNT register + 0x00000000 + + + CH2_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH2_AL3_READ_ADDR_TRIG + 0x000000bc + Alias for channel 2 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH2_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH3_READ_ADDR + 0x000000c0 + DMA Channel 3 Read Address pointer + 0x00000000 + + + CH3_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH3_WRITE_ADDR + 0x000000c4 + DMA Channel 3 Write Address pointer + 0x00000000 + + + CH3_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH3_TRANS_COUNT + 0x000000c8 + DMA Channel 3 Transfer Count + 0x00000000 + + + CH3_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH3_CTRL_TRIG + 0x000000cc + DMA Channel 3 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH3_AL1_CTRL + 0x000000d0 + Alias for channel 3 CTRL register + 0x00000000 + + + CH3_AL1_CTRL + [31:0] + read-write + + + + + CH3_AL1_READ_ADDR + 0x000000d4 + Alias for channel 3 READ_ADDR register + 0x00000000 + + + CH3_AL1_READ_ADDR + [31:0] + read-write + + + + + CH3_AL1_WRITE_ADDR + 0x000000d8 + Alias for channel 3 WRITE_ADDR register + 0x00000000 + + + CH3_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH3_AL1_TRANS_COUNT_TRIG + 0x000000dc + Alias for channel 3 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH3_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH3_AL2_CTRL + 0x000000e0 + Alias for channel 3 CTRL register + 0x00000000 + + + CH3_AL2_CTRL + [31:0] + read-write + + + + + CH3_AL2_TRANS_COUNT + 0x000000e4 + Alias for channel 3 TRANS_COUNT register + 0x00000000 + + + CH3_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH3_AL2_READ_ADDR + 0x000000e8 + Alias for channel 3 READ_ADDR register + 0x00000000 + + + CH3_AL2_READ_ADDR + [31:0] + read-write + + + + + CH3_AL2_WRITE_ADDR_TRIG + 0x000000ec + Alias for channel 3 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH3_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH3_AL3_CTRL + 0x000000f0 + Alias for channel 3 CTRL register + 0x00000000 + + + CH3_AL3_CTRL + [31:0] + read-write + + + + + CH3_AL3_WRITE_ADDR + 0x000000f4 + Alias for channel 3 WRITE_ADDR register + 0x00000000 + + + CH3_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH3_AL3_TRANS_COUNT + 0x000000f8 + Alias for channel 3 TRANS_COUNT register + 0x00000000 + + + CH3_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH3_AL3_READ_ADDR_TRIG + 0x000000fc + Alias for channel 3 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH3_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH4_READ_ADDR + 0x00000100 + DMA Channel 4 Read Address pointer + 0x00000000 + + + CH4_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH4_WRITE_ADDR + 0x00000104 + DMA Channel 4 Write Address pointer + 0x00000000 + + + CH4_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH4_TRANS_COUNT + 0x00000108 + DMA Channel 4 Transfer Count + 0x00000000 + + + CH4_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH4_CTRL_TRIG + 0x0000010c + DMA Channel 4 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH4_AL1_CTRL + 0x00000110 + Alias for channel 4 CTRL register + 0x00000000 + + + CH4_AL1_CTRL + [31:0] + read-write + + + + + CH4_AL1_READ_ADDR + 0x00000114 + Alias for channel 4 READ_ADDR register + 0x00000000 + + + CH4_AL1_READ_ADDR + [31:0] + read-write + + + + + CH4_AL1_WRITE_ADDR + 0x00000118 + Alias for channel 4 WRITE_ADDR register + 0x00000000 + + + CH4_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH4_AL1_TRANS_COUNT_TRIG + 0x0000011c + Alias for channel 4 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH4_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH4_AL2_CTRL + 0x00000120 + Alias for channel 4 CTRL register + 0x00000000 + + + CH4_AL2_CTRL + [31:0] + read-write + + + + + CH4_AL2_TRANS_COUNT + 0x00000124 + Alias for channel 4 TRANS_COUNT register + 0x00000000 + + + CH4_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH4_AL2_READ_ADDR + 0x00000128 + Alias for channel 4 READ_ADDR register + 0x00000000 + + + CH4_AL2_READ_ADDR + [31:0] + read-write + + + + + CH4_AL2_WRITE_ADDR_TRIG + 0x0000012c + Alias for channel 4 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH4_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH4_AL3_CTRL + 0x00000130 + Alias for channel 4 CTRL register + 0x00000000 + + + CH4_AL3_CTRL + [31:0] + read-write + + + + + CH4_AL3_WRITE_ADDR + 0x00000134 + Alias for channel 4 WRITE_ADDR register + 0x00000000 + + + CH4_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH4_AL3_TRANS_COUNT + 0x00000138 + Alias for channel 4 TRANS_COUNT register + 0x00000000 + + + CH4_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH4_AL3_READ_ADDR_TRIG + 0x0000013c + Alias for channel 4 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH4_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH5_READ_ADDR + 0x00000140 + DMA Channel 5 Read Address pointer + 0x00000000 + + + CH5_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH5_WRITE_ADDR + 0x00000144 + DMA Channel 5 Write Address pointer + 0x00000000 + + + CH5_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH5_TRANS_COUNT + 0x00000148 + DMA Channel 5 Transfer Count + 0x00000000 + + + CH5_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH5_CTRL_TRIG + 0x0000014c + DMA Channel 5 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH5_AL1_CTRL + 0x00000150 + Alias for channel 5 CTRL register + 0x00000000 + + + CH5_AL1_CTRL + [31:0] + read-write + + + + + CH5_AL1_READ_ADDR + 0x00000154 + Alias for channel 5 READ_ADDR register + 0x00000000 + + + CH5_AL1_READ_ADDR + [31:0] + read-write + + + + + CH5_AL1_WRITE_ADDR + 0x00000158 + Alias for channel 5 WRITE_ADDR register + 0x00000000 + + + CH5_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH5_AL1_TRANS_COUNT_TRIG + 0x0000015c + Alias for channel 5 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH5_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH5_AL2_CTRL + 0x00000160 + Alias for channel 5 CTRL register + 0x00000000 + + + CH5_AL2_CTRL + [31:0] + read-write + + + + + CH5_AL2_TRANS_COUNT + 0x00000164 + Alias for channel 5 TRANS_COUNT register + 0x00000000 + + + CH5_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH5_AL2_READ_ADDR + 0x00000168 + Alias for channel 5 READ_ADDR register + 0x00000000 + + + CH5_AL2_READ_ADDR + [31:0] + read-write + + + + + CH5_AL2_WRITE_ADDR_TRIG + 0x0000016c + Alias for channel 5 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH5_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH5_AL3_CTRL + 0x00000170 + Alias for channel 5 CTRL register + 0x00000000 + + + CH5_AL3_CTRL + [31:0] + read-write + + + + + CH5_AL3_WRITE_ADDR + 0x00000174 + Alias for channel 5 WRITE_ADDR register + 0x00000000 + + + CH5_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH5_AL3_TRANS_COUNT + 0x00000178 + Alias for channel 5 TRANS_COUNT register + 0x00000000 + + + CH5_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH5_AL3_READ_ADDR_TRIG + 0x0000017c + Alias for channel 5 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH5_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH6_READ_ADDR + 0x00000180 + DMA Channel 6 Read Address pointer + 0x00000000 + + + CH6_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH6_WRITE_ADDR + 0x00000184 + DMA Channel 6 Write Address pointer + 0x00000000 + + + CH6_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH6_TRANS_COUNT + 0x00000188 + DMA Channel 6 Transfer Count + 0x00000000 + + + CH6_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH6_CTRL_TRIG + 0x0000018c + DMA Channel 6 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH6_AL1_CTRL + 0x00000190 + Alias for channel 6 CTRL register + 0x00000000 + + + CH6_AL1_CTRL + [31:0] + read-write + + + + + CH6_AL1_READ_ADDR + 0x00000194 + Alias for channel 6 READ_ADDR register + 0x00000000 + + + CH6_AL1_READ_ADDR + [31:0] + read-write + + + + + CH6_AL1_WRITE_ADDR + 0x00000198 + Alias for channel 6 WRITE_ADDR register + 0x00000000 + + + CH6_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH6_AL1_TRANS_COUNT_TRIG + 0x0000019c + Alias for channel 6 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH6_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH6_AL2_CTRL + 0x000001a0 + Alias for channel 6 CTRL register + 0x00000000 + + + CH6_AL2_CTRL + [31:0] + read-write + + + + + CH6_AL2_TRANS_COUNT + 0x000001a4 + Alias for channel 6 TRANS_COUNT register + 0x00000000 + + + CH6_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH6_AL2_READ_ADDR + 0x000001a8 + Alias for channel 6 READ_ADDR register + 0x00000000 + + + CH6_AL2_READ_ADDR + [31:0] + read-write + + + + + CH6_AL2_WRITE_ADDR_TRIG + 0x000001ac + Alias for channel 6 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH6_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH6_AL3_CTRL + 0x000001b0 + Alias for channel 6 CTRL register + 0x00000000 + + + CH6_AL3_CTRL + [31:0] + read-write + + + + + CH6_AL3_WRITE_ADDR + 0x000001b4 + Alias for channel 6 WRITE_ADDR register + 0x00000000 + + + CH6_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH6_AL3_TRANS_COUNT + 0x000001b8 + Alias for channel 6 TRANS_COUNT register + 0x00000000 + + + CH6_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH6_AL3_READ_ADDR_TRIG + 0x000001bc + Alias for channel 6 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH6_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH7_READ_ADDR + 0x000001c0 + DMA Channel 7 Read Address pointer + 0x00000000 + + + CH7_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH7_WRITE_ADDR + 0x000001c4 + DMA Channel 7 Write Address pointer + 0x00000000 + + + CH7_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH7_TRANS_COUNT + 0x000001c8 + DMA Channel 7 Transfer Count + 0x00000000 + + + CH7_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH7_CTRL_TRIG + 0x000001cc + DMA Channel 7 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH7_AL1_CTRL + 0x000001d0 + Alias for channel 7 CTRL register + 0x00000000 + + + CH7_AL1_CTRL + [31:0] + read-write + + + + + CH7_AL1_READ_ADDR + 0x000001d4 + Alias for channel 7 READ_ADDR register + 0x00000000 + + + CH7_AL1_READ_ADDR + [31:0] + read-write + + + + + CH7_AL1_WRITE_ADDR + 0x000001d8 + Alias for channel 7 WRITE_ADDR register + 0x00000000 + + + CH7_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH7_AL1_TRANS_COUNT_TRIG + 0x000001dc + Alias for channel 7 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH7_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH7_AL2_CTRL + 0x000001e0 + Alias for channel 7 CTRL register + 0x00000000 + + + CH7_AL2_CTRL + [31:0] + read-write + + + + + CH7_AL2_TRANS_COUNT + 0x000001e4 + Alias for channel 7 TRANS_COUNT register + 0x00000000 + + + CH7_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH7_AL2_READ_ADDR + 0x000001e8 + Alias for channel 7 READ_ADDR register + 0x00000000 + + + CH7_AL2_READ_ADDR + [31:0] + read-write + + + + + CH7_AL2_WRITE_ADDR_TRIG + 0x000001ec + Alias for channel 7 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH7_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH7_AL3_CTRL + 0x000001f0 + Alias for channel 7 CTRL register + 0x00000000 + + + CH7_AL3_CTRL + [31:0] + read-write + + + + + CH7_AL3_WRITE_ADDR + 0x000001f4 + Alias for channel 7 WRITE_ADDR register + 0x00000000 + + + CH7_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH7_AL3_TRANS_COUNT + 0x000001f8 + Alias for channel 7 TRANS_COUNT register + 0x00000000 + + + CH7_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH7_AL3_READ_ADDR_TRIG + 0x000001fc + Alias for channel 7 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH7_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH8_READ_ADDR + 0x00000200 + DMA Channel 8 Read Address pointer + 0x00000000 + + + CH8_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH8_WRITE_ADDR + 0x00000204 + DMA Channel 8 Write Address pointer + 0x00000000 + + + CH8_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH8_TRANS_COUNT + 0x00000208 + DMA Channel 8 Transfer Count + 0x00000000 + + + CH8_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH8_CTRL_TRIG + 0x0000020c + DMA Channel 8 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH8_AL1_CTRL + 0x00000210 + Alias for channel 8 CTRL register + 0x00000000 + + + CH8_AL1_CTRL + [31:0] + read-write + + + + + CH8_AL1_READ_ADDR + 0x00000214 + Alias for channel 8 READ_ADDR register + 0x00000000 + + + CH8_AL1_READ_ADDR + [31:0] + read-write + + + + + CH8_AL1_WRITE_ADDR + 0x00000218 + Alias for channel 8 WRITE_ADDR register + 0x00000000 + + + CH8_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH8_AL1_TRANS_COUNT_TRIG + 0x0000021c + Alias for channel 8 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH8_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH8_AL2_CTRL + 0x00000220 + Alias for channel 8 CTRL register + 0x00000000 + + + CH8_AL2_CTRL + [31:0] + read-write + + + + + CH8_AL2_TRANS_COUNT + 0x00000224 + Alias for channel 8 TRANS_COUNT register + 0x00000000 + + + CH8_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH8_AL2_READ_ADDR + 0x00000228 + Alias for channel 8 READ_ADDR register + 0x00000000 + + + CH8_AL2_READ_ADDR + [31:0] + read-write + + + + + CH8_AL2_WRITE_ADDR_TRIG + 0x0000022c + Alias for channel 8 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH8_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH8_AL3_CTRL + 0x00000230 + Alias for channel 8 CTRL register + 0x00000000 + + + CH8_AL3_CTRL + [31:0] + read-write + + + + + CH8_AL3_WRITE_ADDR + 0x00000234 + Alias for channel 8 WRITE_ADDR register + 0x00000000 + + + CH8_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH8_AL3_TRANS_COUNT + 0x00000238 + Alias for channel 8 TRANS_COUNT register + 0x00000000 + + + CH8_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH8_AL3_READ_ADDR_TRIG + 0x0000023c + Alias for channel 8 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH8_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH9_READ_ADDR + 0x00000240 + DMA Channel 9 Read Address pointer + 0x00000000 + + + CH9_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH9_WRITE_ADDR + 0x00000244 + DMA Channel 9 Write Address pointer + 0x00000000 + + + CH9_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH9_TRANS_COUNT + 0x00000248 + DMA Channel 9 Transfer Count + 0x00000000 + + + CH9_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH9_CTRL_TRIG + 0x0000024c + DMA Channel 9 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH9_AL1_CTRL + 0x00000250 + Alias for channel 9 CTRL register + 0x00000000 + + + CH9_AL1_CTRL + [31:0] + read-write + + + + + CH9_AL1_READ_ADDR + 0x00000254 + Alias for channel 9 READ_ADDR register + 0x00000000 + + + CH9_AL1_READ_ADDR + [31:0] + read-write + + + + + CH9_AL1_WRITE_ADDR + 0x00000258 + Alias for channel 9 WRITE_ADDR register + 0x00000000 + + + CH9_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH9_AL1_TRANS_COUNT_TRIG + 0x0000025c + Alias for channel 9 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH9_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH9_AL2_CTRL + 0x00000260 + Alias for channel 9 CTRL register + 0x00000000 + + + CH9_AL2_CTRL + [31:0] + read-write + + + + + CH9_AL2_TRANS_COUNT + 0x00000264 + Alias for channel 9 TRANS_COUNT register + 0x00000000 + + + CH9_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH9_AL2_READ_ADDR + 0x00000268 + Alias for channel 9 READ_ADDR register + 0x00000000 + + + CH9_AL2_READ_ADDR + [31:0] + read-write + + + + + CH9_AL2_WRITE_ADDR_TRIG + 0x0000026c + Alias for channel 9 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH9_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH9_AL3_CTRL + 0x00000270 + Alias for channel 9 CTRL register + 0x00000000 + + + CH9_AL3_CTRL + [31:0] + read-write + + + + + CH9_AL3_WRITE_ADDR + 0x00000274 + Alias for channel 9 WRITE_ADDR register + 0x00000000 + + + CH9_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH9_AL3_TRANS_COUNT + 0x00000278 + Alias for channel 9 TRANS_COUNT register + 0x00000000 + + + CH9_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH9_AL3_READ_ADDR_TRIG + 0x0000027c + Alias for channel 9 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH9_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH10_READ_ADDR + 0x00000280 + DMA Channel 10 Read Address pointer + 0x00000000 + + + CH10_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH10_WRITE_ADDR + 0x00000284 + DMA Channel 10 Write Address pointer + 0x00000000 + + + CH10_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH10_TRANS_COUNT + 0x00000288 + DMA Channel 10 Transfer Count + 0x00000000 + + + CH10_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH10_CTRL_TRIG + 0x0000028c + DMA Channel 10 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH10_AL1_CTRL + 0x00000290 + Alias for channel 10 CTRL register + 0x00000000 + + + CH10_AL1_CTRL + [31:0] + read-write + + + + + CH10_AL1_READ_ADDR + 0x00000294 + Alias for channel 10 READ_ADDR register + 0x00000000 + + + CH10_AL1_READ_ADDR + [31:0] + read-write + + + + + CH10_AL1_WRITE_ADDR + 0x00000298 + Alias for channel 10 WRITE_ADDR register + 0x00000000 + + + CH10_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH10_AL1_TRANS_COUNT_TRIG + 0x0000029c + Alias for channel 10 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH10_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH10_AL2_CTRL + 0x000002a0 + Alias for channel 10 CTRL register + 0x00000000 + + + CH10_AL2_CTRL + [31:0] + read-write + + + + + CH10_AL2_TRANS_COUNT + 0x000002a4 + Alias for channel 10 TRANS_COUNT register + 0x00000000 + + + CH10_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH10_AL2_READ_ADDR + 0x000002a8 + Alias for channel 10 READ_ADDR register + 0x00000000 + + + CH10_AL2_READ_ADDR + [31:0] + read-write + + + + + CH10_AL2_WRITE_ADDR_TRIG + 0x000002ac + Alias for channel 10 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH10_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH10_AL3_CTRL + 0x000002b0 + Alias for channel 10 CTRL register + 0x00000000 + + + CH10_AL3_CTRL + [31:0] + read-write + + + + + CH10_AL3_WRITE_ADDR + 0x000002b4 + Alias for channel 10 WRITE_ADDR register + 0x00000000 + + + CH10_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH10_AL3_TRANS_COUNT + 0x000002b8 + Alias for channel 10 TRANS_COUNT register + 0x00000000 + + + CH10_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH10_AL3_READ_ADDR_TRIG + 0x000002bc + Alias for channel 10 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH10_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH11_READ_ADDR + 0x000002c0 + DMA Channel 11 Read Address pointer + 0x00000000 + + + CH11_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH11_WRITE_ADDR + 0x000002c4 + DMA Channel 11 Write Address pointer + 0x00000000 + + + CH11_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH11_TRANS_COUNT + 0x000002c8 + DMA Channel 11 Transfer Count + 0x00000000 + + + CH11_TRANS_COUNT + 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. + [31:0] + read-write + + + + + CH11_CTRL_TRIG + 0x000002cc + DMA Channel 11 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [24:24] + read-only + + + SNIFF_EN + 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. + [23:23] + read-write + + + BSWAP + 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. + [22:22] + read-write + + + IRQ_QUIET + 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. + [21:21] + read-write + + + TREQ_SEL + 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 + [20:15] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + SPI0_TX + 16 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 17 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 18 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 19 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 20 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 21 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 22 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 23 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 24 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 25 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 26 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 27 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 28 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 29 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 30 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 31 + Select PWM Counter 7's Wrap Value as TREQ + + + I2C0_TX + 32 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 33 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 34 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 35 + Select I2C1's RX FIFO as TREQ + + + ADC + 36 + Select the ADC as TREQ + + + XIP_STREAM + 37 + Select the XIP Streaming FIFO as TREQ + + + XIP_SSITX + 38 + Select the XIP SSI TX FIFO as TREQ + + + XIP_SSIRX + 39 + Select the XIP SSI RX FIFO as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. + [14:11] + read-write + + + RING_SEL + 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. + [10:10] + read-write + + + RING_SIZE + 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. + [9:6] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH11_AL1_CTRL + 0x000002d0 + Alias for channel 11 CTRL register + 0x00000000 + + + CH11_AL1_CTRL + [31:0] + read-write + + + + + CH11_AL1_READ_ADDR + 0x000002d4 + Alias for channel 11 READ_ADDR register + 0x00000000 + + + CH11_AL1_READ_ADDR + [31:0] + read-write + + + + + CH11_AL1_WRITE_ADDR + 0x000002d8 + Alias for channel 11 WRITE_ADDR register + 0x00000000 + + + CH11_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH11_AL1_TRANS_COUNT_TRIG + 0x000002dc + Alias for channel 11 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH11_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH11_AL2_CTRL + 0x000002e0 + Alias for channel 11 CTRL register + 0x00000000 + + + CH11_AL2_CTRL + [31:0] + read-write + + + + + CH11_AL2_TRANS_COUNT + 0x000002e4 + Alias for channel 11 TRANS_COUNT register + 0x00000000 + + + CH11_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH11_AL2_READ_ADDR + 0x000002e8 + Alias for channel 11 READ_ADDR register + 0x00000000 + + + CH11_AL2_READ_ADDR + [31:0] + read-write + + + + + CH11_AL2_WRITE_ADDR_TRIG + 0x000002ec + Alias for channel 11 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH11_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH11_AL3_CTRL + 0x000002f0 + Alias for channel 11 CTRL register + 0x00000000 + + + CH11_AL3_CTRL + [31:0] + read-write + + + + + CH11_AL3_WRITE_ADDR + 0x000002f4 + Alias for channel 11 WRITE_ADDR register + 0x00000000 + + + CH11_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH11_AL3_TRANS_COUNT + 0x000002f8 + Alias for channel 11 TRANS_COUNT register + 0x00000000 + + + CH11_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH11_AL3_READ_ADDR_TRIG + 0x000002fc + Alias for channel 11 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH11_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + INTR + 0x00000400 + Interrupt Status (raw) + 0x00000000 + + + INTR + 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, INTS0 or INTS1. + + Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1. + + This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores. + + It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0. + [15:0] + read-write + oneToClear + + + + + INTE0 + 0x00000404 + Interrupt Enables for IRQ 0 + 0x00000000 + + + INTE0 + Set bit n to pass interrupts from channel n to DMA IRQ 0. + [15:0] + read-write + + + + + INTF0 + 0x00000408 + Force Interrupts + 0x00000000 + + + INTF0 + Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared. + [15:0] + read-write + + + + + INTS0 + 0x0000040c + Interrupt Status for IRQ 0 + 0x00000000 + + + INTS0 + 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. + [15:0] + read-write + oneToClear + + + + + INTR1 + 0x00000410 + Interrupt Status (raw) + 0x00000000 + + + INTR1 + 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, INTS0 or INTS1. + + Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1. + + This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores. + + It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0. + [15:0] + read-write + oneToClear + + + + + INTE1 + 0x00000414 + Interrupt Enables for IRQ 1 + 0x00000000 + + + INTE1 + Set bit n to pass interrupts from channel n to DMA IRQ 1. + [15:0] + read-write + + + + + INTF1 + 0x00000418 + Force Interrupts for IRQ 1 + 0x00000000 + + + INTF1 + Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared. + [15:0] + read-write + + + + + INTS1 + 0x0000041c + Interrupt Status (masked) for IRQ 1 + 0x00000000 + + + INTS1 + 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. + [15:0] + read-write + oneToClear + + + + + TIMER0 + 0x00000420 + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + TIMER1 + 0x00000424 + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + TIMER2 + 0x00000428 + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + TIMER3 + 0x0000042c + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + MULTI_CHAN_TRIGGER + 0x00000430 + Trigger one or more channels simultaneously + 0x00000000 + + + MULTI_CHAN_TRIGGER + 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. + [15:0] + write-only + + + + + SNIFF_CTRL + 0x00000434 + Sniffer Control + 0x00000000 + + + OUT_INV + 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. + [11:11] + read-write + + + OUT_REV + 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. + [10:10] + read-write + + + BSWAP + 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. + [9:9] + read-write + + + CALC + [8:5] + read-write + + + CRC32 + 0 + Calculate a CRC-32 (IEEE802.3 polynomial) + + + CRC32R + 1 + Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data + + + CRC16 + 2 + Calculate a CRC-16-CCITT + + + CRC16R + 3 + Calculate a CRC-16-CCITT with bit reversed data + + + EVEN + 14 + XOR reduction over all data. == 1 if the total 1 population count is odd. + + + SUM + 15 + Calculate a simple 32-bit checksum (addition with a 32 bit accumulator) + + + + + DMACH + DMA channel for Sniffer to observe + [4:1] + read-write + + + EN + Enable sniffer + [0:0] + read-write + + + + + SNIFF_DATA + 0x00000438 + Data accumulator for sniff hardware + 0x00000000 + + + SNIFF_DATA + 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. + [31:0] + read-write + + + + + FIFO_LEVELS + 0x00000440 + Debug RAF, WAF, TDF levels + 0x00000000 + + + RAF_LVL + Current Read-Address-FIFO fill level + [23:16] + read-only + + + WAF_LVL + Current Write-Address-FIFO fill level + [15:8] + read-only + + + TDF_LVL + Current Transfer-Data-FIFO fill level + [7:0] + read-only + + + + + CHAN_ABORT + 0x00000444 + Abort an in-progress transfer sequence on one or more channels + 0x00000000 + + + CHAN_ABORT + 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. + [15:0] + write-only + + + + + N_CHANNELS + 0x00000448 + 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. + 0x00000000 + + + N_CHANNELS + [4:0] + read-only + + + + + CH0_DBG_CTDREQ + 0x00000800 + 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. + 0x00000000 + + + CH0_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH0_DBG_TCR + 0x00000804 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH0_DBG_TCR + [31:0] + read-only + + + + + CH1_DBG_CTDREQ + 0x00000840 + 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. + 0x00000000 + + + CH1_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH1_DBG_TCR + 0x00000844 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH1_DBG_TCR + [31:0] + read-only + + + + + CH2_DBG_CTDREQ + 0x00000880 + 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. + 0x00000000 + + + CH2_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH2_DBG_TCR + 0x00000884 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH2_DBG_TCR + [31:0] + read-only + + + + + CH3_DBG_CTDREQ + 0x000008c0 + 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. + 0x00000000 + + + CH3_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH3_DBG_TCR + 0x000008c4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH3_DBG_TCR + [31:0] + read-only + + + + + CH4_DBG_CTDREQ + 0x00000900 + 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. + 0x00000000 + + + CH4_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH4_DBG_TCR + 0x00000904 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH4_DBG_TCR + [31:0] + read-only + + + + + CH5_DBG_CTDREQ + 0x00000940 + 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. + 0x00000000 + + + CH5_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH5_DBG_TCR + 0x00000944 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH5_DBG_TCR + [31:0] + read-only + + + + + CH6_DBG_CTDREQ + 0x00000980 + 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. + 0x00000000 + + + CH6_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH6_DBG_TCR + 0x00000984 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH6_DBG_TCR + [31:0] + read-only + + + + + CH7_DBG_CTDREQ + 0x000009c0 + 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. + 0x00000000 + + + CH7_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH7_DBG_TCR + 0x000009c4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH7_DBG_TCR + [31:0] + read-only + + + + + CH8_DBG_CTDREQ + 0x00000a00 + 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. + 0x00000000 + + + CH8_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH8_DBG_TCR + 0x00000a04 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH8_DBG_TCR + [31:0] + read-only + + + + + CH9_DBG_CTDREQ + 0x00000a40 + 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. + 0x00000000 + + + CH9_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH9_DBG_TCR + 0x00000a44 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH9_DBG_TCR + [31:0] + read-only + + + + + CH10_DBG_CTDREQ + 0x00000a80 + 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. + 0x00000000 + + + CH10_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH10_DBG_TCR + 0x00000a84 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH10_DBG_TCR + [31:0] + read-only + + + + + CH11_DBG_CTDREQ + 0x00000ac0 + 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. + 0x00000000 + + + CH11_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH11_DBG_TCR + 0x00000ac4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH11_DBG_TCR + [31:0] + read-only + + + + + + + TIMER + Controls time and alarms + time is a 64 bit value indicating the time in usec 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 + 0x40054000 + + 0 + 68 + registers + + + TIMER_IRQ_0 + 0 + + + TIMER_IRQ_1 + 1 + + + TIMER_IRQ_2 + 2 + + + TIMER_IRQ_3 + 3 + + + + TIMEHW + 0x00000000 + Write to bits 63:32 of time + always write timelw before timehw + 0x00000000 + + + TIMEHW + [31:0] + write-only + + + + + TIMELW + 0x00000004 + Write to bits 31:0 of time + writes do not get copied to time until timehw is written + 0x00000000 + + + TIMELW + [31:0] + write-only + + + + + TIMEHR + 0x00000008 + Read from bits 63:32 of time + always read timelr before timehr + 0x00000000 + + + TIMEHR + [31:0] + read-only + + + + + TIMELR + 0x0000000c + Read from bits 31:0 of time + 0x00000000 + + + TIMELR + [31:0] + read-only + modify + + + + + ALARM0 + 0x00000010 + Arm alarm 0, and configure the time it will fire. + Once armed, the alarm fires when TIMER_ALARM0 == TIMELR. + The alarm will disarm itself once it fires, and can + be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM0 + [31:0] + read-write + + + + + ALARM1 + 0x00000014 + Arm alarm 1, and configure the time it will fire. + Once armed, the alarm fires when TIMER_ALARM1 == TIMELR. + The alarm will disarm itself once it fires, and can + be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM1 + [31:0] + read-write + + + + + ALARM2 + 0x00000018 + Arm alarm 2, and configure the time it will fire. + Once armed, the alarm fires when TIMER_ALARM2 == TIMELR. + The alarm will disarm itself once it fires, and can + be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM2 + [31:0] + read-write + + + + + ALARM3 + 0x0000001c + Arm alarm 3, and configure the time it will fire. + Once armed, the alarm fires when TIMER_ALARM3 == TIMELR. + The alarm will disarm itself once it fires, and can + be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM3 + [31:0] + read-write + + + + + ARMED + 0x00000020 + 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. + 0x00000000 + + + ARMED + [3:0] + read-write + oneToClear + + + + + TIMERAWH + 0x00000024 + Raw read from bits 63:32 of time (no side effects) + 0x00000000 + + + TIMERAWH + [31:0] + read-only + + + + + TIMERAWL + 0x00000028 + Raw read from bits 31:0 of time (no side effects) + 0x00000000 + + + TIMERAWL + [31:0] + read-only + + + + + DBGPAUSE + 0x0000002c + Set bits high to enable pause when the corresponding debug ports are active + 0x00000007 + + + DBG1 + Pause when processor 1 is in debug mode + [2:2] + read-write + + + DBG0 + Pause when processor 0 is in debug mode + [1:1] + read-write + + + + + PAUSE + 0x00000030 + Set high to pause the timer + 0x00000000 + + + PAUSE + [0:0] + read-write + + + + + INTR + 0x00000034 + Raw Interrupts + 0x00000000 + + + ALARM_3 + [3:3] + read-write + oneToClear + + + ALARM_2 + [2:2] + read-write + oneToClear + + + ALARM_1 + [1:1] + read-write + oneToClear + + + ALARM_0 + [0:0] + read-write + oneToClear + + + + + INTE + 0x00000038 + Interrupt Enable + 0x00000000 + + + ALARM_3 + [3:3] + read-write + + + ALARM_2 + [2:2] + read-write + + + ALARM_1 + [1:1] + read-write + + + ALARM_0 + [0:0] + read-write + + + + + INTF + 0x0000003c + Interrupt Force + 0x00000000 + + + ALARM_3 + [3:3] + read-write + + + ALARM_2 + [2:2] + read-write + + + ALARM_1 + [1:1] + read-write + + + ALARM_0 + [0:0] + read-write + + + + + INTS + 0x00000040 + Interrupt status after masking & forcing + 0x00000000 + + + ALARM_3 + [3:3] + read-only + + + ALARM_2 + [2:2] + read-only + + + ALARM_1 + [1:1] + read-only + + + ALARM_0 + [0:0] + read-only + + + + + + + PWM + Simple PWM + 0x40050000 + + 0 + 180 + registers + + + PWM_IRQ_WRAP + 4 + + + + CH0_CSR + 0x00000000 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH0_DIV + 0x00000004 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH0_CTR + 0x00000008 + Direct access to the PWM counter + 0x00000000 + + + CH0_CTR + [15:0] + read-write + + + + + CH0_CC + 0x0000000c + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH0_TOP + 0x00000010 + Counter wrap value + 0x0000ffff + + + CH0_TOP + [15:0] + read-write + + + + + CH1_CSR + 0x00000014 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH1_DIV + 0x00000018 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH1_CTR + 0x0000001c + Direct access to the PWM counter + 0x00000000 + + + CH1_CTR + [15:0] + read-write + + + + + CH1_CC + 0x00000020 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH1_TOP + 0x00000024 + Counter wrap value + 0x0000ffff + + + CH1_TOP + [15:0] + read-write + + + + + CH2_CSR + 0x00000028 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH2_DIV + 0x0000002c + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH2_CTR + 0x00000030 + Direct access to the PWM counter + 0x00000000 + + + CH2_CTR + [15:0] + read-write + + + + + CH2_CC + 0x00000034 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH2_TOP + 0x00000038 + Counter wrap value + 0x0000ffff + + + CH2_TOP + [15:0] + read-write + + + + + CH3_CSR + 0x0000003c + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH3_DIV + 0x00000040 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH3_CTR + 0x00000044 + Direct access to the PWM counter + 0x00000000 + + + CH3_CTR + [15:0] + read-write + + + + + CH3_CC + 0x00000048 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH3_TOP + 0x0000004c + Counter wrap value + 0x0000ffff + + + CH3_TOP + [15:0] + read-write + + + + + CH4_CSR + 0x00000050 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH4_DIV + 0x00000054 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH4_CTR + 0x00000058 + Direct access to the PWM counter + 0x00000000 + + + CH4_CTR + [15:0] + read-write + + + + + CH4_CC + 0x0000005c + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH4_TOP + 0x00000060 + Counter wrap value + 0x0000ffff + + + CH4_TOP + [15:0] + read-write + + + + + CH5_CSR + 0x00000064 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH5_DIV + 0x00000068 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH5_CTR + 0x0000006c + Direct access to the PWM counter + 0x00000000 + + + CH5_CTR + [15:0] + read-write + + + + + CH5_CC + 0x00000070 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH5_TOP + 0x00000074 + Counter wrap value + 0x0000ffff + + + CH5_TOP + [15:0] + read-write + + + + + CH6_CSR + 0x00000078 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH6_DIV + 0x0000007c + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH6_CTR + 0x00000080 + Direct access to the PWM counter + 0x00000000 + + + CH6_CTR + [15:0] + read-write + + + + + CH6_CC + 0x00000084 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH6_TOP + 0x00000088 + Counter wrap value + 0x0000ffff + + + CH6_TOP + [15:0] + read-write + + + + + CH7_CSR + 0x0000008c + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH7_DIV + 0x00000090 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH7_CTR + 0x00000094 + Direct access to the PWM counter + 0x00000000 + + + CH7_CTR + [15:0] + read-write + + + + + CH7_CC + 0x00000098 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH7_TOP + 0x0000009c + Counter wrap value + 0x0000ffff + + + CH7_TOP + [15:0] + read-write + + + + + EN + 0x000000a0 + 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. + 0x00000000 + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + INTR + 0x000000a4 + Raw Interrupts + 0x00000000 + + + CH7 + [7:7] + read-write + oneToClear + + + CH6 + [6:6] + read-write + oneToClear + + + CH5 + [5:5] + read-write + oneToClear + + + CH4 + [4:4] + read-write + oneToClear + + + CH3 + [3:3] + read-write + oneToClear + + + CH2 + [2:2] + read-write + oneToClear + + + CH1 + [1:1] + read-write + oneToClear + + + CH0 + [0:0] + read-write + oneToClear + + + + + INTE + 0x000000a8 + Interrupt Enable + 0x00000000 + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + INTF + 0x000000ac + Interrupt Force + 0x00000000 + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + INTS + 0x000000b0 + Interrupt status after masking & forcing + 0x00000000 + + + CH7 + [7:7] + read-only + + + CH6 + [6:6] + read-only + + + CH5 + [5:5] + read-only + + + CH4 + [4:4] + read-only + + + CH3 + [3:3] + read-only + + + CH2 + [2:2] + read-only + + + CH1 + [1:1] + read-only + + + CH0 + [0:0] + read-only + + + + + + + ADC + Control and data interface to SAR ADC + 0x4004c000 + + 0 + 36 + registers + + + ADC_IRQ_FIFO + 22 + + + + CS + 0x00000000 + ADC Control and Status + 0x00000000 + + + RROBIN + 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. + [20:16] + read-write + + + AINSEL + Select analog mux input. Updated automatically in round-robin mode. + [14:12] + read-write + + + ERR_STICKY + Some past ADC conversion encountered an error. Write 1 to clear. + [10:10] + read-write + oneToClear + + + ERR + The most recent ADC conversion encountered an error; result is undefined or noisy. + [9:9] + read-only + + + READY + 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. + 0 whilst conversion in progress. + [8:8] + read-only + + + START_MANY + Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes. + [3:3] + read-write + + + START_ONCE + Start a single conversion. Self-clearing. Ignored if start_many is asserted. + [2:2] + write-only + + + TS_EN + Power on temperature sensor. 1 - enabled. 0 - disabled. + [1:1] + read-write + + + EN + Power on ADC and enable its clock. + 1 - enabled. 0 - disabled. + [0:0] + read-write + + + + + RESULT + 0x00000004 + Result of most recent ADC conversion + 0x00000000 + + + RESULT + [11:0] + read-only + + + + + FCS + 0x00000008 + FIFO control and status + 0x00000000 + + + THRESH + DREQ/IRQ asserted when level >= threshold + [27:24] + read-write + + + LEVEL + The number of conversion results currently waiting in the FIFO + [19:16] + read-only + + + OVER + 1 if the FIFO has been overflowed. Write 1 to clear. + [11:11] + read-write + oneToClear + + + UNDER + 1 if the FIFO has been underflowed. Write 1 to clear. + [10:10] + read-write + oneToClear + + + FULL + [9:9] + read-only + + + EMPTY + [8:8] + read-only + + + DREQ_EN + If 1: assert DMA requests when FIFO contains data + [3:3] + read-write + + + ERR + If 1: conversion error bit appears in the FIFO alongside the result + [2:2] + read-write + + + SHIFT + If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers. + [1:1] + read-write + + + EN + If 1: write result to the FIFO after each conversion. + [0:0] + read-write + + + + + FIFO + 0x0000000c + Conversion result FIFO + 0x00000000 + + + ERR + 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted. + [15:15] + read-only + modify + + + VAL + [11:0] + read-only + modify + + + + + DIV + 0x00000010 + 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 + 0x00000000 + + + INT + Integer part of clock divisor. + [23:8] + read-write + + + FRAC + Fractional part of clock divisor. First-order delta-sigma. + [7:0] + read-write + + + + + INTR + 0x00000014 + Raw Interrupts + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-only + + + + + INTE + 0x00000018 + Interrupt Enable + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-write + + + + + INTF + 0x0000001c + Interrupt Force + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-write + + + + + INTS + 0x00000020 + Interrupt status after masking & forcing + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-only + + + + + + + I2C0 + 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 + 0x40044000 + + 0 + 256 + registers + + + I2C0_IRQ + 23 + + + + IC_CON + 0x00000000 + 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. + 0x00000065 + + + STOP_DET_IF_MASTER_ACTIVE + Master issues the STOP_DET interrupt irrespective of whether master is active or not + [10:10] + read-only + + + RX_FIFO_FULL_HLD_CTRL + 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. + [9:9] + read-write + + + DISABLED + 0 + Overflow when RX_FIFO is full + + + ENABLED + 1 + Hold bus when RX_FIFO is full + + + + + TX_EMPTY_CTRL + This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register. + + Reset value: 0x0. + [8:8] + read-write + + + DISABLED + 0 + Default behaviour of TX_EMPTY interrupt + + + ENABLED + 1 + Controlled generation of TX_EMPTY interrupt + + + + + STOP_DET_IFADDRESSED + 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). + [7:7] + read-write + + + DISABLED + 0 + slave issues STOP_DET intr always + + + ENABLED + 1 + slave issues STOP_DET intr only if addressed + + + + + IC_SLAVE_DISABLE + 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. + [6:6] + read-write + + + SLAVE_ENABLED + 0 + Slave mode is enabled + + + SLAVE_DISABLED + 1 + Slave mode is disabled + + + + + IC_RESTART_EN + 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 + [5:5] + read-write + + + DISABLED + 0 + Master restart disabled + + + ENABLED + 1 + Master restart enabled + + + + + IC_10BITADDR_MASTER + 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 + [4:4] + read-write + + + ADDR_7BITS + 0 + Master 7Bit addressing mode + + + ADDR_10BITS + 1 + Master 10Bit addressing mode + + + + + IC_10BITADDR_SLAVE + 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. + [3:3] + read-write + + + ADDR_7BITS + 0 + Slave 7Bit addressing + + + ADDR_10BITS + 1 + Slave 10Bit addressing + + + + + SPEED + 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 + [2:1] + read-write + + + STANDARD + 1 + Standard Speed mode of operation + + + FAST + 2 + Fast or Fast Plus mode of operation + + + HIGH + 3 + High Speed mode of operation + + + + + MASTER_MODE + 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'. + [0:0] + read-write + + + DISABLED + 0 + Master mode is disabled + + + ENABLED + 1 + Master mode is enabled + + + + + + + IC_TAR + 0x00000004 + 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. + 0x00000055 + + + SPECIAL + 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 + [11:11] + read-write + + + DISABLED + 0 + Disables programming of GENERAL_CALL or START_BYTE transmission + + + ENABLED + 1 + Enables programming of GENERAL_CALL or START_BYTE transmission + + + + + GC_OR_START + 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 + [10:10] + read-write + + + GENERAL_CALL + 0 + GENERAL_CALL byte transmission + + + START_BYTE + 1 + START byte transmission + + + + + IC_TAR + 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. + [9:0] + read-write + + + + + IC_SAR + 0x00000008 + I2C Slave Address Register + 0x00000055 + + + IC_SAR + 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. + [9:0] + read-write + + + + + IC_DATA_CMD + 0x00000010 + 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. + 0x00000000 + + + FIRST_DATA_BYTE + 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. + [11:11] + read-only + + + INACTIVE + 0 + Sequential data byte received + + + ACTIVE + 1 + Non sequential data byte received + + + + + RESTART + 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 + [10:10] + write-only + + + DISABLE + 0 + Don't Issue RESTART before this command + + + ENABLE + 1 + Issue RESTART before this command + + + + + STOP + 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 + [9:9] + write-only + + + DISABLE + 0 + Don't Issue STOP after this command + + + ENABLE + 1 + Issue STOP after this command + + + + + CMD + 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 + [8:8] + write-only + + + WRITE + 0 + Master Write Command + + + READ + 1 + Master Read Command + + + + + DAT + 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 + [7:0] + read-write + + + + + IC_SS_SCL_HCNT + 0x00000014 + Standard Speed I2C Clock SCL High Count Register + 0x00000028 + + + IC_SS_SCL_HCNT + 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. + [15:0] + read-write + + + + + IC_SS_SCL_LCNT + 0x00000018 + Standard Speed I2C Clock SCL Low Count Register + 0x0000002f + + + IC_SS_SCL_LCNT + 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. + [15:0] + read-write + + + + + IC_FS_SCL_HCNT + 0x0000001c + Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register + 0x00000006 + + + IC_FS_SCL_HCNT + 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. + [15:0] + read-write + + + + + IC_FS_SCL_LCNT + 0x00000020 + Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register + 0x0000000d + + + IC_FS_SCL_LCNT + 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. + [15:0] + read-write + + + + + IC_INTR_STAT + 0x0000002c + 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. + 0x00000000 + + + R_RESTART_DET + See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit. + + Reset value: 0x0 + [12:12] + read-only + + + INACTIVE + 0 + R_RESTART_DET interrupt is inactive + + + ACTIVE + 1 + R_RESTART_DET interrupt is active + + + + + R_GEN_CALL + See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit. + + Reset value: 0x0 + [11:11] + read-only + + + INACTIVE + 0 + R_GEN_CALL interrupt is inactive + + + ACTIVE + 1 + R_GEN_CALL interrupt is active + + + + + R_START_DET + See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit. + + Reset value: 0x0 + [10:10] + read-only + + + INACTIVE + 0 + R_START_DET interrupt is inactive + + + ACTIVE + 1 + R_START_DET interrupt is active + + + + + R_STOP_DET + See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit. + + Reset value: 0x0 + [9:9] + read-only + + + INACTIVE + 0 + R_STOP_DET interrupt is inactive + + + ACTIVE + 1 + R_STOP_DET interrupt is active + + + + + R_ACTIVITY + See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit. + + Reset value: 0x0 + [8:8] + read-only + + + INACTIVE + 0 + R_ACTIVITY interrupt is inactive + + + ACTIVE + 1 + R_ACTIVITY interrupt is active + + + + + R_RX_DONE + See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit. + + Reset value: 0x0 + [7:7] + read-only + + + INACTIVE + 0 + R_RX_DONE interrupt is inactive + + + ACTIVE + 1 + R_RX_DONE interrupt is active + + + + + R_TX_ABRT + See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit. + + Reset value: 0x0 + [6:6] + read-only + + + INACTIVE + 0 + R_TX_ABRT interrupt is inactive + + + ACTIVE + 1 + R_TX_ABRT interrupt is active + + + + + R_RD_REQ + See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit. + + Reset value: 0x0 + [5:5] + read-only + + + INACTIVE + 0 + R_RD_REQ interrupt is inactive + + + ACTIVE + 1 + R_RD_REQ interrupt is active + + + + + R_TX_EMPTY + See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit. + + Reset value: 0x0 + [4:4] + read-only + + + INACTIVE + 0 + R_TX_EMPTY interrupt is inactive + + + ACTIVE + 1 + R_TX_EMPTY interrupt is active + + + + + R_TX_OVER + See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit. + + Reset value: 0x0 + [3:3] + read-only + + + INACTIVE + 0 + R_TX_OVER interrupt is inactive + + + ACTIVE + 1 + R_TX_OVER interrupt is active + + + + + R_RX_FULL + See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit. + + Reset value: 0x0 + [2:2] + read-only + + + INACTIVE + 0 + R_RX_FULL interrupt is inactive + + + ACTIVE + 1 + R_RX_FULL interrupt is active + + + + + R_RX_OVER + See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit. + + Reset value: 0x0 + [1:1] + read-only + + + INACTIVE + 0 + R_RX_OVER interrupt is inactive + + + ACTIVE + 1 + R_RX_OVER interrupt is active + + + + + R_RX_UNDER + See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit. + + Reset value: 0x0 + [0:0] + read-only + + + INACTIVE + 0 + RX_UNDER interrupt is inactive + + + ACTIVE + 1 + RX_UNDER interrupt is active + + + + + + + IC_INTR_MASK + 0x00000030 + 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. + 0x000008ff + + + M_RESTART_DET + This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [12:12] + read-write + + + ENABLED + 0 + RESTART_DET interrupt is masked + + + DISABLED + 1 + RESTART_DET interrupt is unmasked + + + + + M_GEN_CALL + This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [11:11] + read-write + + + ENABLED + 0 + GEN_CALL interrupt is masked + + + DISABLED + 1 + GEN_CALL interrupt is unmasked + + + + + M_START_DET + This bit masks the R_START_DET interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [10:10] + read-write + + + ENABLED + 0 + START_DET interrupt is masked + + + DISABLED + 1 + START_DET interrupt is unmasked + + + + + M_STOP_DET + This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [9:9] + read-write + + + ENABLED + 0 + STOP_DET interrupt is masked + + + DISABLED + 1 + STOP_DET interrupt is unmasked + + + + + M_ACTIVITY + This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [8:8] + read-write + + + ENABLED + 0 + ACTIVITY interrupt is masked + + + DISABLED + 1 + ACTIVITY interrupt is unmasked + + + + + M_RX_DONE + This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [7:7] + read-write + + + ENABLED + 0 + RX_DONE interrupt is masked + + + DISABLED + 1 + RX_DONE interrupt is unmasked + + + + + M_TX_ABRT + This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [6:6] + read-write + + + ENABLED + 0 + TX_ABORT interrupt is masked + + + DISABLED + 1 + TX_ABORT interrupt is unmasked + + + + + M_RD_REQ + This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [5:5] + read-write + + + ENABLED + 0 + RD_REQ interrupt is masked + + + DISABLED + 1 + RD_REQ interrupt is unmasked + + + + + M_TX_EMPTY + This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [4:4] + read-write + + + ENABLED + 0 + TX_EMPTY interrupt is masked + + + DISABLED + 1 + TX_EMPTY interrupt is unmasked + + + + + M_TX_OVER + This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [3:3] + read-write + + + ENABLED + 0 + TX_OVER interrupt is masked + + + DISABLED + 1 + TX_OVER interrupt is unmasked + + + + + M_RX_FULL + This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [2:2] + read-write + + + ENABLED + 0 + RX_FULL interrupt is masked + + + DISABLED + 1 + RX_FULL interrupt is unmasked + + + + + M_RX_OVER + This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [1:1] + read-write + + + ENABLED + 0 + RX_OVER interrupt is masked + + + DISABLED + 1 + RX_OVER interrupt is unmasked + + + + + M_RX_UNDER + This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [0:0] + read-write + + + ENABLED + 0 + RX_UNDER interrupt is masked + + + DISABLED + 1 + RX_UNDER interrupt is unmasked + + + + + + + IC_RAW_INTR_STAT + 0x00000034 + 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. + 0x00000000 + + + RESTART_DET + 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 + [12:12] + read-only + + + INACTIVE + 0 + RESTART_DET interrupt is inactive + + + ACTIVE + 1 + RESTART_DET interrupt is active + + + + + GEN_CALL + 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 + [11:11] + read-only + + + INACTIVE + 0 + GEN_CALL interrupt is inactive + + + ACTIVE + 1 + GEN_CALL interrupt is active + + + + + START_DET + 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 + [10:10] + read-only + + + INACTIVE + 0 + START_DET interrupt is inactive + + + ACTIVE + 1 + START_DET interrupt is active + + + + + STOP_DET + 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 + [9:9] + read-only + + + INACTIVE + 0 + STOP_DET interrupt is inactive + + + ACTIVE + 1 + STOP_DET interrupt is active + + + + + ACTIVITY + 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 + [8:8] + read-only + + + INACTIVE + 0 + RAW_INTR_ACTIVITY interrupt is inactive + + + ACTIVE + 1 + RAW_INTR_ACTIVITY interrupt is active + + + + + RX_DONE + 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 + [7:7] + read-only + + + INACTIVE + 0 + RX_DONE interrupt is inactive + + + ACTIVE + 1 + RX_DONE interrupt is active + + + + + TX_ABRT + 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 + [6:6] + read-only + + + INACTIVE + 0 + TX_ABRT interrupt is inactive + + + ACTIVE + 1 + TX_ABRT interrupt is active + + + + + RD_REQ + 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 + [5:5] + read-only + + + INACTIVE + 0 + RD_REQ interrupt is inactive + + + ACTIVE + 1 + RD_REQ interrupt is active + + + + + TX_EMPTY + 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. + [4:4] + read-only + + + INACTIVE + 0 + TX_EMPTY interrupt is inactive + + + ACTIVE + 1 + TX_EMPTY interrupt is active + + + + + TX_OVER + 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 + [3:3] + read-only + + + INACTIVE + 0 + TX_OVER interrupt is inactive + + + ACTIVE + 1 + TX_OVER interrupt is active + + + + + RX_FULL + 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 + [2:2] + read-only + + + INACTIVE + 0 + RX_FULL interrupt is inactive + + + ACTIVE + 1 + RX_FULL interrupt is active + + + + + RX_OVER + 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 + [1:1] + read-only + + + INACTIVE + 0 + RX_OVER interrupt is inactive + + + ACTIVE + 1 + RX_OVER interrupt is active + + + + + RX_UNDER + 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 + [0:0] + read-only + + + INACTIVE + 0 + RX_UNDER interrupt is inactive + + + ACTIVE + 1 + RX_UNDER interrupt is active + + + + + + + IC_RX_TL + 0x00000038 + I2C Receive FIFO Threshold Register + 0x00000000 + + + RX_TL + 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. + [7:0] + read-write + + + + + IC_TX_TL + 0x0000003c + I2C Transmit FIFO Threshold Register + 0x00000000 + + + TX_TL + 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. + [7:0] + read-write + + + + + IC_CLR_INTR + 0x00000040 + Clear Combined and Individual Interrupt Register + 0x00000000 + + + CLR_INTR + 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 + [0:0] + read-only + + + + + IC_CLR_RX_UNDER + 0x00000044 + Clear RX_UNDER Interrupt Register + 0x00000000 + + + CLR_RX_UNDER + Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_RX_OVER + 0x00000048 + Clear RX_OVER Interrupt Register + 0x00000000 + + + CLR_RX_OVER + Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_TX_OVER + 0x0000004c + Clear TX_OVER Interrupt Register + 0x00000000 + + + CLR_TX_OVER + Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_RD_REQ + 0x00000050 + Clear RD_REQ Interrupt Register + 0x00000000 + + + CLR_RD_REQ + Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_TX_ABRT + 0x00000054 + Clear TX_ABRT Interrupt Register + 0x00000000 + + + CLR_TX_ABRT + 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 + [0:0] + read-only + + + + + IC_CLR_RX_DONE + 0x00000058 + Clear RX_DONE Interrupt Register + 0x00000000 + + + CLR_RX_DONE + Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_ACTIVITY + 0x0000005c + Clear ACTIVITY Interrupt Register + 0x00000000 + + + CLR_ACTIVITY + 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 + [0:0] + read-only + + + + + IC_CLR_STOP_DET + 0x00000060 + Clear STOP_DET Interrupt Register + 0x00000000 + + + CLR_STOP_DET + Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_START_DET + 0x00000064 + Clear START_DET Interrupt Register + 0x00000000 + + + CLR_START_DET + Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_GEN_CALL + 0x00000068 + Clear GEN_CALL Interrupt Register + 0x00000000 + + + CLR_GEN_CALL + Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_ENABLE + 0x0000006c + I2C Enable Register + 0x00000000 + + + TX_CMD_BLOCK + 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 + [2:2] + read-write + + + NOT_BLOCKED + 0 + Tx Command execution not blocked + + + BLOCKED + 1 + Tx Command execution blocked + + + + + ABORT + 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 + [1:1] + read-write + + + DISABLE + 0 + ABORT operation not in progress + + + ENABLED + 1 + ABORT operation in progress + + + + + ENABLE + 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 + [0:0] + read-write + + + DISABLED + 0 + I2C is disabled + + + ENABLED + 1 + I2C is enabled + + + + + + + IC_STATUS + 0x00000070 + 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 + 0x00000006 + + + SLV_ACTIVITY + 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 + [6:6] + read-only + + + IDLE + 0 + Slave is idle + + + ACTIVE + 1 + Slave not idle + + + + + MST_ACTIVITY + 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 + [5:5] + read-only + + + IDLE + 0 + Master is idle + + + ACTIVE + 1 + Master not idle + + + + + RFF + 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 + [4:4] + read-only + + + NOT_FULL + 0 + Rx FIFO not full + + + FULL + 1 + Rx FIFO is full + + + + + RFNE + 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 + [3:3] + read-only + + + EMPTY + 0 + Rx FIFO is empty + + + NOT_EMPTY + 1 + Rx FIFO not empty + + + + + TFE + 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 + [2:2] + read-only + + + NON_EMPTY + 0 + Tx FIFO not empty + + + EMPTY + 1 + Tx FIFO is empty + + + + + TFNF + 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 + [1:1] + read-only + + + FULL + 0 + Tx FIFO is full + + + NOT_FULL + 1 + Tx FIFO not full + + + + + ACTIVITY + I2C Activity Status. Reset value: 0x0 + [0:0] + read-only + + + INACTIVE + 0 + I2C is idle + + + ACTIVE + 1 + I2C is active + + + + + + + IC_TXFLR + 0x00000074 + 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. + 0x00000000 + + + TXFLR + Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. + + Reset value: 0x0 + [4:0] + read-only + + + + + IC_RXFLR + 0x00000078 + 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. + 0x00000000 + + + RXFLR + Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. + + Reset value: 0x0 + [4:0] + read-only + + + + + IC_SDA_HOLD + 0x0000007c + 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. + 0x00000001 + + + IC_SDA_RX_HOLD + 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]. + [23:16] + read-write + + + IC_SDA_TX_HOLD + 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]. + [15:0] + read-write + + + + + IC_TX_ABRT_SOURCE + 0x00000080 + 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. + 0x00000000 + + + TX_FLUSH_CNT + 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 + [31:23] + read-only + + + ABRT_USER_ABRT + 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 + [16:16] + read-only + + + ABRT_USER_ABRT_VOID + 0 + Transfer abort detected by master- scenario not present + + + ABRT_USER_ABRT_GENERATED + 1 + Transfer abort detected by master + + + + + ABRT_SLVRD_INTX + 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 + [15:15] + read-only + + + ABRT_SLVRD_INTX_VOID + 0 + Slave trying to transmit to remote master in read mode- scenario not present + + + ABRT_SLVRD_INTX_GENERATED + 1 + Slave trying to transmit to remote master in read mode + + + + + ABRT_SLV_ARBLOST + 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 + [14:14] + read-only + + + ABRT_SLV_ARBLOST_VOID + 0 + Slave lost arbitration to remote master- scenario not present + + + ABRT_SLV_ARBLOST_GENERATED + 1 + Slave lost arbitration to remote master + + + + + ABRT_SLVFLUSH_TXFIFO + 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 + [13:13] + read-only + + + ABRT_SLVFLUSH_TXFIFO_VOID + 0 + Slave flushes existing data in TX-FIFO upon getting read command- scenario not present + + + ABRT_SLVFLUSH_TXFIFO_GENERATED + 1 + Slave flushes existing data in TX-FIFO upon getting read command + + + + + ARB_LOST + 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 + [12:12] + read-only + + + ABRT_LOST_VOID + 0 + Master or Slave-Transmitter lost arbitration- scenario not present + + + ABRT_LOST_GENERATED + 1 + Master or Slave-Transmitter lost arbitration + + + + + ABRT_MASTER_DIS + 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 + [11:11] + read-only + + + ABRT_MASTER_DIS_VOID + 0 + User initiating master operation when MASTER disabled- scenario not present + + + ABRT_MASTER_DIS_GENERATED + 1 + User initiating master operation when MASTER disabled + + + + + ABRT_10B_RD_NORSTRT + 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 + [10:10] + read-only + + + ABRT_10B_RD_VOID + 0 + Master not trying to read in 10Bit addressing mode when RESTART disabled + + + ABRT_10B_RD_GENERATED + 1 + Master trying to read in 10Bit addressing mode when RESTART disabled + + + + + ABRT_SBYTE_NORSTRT + 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 + [9:9] + read-only + + + ABRT_SBYTE_NORSTRT_VOID + 0 + User trying to send START byte when RESTART disabled- scenario not present + + + ABRT_SBYTE_NORSTRT_GENERATED + 1 + User trying to send START byte when RESTART disabled + + + + + ABRT_HS_NORSTRT + 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 + [8:8] + read-only + + + ABRT_HS_NORSTRT_VOID + 0 + User trying to switch Master to HS mode when RESTART disabled- scenario not present + + + ABRT_HS_NORSTRT_GENERATED + 1 + User trying to switch Master to HS mode when RESTART disabled + + + + + ABRT_SBYTE_ACKDET + 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 + [7:7] + read-only + + + ABRT_SBYTE_ACKDET_VOID + 0 + ACK detected for START byte- scenario not present + + + ABRT_SBYTE_ACKDET_GENERATED + 1 + ACK detected for START byte + + + + + ABRT_HS_ACKDET + 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 + [6:6] + read-only + + + ABRT_HS_ACK_VOID + 0 + HS Master code ACKed in HS Mode- scenario not present + + + ABRT_HS_ACK_GENERATED + 1 + HS Master code ACKed in HS Mode + + + + + ABRT_GCALL_READ + 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 + [5:5] + read-only + + + ABRT_GCALL_READ_VOID + 0 + GCALL is followed by read from bus-scenario not present + + + ABRT_GCALL_READ_GENERATED + 1 + GCALL is followed by read from bus + + + + + ABRT_GCALL_NOACK + 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 + [4:4] + read-only + + + ABRT_GCALL_NOACK_VOID + 0 + GCALL not ACKed by any slave-scenario not present + + + ABRT_GCALL_NOACK_GENERATED + 1 + GCALL not ACKed by any slave + + + + + ABRT_TXDATA_NOACK + 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 + [3:3] + read-only + + + ABRT_TXDATA_NOACK_VOID + 0 + Transmitted data non-ACKed by addressed slave-scenario not present + + + ABRT_TXDATA_NOACK_GENERATED + 1 + Transmitted data not ACKed by addressed slave + + + + + ABRT_10ADDR2_NOACK + 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 + [2:2] + read-only + + + INACTIVE + 0 + This abort is not generated + + + ACTIVE + 1 + Byte 2 of 10Bit Address not ACKed by any slave + + + + + ABRT_10ADDR1_NOACK + 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 + [1:1] + read-only + + + INACTIVE + 0 + This abort is not generated + + + ACTIVE + 1 + Byte 1 of 10Bit Address not ACKed by any slave + + + + + ABRT_7B_ADDR_NOACK + 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 + [0:0] + read-only + + + INACTIVE + 0 + This abort is not generated + + + ACTIVE + 1 + This abort is generated because of NOACK for 7-bit address + + + + + + + IC_SLV_DATA_NACK_ONLY + 0x00000084 + 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. + 0x00000000 + + + NACK + 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 + [0:0] + read-write + + + DISABLED + 0 + Slave receiver generates NACK normally + + + ENABLED + 1 + Slave receiver generates NACK upon data reception only + + + + + + + IC_DMA_CR + 0x00000088 + 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. + 0x00000000 + + + TDMAE + Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0 + [1:1] + read-write + + + DISABLED + 0 + transmit FIFO DMA channel disabled + + + ENABLED + 1 + Transmit FIFO DMA channel enabled + + + + + RDMAE + Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0 + [0:0] + read-write + + + DISABLED + 0 + Receive FIFO DMA channel disabled + + + ENABLED + 1 + Receive FIFO DMA channel enabled + + + + + + + IC_DMA_TDLR + 0x0000008c + DMA Transmit Data Level Register + 0x00000000 + + + DMATDL + 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 + [3:0] + read-write + + + + + IC_DMA_RDLR + 0x00000090 + I2C Receive Data Level Register + 0x00000000 + + + DMARDL + 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 + [3:0] + read-write + + + + + IC_SDA_SETUP + 0x00000094 + 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. + 0x00000064 + + + SDA_SETUP + 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. + [7:0] + read-write + + + + + IC_ACK_GENERAL_CALL + 0x00000098 + 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. + 0x00000001 + + + ACK_GEN_CALL + 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). + [0:0] + read-write + + + DISABLED + 0 + Generate NACK for a General Call + + + ENABLED + 1 + Generate ACK for a General Call + + + + + + + IC_ENABLE_STATUS + 0x0000009c + 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. + 0x00000000 + + + SLV_RX_DATA_LOST + 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 + [2:2] + read-only + + + INACTIVE + 0 + Slave RX Data is not lost + + + ACTIVE + 1 + Slave RX Data is lost + + + + + SLV_DISABLED_WHILE_BUSY + 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 + [1:1] + read-only + + + INACTIVE + 0 + Slave is disabled when it is idle + + + ACTIVE + 1 + Slave is disabled when it is active + + + + + IC_EN + 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 + [0:0] + read-only + + + DISABLED + 0 + I2C disabled + + + ENABLED + 1 + I2C enabled + + + + + + + IC_FS_SPKLEN + 0x000000a0 + 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. + 0x00000007 + + + IC_FS_SPKLEN + 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'. + [7:0] + read-write + + + + + IC_CLR_RESTART_DET + 0x000000a8 + Clear RESTART_DET Interrupt Register + 0x00000000 + + + CLR_RESTART_DET + Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_COMP_PARAM_1 + 0x000000f4 + 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 + 0x00000000 + + + TX_BUFFER_DEPTH + TX Buffer Depth = 16 + [23:16] + read-only + + + RX_BUFFER_DEPTH + RX Buffer Depth = 16 + [15:8] + read-only + + + ADD_ENCODED_PARAMS + Encoded parameters not visible + [7:7] + read-only + + + HAS_DMA + DMA handshaking signals are enabled + [6:6] + read-only + + + INTR_IO + COMBINED Interrupt outputs + [5:5] + read-only + + + HC_COUNT_VALUES + Programmable count values for each mode. + [4:4] + read-only + + + MAX_SPEED_MODE + MAX SPEED MODE = FAST MODE + [3:2] + read-only + + + APB_DATA_WIDTH + APB data bus width is 32 bits + [1:0] + read-only + + + + + IC_COMP_VERSION + 0x000000f8 + I2C Component Version Register + 0x3230312a + + + IC_COMP_VERSION + [31:0] + read-only + + + + + IC_COMP_TYPE + 0x000000fc + I2C Component Type Register + 0x44570140 + + + IC_COMP_TYPE + 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. + [31:0] + read-only + + + + + + + I2C1 + 0x40048000 + + I2C1_IRQ + 24 + + + + SPI0 + 0x4003c000 + + 0 + 4096 + registers + + + SPI0_IRQ + 18 + + + + SSPCR0 + 0x00000000 + Control register 0, SSPCR0 on page 3-4 + 0x00000000 + + + SCR + 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. + [15:8] + read-write + + + SPH + SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. + [7:7] + read-write + + + SPO + SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. + [6:6] + read-write + + + FRF + Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation. + [5:4] + read-write + + + DSS + 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. + [3:0] + read-write + + + + + SSPCR1 + 0x00000004 + Control register 1, SSPCR1 on page 3-5 + 0x00000000 + + + SOD + 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. + [3:3] + read-write + + + MS + 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. + [2:2] + read-write + + + SSE + Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled. + [1:1] + read-write + + + LBM + Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally. + [0:0] + read-write + + + + + SSPDR + 0x00000008 + Data register, SSPDR on page 3-6 + 0x00000000 + + + DATA + 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. + [15:0] + read-write + modify + + + + + SSPSR + 0x0000000c + Status register, SSPSR on page 3-7 + 0x00000003 + + + BSY + 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. + [4:4] + read-only + + + RFF + Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full. + [3:3] + read-only + + + RNE + Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty. + [2:2] + read-only + + + TNF + Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full. + [1:1] + read-only + + + TFE + Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty. + [0:0] + read-only + + + + + SSPCPSR + 0x00000010 + Clock prescale register, SSPCPSR on page 3-8 + 0x00000000 + + + CPSDVSR + 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. + [7:0] + read-write + + + + + SSPIMSC + 0x00000014 + Interrupt mask set or clear register, SSPIMSC on page 3-9 + 0x00000000 + + + TXIM + 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. + [3:3] + read-write + + + RXIM + 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. + [2:2] + read-write + + + RTIM + 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. + [1:1] + read-write + + + RORIM + 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. + [0:0] + read-write + + + + + SSPRIS + 0x00000018 + Raw interrupt status register, SSPRIS on page 3-10 + 0x00000008 + + + TXRIS + Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt + [3:3] + read-only + + + RXRIS + Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt + [2:2] + read-only + + + RTRIS + Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt + [1:1] + read-only + + + RORRIS + Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt + [0:0] + read-only + + + + + SSPMIS + 0x0000001c + Masked interrupt status register, SSPMIS on page 3-11 + 0x00000000 + + + TXMIS + Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt + [3:3] + read-only + + + RXMIS + Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt + [2:2] + read-only + + + RTMIS + Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt + [1:1] + read-only + + + RORMIS + Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt + [0:0] + read-only + + + + + SSPICR + 0x00000020 + Interrupt clear register, SSPICR on page 3-11 + 0x00000000 + + + RTIC + Clears the SSPRTINTR interrupt + [1:1] + read-write + oneToClear + + + RORIC + Clears the SSPRORINTR interrupt + [0:0] + read-write + oneToClear + + + + + SSPDMACR + 0x00000024 + DMA control register, SSPDMACR on page 3-12 + 0x00000000 + + + TXDMAE + Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. + [1:1] + read-write + + + RXDMAE + Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled. + [0:0] + read-write + + + + + SSPPERIPHID0 + 0x00000fe0 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000022 + + + PARTNUMBER0 + These bits read back as 0x22 + [7:0] + read-only + + + + + SSPPERIPHID1 + 0x00000fe4 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000010 + + + DESIGNER0 + These bits read back as 0x1 + [7:4] + read-only + + + PARTNUMBER1 + These bits read back as 0x0 + [3:0] + read-only + + + + + SSPPERIPHID2 + 0x00000fe8 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000034 + + + REVISION + These bits return the peripheral revision + [7:4] + read-only + + + DESIGNER1 + These bits read back as 0x4 + [3:0] + read-only + + + + + SSPPERIPHID3 + 0x00000fec + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000000 + + + CONFIGURATION + These bits read back as 0x00 + [7:0] + read-only + + + + + SSPPCELLID0 + 0x00000ff0 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x0000000d + + + SSPPCELLID0 + These bits read back as 0x0D + [7:0] + read-only + + + + + SSPPCELLID1 + 0x00000ff4 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x000000f0 + + + SSPPCELLID1 + These bits read back as 0xF0 + [7:0] + read-only + + + + + SSPPCELLID2 + 0x00000ff8 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x00000005 + + + SSPPCELLID2 + These bits read back as 0x05 + [7:0] + read-only + + + + + SSPPCELLID3 + 0x00000ffc + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x000000b1 + + + SSPPCELLID3 + These bits read back as 0xB1 + [7:0] + read-only + + + + + + + SPI1 + 0x40040000 + + SPI1_IRQ + 19 + + + + PIO0 + Programmable IO block + 0x50200000 + + 0 + 324 + registers + + + PIO0_IRQ_0 + 7 + + + PIO0_IRQ_1 + 8 + + + + CTRL + 0x00000000 + PIO control register + 0x00000000 + + + CLKDIV_RESTART + 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. + [11:8] + write-only + + + SM_RESTART + 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 program counter, the contents of the output shift register and the X/Y scratch registers are not affected. + [7:4] + write-only + + + SM_ENABLE + 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. + [3:0] + read-write + + + + + FSTAT + 0x00000004 + FIFO status register + 0x0f000f00 + + + TXEMPTY + State machine TX FIFO is empty + [27:24] + read-only + + + TXFULL + State machine TX FIFO is full + [19:16] + read-only + + + RXEMPTY + State machine RX FIFO is empty + [11:8] + read-only + + + RXFULL + State machine RX FIFO is full + [3:0] + read-only + + + + + FDEBUG + 0x00000008 + FIFO debug register + 0x00000000 + + + TXSTALL + State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear. + [27:24] + read-write + oneToClear + + + TXOVER + 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. + [19:16] + read-write + oneToClear + + + RXUNDER + 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. + [11:8] + read-write + oneToClear + + + RXSTALL + 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. + [3:0] + read-write + oneToClear + + + + + FLEVEL + 0x0000000c + FIFO levels + 0x00000000 + + + RX3 + [31:28] + read-only + + + TX3 + [27:24] + read-only + + + RX2 + [23:20] + read-only + + + TX2 + [19:16] + read-only + + + RX1 + [15:12] + read-only + + + TX1 + [11:8] + read-only + + + RX0 + [7:4] + read-only + + + TX0 + [3:0] + read-only + + + + + TXF0 + 0x00000010 + 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. + 0x00000000 + + + TXF0 + [31:0] + write-only + + + + + TXF1 + 0x00000014 + 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. + 0x00000000 + + + TXF1 + [31:0] + write-only + + + + + TXF2 + 0x00000018 + 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. + 0x00000000 + + + TXF2 + [31:0] + write-only + + + + + TXF3 + 0x0000001c + 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. + 0x00000000 + + + TXF3 + [31:0] + write-only + + + + + RXF0 + 0x00000020 + 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. + 0x00000000 + + + RXF0 + [31:0] + read-only + modify + + + + + RXF1 + 0x00000024 + 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. + 0x00000000 + + + RXF1 + [31:0] + read-only + modify + + + + + RXF2 + 0x00000028 + 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. + 0x00000000 + + + RXF2 + [31:0] + read-only + modify + + + + + RXF3 + 0x0000002c + 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. + 0x00000000 + + + RXF3 + [31:0] + read-only + modify + + + + + IRQ + 0x00000030 + State machine IRQ flags register. Write 1 to clear. There are 8 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 8 flags can be used for timing synchronisation between state machines, using IRQ and WAIT instructions. The lower four of these flags are also routed out to system-level interrupt requests, alongside FIFO status interrupts -- see e.g. IRQ0_INTE. + 0x00000000 + + + IRQ + [7:0] + read-write + oneToClear + + + + + IRQ_FORCE + 0x00000034 + 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. + 0x00000000 + + + IRQ_FORCE + [7:0] + write-only + + + + + INPUT_SYNC_BYPASS + 0x00000038 + 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. + 0x00000000 + + + INPUT_SYNC_BYPASS + [31:0] + read-write + + + + + DBG_PADOUT + 0x0000003c + 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. + 0x00000000 + + + DBG_PADOUT + [31:0] + read-only + + + + + DBG_PADOE + 0x00000040 + 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. + 0x00000000 + + + DBG_PADOE + [31:0] + read-only + + + + + DBG_CFGINFO + 0x00000044 + 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. + 0x00000000 + + + IMEM_SIZE + The size of the instruction memory, measured in units of one instruction + [21:16] + read-only + + + SM_COUNT + The number of state machines this PIO instance is equipped with. + [11:8] + read-only + + + FIFO_DEPTH + The depth of the state machine TX/RX FIFOs, measured in words. + Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double + this depth. + [5:0] + read-only + + + + + INSTR_MEM0 + 0x00000048 + Write-only access to instruction memory location 0 + 0x00000000 + + + INSTR_MEM0 + [15:0] + write-only + + + + + INSTR_MEM1 + 0x0000004c + Write-only access to instruction memory location 1 + 0x00000000 + + + INSTR_MEM1 + [15:0] + write-only + + + + + INSTR_MEM2 + 0x00000050 + Write-only access to instruction memory location 2 + 0x00000000 + + + INSTR_MEM2 + [15:0] + write-only + + + + + INSTR_MEM3 + 0x00000054 + Write-only access to instruction memory location 3 + 0x00000000 + + + INSTR_MEM3 + [15:0] + write-only + + + + + INSTR_MEM4 + 0x00000058 + Write-only access to instruction memory location 4 + 0x00000000 + + + INSTR_MEM4 + [15:0] + write-only + + + + + INSTR_MEM5 + 0x0000005c + Write-only access to instruction memory location 5 + 0x00000000 + + + INSTR_MEM5 + [15:0] + write-only + + + + + INSTR_MEM6 + 0x00000060 + Write-only access to instruction memory location 6 + 0x00000000 + + + INSTR_MEM6 + [15:0] + write-only + + + + + INSTR_MEM7 + 0x00000064 + Write-only access to instruction memory location 7 + 0x00000000 + + + INSTR_MEM7 + [15:0] + write-only + + + + + INSTR_MEM8 + 0x00000068 + Write-only access to instruction memory location 8 + 0x00000000 + + + INSTR_MEM8 + [15:0] + write-only + + + + + INSTR_MEM9 + 0x0000006c + Write-only access to instruction memory location 9 + 0x00000000 + + + INSTR_MEM9 + [15:0] + write-only + + + + + INSTR_MEM10 + 0x00000070 + Write-only access to instruction memory location 10 + 0x00000000 + + + INSTR_MEM10 + [15:0] + write-only + + + + + INSTR_MEM11 + 0x00000074 + Write-only access to instruction memory location 11 + 0x00000000 + + + INSTR_MEM11 + [15:0] + write-only + + + + + INSTR_MEM12 + 0x00000078 + Write-only access to instruction memory location 12 + 0x00000000 + + + INSTR_MEM12 + [15:0] + write-only + + + + + INSTR_MEM13 + 0x0000007c + Write-only access to instruction memory location 13 + 0x00000000 + + + INSTR_MEM13 + [15:0] + write-only + + + + + INSTR_MEM14 + 0x00000080 + Write-only access to instruction memory location 14 + 0x00000000 + + + INSTR_MEM14 + [15:0] + write-only + + + + + INSTR_MEM15 + 0x00000084 + Write-only access to instruction memory location 15 + 0x00000000 + + + INSTR_MEM15 + [15:0] + write-only + + + + + INSTR_MEM16 + 0x00000088 + Write-only access to instruction memory location 16 + 0x00000000 + + + INSTR_MEM16 + [15:0] + write-only + + + + + INSTR_MEM17 + 0x0000008c + Write-only access to instruction memory location 17 + 0x00000000 + + + INSTR_MEM17 + [15:0] + write-only + + + + + INSTR_MEM18 + 0x00000090 + Write-only access to instruction memory location 18 + 0x00000000 + + + INSTR_MEM18 + [15:0] + write-only + + + + + INSTR_MEM19 + 0x00000094 + Write-only access to instruction memory location 19 + 0x00000000 + + + INSTR_MEM19 + [15:0] + write-only + + + + + INSTR_MEM20 + 0x00000098 + Write-only access to instruction memory location 20 + 0x00000000 + + + INSTR_MEM20 + [15:0] + write-only + + + + + INSTR_MEM21 + 0x0000009c + Write-only access to instruction memory location 21 + 0x00000000 + + + INSTR_MEM21 + [15:0] + write-only + + + + + INSTR_MEM22 + 0x000000a0 + Write-only access to instruction memory location 22 + 0x00000000 + + + INSTR_MEM22 + [15:0] + write-only + + + + + INSTR_MEM23 + 0x000000a4 + Write-only access to instruction memory location 23 + 0x00000000 + + + INSTR_MEM23 + [15:0] + write-only + + + + + INSTR_MEM24 + 0x000000a8 + Write-only access to instruction memory location 24 + 0x00000000 + + + INSTR_MEM24 + [15:0] + write-only + + + + + INSTR_MEM25 + 0x000000ac + Write-only access to instruction memory location 25 + 0x00000000 + + + INSTR_MEM25 + [15:0] + write-only + + + + + INSTR_MEM26 + 0x000000b0 + Write-only access to instruction memory location 26 + 0x00000000 + + + INSTR_MEM26 + [15:0] + write-only + + + + + INSTR_MEM27 + 0x000000b4 + Write-only access to instruction memory location 27 + 0x00000000 + + + INSTR_MEM27 + [15:0] + write-only + + + + + INSTR_MEM28 + 0x000000b8 + Write-only access to instruction memory location 28 + 0x00000000 + + + INSTR_MEM28 + [15:0] + write-only + + + + + INSTR_MEM29 + 0x000000bc + Write-only access to instruction memory location 29 + 0x00000000 + + + INSTR_MEM29 + [15:0] + write-only + + + + + INSTR_MEM30 + 0x000000c0 + Write-only access to instruction memory location 30 + 0x00000000 + + + INSTR_MEM30 + [15:0] + write-only + + + + + INSTR_MEM31 + 0x000000c4 + Write-only access to instruction memory location 31 + 0x00000000 + + + INSTR_MEM31 + [15:0] + write-only + + + + + SM0_CLKDIV + 0x000000c8 + Clock divisor register for state machine 0 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM0_EXECCTRL + 0x000000cc + Execution/behavioural settings for state machine 0 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [4:4] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + + + STATUS_N + Comparison level for the MOV x, STATUS instruction + [3:0] + read-write + + + + + SM0_SHIFTCTRL + 0x000000d0 + Control behaviour of the input/output shift registers for state machine 0 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + + + SM0_ADDR + 0x000000d4 + Current instruction address of state machine 0 + 0x00000000 + + + SM0_ADDR + [4:0] + read-only + + + + + SM0_INSTR + 0x000000d8 + 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. + 0x00000000 + + + SM0_INSTR + [15:0] + read-write + + + + + SM0_PINCTRL + 0x000000dc + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + SM1_CLKDIV + 0x000000e0 + Clock divisor register for state machine 1 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM1_EXECCTRL + 0x000000e4 + Execution/behavioural settings for state machine 1 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [4:4] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + + + STATUS_N + Comparison level for the MOV x, STATUS instruction + [3:0] + read-write + + + + + SM1_SHIFTCTRL + 0x000000e8 + Control behaviour of the input/output shift registers for state machine 1 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + + + SM1_ADDR + 0x000000ec + Current instruction address of state machine 1 + 0x00000000 + + + SM1_ADDR + [4:0] + read-only + + + + + SM1_INSTR + 0x000000f0 + Read to see the instruction currently addressed by state machine 1's program counter + Write to execute an instruction immediately (including jumps) and then resume execution. + 0x00000000 + + + SM1_INSTR + [15:0] + read-write + + + + + SM1_PINCTRL + 0x000000f4 + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + SM2_CLKDIV + 0x000000f8 + Clock divisor register for state machine 2 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM2_EXECCTRL + 0x000000fc + Execution/behavioural settings for state machine 2 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [4:4] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + + + STATUS_N + Comparison level for the MOV x, STATUS instruction + [3:0] + read-write + + + + + SM2_SHIFTCTRL + 0x00000100 + Control behaviour of the input/output shift registers for state machine 2 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + + + SM2_ADDR + 0x00000104 + Current instruction address of state machine 2 + 0x00000000 + + + SM2_ADDR + [4:0] + read-only + + + + + SM2_INSTR + 0x00000108 + Read to see the instruction currently addressed by state machine 2's program counter + Write to execute an instruction immediately (including jumps) and then resume execution. + 0x00000000 + + + SM2_INSTR + [15:0] + read-write + + + + + SM2_PINCTRL + 0x0000010c + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + SM3_CLKDIV + 0x00000110 + Clock divisor register for state machine 3 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM3_EXECCTRL + 0x00000114 + Execution/behavioural settings for state machine 3 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [4:4] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + + + STATUS_N + Comparison level for the MOV x, STATUS instruction + [3:0] + read-write + + + + + SM3_SHIFTCTRL + 0x00000118 + Control behaviour of the input/output shift registers for state machine 3 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + + + SM3_ADDR + 0x0000011c + Current instruction address of state machine 3 + 0x00000000 + + + SM3_ADDR + [4:0] + read-only + + + + + SM3_INSTR + 0x00000120 + Read to see the instruction currently addressed by state machine 3's program counter + Write to execute an instruction immediately (including jumps) and then resume execution. + 0x00000000 + + + SM3_INSTR + [15:0] + read-write + + + + + SM3_PINCTRL + 0x00000124 + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + INTR + 0x00000128 + Raw Interrupts + 0x00000000 + + + SM3 + [11:11] + read-only + + + SM2 + [10:10] + read-only + + + SM1 + [9:9] + read-only + + + SM0 + [8:8] + read-only + + + SM3_TXNFULL + [7:7] + read-only + + + SM2_TXNFULL + [6:6] + read-only + + + SM1_TXNFULL + [5:5] + read-only + + + SM0_TXNFULL + [4:4] + read-only + + + SM3_RXNEMPTY + [3:3] + read-only + + + SM2_RXNEMPTY + [2:2] + read-only + + + SM1_RXNEMPTY + [1:1] + read-only + + + SM0_RXNEMPTY + [0:0] + read-only + + + + + IRQ0_INTE + 0x0000012c + Interrupt Enable for irq0 + 0x00000000 + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ0_INTF + 0x00000130 + Interrupt Force for irq0 + 0x00000000 + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ0_INTS + 0x00000134 + Interrupt status after masking & forcing for irq0 + 0x00000000 + + + SM3 + [11:11] + read-only + + + SM2 + [10:10] + read-only + + + SM1 + [9:9] + read-only + + + SM0 + [8:8] + read-only + + + SM3_TXNFULL + [7:7] + read-only + + + SM2_TXNFULL + [6:6] + read-only + + + SM1_TXNFULL + [5:5] + read-only + + + SM0_TXNFULL + [4:4] + read-only + + + SM3_RXNEMPTY + [3:3] + read-only + + + SM2_RXNEMPTY + [2:2] + read-only + + + SM1_RXNEMPTY + [1:1] + read-only + + + SM0_RXNEMPTY + [0:0] + read-only + + + + + IRQ1_INTE + 0x00000138 + Interrupt Enable for irq1 + 0x00000000 + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ1_INTF + 0x0000013c + Interrupt Force for irq1 + 0x00000000 + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ1_INTS + 0x00000140 + Interrupt status after masking & forcing for irq1 + 0x00000000 + + + SM3 + [11:11] + read-only + + + SM2 + [10:10] + read-only + + + SM1 + [9:9] + read-only + + + SM0 + [8:8] + read-only + + + SM3_TXNFULL + [7:7] + read-only + + + SM2_TXNFULL + [6:6] + read-only + + + SM1_TXNFULL + [5:5] + read-only + + + SM0_TXNFULL + [4:4] + read-only + + + SM3_RXNEMPTY + [3:3] + read-only + + + SM2_RXNEMPTY + [2:2] + read-only + + + SM1_RXNEMPTY + [1:1] + read-only + + + SM0_RXNEMPTY + [0:0] + read-only + + + + + + + PIO1 + 0x50300000 + + PIO1_IRQ_0 + 9 + + + PIO1_IRQ_1 + 10 + + + + BUSCTRL + Register block for busfabric control signals and performance counters + 0x40030000 + + 0 + 40 + registers + + + + BUS_PRIORITY + 0x00000000 + Set the priority of each master for bus arbitration. + 0x00000000 + + + DMA_W + 0 - low priority, 1 - high priority + [12:12] + read-write + + + DMA_R + 0 - low priority, 1 - high priority + [8:8] + read-write + + + PROC1 + 0 - low priority, 1 - high priority + [4:4] + read-write + + + PROC0 + 0 - low priority, 1 - high priority + [0:0] + read-write + + + + + BUS_PRIORITY_ACK + 0x00000004 + Bus priority acknowledge + 0x00000000 + + + BUS_PRIORITY_ACK + 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. + [0:0] + read-only + + + + + PERFCTR0 + 0x00000008 + Bus fabric performance counter 0 + 0x00000000 + + + PERFCTR0 + Busfabric saturating performance counter 0 + Count some event signal from the busfabric arbiters. + Write any value to clear. Select an event to count using PERFSEL0 + [23:0] + read-write + oneToClear + + + + + PERFSEL0 + 0x0000000c + Bus fabric performance event select for PERFCTR0 + 0x0000001f + + + PERFSEL0 + Select an event for PERFCTR0. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. + [4:0] + read-write + + + apb_contested + 0 + + + apb + 1 + + + fastperi_contested + 2 + + + fastperi + 3 + + + sram5_contested + 4 + + + sram5 + 5 + + + sram4_contested + 6 + + + sram4 + 7 + + + sram3_contested + 8 + + + sram3 + 9 + + + sram2_contested + 10 + + + sram2 + 11 + + + sram1_contested + 12 + + + sram1 + 13 + + + sram0_contested + 14 + + + sram0 + 15 + + + xip_main_contested + 16 + + + xip_main + 17 + + + rom_contested + 18 + + + rom + 19 + + + + + + + PERFCTR1 + 0x00000010 + Bus fabric performance counter 1 + 0x00000000 + + + PERFCTR1 + Busfabric saturating performance counter 1 + Count some event signal from the busfabric arbiters. + Write any value to clear. Select an event to count using PERFSEL1 + [23:0] + read-write + oneToClear + + + + + PERFSEL1 + 0x00000014 + Bus fabric performance event select for PERFCTR1 + 0x0000001f + + + PERFSEL1 + Select an event for PERFCTR1. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. + [4:0] + read-write + + + apb_contested + 0 + + + apb + 1 + + + fastperi_contested + 2 + + + fastperi + 3 + + + sram5_contested + 4 + + + sram5 + 5 + + + sram4_contested + 6 + + + sram4 + 7 + + + sram3_contested + 8 + + + sram3 + 9 + + + sram2_contested + 10 + + + sram2 + 11 + + + sram1_contested + 12 + + + sram1 + 13 + + + sram0_contested + 14 + + + sram0 + 15 + + + xip_main_contested + 16 + + + xip_main + 17 + + + rom_contested + 18 + + + rom + 19 + + + + + + + PERFCTR2 + 0x00000018 + Bus fabric performance counter 2 + 0x00000000 + + + PERFCTR2 + Busfabric saturating performance counter 2 + Count some event signal from the busfabric arbiters. + Write any value to clear. Select an event to count using PERFSEL2 + [23:0] + read-write + oneToClear + + + + + PERFSEL2 + 0x0000001c + Bus fabric performance event select for PERFCTR2 + 0x0000001f + + + PERFSEL2 + Select an event for PERFCTR2. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. + [4:0] + read-write + + + apb_contested + 0 + + + apb + 1 + + + fastperi_contested + 2 + + + fastperi + 3 + + + sram5_contested + 4 + + + sram5 + 5 + + + sram4_contested + 6 + + + sram4 + 7 + + + sram3_contested + 8 + + + sram3 + 9 + + + sram2_contested + 10 + + + sram2 + 11 + + + sram1_contested + 12 + + + sram1 + 13 + + + sram0_contested + 14 + + + sram0 + 15 + + + xip_main_contested + 16 + + + xip_main + 17 + + + rom_contested + 18 + + + rom + 19 + + + + + + + PERFCTR3 + 0x00000020 + Bus fabric performance counter 3 + 0x00000000 + + + PERFCTR3 + Busfabric saturating performance counter 3 + Count some event signal from the busfabric arbiters. + Write any value to clear. Select an event to count using PERFSEL3 + [23:0] + read-write + oneToClear + + + + + PERFSEL3 + 0x00000024 + Bus fabric performance event select for PERFCTR3 + 0x0000001f + + + PERFSEL3 + Select an event for PERFCTR3. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. + [4:0] + read-write + + + apb_contested + 0 + + + apb + 1 + + + fastperi_contested + 2 + + + fastperi + 3 + + + sram5_contested + 4 + + + sram5 + 5 + + + sram4_contested + 6 + + + sram4 + 7 + + + sram3_contested + 8 + + + sram3 + 9 + + + sram2_contested + 10 + + + sram2 + 11 + + + sram1_contested + 12 + + + sram1 + 13 + + + sram0_contested + 14 + + + sram0 + 15 + + + xip_main_contested + 16 + + + xip_main + 17 + + + rom_contested + 18 + + + rom + 19 + + + + + + + + + SIO + Single-cycle IO block + Provides core-local and inter-core hardware for the two processors, with single-cycle access. + 0xd0000000 + + 0 + 384 + registers + + + SIO_IRQ_PROC0 + 15 + + + SIO_IRQ_PROC1 + 16 + + + + CPUID + 0x00000000 + Processor core identifier + 0x00000000 + + + CPUID + Value is 0 when read from processor core 0, and 1 when read from processor core 1. + [31:0] + read-only + + + + + GPIO_IN + 0x00000004 + Input value for GPIO pins + 0x00000000 + + + GPIO_IN + Input value for GPIO0...29 + [29:0] + read-only + + + + + GPIO_HI_IN + 0x00000008 + Input value for QSPI pins + 0x00000000 + + + GPIO_HI_IN + Input value on QSPI IO in order 0..5: SCLK, SSn, SD0, SD1, SD2, SD3 + [5:0] + read-only + + + + + GPIO_OUT + 0x00000010 + GPIO output value + 0x00000000 + + + GPIO_OUT + Set output level (1/0 -> high/low) for GPIO0...29. + 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. + [29:0] + read-write + + + + + GPIO_OUT_SET + 0x00000014 + GPIO output value set + 0x00000000 + + + GPIO_OUT_SET + Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata` + [29:0] + write-only + + + + + GPIO_OUT_CLR + 0x00000018 + GPIO output value clear + 0x00000000 + + + GPIO_OUT_CLR + Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= ~wdata` + [29:0] + write-only + + + + + GPIO_OUT_XOR + 0x0000001c + GPIO output value XOR + 0x00000000 + + + GPIO_OUT_XOR + Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= wdata` + [29:0] + write-only + + + + + GPIO_OE + 0x00000020 + GPIO output enable + 0x00000000 + + + GPIO_OE + Set output enable (1/0 -> output/input) for GPIO0...29. + 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. + [29:0] + read-write + + + + + GPIO_OE_SET + 0x00000024 + GPIO output enable set + 0x00000000 + + + GPIO_OE_SET + Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata` + [29:0] + write-only + + + + + GPIO_OE_CLR + 0x00000028 + GPIO output enable clear + 0x00000000 + + + GPIO_OE_CLR + Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= ~wdata` + [29:0] + write-only + + + + + GPIO_OE_XOR + 0x0000002c + GPIO output enable XOR + 0x00000000 + + + GPIO_OE_XOR + Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= wdata` + [29:0] + write-only + + + + + GPIO_HI_OUT + 0x00000030 + QSPI output value + 0x00000000 + + + GPIO_HI_OUT + Set output level (1/0 -> high/low) for QSPI IO0...5. + 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. + [5:0] + read-write + + + + + GPIO_HI_OUT_SET + 0x00000034 + QSPI output value set + 0x00000000 + + + GPIO_HI_OUT_SET + Perform an atomic bit-set on GPIO_HI_OUT, i.e. `GPIO_HI_OUT |= wdata` + [5:0] + write-only + + + + + GPIO_HI_OUT_CLR + 0x00000038 + QSPI output value clear + 0x00000000 + + + GPIO_HI_OUT_CLR + Perform an atomic bit-clear on GPIO_HI_OUT, i.e. `GPIO_HI_OUT &= ~wdata` + [5:0] + write-only + + + + + GPIO_HI_OUT_XOR + 0x0000003c + QSPI output value XOR + 0x00000000 + + + GPIO_HI_OUT_XOR + Perform an atomic bitwise XOR on GPIO_HI_OUT, i.e. `GPIO_HI_OUT ^= wdata` + [5:0] + write-only + + + + + GPIO_HI_OE + 0x00000040 + QSPI output enable + 0x00000000 + + + GPIO_HI_OE + Set output enable (1/0 -> output/input) for QSPI IO0...5. + 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. + [5:0] + read-write + + + + + GPIO_HI_OE_SET + 0x00000044 + QSPI output enable set + 0x00000000 + + + GPIO_HI_OE_SET + Perform an atomic bit-set on GPIO_HI_OE, i.e. `GPIO_HI_OE |= wdata` + [5:0] + write-only + + + + + GPIO_HI_OE_CLR + 0x00000048 + QSPI output enable clear + 0x00000000 + + + GPIO_HI_OE_CLR + Perform an atomic bit-clear on GPIO_HI_OE, i.e. `GPIO_HI_OE &= ~wdata` + [5:0] + write-only + + + + + GPIO_HI_OE_XOR + 0x0000004c + QSPI output enable XOR + 0x00000000 + + + GPIO_HI_OE_XOR + Perform an atomic bitwise XOR on GPIO_HI_OE, i.e. `GPIO_HI_OE ^= wdata` + [5:0] + write-only + + + + + FIFO_ST + 0x00000050 + 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. + 0x00000002 + + + ROE + Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO. + [3:3] + read-write + oneToClear + + + WOF + Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO. + [2:2] + read-write + oneToClear + + + RDY + Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data) + [1:1] + read-only + + + VLD + Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid) + [0:0] + read-only + + + + + FIFO_WR + 0x00000054 + Write access to this core's TX FIFO + 0x00000000 + + + FIFO_WR + [31:0] + write-only + + + + + FIFO_RD + 0x00000058 + Read access to this core's RX FIFO + 0x00000000 + + + FIFO_RD + [31:0] + read-only + modify + + + + + SPINLOCK_ST + 0x0000005c + Spinlock state + A bitmap containing the state of all 32 spinlocks (1=locked). + Mainly intended for debugging. + 0x00000000 + + + SPINLOCK_ST + [31:0] + read-only + + + + + DIV_UDIVIDEND + 0x00000060 + Divider unsigned dividend + Write to the DIVIDEND operand of the divider, i.e. the p in `p / q`. + Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER. + UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an + unsigned calculation, and the S alias starts a signed calculation. + 0x00000000 + + + DIV_UDIVIDEND + [31:0] + read-write + + + + + DIV_UDIVISOR + 0x00000064 + Divider unsigned divisor + Write to the DIVISOR operand of the divider, i.e. the q in `p / q`. + Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER. + UDIVISOR/SDIVISOR are aliases of the same internal register. The U alias starts an + unsigned calculation, and the S alias starts a signed calculation. + 0x00000000 + + + DIV_UDIVISOR + [31:0] + read-write + + + + + DIV_SDIVIDEND + 0x00000068 + Divider signed dividend + The same as UDIVIDEND, but starts a signed calculation, rather than unsigned. + 0x00000000 + + + DIV_SDIVIDEND + [31:0] + read-write + + + + + DIV_SDIVISOR + 0x0000006c + Divider signed divisor + The same as UDIVISOR, but starts a signed calculation, rather than unsigned. + 0x00000000 + + + DIV_SDIVISOR + [31:0] + read-write + + + + + DIV_QUOTIENT + 0x00000070 + Divider result quotient + The result of `DIVIDEND / DIVISOR` (division). Contents undefined while CSR_READY is low. + For signed calculations, QUOTIENT is negative when the signs of DIVIDEND and DIVISOR differ. + This register can be written to directly, for context save/restore purposes. This halts any + in-progress calculation and sets the CSR_READY and CSR_DIRTY flags. + Reading from QUOTIENT clears the CSR_DIRTY flag, so should read results in the order + REMAINDER, QUOTIENT if CSR_DIRTY is used. + 0x00000000 + + + DIV_QUOTIENT + [31:0] + read-write + + + + + DIV_REMAINDER + 0x00000074 + Divider result remainder + The result of `DIVIDEND % DIVISOR` (modulo). Contents undefined while CSR_READY is low. + For signed calculations, REMAINDER is negative only when DIVIDEND is negative. + This register can be written to directly, for context save/restore purposes. This halts any + in-progress calculation and sets the CSR_READY and CSR_DIRTY flags. + 0x00000000 + + + DIV_REMAINDER + [31:0] + read-write + + + + + DIV_CSR + 0x00000078 + Control and status register for divider. + 0x00000001 + + + DIRTY + Changes to 1 when any register is written, and back to 0 when QUOTIENT is read. + Software can use this flag to make save/restore more efficient (skip if not DIRTY). + If the flag is used in this way, it's recommended to either read QUOTIENT only, + or REMAINDER and then QUOTIENT, to prevent data loss on context switch. + [1:1] + read-only + + + READY + Reads as 0 when a calculation is in progress, 1 otherwise. + Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no + matter if one is already in progress. + Writing to a result register will immediately terminate any in-progress calculation + and set the READY and DIRTY flags. + [0:0] + read-only + + + + + INTERP0_ACCUM0 + 0x00000080 + Read/write access to accumulator 0 + 0x00000000 + + + INTERP0_ACCUM0 + [31:0] + read-write + + + + + INTERP0_ACCUM1 + 0x00000084 + Read/write access to accumulator 1 + 0x00000000 + + + INTERP0_ACCUM1 + [31:0] + read-write + + + + + INTERP0_BASE0 + 0x00000088 + Read/write access to BASE0 register. + 0x00000000 + + + INTERP0_BASE0 + [31:0] + read-write + + + + + INTERP0_BASE1 + 0x0000008c + Read/write access to BASE1 register. + 0x00000000 + + + INTERP0_BASE1 + [31:0] + read-write + + + + + INTERP0_BASE2 + 0x00000090 + Read/write access to BASE2 register. + 0x00000000 + + + INTERP0_BASE2 + [31:0] + read-write + + + + + INTERP0_POP_LANE0 + 0x00000094 + Read LANE0 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP0_POP_LANE0 + [31:0] + read-only + + + + + INTERP0_POP_LANE1 + 0x00000098 + Read LANE1 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP0_POP_LANE1 + [31:0] + read-only + + + + + INTERP0_POP_FULL + 0x0000009c + Read FULL result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP0_POP_FULL + [31:0] + read-only + + + + + INTERP0_PEEK_LANE0 + 0x000000a0 + Read LANE0 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP0_PEEK_LANE0 + [31:0] + read-only + + + + + INTERP0_PEEK_LANE1 + 0x000000a4 + Read LANE1 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP0_PEEK_LANE1 + [31:0] + read-only + + + + + INTERP0_PEEK_FULL + 0x000000a8 + Read FULL result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP0_PEEK_FULL + [31:0] + read-only + + + + + INTERP0_CTRL_LANE0 + 0x000000ac + Control register for lane 0 + 0x00000000 + + + OVERF + Set if either OVERF0 or OVERF1 is set. + [25:25] + read-only + + + OVERF1 + Indicates if any masked-off MSBs in ACCUM1 are set. + [24:24] + read-only + + + OVERF0 + Indicates if any masked-off MSBs in ACCUM0 are set. + [23:23] + read-only + + + BLEND + 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. + [21:21] + read-write + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Logical right-shift applied to accumulator before masking + [4:0] + read-write + + + + + INTERP0_CTRL_LANE1 + 0x000000b0 + Control register for lane 1 + 0x00000000 + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Logical right-shift applied to accumulator before masking + [4:0] + read-write + + + + + INTERP0_ACCUM0_ADD + 0x000000b4 + Values written here are atomically added to ACCUM0 + Reading yields lane 0's raw shift and mask value (BASE0 not added). + 0x00000000 + + + INTERP0_ACCUM0_ADD + [23:0] + read-write + + + + + INTERP0_ACCUM1_ADD + 0x000000b8 + Values written here are atomically added to ACCUM1 + Reading yields lane 1's raw shift and mask value (BASE1 not added). + 0x00000000 + + + INTERP0_ACCUM1_ADD + [23:0] + read-write + + + + + INTERP0_BASE_1AND0 + 0x000000bc + 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. + 0x00000000 + + + INTERP0_BASE_1AND0 + [31:0] + write-only + + + + + INTERP1_ACCUM0 + 0x000000c0 + Read/write access to accumulator 0 + 0x00000000 + + + INTERP1_ACCUM0 + [31:0] + read-write + + + + + INTERP1_ACCUM1 + 0x000000c4 + Read/write access to accumulator 1 + 0x00000000 + + + INTERP1_ACCUM1 + [31:0] + read-write + + + + + INTERP1_BASE0 + 0x000000c8 + Read/write access to BASE0 register. + 0x00000000 + + + INTERP1_BASE0 + [31:0] + read-write + + + + + INTERP1_BASE1 + 0x000000cc + Read/write access to BASE1 register. + 0x00000000 + + + INTERP1_BASE1 + [31:0] + read-write + + + + + INTERP1_BASE2 + 0x000000d0 + Read/write access to BASE2 register. + 0x00000000 + + + INTERP1_BASE2 + [31:0] + read-write + + + + + INTERP1_POP_LANE0 + 0x000000d4 + Read LANE0 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP1_POP_LANE0 + [31:0] + read-only + + + + + INTERP1_POP_LANE1 + 0x000000d8 + Read LANE1 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP1_POP_LANE1 + [31:0] + read-only + + + + + INTERP1_POP_FULL + 0x000000dc + Read FULL result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP1_POP_FULL + [31:0] + read-only + + + + + INTERP1_PEEK_LANE0 + 0x000000e0 + Read LANE0 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP1_PEEK_LANE0 + [31:0] + read-only + + + + + INTERP1_PEEK_LANE1 + 0x000000e4 + Read LANE1 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP1_PEEK_LANE1 + [31:0] + read-only + + + + + INTERP1_PEEK_FULL + 0x000000e8 + Read FULL result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP1_PEEK_FULL + [31:0] + read-only + + + + + INTERP1_CTRL_LANE0 + 0x000000ec + Control register for lane 0 + 0x00000000 + + + OVERF + Set if either OVERF0 or OVERF1 is set. + [25:25] + read-only + + + OVERF1 + Indicates if any masked-off MSBs in ACCUM1 are set. + [24:24] + read-only + + + OVERF0 + Indicates if any masked-off MSBs in ACCUM0 are set. + [23:23] + read-only + + + CLAMP + 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 + [22:22] + read-write + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Logical right-shift applied to accumulator before masking + [4:0] + read-write + + + + + INTERP1_CTRL_LANE1 + 0x000000f0 + Control register for lane 1 + 0x00000000 + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Logical right-shift applied to accumulator before masking + [4:0] + read-write + + + + + INTERP1_ACCUM0_ADD + 0x000000f4 + Values written here are atomically added to ACCUM0 + Reading yields lane 0's raw shift and mask value (BASE0 not added). + 0x00000000 + + + INTERP1_ACCUM0_ADD + [23:0] + read-write + + + + + INTERP1_ACCUM1_ADD + 0x000000f8 + Values written here are atomically added to ACCUM1 + Reading yields lane 1's raw shift and mask value (BASE1 not added). + 0x00000000 + + + INTERP1_ACCUM1_ADD + [23:0] + read-write + + + + + INTERP1_BASE_1AND0 + 0x000000fc + 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. + 0x00000000 + + + INTERP1_BASE_1AND0 + [31:0] + write-only + + + + + SPINLOCK0 + 0x00000100 + 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. + 0x00000000 + + + SPINLOCK0 + [31:0] + read-write + modify + + + + + SPINLOCK1 + 0x00000104 + 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. + 0x00000000 + + + SPINLOCK1 + [31:0] + read-write + modify + + + + + SPINLOCK2 + 0x00000108 + 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. + 0x00000000 + + + SPINLOCK2 + [31:0] + read-write + modify + + + + + SPINLOCK3 + 0x0000010c + 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. + 0x00000000 + + + SPINLOCK3 + [31:0] + read-write + modify + + + + + SPINLOCK4 + 0x00000110 + 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. + 0x00000000 + + + SPINLOCK4 + [31:0] + read-write + modify + + + + + SPINLOCK5 + 0x00000114 + 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. + 0x00000000 + + + SPINLOCK5 + [31:0] + read-write + modify + + + + + SPINLOCK6 + 0x00000118 + 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. + 0x00000000 + + + SPINLOCK6 + [31:0] + read-write + modify + + + + + SPINLOCK7 + 0x0000011c + 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. + 0x00000000 + + + SPINLOCK7 + [31:0] + read-write + modify + + + + + SPINLOCK8 + 0x00000120 + 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. + 0x00000000 + + + SPINLOCK8 + [31:0] + read-write + modify + + + + + SPINLOCK9 + 0x00000124 + 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. + 0x00000000 + + + SPINLOCK9 + [31:0] + read-write + modify + + + + + SPINLOCK10 + 0x00000128 + 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. + 0x00000000 + + + SPINLOCK10 + [31:0] + read-write + modify + + + + + SPINLOCK11 + 0x0000012c + 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. + 0x00000000 + + + SPINLOCK11 + [31:0] + read-write + modify + + + + + SPINLOCK12 + 0x00000130 + 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. + 0x00000000 + + + SPINLOCK12 + [31:0] + read-write + modify + + + + + SPINLOCK13 + 0x00000134 + 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. + 0x00000000 + + + SPINLOCK13 + [31:0] + read-write + modify + + + + + SPINLOCK14 + 0x00000138 + 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. + 0x00000000 + + + SPINLOCK14 + [31:0] + read-write + modify + + + + + SPINLOCK15 + 0x0000013c + 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. + 0x00000000 + + + SPINLOCK15 + [31:0] + read-write + modify + + + + + SPINLOCK16 + 0x00000140 + 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. + 0x00000000 + + + SPINLOCK16 + [31:0] + read-write + modify + + + + + SPINLOCK17 + 0x00000144 + 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. + 0x00000000 + + + SPINLOCK17 + [31:0] + read-write + modify + + + + + SPINLOCK18 + 0x00000148 + 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. + 0x00000000 + + + SPINLOCK18 + [31:0] + read-write + modify + + + + + SPINLOCK19 + 0x0000014c + 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. + 0x00000000 + + + SPINLOCK19 + [31:0] + read-write + modify + + + + + SPINLOCK20 + 0x00000150 + 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. + 0x00000000 + + + SPINLOCK20 + [31:0] + read-write + modify + + + + + SPINLOCK21 + 0x00000154 + 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. + 0x00000000 + + + SPINLOCK21 + [31:0] + read-write + modify + + + + + SPINLOCK22 + 0x00000158 + 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. + 0x00000000 + + + SPINLOCK22 + [31:0] + read-write + modify + + + + + SPINLOCK23 + 0x0000015c + 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. + 0x00000000 + + + SPINLOCK23 + [31:0] + read-write + modify + + + + + SPINLOCK24 + 0x00000160 + 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. + 0x00000000 + + + SPINLOCK24 + [31:0] + read-write + modify + + + + + SPINLOCK25 + 0x00000164 + 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. + 0x00000000 + + + SPINLOCK25 + [31:0] + read-write + modify + + + + + SPINLOCK26 + 0x00000168 + 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. + 0x00000000 + + + SPINLOCK26 + [31:0] + read-write + modify + + + + + SPINLOCK27 + 0x0000016c + 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. + 0x00000000 + + + SPINLOCK27 + [31:0] + read-write + modify + + + + + SPINLOCK28 + 0x00000170 + 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. + 0x00000000 + + + SPINLOCK28 + [31:0] + read-write + modify + + + + + SPINLOCK29 + 0x00000174 + 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. + 0x00000000 + + + SPINLOCK29 + [31:0] + read-write + modify + + + + + SPINLOCK30 + 0x00000178 + 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. + 0x00000000 + + + SPINLOCK30 + [31:0] + read-write + modify + + + + + SPINLOCK31 + 0x0000017c + 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. + 0x00000000 + + + SPINLOCK31 + [31:0] + read-write + modify + + + + + + + USB + USB FS/LS controller device registers + 0x50110000 + + 0 + 156 + registers + + + USBCTRL_IRQ + 5 + + + + ADDR_ENDP + 0x00000000 + Device address and endpoint control + 0x00000000 + + + ENDPOINT + Device endpoint to send data to. Only valid for HOST mode. + [19:16] + read-write + + + ADDRESS + 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. + [6:0] + read-write + + + + + ADDR_ENDP1 + 0x00000004 + Interrupt endpoint 1. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP2 + 0x00000008 + Interrupt endpoint 2. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP3 + 0x0000000c + Interrupt endpoint 3. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP4 + 0x00000010 + Interrupt endpoint 4. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP5 + 0x00000014 + Interrupt endpoint 5. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP6 + 0x00000018 + Interrupt endpoint 6. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP7 + 0x0000001c + Interrupt endpoint 7. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP8 + 0x00000020 + Interrupt endpoint 8. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP9 + 0x00000024 + Interrupt endpoint 9. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP10 + 0x00000028 + Interrupt endpoint 10. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP11 + 0x0000002c + Interrupt endpoint 11. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP12 + 0x00000030 + Interrupt endpoint 12. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP13 + 0x00000034 + Interrupt endpoint 13. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP14 + 0x00000038 + Interrupt endpoint 14. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP15 + 0x0000003c + Interrupt endpoint 15. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + MAIN_CTRL + 0x00000040 + Main control register + 0x00000000 + + + SIM_TIMING + Reduced timings for simulation + [31:31] + read-write + + + HOST_NDEVICE + Device mode = 0, Host mode = 1 + [1:1] + read-write + + + CONTROLLER_EN + Enable controller + [0:0] + read-write + + + + + SOF_WR + 0x00000044 + 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. + 0x00000000 + + + COUNT + [10:0] + write-only + + + + + SOF_RD + 0x00000048 + 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. + 0x00000000 + + + COUNT + [10:0] + read-only + + + + + SIE_CTRL + 0x0000004c + SIE control register + 0x00000000 + + + EP0_INT_STALL + Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL + [31:31] + read-write + + + EP0_DOUBLE_BUF + Device: EP0 single buffered = 0, double buffered = 1 + [30:30] + read-write + + + EP0_INT_1BUF + Device: Set bit in BUFF_STATUS for every buffer completed on EP0 + [29:29] + read-write + + + EP0_INT_2BUF + Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0 + [28:28] + read-write + + + EP0_INT_NAK + Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK + [27:27] + read-write + + + DIRECT_EN + Direct bus drive enable + [26:26] + read-write + + + DIRECT_DP + Direct control of DP + [25:25] + read-write + + + DIRECT_DM + Direct control of DM + [24:24] + read-write + + + TRANSCEIVER_PD + Power down bus transceiver + [18:18] + read-write + + + RPU_OPT + Device: Pull-up strength (0=1K2, 1=2k3) + [17:17] + read-write + + + PULLUP_EN + Device: Enable pull up resistor + [16:16] + read-write + + + PULLDOWN_EN + Host: Enable pull down resistors + [15:15] + read-write + + + RESET_BUS + Host: Reset bus + [13:13] + write-only + + + RESUME + Device: Remote wakeup. Device can initiate its own resume after suspend. + [12:12] + write-only + + + VBUS_EN + Host: Enable VBUS + [11:11] + read-write + + + KEEP_ALIVE_EN + Host: Enable keep alive packet (for low speed bus) + [10:10] + read-write + + + SOF_EN + Host: Enable SOF generation (for full speed bus) + [9:9] + read-write + + + SOF_SYNC + Host: Delay packet(s) until after SOF + [8:8] + read-write + + + PREAMBLE_EN + Host: Preable enable for LS device on FS hub + [6:6] + read-write + + + STOP_TRANS + Host: Stop transaction + [4:4] + write-only + + + RECEIVE_DATA + Host: Receive transaction (IN to host) + [3:3] + read-write + + + SEND_DATA + Host: Send transaction (OUT from host) + [2:2] + read-write + + + SEND_SETUP + Host: Send Setup packet + [1:1] + read-write + + + START_TRANS + Host: Start transaction + [0:0] + write-only + + + + + SIE_STATUS + 0x00000050 + SIE status register + 0x00000000 + + + DATA_SEQ_ERROR + 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 + [31:31] + read-write + oneToClear + + + ACK_REC + ACK received. Raised by both host and device. + [30:30] + read-write + oneToClear + + + STALL_REC + Host: STALL received + [29:29] + read-write + oneToClear + + + NAK_REC + Host: NAK received + [28:28] + read-write + oneToClear + + + RX_TIMEOUT + 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. + [27:27] + read-write + oneToClear + + + RX_OVERFLOW + RX overflow is raised by the Serial RX engine if the incoming data is too fast. + [26:26] + read-write + oneToClear + + + BIT_STUFF_ERROR + Bit Stuff Error. Raised by the Serial RX engine. + [25:25] + read-write + oneToClear + + + CRC_ERROR + CRC Error. Raised by the Serial RX engine. + [24:24] + read-write + oneToClear + + + BUS_RESET + Device: bus reset received + [19:19] + read-write + oneToClear + + + TRANS_COMPLETE + 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 + [18:18] + read-write + oneToClear + + + SETUP_REC + Device: Setup packet received + [17:17] + read-write + oneToClear + + + CONNECTED + Device: connected + [16:16] + read-only + + + RESUME + Host: Device has initiated a remote resume. Device: host has initiated a resume. + [11:11] + read-write + oneToClear + + + VBUS_OVER_CURR + VBUS over current detected + [10:10] + read-only + + + SPEED + Host: device speed. Disconnected = 00, LS = 01, FS = 10 + [9:8] + read-only + + + SUSPENDED + Bus in suspended state. Valid for device and host. Host and device will go into suspend if neither Keep Alive / SOF frames are enabled. + [4:4] + read-only + + + LINE_STATE + USB bus line state + [3:2] + read-only + + + VBUS_DETECTED + Device: VBUS Detected + [0:0] + read-only + + + + + INT_EP_CTRL + 0x00000054 + interrupt endpoint control register + 0x00000000 + + + INT_EP_ACTIVE + Host: Enable interrupt endpoint 1 => 15 + [15:1] + read-write + + + + + BUFF_STATUS + 0x00000058 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + oneToClear + + + EP15_IN + [30:30] + read-write + oneToClear + + + EP14_OUT + [29:29] + read-write + oneToClear + + + EP14_IN + [28:28] + read-write + oneToClear + + + EP13_OUT + [27:27] + read-write + oneToClear + + + EP13_IN + [26:26] + read-write + oneToClear + + + EP12_OUT + [25:25] + read-write + oneToClear + + + EP12_IN + [24:24] + read-write + oneToClear + + + EP11_OUT + [23:23] + read-write + oneToClear + + + EP11_IN + [22:22] + read-write + oneToClear + + + EP10_OUT + [21:21] + read-write + oneToClear + + + EP10_IN + [20:20] + read-write + oneToClear + + + EP9_OUT + [19:19] + read-write + oneToClear + + + EP9_IN + [18:18] + read-write + oneToClear + + + EP8_OUT + [17:17] + read-write + oneToClear + + + EP8_IN + [16:16] + read-write + oneToClear + + + EP7_OUT + [15:15] + read-write + oneToClear + + + EP7_IN + [14:14] + read-write + oneToClear + + + EP6_OUT + [13:13] + read-write + oneToClear + + + EP6_IN + [12:12] + read-write + oneToClear + + + EP5_OUT + [11:11] + read-write + oneToClear + + + EP5_IN + [10:10] + read-write + oneToClear + + + EP4_OUT + [9:9] + read-write + oneToClear + + + EP4_IN + [8:8] + read-write + oneToClear + + + EP3_OUT + [7:7] + read-write + oneToClear + + + EP3_IN + [6:6] + read-write + oneToClear + + + EP2_OUT + [5:5] + read-write + oneToClear + + + EP2_IN + [4:4] + read-write + oneToClear + + + EP1_OUT + [3:3] + read-write + oneToClear + + + EP1_IN + [2:2] + read-write + oneToClear + + + EP0_OUT + [1:1] + read-write + oneToClear + + + EP0_IN + [0:0] + read-write + oneToClear + + + + + BUFF_CPU_SHOULD_HANDLE + 0x0000005c + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-only + + + EP15_IN + [30:30] + read-only + + + EP14_OUT + [29:29] + read-only + + + EP14_IN + [28:28] + read-only + + + EP13_OUT + [27:27] + read-only + + + EP13_IN + [26:26] + read-only + + + EP12_OUT + [25:25] + read-only + + + EP12_IN + [24:24] + read-only + + + EP11_OUT + [23:23] + read-only + + + EP11_IN + [22:22] + read-only + + + EP10_OUT + [21:21] + read-only + + + EP10_IN + [20:20] + read-only + + + EP9_OUT + [19:19] + read-only + + + EP9_IN + [18:18] + read-only + + + EP8_OUT + [17:17] + read-only + + + EP8_IN + [16:16] + read-only + + + EP7_OUT + [15:15] + read-only + + + EP7_IN + [14:14] + read-only + + + EP6_OUT + [13:13] + read-only + + + EP6_IN + [12:12] + read-only + + + EP5_OUT + [11:11] + read-only + + + EP5_IN + [10:10] + read-only + + + EP4_OUT + [9:9] + read-only + + + EP4_IN + [8:8] + read-only + + + EP3_OUT + [7:7] + read-only + + + EP3_IN + [6:6] + read-only + + + EP2_OUT + [5:5] + read-only + + + EP2_IN + [4:4] + read-only + + + EP1_OUT + [3:3] + read-only + + + EP1_IN + [2:2] + read-only + + + EP0_OUT + [1:1] + read-only + + + EP0_IN + [0:0] + read-only + + + + + EP_ABORT + 0x00000060 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + + + EP15_IN + [30:30] + read-write + + + EP14_OUT + [29:29] + read-write + + + EP14_IN + [28:28] + read-write + + + EP13_OUT + [27:27] + read-write + + + EP13_IN + [26:26] + read-write + + + EP12_OUT + [25:25] + read-write + + + EP12_IN + [24:24] + read-write + + + EP11_OUT + [23:23] + read-write + + + EP11_IN + [22:22] + read-write + + + EP10_OUT + [21:21] + read-write + + + EP10_IN + [20:20] + read-write + + + EP9_OUT + [19:19] + read-write + + + EP9_IN + [18:18] + read-write + + + EP8_OUT + [17:17] + read-write + + + EP8_IN + [16:16] + read-write + + + EP7_OUT + [15:15] + read-write + + + EP7_IN + [14:14] + read-write + + + EP6_OUT + [13:13] + read-write + + + EP6_IN + [12:12] + read-write + + + EP5_OUT + [11:11] + read-write + + + EP5_IN + [10:10] + read-write + + + EP4_OUT + [9:9] + read-write + + + EP4_IN + [8:8] + read-write + + + EP3_OUT + [7:7] + read-write + + + EP3_IN + [6:6] + read-write + + + EP2_OUT + [5:5] + read-write + + + EP2_IN + [4:4] + read-write + + + EP1_OUT + [3:3] + read-write + + + EP1_IN + [2:2] + read-write + + + EP0_OUT + [1:1] + read-write + + + EP0_IN + [0:0] + read-write + + + + + EP_ABORT_DONE + 0x00000064 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + oneToClear + + + EP15_IN + [30:30] + read-write + oneToClear + + + EP14_OUT + [29:29] + read-write + oneToClear + + + EP14_IN + [28:28] + read-write + oneToClear + + + EP13_OUT + [27:27] + read-write + oneToClear + + + EP13_IN + [26:26] + read-write + oneToClear + + + EP12_OUT + [25:25] + read-write + oneToClear + + + EP12_IN + [24:24] + read-write + oneToClear + + + EP11_OUT + [23:23] + read-write + oneToClear + + + EP11_IN + [22:22] + read-write + oneToClear + + + EP10_OUT + [21:21] + read-write + oneToClear + + + EP10_IN + [20:20] + read-write + oneToClear + + + EP9_OUT + [19:19] + read-write + oneToClear + + + EP9_IN + [18:18] + read-write + oneToClear + + + EP8_OUT + [17:17] + read-write + oneToClear + + + EP8_IN + [16:16] + read-write + oneToClear + + + EP7_OUT + [15:15] + read-write + oneToClear + + + EP7_IN + [14:14] + read-write + oneToClear + + + EP6_OUT + [13:13] + read-write + oneToClear + + + EP6_IN + [12:12] + read-write + oneToClear + + + EP5_OUT + [11:11] + read-write + oneToClear + + + EP5_IN + [10:10] + read-write + oneToClear + + + EP4_OUT + [9:9] + read-write + oneToClear + + + EP4_IN + [8:8] + read-write + oneToClear + + + EP3_OUT + [7:7] + read-write + oneToClear + + + EP3_IN + [6:6] + read-write + oneToClear + + + EP2_OUT + [5:5] + read-write + oneToClear + + + EP2_IN + [4:4] + read-write + oneToClear + + + EP1_OUT + [3:3] + read-write + oneToClear + + + EP1_IN + [2:2] + read-write + oneToClear + + + EP0_OUT + [1:1] + read-write + oneToClear + + + EP0_IN + [0:0] + read-write + oneToClear + + + + + EP_STALL_ARM + 0x00000068 + 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. + 0x00000000 + + + EP0_OUT + [1:1] + read-write + + + EP0_IN + [0:0] + read-write + + + + + NAK_POLL + 0x0000006c + Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK. + 0x00100010 + + + DELAY_FS + NAK polling interval for a full speed device + [25:16] + read-write + + + DELAY_LS + NAK polling interval for a low speed device + [9:0] + read-write + + + + + EP_STATUS_STALL_NAK + 0x00000070 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + oneToClear + + + EP15_IN + [30:30] + read-write + oneToClear + + + EP14_OUT + [29:29] + read-write + oneToClear + + + EP14_IN + [28:28] + read-write + oneToClear + + + EP13_OUT + [27:27] + read-write + oneToClear + + + EP13_IN + [26:26] + read-write + oneToClear + + + EP12_OUT + [25:25] + read-write + oneToClear + + + EP12_IN + [24:24] + read-write + oneToClear + + + EP11_OUT + [23:23] + read-write + oneToClear + + + EP11_IN + [22:22] + read-write + oneToClear + + + EP10_OUT + [21:21] + read-write + oneToClear + + + EP10_IN + [20:20] + read-write + oneToClear + + + EP9_OUT + [19:19] + read-write + oneToClear + + + EP9_IN + [18:18] + read-write + oneToClear + + + EP8_OUT + [17:17] + read-write + oneToClear + + + EP8_IN + [16:16] + read-write + oneToClear + + + EP7_OUT + [15:15] + read-write + oneToClear + + + EP7_IN + [14:14] + read-write + oneToClear + + + EP6_OUT + [13:13] + read-write + oneToClear + + + EP6_IN + [12:12] + read-write + oneToClear + + + EP5_OUT + [11:11] + read-write + oneToClear + + + EP5_IN + [10:10] + read-write + oneToClear + + + EP4_OUT + [9:9] + read-write + oneToClear + + + EP4_IN + [8:8] + read-write + oneToClear + + + EP3_OUT + [7:7] + read-write + oneToClear + + + EP3_IN + [6:6] + read-write + oneToClear + + + EP2_OUT + [5:5] + read-write + oneToClear + + + EP2_IN + [4:4] + read-write + oneToClear + + + EP1_OUT + [3:3] + read-write + oneToClear + + + EP1_IN + [2:2] + read-write + oneToClear + + + EP0_OUT + [1:1] + read-write + oneToClear + + + EP0_IN + [0:0] + read-write + oneToClear + + + + + USB_MUXING + 0x00000074 + Where to connect the USB controller. Should be to_phy by default. + 0x00000000 + + + SOFTCON + [3:3] + read-write + + + TO_DIGITAL_PAD + [2:2] + read-write + + + TO_EXTPHY + [1:1] + read-write + + + TO_PHY + [0:0] + read-write + + + + + USB_PWR + 0x00000078 + 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 so switch over to the override value. + 0x00000000 + + + OVERCURR_DETECT_EN + [5:5] + read-write + + + OVERCURR_DETECT + [4:4] + read-write + + + VBUS_DETECT_OVERRIDE_EN + [3:3] + read-write + + + VBUS_DETECT + [2:2] + read-write + + + VBUS_EN_OVERRIDE_EN + [1:1] + read-write + + + VBUS_EN + [0:0] + read-write + + + + + USBPHY_DIRECT + 0x0000007c + Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation + Use in conjunction with usbphy_direct_override register + 0x00000000 + + + DM_OVV + Status bit from USB PHY + [22:22] + read-only + + + DP_OVV + Status bit from USB PHY + [21:21] + read-only + + + DM_OVCN + Status bit from USB PHY + [20:20] + read-only + + + DP_OVCN + Status bit from USB PHY + [19:19] + read-only + + + RX_DM + Status bit from USB PHY + DPM pin state + [18:18] + read-only + + + RX_DP + Status bit from USB PHY + DPP pin state + [17:17] + read-only + + + RX_DD + Status bit from USB PHY + RX Diff data + [16:16] + read-only + + + TX_DIFFMODE + [15:15] + read-write + + + TX_FSSLEW + [14:14] + read-write + + + TX_PD + [13:13] + read-write + + + RX_PD + [12:12] + read-write + + + TX_DM + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + TX_SEMODE=0, Ignored + TX_SEMODE=1, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM + [11:11] + read-write + + + TX_DP + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + TX_SEMODE=0, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP + TX_SEMODE=1, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP + [10:10] + read-write + + + TX_DM_OE + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + TX_SEMODE=0, Ignored. + TX_SEMODE=1, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving + [9:9] + read-write + + + TX_DP_OE + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + TX_SEMODE=0, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving + TX_SEMODE=1, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving + [8:8] + read-write + + + DM_PULLDN_EN + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + 1 - Enable Rpd on DPM + [6:6] + read-write + + + DM_PULLUP_EN + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + 1 - Enable Rpu on DPM + [5:5] + read-write + + + DM_PULLUP_HISEL + when dm_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 + [4:4] + read-write + + + DP_PULLDN_EN + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + 1 - Enable Rpd on DPP + [2:2] + read-write + + + DP_PULLUP_EN + Value to drive to USB PHY when override enable is set (which will override the default value or value driven from USB controller + [1:1] + read-write + + + DP_PULLUP_HISEL + when dp_pullup_en is set high, this enables second resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 + [0:0] + read-write + + + + + USBPHY_DIRECT_OVERRIDE + 0x00000080 + 0x00000000 + + + TX_DIFFMODE_OVERRIDE_EN + [15:15] + read-write + + + DM_PULLUP_OVERRIDE_EN + [12:12] + read-write + + + TX_FSSLEW_OVERRIDE_EN + [11:11] + read-write + + + TX_PD_OVERRIDE_EN + [10:10] + read-write + + + RX_PD_OVERRIDE_EN + [9:9] + read-write + + + TX_DM_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [8:8] + read-write + + + TX_DP_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [7:7] + read-write + + + TX_DM_OE_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [6:6] + read-write + + + TX_DP_OE_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [5:5] + read-write + + + DM_PULLDN_EN_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [4:4] + read-write + + + DP_PULLDN_EN_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [3:3] + read-write + + + DP_PULLUP_EN_OVERRIDE_EN + Override default value or value driven from USB Controller to PHY + [2:2] + read-write + + + DM_PULLUP_HISEL_OVERRIDE_EN + [1:1] + read-write + + + DP_PULLUP_HISEL_OVERRIDE_EN + [0:0] + read-write + + + + + USBPHY_TRIM + 0x00000084 + Note that most functions are driven directly from usb_fsls controller. This register allows more detailed control/status from the USB PHY. Useful for debug but not expected to be used in normal operation + 0x00001f1f + + + DM_PULLDN_TRIM + 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 + [12:8] + read-write + + + DP_PULLDN_TRIM + 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 + [4:0] + read-write + + + + + INTR + 0x0000008c + Raw Interrupts + 0x00000000 + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-only + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-only + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-only + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-only + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [15:15] + read-only + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-only + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-only + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-only + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECT + [11:11] + read-only + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-only + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-only + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-only + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-only + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-only + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-only + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-only + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-only + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-only + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [1:1] + read-only + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-only + + + + + INTE + 0x00000090 + Interrupt Enable + 0x00000000 + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-write + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-write + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-write + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-write + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [15:15] + read-write + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-write + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-write + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-write + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECT + [11:11] + read-write + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-write + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-write + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-write + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-write + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-write + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-write + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-write + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-write + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-write + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [1:1] + read-write + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-write + + + + + INTF + 0x00000094 + Interrupt Force + 0x00000000 + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-write + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-write + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-write + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-write + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [15:15] + read-write + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-write + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-write + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-write + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECT + [11:11] + read-write + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-write + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-write + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-write + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-write + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-write + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-write + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-write + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-write + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-write + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [1:1] + read-write + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-write + + + + + INTS + 0x00000098 + Interrupt status after masking & forcing + 0x00000000 + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-only + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-only + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-only + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-only + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [15:15] + read-only + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-only + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-only + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-only + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECT + [11:11] + read-only + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-only + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-only + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-only + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-only + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-only + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-only + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-only + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-only + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-only + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME_REMOTE + [1:1] + read-only + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-only + + + + + + + USB_DPRAM + DPRAM layout for USB device. + 0x50100000 + + 0 + 256 + registers + + + + SETUP_PACKET_LOW + 0x00000000 + Bytes 0-3 of the SETUP packet from the host. + 0x00000000 + + + WVALUE + [31:16] + read-write + + + BREQUEST + [15:8] + read-write + + + BMREQUESTTYPE + [7:0] + read-write + + + + + SETUP_PACKET_HIGH + 0x00000004 + Bytes 4-7 of the setup packet from the host. + 0x00000000 + + + WLENGTH + [31:16] + read-write + + + WINDEX + [15:0] + read-write + + + + + EP1_IN_CONTROL + 0x00000008 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP1_OUT_CONTROL + 0x0000000c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP2_IN_CONTROL + 0x00000010 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP2_OUT_CONTROL + 0x00000014 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP3_IN_CONTROL + 0x00000018 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP3_OUT_CONTROL + 0x0000001c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP4_IN_CONTROL + 0x00000020 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP4_OUT_CONTROL + 0x00000024 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP5_IN_CONTROL + 0x00000028 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP5_OUT_CONTROL + 0x0000002c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP6_IN_CONTROL + 0x00000030 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP6_OUT_CONTROL + 0x00000034 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP7_IN_CONTROL + 0x00000038 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP7_OUT_CONTROL + 0x0000003c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP8_IN_CONTROL + 0x00000040 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP8_OUT_CONTROL + 0x00000044 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP9_IN_CONTROL + 0x00000048 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP9_OUT_CONTROL + 0x0000004c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP10_IN_CONTROL + 0x00000050 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP10_OUT_CONTROL + 0x00000054 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP11_IN_CONTROL + 0x00000058 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP11_OUT_CONTROL + 0x0000005c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP12_IN_CONTROL + 0x00000060 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP12_OUT_CONTROL + 0x00000064 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP13_IN_CONTROL + 0x00000068 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP13_OUT_CONTROL + 0x0000006c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP14_IN_CONTROL + 0x00000070 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP14_OUT_CONTROL + 0x00000074 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP15_IN_CONTROL + 0x00000078 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP15_OUT_CONTROL + 0x0000007c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP0_IN_BUFFER_CONTROL + 0x00000080 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP0_OUT_BUFFER_CONTROL + 0x00000084 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP1_IN_BUFFER_CONTROL + 0x00000088 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP1_OUT_BUFFER_CONTROL + 0x0000008c + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP2_IN_BUFFER_CONTROL + 0x00000090 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP2_OUT_BUFFER_CONTROL + 0x00000094 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP3_IN_BUFFER_CONTROL + 0x00000098 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP3_OUT_BUFFER_CONTROL + 0x0000009c + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP4_IN_BUFFER_CONTROL + 0x000000a0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP4_OUT_BUFFER_CONTROL + 0x000000a4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP5_IN_BUFFER_CONTROL + 0x000000a8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP5_OUT_BUFFER_CONTROL + 0x000000ac + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP6_IN_BUFFER_CONTROL + 0x000000b0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP6_OUT_BUFFER_CONTROL + 0x000000b4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP7_IN_BUFFER_CONTROL + 0x000000b8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP7_OUT_BUFFER_CONTROL + 0x000000bc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP8_IN_BUFFER_CONTROL + 0x000000c0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP8_OUT_BUFFER_CONTROL + 0x000000c4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP9_IN_BUFFER_CONTROL + 0x000000c8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP9_OUT_BUFFER_CONTROL + 0x000000cc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP10_IN_BUFFER_CONTROL + 0x000000d0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP10_OUT_BUFFER_CONTROL + 0x000000d4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP11_IN_BUFFER_CONTROL + 0x000000d8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP11_OUT_BUFFER_CONTROL + 0x000000dc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP12_IN_BUFFER_CONTROL + 0x000000e0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP12_OUT_BUFFER_CONTROL + 0x000000e4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP13_IN_BUFFER_CONTROL + 0x000000e8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP13_OUT_BUFFER_CONTROL + 0x000000ec + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP14_IN_BUFFER_CONTROL + 0x000000f0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP14_OUT_BUFFER_CONTROL + 0x000000f4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP15_IN_BUFFER_CONTROL + 0x000000f8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + EP15_OUT_BUFFER_CONTROL + 0x000000fc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 0. + [9:0] + read-write + + + + + + + TBMAN + Testbench manager. Allows the programmer to know what platform their software is running on. + 0x4006c000 + + 0 + 4 + registers + + + + PLATFORM + 0x00000000 + Indicates the type of platform in use + 0x00000005 + + + FPGA + Indicates the platform is an FPGA + [1:1] + read-only + + + ASIC + Indicates the platform is an ASIC + [0:0] + read-only + + + + + + + VREG_AND_CHIP_RESET + control and status for on-chip voltage regulator and chip level reset subsystem + 0x40064000 + + 0 + 12 + registers + + + + VREG + 0x00000000 + Voltage regulator control and status + 0x000000b1 + + + ROK + regulation status + 0=not in regulation, 1=in regulation + [12:12] + read-only + + + VSEL + output voltage select + 0000 to 0101 - 0.80V + 0110 - 0.85V + 0111 - 0.90V + 1000 - 0.95V + 1001 - 1.00V + 1010 - 1.05V + 1011 - 1.10V (default) + 1100 - 1.15V + 1101 - 1.20V + 1110 - 1.25V + 1111 - 1.30V + [7:4] + read-write + + + HIZ + high impedance mode select + 0=not in high impedance mode, 1=in high impedance mode + [1:1] + read-write + + + EN + enable + 0=not enabled, 1=enabled + [0:0] + read-write + + + + + BOD + 0x00000004 + brown-out detection control + 0x00000091 + + + VSEL + threshold select + 0000 - 0.473V + 0001 - 0.516V + 0010 - 0.559V + 0011 - 0.602V + 0100 - 0.645V + 0101 - 0.688V + 0110 - 0.731V + 0111 - 0.774V + 1000 - 0.817V + 1001 - 0.860V (default) + 1010 - 0.903V + 1011 - 0.946V + 1100 - 0.989V + 1101 - 1.032V + 1110 - 1.075V + 1111 - 1.118V + [7:4] + read-write + + + EN + enable + 0=not enabled, 1=enabled + [0:0] + read-write + + + + + CHIP_RESET + 0x00000008 + Chip reset control and status + 0x00000000 + + + PSM_RESTART_FLAG + This is set by psm_restart from the debugger. + Its purpose is to branch bootcode to a safe mode when the debugger has issued a psm_restart in order to recover from a boot lock-up. + In the safe mode the debugger can repair the boot code, clear this flag then reboot the processor. + [24:24] + read-write + oneToClear + + + HAD_PSM_RESTART + Last reset was from the debug port + [20:20] + read-only + + + HAD_RUN + Last reset was from the RUN pin + [16:16] + read-only + + + HAD_POR + Last reset was from the power-on reset or brown-out detection blocks + [8:8] + read-only + + + + + + + RTC + Register block to control RTC + 0x4005c000 + + 0 + 48 + registers + + + RTC_IRQ + 25 + + + + CLKDIV_M1 + 0x00000000 + Divider minus 1 for the 1 second counter. Safe to change the value when RTC is not enabled. + 0x00000000 + + + CLKDIV_M1 + [15:0] + read-write + + + + + SETUP_0 + 0x00000004 + RTC setup register 0 + 0x00000000 + + + YEAR + Year + [23:12] + read-write + + + MONTH + Month (1..12) + [11:8] + read-write + + + DAY + Day of the month (1..31) + [4:0] + read-write + + + + + SETUP_1 + 0x00000008 + RTC setup register 1 + 0x00000000 + + + DOTW + Day of the week: 1-Monday...0-Sunday ISO 8601 mod 7 + [26:24] + read-write + + + HOUR + Hours + [20:16] + read-write + + + MIN + Minutes + [13:8] + read-write + + + SEC + Seconds + [5:0] + read-write + + + + + CTRL + 0x0000000c + RTC Control and status + 0x00000000 + + + FORCE_NOTLEAPYEAR + If set, leapyear is forced off. + Useful for years divisible by 100 but not by 400 + [8:8] + read-write + + + LOAD + Load RTC + [4:4] + write-only + + + RTC_ACTIVE + RTC enabled (running) + [1:1] + read-only + + + RTC_ENABLE + Enable RTC + [0:0] + read-write + + + + + IRQ_SETUP_0 + 0x00000010 + Interrupt setup register 0 + 0x00000000 + + + MATCH_ACTIVE + [29:29] + read-only + + + MATCH_ENA + Global match enable. Don't change any other value while this one is enabled + [28:28] + read-write + + + YEAR_ENA + Enable year matching + [26:26] + read-write + + + MONTH_ENA + Enable month matching + [25:25] + read-write + + + DAY_ENA + Enable day matching + [24:24] + read-write + + + YEAR + Year + [23:12] + read-write + + + MONTH + Month (1..12) + [11:8] + read-write + + + DAY + Day of the month (1..31) + [4:0] + read-write + + + + + IRQ_SETUP_1 + 0x00000014 + Interrupt setup register 1 + 0x00000000 + + + DOTW_ENA + Enable day of the week matching + [31:31] + read-write + + + HOUR_ENA + Enable hour matching + [30:30] + read-write + + + MIN_ENA + Enable minute matching + [29:29] + read-write + + + SEC_ENA + Enable second matching + [28:28] + read-write + + + DOTW + Day of the week + [26:24] + read-write + + + HOUR + Hours + [20:16] + read-write + + + MIN + Minutes + [13:8] + read-write + + + SEC + Seconds + [5:0] + read-write + + + + + RTC_1 + 0x00000018 + RTC register 1. + 0x00000000 + + + YEAR + Year + [23:12] + read-only + + + MONTH + Month (1..12) + [11:8] + read-only + + + DAY + Day of the month (1..31) + [4:0] + read-only + + + + + RTC_0 + 0x0000001c + RTC register 0 + Read this before RTC 1! + 0x00000000 + + + DOTW + Day of the week + [26:24] + read-only + modify + + + HOUR + Hours + [20:16] + read-only + modify + + + MIN + Minutes + [13:8] + read-only + modify + + + SEC + Seconds + [5:0] + read-only + modify + + + + + INTR + 0x00000020 + Raw Interrupts + 0x00000000 + + + RTC + [0:0] + read-only + + + + + INTE + 0x00000024 + Interrupt Enable + 0x00000000 + + + RTC + [0:0] + read-write + + + + + INTF + 0x00000028 + Interrupt Force + 0x00000000 + + + RTC + [0:0] + read-write + + + + + INTS + 0x0000002c + Interrupt status after masking & forcing + 0x00000000 + + + RTC + [0:0] + read-only + + + + + + + SWI_IRQ + Virtual Peripheral to access unused NVIC software interrupts + 0 + + + SWI_IRQ_0 + 26 + + + SWI_IRQ_1 + 27 + + + SWI_IRQ_2 + 28 + + + SWI_IRQ_3 + 29 + + + SWI_IRQ_4 + 30 + + + SWI_IRQ_5 + 31 + + + + diff --git a/svd/RP2350.svd b/svd/RP2350.svd new file mode 100644 index 00000000..edab555a --- /dev/null +++ b/svd/RP2350.svd @@ -0,0 +1,106183 @@ + + + + Raspberry Pi + RP2350 + RP + 0.1 + + Dual Cortex-M33 or Hazard3 processors at 150MHz + 520kB on-chip SRAM, in 10 independent banks + Extended low-power sleep states with optional SRAM retention: as low as 10uA DVDD + 8kB of one-time-programmable storage (OTP) + Up to 16MB of external QSPI flash/PSRAM via dedicated QSPI bus + Additional 16MB flash/PSRAM accessible via optional second chip-select + On-chip switched-mode power supply to generate core voltage + Low-quiescent-current LDO mode can be enabled for sleep states + 2x on-chip PLLs for internal or external clock generation + GPIOs are 5V-tolerant (powered), and 3.3V-failsafe (unpowered) + Security features: + Optional boot signing, enforced by on-chip mask ROM, with key fingerprint in OTP + Protected OTP storage for optional boot decryption key + Global bus filtering based on Arm or RISC-V security/privilege levels + Peripherals, GPIOs and DMA channels individually assignable to security domains + Hardware mitigations for fault injection attacks + Hardware SHA-256 accelerator + Peripherals: + 2x UARTs + 2x SPI controllers + 2x I2C controllers + 24x PWM channels + USB 1.1 controller and PHY, with host and device support + 12x PIO state machines + 1x HSTX peripheral + + 32 + 32 + 0xffffffff + 0x00000000 + read-write + + Copyright (c) 2024 Raspberry Pi Ltd. + + SPDX-License-Identifier: BSD-3-Clause + + + CM33 + r1p0 + little + true + true + 8 + 4 + 1 + 1 + false + 52 + + 8 + + + RESETS + 0x40020000 + + 0 + 12 + registers + + + + RESET + 0x00000000 + 0x1fffffff + + + USBCTRL + [28:28] + read-write + + + UART1 + [27:27] + read-write + + + UART0 + [26:26] + read-write + + + TRNG + [25:25] + read-write + + + TIMER1 + [24:24] + read-write + + + TIMER0 + [23:23] + read-write + + + TBMAN + [22:22] + read-write + + + SYSINFO + [21:21] + read-write + + + SYSCFG + [20:20] + read-write + + + SPI1 + [19:19] + read-write + + + SPI0 + [18:18] + read-write + + + SHA256 + [17:17] + read-write + + + PWM + [16:16] + read-write + + + PLL_USB + [15:15] + read-write + + + PLL_SYS + [14:14] + read-write + + + PIO2 + [13:13] + read-write + + + PIO1 + [12:12] + read-write + + + PIO0 + [11:11] + read-write + + + PADS_QSPI + [10:10] + read-write + + + PADS_BANK0 + [9:9] + read-write + + + JTAG + [8:8] + read-write + + + IO_QSPI + [7:7] + read-write + + + IO_BANK0 + [6:6] + read-write + + + I2C1 + [5:5] + read-write + + + I2C0 + [4:4] + read-write + + + HSTX + [3:3] + read-write + + + DMA + [2:2] + read-write + + + BUSCTRL + [1:1] + read-write + + + ADC + [0:0] + read-write + + + + + WDSEL + 0x00000004 + 0x00000000 + + + USBCTRL + [28:28] + read-write + + + UART1 + [27:27] + read-write + + + UART0 + [26:26] + read-write + + + TRNG + [25:25] + read-write + + + TIMER1 + [24:24] + read-write + + + TIMER0 + [23:23] + read-write + + + TBMAN + [22:22] + read-write + + + SYSINFO + [21:21] + read-write + + + SYSCFG + [20:20] + read-write + + + SPI1 + [19:19] + read-write + + + SPI0 + [18:18] + read-write + + + SHA256 + [17:17] + read-write + + + PWM + [16:16] + read-write + + + PLL_USB + [15:15] + read-write + + + PLL_SYS + [14:14] + read-write + + + PIO2 + [13:13] + read-write + + + PIO1 + [12:12] + read-write + + + PIO0 + [11:11] + read-write + + + PADS_QSPI + [10:10] + read-write + + + PADS_BANK0 + [9:9] + read-write + + + JTAG + [8:8] + read-write + + + IO_QSPI + [7:7] + read-write + + + IO_BANK0 + [6:6] + read-write + + + I2C1 + [5:5] + read-write + + + I2C0 + [4:4] + read-write + + + HSTX + [3:3] + read-write + + + DMA + [2:2] + read-write + + + BUSCTRL + [1:1] + read-write + + + ADC + [0:0] + read-write + + + + + RESET_DONE + 0x00000008 + 0x00000000 + + + USBCTRL + [28:28] + read-only + + + UART1 + [27:27] + read-only + + + UART0 + [26:26] + read-only + + + TRNG + [25:25] + read-only + + + TIMER1 + [24:24] + read-only + + + TIMER0 + [23:23] + read-only + + + TBMAN + [22:22] + read-only + + + SYSINFO + [21:21] + read-only + + + SYSCFG + [20:20] + read-only + + + SPI1 + [19:19] + read-only + + + SPI0 + [18:18] + read-only + + + SHA256 + [17:17] + read-only + + + PWM + [16:16] + read-only + + + PLL_USB + [15:15] + read-only + + + PLL_SYS + [14:14] + read-only + + + PIO2 + [13:13] + read-only + + + PIO1 + [12:12] + read-only + + + PIO0 + [11:11] + read-only + + + PADS_QSPI + [10:10] + read-only + + + PADS_BANK0 + [9:9] + read-only + + + JTAG + [8:8] + read-only + + + IO_QSPI + [7:7] + read-only + + + IO_BANK0 + [6:6] + read-only + + + I2C1 + [5:5] + read-only + + + I2C0 + [4:4] + read-only + + + HSTX + [3:3] + read-only + + + DMA + [2:2] + read-only + + + BUSCTRL + [1:1] + read-only + + + ADC + [0:0] + read-only + + + + + + + PSM + 0x40018000 + + 0 + 16 + registers + + + + FRCE_ON + 0x00000000 + Force block out of reset (i.e. power it on) + 0x00000000 + + + PROC1 + [24:24] + read-write + + + PROC0 + [23:23] + read-write + + + ACCESSCTRL + [22:22] + read-write + + + SIO + [21:21] + read-write + + + XIP + [20:20] + read-write + + + SRAM9 + [19:19] + read-write + + + SRAM8 + [18:18] + read-write + + + SRAM7 + [17:17] + read-write + + + SRAM6 + [16:16] + read-write + + + SRAM5 + [15:15] + read-write + + + SRAM4 + [14:14] + read-write + + + SRAM3 + [13:13] + read-write + + + SRAM2 + [12:12] + read-write + + + SRAM1 + [11:11] + read-write + + + SRAM0 + [10:10] + read-write + + + BOOTRAM + [9:9] + read-write + + + ROM + [8:8] + read-write + + + BUSFABRIC + [7:7] + read-write + + + PSM_READY + [6:6] + read-write + + + CLOCKS + [5:5] + read-write + + + RESETS + [4:4] + read-write + + + XOSC + [3:3] + read-write + + + ROSC + [2:2] + read-write + + + OTP + [1:1] + read-write + + + PROC_COLD + [0:0] + read-write + + + + + FRCE_OFF + 0x00000004 + Force into reset (i.e. power it off) + 0x00000000 + + + PROC1 + [24:24] + read-write + + + PROC0 + [23:23] + read-write + + + ACCESSCTRL + [22:22] + read-write + + + SIO + [21:21] + read-write + + + XIP + [20:20] + read-write + + + SRAM9 + [19:19] + read-write + + + SRAM8 + [18:18] + read-write + + + SRAM7 + [17:17] + read-write + + + SRAM6 + [16:16] + read-write + + + SRAM5 + [15:15] + read-write + + + SRAM4 + [14:14] + read-write + + + SRAM3 + [13:13] + read-write + + + SRAM2 + [12:12] + read-write + + + SRAM1 + [11:11] + read-write + + + SRAM0 + [10:10] + read-write + + + BOOTRAM + [9:9] + read-write + + + ROM + [8:8] + read-write + + + BUSFABRIC + [7:7] + read-write + + + PSM_READY + [6:6] + read-write + + + CLOCKS + [5:5] + read-write + + + RESETS + [4:4] + read-write + + + XOSC + [3:3] + read-write + + + ROSC + [2:2] + read-write + + + OTP + [1:1] + read-write + + + PROC_COLD + [0:0] + read-write + + + + + WDSEL + 0x00000008 + Set to 1 if the watchdog should reset this + 0x00000000 + + + PROC1 + [24:24] + read-write + + + PROC0 + [23:23] + read-write + + + ACCESSCTRL + [22:22] + read-write + + + SIO + [21:21] + read-write + + + XIP + [20:20] + read-write + + + SRAM9 + [19:19] + read-write + + + SRAM8 + [18:18] + read-write + + + SRAM7 + [17:17] + read-write + + + SRAM6 + [16:16] + read-write + + + SRAM5 + [15:15] + read-write + + + SRAM4 + [14:14] + read-write + + + SRAM3 + [13:13] + read-write + + + SRAM2 + [12:12] + read-write + + + SRAM1 + [11:11] + read-write + + + SRAM0 + [10:10] + read-write + + + BOOTRAM + [9:9] + read-write + + + ROM + [8:8] + read-write + + + BUSFABRIC + [7:7] + read-write + + + PSM_READY + [6:6] + read-write + + + CLOCKS + [5:5] + read-write + + + RESETS + [4:4] + read-write + + + XOSC + [3:3] + read-write + + + ROSC + [2:2] + read-write + + + OTP + [1:1] + read-write + + + PROC_COLD + [0:0] + read-write + + + + + DONE + 0x0000000c + Is the subsystem ready? + 0x00000000 + + + PROC1 + [24:24] + read-only + + + PROC0 + [23:23] + read-only + + + ACCESSCTRL + [22:22] + read-only + + + SIO + [21:21] + read-only + + + XIP + [20:20] + read-only + + + SRAM9 + [19:19] + read-only + + + SRAM8 + [18:18] + read-only + + + SRAM7 + [17:17] + read-only + + + SRAM6 + [16:16] + read-only + + + SRAM5 + [15:15] + read-only + + + SRAM4 + [14:14] + read-only + + + SRAM3 + [13:13] + read-only + + + SRAM2 + [12:12] + read-only + + + SRAM1 + [11:11] + read-only + + + SRAM0 + [10:10] + read-only + + + BOOTRAM + [9:9] + read-only + + + ROM + [8:8] + read-only + + + BUSFABRIC + [7:7] + read-only + + + PSM_READY + [6:6] + read-only + + + CLOCKS + [5:5] + read-only + + + RESETS + [4:4] + read-only + + + XOSC + [3:3] + read-only + + + ROSC + [2:2] + read-only + + + OTP + [1:1] + read-only + + + PROC_COLD + [0:0] + read-only + + + + + + + CLOCKS + 0x40010000 + + 0 + 212 + registers + + + CLOCKS_IRQ + 30 + + + + CLK_GPOUT0_CTRL + 0x00000000 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors, can be changed on-the-fly + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + clksrc_pll_usb_primary_ref_opcg + 4 + + + rosc_clksrc + 5 + + + xosc_clksrc + 6 + + + lposc_clksrc + 7 + + + clk_sys + 8 + + + clk_usb + 9 + + + clk_adc + 10 + + + clk_ref + 11 + + + clk_peri + 12 + + + clk_hstx + 13 + + + otp_clk2fc + 14 + + + + + + + CLK_GPOUT0_DIV + 0x00000004 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [31:16] + read-write + + + FRAC + Fractional component of the divisor, can be changed on-the-fly + [15:0] + read-write + + + + + CLK_GPOUT0_SELECTED + 0x00000008 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_GPOUT0_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_GPOUT1_CTRL + 0x0000000c + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors, can be changed on-the-fly + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + clksrc_pll_usb_primary_ref_opcg + 4 + + + rosc_clksrc + 5 + + + xosc_clksrc + 6 + + + lposc_clksrc + 7 + + + clk_sys + 8 + + + clk_usb + 9 + + + clk_adc + 10 + + + clk_ref + 11 + + + clk_peri + 12 + + + clk_hstx + 13 + + + otp_clk2fc + 14 + + + + + + + CLK_GPOUT1_DIV + 0x00000010 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [31:16] + read-write + + + FRAC + Fractional component of the divisor, can be changed on-the-fly + [15:0] + read-write + + + + + CLK_GPOUT1_SELECTED + 0x00000014 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_GPOUT1_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_GPOUT2_CTRL + 0x00000018 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors, can be changed on-the-fly + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + clksrc_pll_usb_primary_ref_opcg + 4 + + + rosc_clksrc_ph + 5 + + + xosc_clksrc + 6 + + + lposc_clksrc + 7 + + + clk_sys + 8 + + + clk_usb + 9 + + + clk_adc + 10 + + + clk_ref + 11 + + + clk_peri + 12 + + + clk_hstx + 13 + + + otp_clk2fc + 14 + + + + + + + CLK_GPOUT2_DIV + 0x0000001c + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [31:16] + read-write + + + FRAC + Fractional component of the divisor, can be changed on-the-fly + [15:0] + read-write + + + + + CLK_GPOUT2_SELECTED + 0x00000020 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_GPOUT2_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_GPOUT3_CTRL + 0x00000024 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + DC50 + Enables duty cycle correction for odd divisors, can be changed on-the-fly + [12:12] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [8:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + clksrc_pll_usb_primary_ref_opcg + 4 + + + rosc_clksrc_ph + 5 + + + xosc_clksrc + 6 + + + lposc_clksrc + 7 + + + clk_sys + 8 + + + clk_usb + 9 + + + clk_adc + 10 + + + clk_ref + 11 + + + clk_peri + 12 + + + clk_hstx + 13 + + + otp_clk2fc + 14 + + + + + + + CLK_GPOUT3_DIV + 0x00000028 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [31:16] + read-write + + + FRAC + Fractional component of the divisor, can be changed on-the-fly + [15:0] + read-write + + + + + CLK_GPOUT3_SELECTED + 0x0000002c + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_GPOUT3_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_REF_CTRL + 0x00000030 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [6:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb_primary_ref_opcg + 3 + + + + + SRC + Selects the clock source glitchlessly, can be changed on-the-fly + [1:0] + read-write + + + rosc_clksrc_ph + 0 + + + clksrc_clk_ref_aux + 1 + + + xosc_clksrc + 2 + + + lposc_clksrc + 3 + + + + + + + CLK_REF_DIV + 0x00000034 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [23:16] + read-write + + + + + CLK_REF_SELECTED + 0x00000038 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_REF_SELECTED + The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s. + [3:0] + read-only + + + + + CLK_SYS_CTRL + 0x0000003c + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_sys + 0 + + + clksrc_pll_usb + 1 + + + rosc_clksrc + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + SRC + Selects the clock source glitchlessly, can be changed on-the-fly + [0:0] + read-write + + + clk_ref + 0 + + + clksrc_clk_sys_aux + 1 + + + + + + + CLK_SYS_DIV + 0x00000040 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [31:16] + read-write + + + FRAC + Fractional component of the divisor, can be changed on-the-fly + [15:0] + read-write + + + + + CLK_SYS_SELECTED + 0x00000044 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_SYS_SELECTED + The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s. + [1:0] + read-only + + + + + CLK_PERI_CTRL + 0x00000048 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clk_sys + 0 + + + clksrc_pll_sys + 1 + + + clksrc_pll_usb + 2 + + + rosc_clksrc_ph + 3 + + + xosc_clksrc + 4 + + + clksrc_gpin0 + 5 + + + clksrc_gpin1 + 6 + + + + + + + CLK_PERI_DIV + 0x0000004c + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [17:16] + read-write + + + + + CLK_PERI_SELECTED + 0x00000050 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_PERI_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_HSTX_CTRL + 0x00000054 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clk_sys + 0 + + + clksrc_pll_sys + 1 + + + clksrc_pll_usb + 2 + + + clksrc_gpin0 + 3 + + + clksrc_gpin1 + 4 + + + + + + + CLK_HSTX_DIV + 0x00000058 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [17:16] + read-write + + + + + CLK_HSTX_SELECTED + 0x0000005c + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_HSTX_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_USB_CTRL + 0x00000060 + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + + + CLK_USB_DIV + 0x00000064 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [19:16] + read-write + + + + + CLK_USB_SELECTED + 0x00000068 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_USB_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + CLK_ADC_CTRL + 0x0000006c + Clock control, can be changed on-the-fly (except for auxsrc) + 0x00000000 + + + ENABLED + clock generator is enabled + [28:28] + read-only + + + NUDGE + An edge on this signal shifts the phase of the output by 1 cycle of the input clock + This can be done at any time + [20:20] + read-write + + + PHASE + This delays the enable signal by up to 3 cycles of the input clock + This must be set before the clock is enabled to have any effect + [17:16] + read-write + + + ENABLE + Starts and stops the clock generator cleanly + [11:11] + read-write + + + KILL + Asynchronously kills the clock generator, enable must be set low before deasserting kill + [10:10] + read-write + + + AUXSRC + Selects the auxiliary clock source, will glitch when switching + [7:5] + read-write + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + + + + + CLK_ADC_DIV + 0x00000070 + 0x00010000 + + + INT + Integer part of clock divisor, 0 -> max+1, can be changed on-the-fly + [19:16] + read-write + + + + + CLK_ADC_SELECTED + 0x00000074 + Indicates which src is currently selected (one-hot) + 0x00000001 + + + CLK_ADC_SELECTED + This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. + [0:0] + read-only + + + + + DFTCLK_XOSC_CTRL + 0x00000078 + 0x00000000 + + + SRC + [1:0] + read-write + + + NULL + 0 + + + clksrc_pll_usb_primary + 1 + + + clksrc_gpin0 + 2 + + + + + + + DFTCLK_ROSC_CTRL + 0x0000007c + 0x00000000 + + + SRC + [1:0] + read-write + + + NULL + 0 + + + clksrc_pll_sys_primary_rosc + 1 + + + clksrc_gpin1 + 2 + + + + + + + DFTCLK_LPOSC_CTRL + 0x00000080 + 0x00000000 + + + SRC + [1:0] + read-write + + + NULL + 0 + + + clksrc_pll_usb_primary_lposc + 1 + + + clksrc_gpin1 + 2 + + + + + + + CLK_SYS_RESUS_CTRL + 0x00000084 + 0x000000ff + + + CLEAR + For clearing the resus after the fault that triggered it has been corrected + [16:16] + read-write + + + FRCE + Force a resus, for test purposes only + [12:12] + read-write + + + ENABLE + Enable resus + [8:8] + read-write + + + TIMEOUT + This is expressed as a number of clk_ref cycles + and must be >= 2x clk_ref_freq/min_clk_tst_freq + [7:0] + read-write + + + + + CLK_SYS_RESUS_STATUS + 0x00000088 + 0x00000000 + + + RESUSSED + Clock has been resuscitated, correct the error then send ctrl_clear=1 + [0:0] + read-only + + + + + FC0_REF_KHZ + 0x0000008c + Reference clock frequency in kHz + 0x00000000 + + + FC0_REF_KHZ + [19:0] + read-write + + + + + FC0_MIN_KHZ + 0x00000090 + Minimum pass frequency in kHz. This is optional. Set to 0 if you are not using the pass/fail flags + 0x00000000 + + + FC0_MIN_KHZ + [24:0] + read-write + + + + + FC0_MAX_KHZ + 0x00000094 + Maximum pass frequency in kHz. This is optional. Set to 0x1ffffff if you are not using the pass/fail flags + 0x01ffffff + + + FC0_MAX_KHZ + [24:0] + read-write + + + + + FC0_DELAY + 0x00000098 + Delays the start of frequency counting to allow the mux to settle + Delay is measured in multiples of the reference clock period + 0x00000001 + + + FC0_DELAY + [2:0] + read-write + + + + + FC0_INTERVAL + 0x0000009c + The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval + The default gives a test interval of 250us + 0x00000008 + + + FC0_INTERVAL + [3:0] + read-write + + + + + FC0_SRC + 0x000000a0 + Clock sent to frequency counter, set to 0 when not required + Writing to this register initiates the frequency count + 0x00000000 + + + FC0_SRC + [7:0] + read-write + + + NULL + 0 + + + pll_sys_clksrc_primary + 1 + + + pll_usb_clksrc_primary + 2 + + + rosc_clksrc + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clksrc_gpin0 + 6 + + + clksrc_gpin1 + 7 + + + clk_ref + 8 + + + clk_sys + 9 + + + clk_peri + 10 + + + clk_usb + 11 + + + clk_adc + 12 + + + clk_hstx + 13 + + + lposc_clksrc + 14 + + + otp_clk2fc + 15 + + + pll_usb_clksrc_primary_dft + 16 + + + + + + + FC0_STATUS + 0x000000a4 + Frequency counter status + 0x00000000 + + + DIED + Test clock stopped during test + [28:28] + read-only + + + FAST + Test clock faster than expected, only valid when status_done=1 + [24:24] + read-only + + + SLOW + Test clock slower than expected, only valid when status_done=1 + [20:20] + read-only + + + FAIL + Test failed + [16:16] + read-only + + + WAITING + Waiting for test clock to start + [12:12] + read-only + + + RUNNING + Test running + [8:8] + read-only + + + DONE + Test complete + [4:4] + read-only + + + PASS + Test passed + [0:0] + read-only + + + + + FC0_RESULT + 0x000000a8 + Result of frequency measurement, only valid when status_done=1 + 0x00000000 + + + KHZ + [29:5] + read-only + + + FRAC + [4:0] + read-only + + + + + WAKE_EN0 + 0x000000ac + enable clock in wake mode + 0xffffffff + + + CLK_SYS_SIO + [31:31] + read-write + + + CLK_SYS_SHA256 + [30:30] + read-write + + + CLK_SYS_PSM + [29:29] + read-write + + + CLK_SYS_ROSC + [28:28] + read-write + + + CLK_SYS_ROM + [27:27] + read-write + + + CLK_SYS_RESETS + [26:26] + read-write + + + CLK_SYS_PWM + [25:25] + read-write + + + CLK_SYS_POWMAN + [24:24] + read-write + + + CLK_REF_POWMAN + [23:23] + read-write + + + CLK_SYS_PLL_USB + [22:22] + read-write + + + CLK_SYS_PLL_SYS + [21:21] + read-write + + + CLK_SYS_PIO2 + [20:20] + read-write + + + CLK_SYS_PIO1 + [19:19] + read-write + + + CLK_SYS_PIO0 + [18:18] + read-write + + + CLK_SYS_PADS + [17:17] + read-write + + + CLK_SYS_OTP + [16:16] + read-write + + + CLK_REF_OTP + [15:15] + read-write + + + CLK_SYS_JTAG + [14:14] + read-write + + + CLK_SYS_IO + [13:13] + read-write + + + CLK_SYS_I2C1 + [12:12] + read-write + + + CLK_SYS_I2C0 + [11:11] + read-write + + + CLK_SYS_HSTX + [10:10] + read-write + + + CLK_HSTX + [9:9] + read-write + + + CLK_SYS_GLITCH_DETECTOR + [8:8] + read-write + + + CLK_SYS_DMA + [7:7] + read-write + + + CLK_SYS_BUSFABRIC + [6:6] + read-write + + + CLK_SYS_BUSCTRL + [5:5] + read-write + + + CLK_SYS_BOOTRAM + [4:4] + read-write + + + CLK_SYS_ADC + [3:3] + read-write + + + CLK_ADC + [2:2] + read-write + + + CLK_SYS_ACCESSCTRL + [1:1] + read-write + + + CLK_SYS_CLOCKS + [0:0] + read-write + + + + + WAKE_EN1 + 0x000000b0 + enable clock in wake mode + 0x7fffffff + + + CLK_SYS_XOSC + [30:30] + read-write + + + CLK_SYS_XIP + [29:29] + read-write + + + CLK_SYS_WATCHDOG + [28:28] + read-write + + + CLK_USB + [27:27] + read-write + + + CLK_SYS_USBCTRL + [26:26] + read-write + + + CLK_SYS_UART1 + [25:25] + read-write + + + CLK_PERI_UART1 + [24:24] + read-write + + + CLK_SYS_UART0 + [23:23] + read-write + + + CLK_PERI_UART0 + [22:22] + read-write + + + CLK_SYS_TRNG + [21:21] + read-write + + + CLK_SYS_TIMER1 + [20:20] + read-write + + + CLK_SYS_TIMER0 + [19:19] + read-write + + + CLK_SYS_TICKS + [18:18] + read-write + + + CLK_REF_TICKS + [17:17] + read-write + + + CLK_SYS_TBMAN + [16:16] + read-write + + + CLK_SYS_SYSINFO + [15:15] + read-write + + + CLK_SYS_SYSCFG + [14:14] + read-write + + + CLK_SYS_SRAM9 + [13:13] + read-write + + + CLK_SYS_SRAM8 + [12:12] + read-write + + + CLK_SYS_SRAM7 + [11:11] + read-write + + + CLK_SYS_SRAM6 + [10:10] + read-write + + + CLK_SYS_SRAM5 + [9:9] + read-write + + + CLK_SYS_SRAM4 + [8:8] + read-write + + + CLK_SYS_SRAM3 + [7:7] + read-write + + + CLK_SYS_SRAM2 + [6:6] + read-write + + + CLK_SYS_SRAM1 + [5:5] + read-write + + + CLK_SYS_SRAM0 + [4:4] + read-write + + + CLK_SYS_SPI1 + [3:3] + read-write + + + CLK_PERI_SPI1 + [2:2] + read-write + + + CLK_SYS_SPI0 + [1:1] + read-write + + + CLK_PERI_SPI0 + [0:0] + read-write + + + + + SLEEP_EN0 + 0x000000b4 + enable clock in sleep mode + 0xffffffff + + + CLK_SYS_SIO + [31:31] + read-write + + + CLK_SYS_SHA256 + [30:30] + read-write + + + CLK_SYS_PSM + [29:29] + read-write + + + CLK_SYS_ROSC + [28:28] + read-write + + + CLK_SYS_ROM + [27:27] + read-write + + + CLK_SYS_RESETS + [26:26] + read-write + + + CLK_SYS_PWM + [25:25] + read-write + + + CLK_SYS_POWMAN + [24:24] + read-write + + + CLK_REF_POWMAN + [23:23] + read-write + + + CLK_SYS_PLL_USB + [22:22] + read-write + + + CLK_SYS_PLL_SYS + [21:21] + read-write + + + CLK_SYS_PIO2 + [20:20] + read-write + + + CLK_SYS_PIO1 + [19:19] + read-write + + + CLK_SYS_PIO0 + [18:18] + read-write + + + CLK_SYS_PADS + [17:17] + read-write + + + CLK_SYS_OTP + [16:16] + read-write + + + CLK_REF_OTP + [15:15] + read-write + + + CLK_SYS_JTAG + [14:14] + read-write + + + CLK_SYS_IO + [13:13] + read-write + + + CLK_SYS_I2C1 + [12:12] + read-write + + + CLK_SYS_I2C0 + [11:11] + read-write + + + CLK_SYS_HSTX + [10:10] + read-write + + + CLK_HSTX + [9:9] + read-write + + + CLK_SYS_GLITCH_DETECTOR + [8:8] + read-write + + + CLK_SYS_DMA + [7:7] + read-write + + + CLK_SYS_BUSFABRIC + [6:6] + read-write + + + CLK_SYS_BUSCTRL + [5:5] + read-write + + + CLK_SYS_BOOTRAM + [4:4] + read-write + + + CLK_SYS_ADC + [3:3] + read-write + + + CLK_ADC + [2:2] + read-write + + + CLK_SYS_ACCESSCTRL + [1:1] + read-write + + + CLK_SYS_CLOCKS + [0:0] + read-write + + + + + SLEEP_EN1 + 0x000000b8 + enable clock in sleep mode + 0x7fffffff + + + CLK_SYS_XOSC + [30:30] + read-write + + + CLK_SYS_XIP + [29:29] + read-write + + + CLK_SYS_WATCHDOG + [28:28] + read-write + + + CLK_USB + [27:27] + read-write + + + CLK_SYS_USBCTRL + [26:26] + read-write + + + CLK_SYS_UART1 + [25:25] + read-write + + + CLK_PERI_UART1 + [24:24] + read-write + + + CLK_SYS_UART0 + [23:23] + read-write + + + CLK_PERI_UART0 + [22:22] + read-write + + + CLK_SYS_TRNG + [21:21] + read-write + + + CLK_SYS_TIMER1 + [20:20] + read-write + + + CLK_SYS_TIMER0 + [19:19] + read-write + + + CLK_SYS_TICKS + [18:18] + read-write + + + CLK_REF_TICKS + [17:17] + read-write + + + CLK_SYS_TBMAN + [16:16] + read-write + + + CLK_SYS_SYSINFO + [15:15] + read-write + + + CLK_SYS_SYSCFG + [14:14] + read-write + + + CLK_SYS_SRAM9 + [13:13] + read-write + + + CLK_SYS_SRAM8 + [12:12] + read-write + + + CLK_SYS_SRAM7 + [11:11] + read-write + + + CLK_SYS_SRAM6 + [10:10] + read-write + + + CLK_SYS_SRAM5 + [9:9] + read-write + + + CLK_SYS_SRAM4 + [8:8] + read-write + + + CLK_SYS_SRAM3 + [7:7] + read-write + + + CLK_SYS_SRAM2 + [6:6] + read-write + + + CLK_SYS_SRAM1 + [5:5] + read-write + + + CLK_SYS_SRAM0 + [4:4] + read-write + + + CLK_SYS_SPI1 + [3:3] + read-write + + + CLK_PERI_SPI1 + [2:2] + read-write + + + CLK_SYS_SPI0 + [1:1] + read-write + + + CLK_PERI_SPI0 + [0:0] + read-write + + + + + ENABLED0 + 0x000000bc + indicates the state of the clock enable + 0x00000000 + + + CLK_SYS_SIO + [31:31] + read-only + + + CLK_SYS_SHA256 + [30:30] + read-only + + + CLK_SYS_PSM + [29:29] + read-only + + + CLK_SYS_ROSC + [28:28] + read-only + + + CLK_SYS_ROM + [27:27] + read-only + + + CLK_SYS_RESETS + [26:26] + read-only + + + CLK_SYS_PWM + [25:25] + read-only + + + CLK_SYS_POWMAN + [24:24] + read-only + + + CLK_REF_POWMAN + [23:23] + read-only + + + CLK_SYS_PLL_USB + [22:22] + read-only + + + CLK_SYS_PLL_SYS + [21:21] + read-only + + + CLK_SYS_PIO2 + [20:20] + read-only + + + CLK_SYS_PIO1 + [19:19] + read-only + + + CLK_SYS_PIO0 + [18:18] + read-only + + + CLK_SYS_PADS + [17:17] + read-only + + + CLK_SYS_OTP + [16:16] + read-only + + + CLK_REF_OTP + [15:15] + read-only + + + CLK_SYS_JTAG + [14:14] + read-only + + + CLK_SYS_IO + [13:13] + read-only + + + CLK_SYS_I2C1 + [12:12] + read-only + + + CLK_SYS_I2C0 + [11:11] + read-only + + + CLK_SYS_HSTX + [10:10] + read-only + + + CLK_HSTX + [9:9] + read-only + + + CLK_SYS_GLITCH_DETECTOR + [8:8] + read-only + + + CLK_SYS_DMA + [7:7] + read-only + + + CLK_SYS_BUSFABRIC + [6:6] + read-only + + + CLK_SYS_BUSCTRL + [5:5] + read-only + + + CLK_SYS_BOOTRAM + [4:4] + read-only + + + CLK_SYS_ADC + [3:3] + read-only + + + CLK_ADC + [2:2] + read-only + + + CLK_SYS_ACCESSCTRL + [1:1] + read-only + + + CLK_SYS_CLOCKS + [0:0] + read-only + + + + + ENABLED1 + 0x000000c0 + indicates the state of the clock enable + 0x00000000 + + + CLK_SYS_XOSC + [30:30] + read-only + + + CLK_SYS_XIP + [29:29] + read-only + + + CLK_SYS_WATCHDOG + [28:28] + read-only + + + CLK_USB + [27:27] + read-only + + + CLK_SYS_USBCTRL + [26:26] + read-only + + + CLK_SYS_UART1 + [25:25] + read-only + + + CLK_PERI_UART1 + [24:24] + read-only + + + CLK_SYS_UART0 + [23:23] + read-only + + + CLK_PERI_UART0 + [22:22] + read-only + + + CLK_SYS_TRNG + [21:21] + read-only + + + CLK_SYS_TIMER1 + [20:20] + read-only + + + CLK_SYS_TIMER0 + [19:19] + read-only + + + CLK_SYS_TICKS + [18:18] + read-only + + + CLK_REF_TICKS + [17:17] + read-only + + + CLK_SYS_TBMAN + [16:16] + read-only + + + CLK_SYS_SYSINFO + [15:15] + read-only + + + CLK_SYS_SYSCFG + [14:14] + read-only + + + CLK_SYS_SRAM9 + [13:13] + read-only + + + CLK_SYS_SRAM8 + [12:12] + read-only + + + CLK_SYS_SRAM7 + [11:11] + read-only + + + CLK_SYS_SRAM6 + [10:10] + read-only + + + CLK_SYS_SRAM5 + [9:9] + read-only + + + CLK_SYS_SRAM4 + [8:8] + read-only + + + CLK_SYS_SRAM3 + [7:7] + read-only + + + CLK_SYS_SRAM2 + [6:6] + read-only + + + CLK_SYS_SRAM1 + [5:5] + read-only + + + CLK_SYS_SRAM0 + [4:4] + read-only + + + CLK_SYS_SPI1 + [3:3] + read-only + + + CLK_PERI_SPI1 + [2:2] + read-only + + + CLK_SYS_SPI0 + [1:1] + read-only + + + CLK_PERI_SPI0 + [0:0] + read-only + + + + + INTR + 0x000000c4 + Raw Interrupts + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-only + + + + + INTE + 0x000000c8 + Interrupt Enable + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-write + + + + + INTF + 0x000000cc + Interrupt Force + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-write + + + + + INTS + 0x000000d0 + Interrupt status after masking & forcing + 0x00000000 + + + CLK_SYS_RESUS + [0:0] + read-only + + + + + + + TICKS + 0x40108000 + + 0 + 72 + registers + + + + PROC0_CTRL + 0x00000000 + Controls the tick generator + 0x00000000 + + + RUNNING + Is the tick generator running? + [1:1] + read-only + + + ENABLE + start / stop tick generation + [0:0] + read-write + + + + + PROC0_CYCLES + 0x00000004 + 0x00000000 + + + PROC0_CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + PROC0_COUNT + 0x00000008 + 0x00000000 + + + PROC0_COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [8:0] + read-only + + + + + PROC1_CTRL + 0x0000000c + Controls the tick generator + 0x00000000 + + + RUNNING + Is the tick generator running? + [1:1] + read-only + + + ENABLE + start / stop tick generation + [0:0] + read-write + + + + + PROC1_CYCLES + 0x00000010 + 0x00000000 + + + PROC1_CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + PROC1_COUNT + 0x00000014 + 0x00000000 + + + PROC1_COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [8:0] + read-only + + + + + TIMER0_CTRL + 0x00000018 + Controls the tick generator + 0x00000000 + + + RUNNING + Is the tick generator running? + [1:1] + read-only + + + ENABLE + start / stop tick generation + [0:0] + read-write + + + + + TIMER0_CYCLES + 0x0000001c + 0x00000000 + + + TIMER0_CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + TIMER0_COUNT + 0x00000020 + 0x00000000 + + + TIMER0_COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [8:0] + read-only + + + + + TIMER1_CTRL + 0x00000024 + Controls the tick generator + 0x00000000 + + + RUNNING + Is the tick generator running? + [1:1] + read-only + + + ENABLE + start / stop tick generation + [0:0] + read-write + + + + + TIMER1_CYCLES + 0x00000028 + 0x00000000 + + + TIMER1_CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + TIMER1_COUNT + 0x0000002c + 0x00000000 + + + TIMER1_COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [8:0] + read-only + + + + + WATCHDOG_CTRL + 0x00000030 + Controls the tick generator + 0x00000000 + + + RUNNING + Is the tick generator running? + [1:1] + read-only + + + ENABLE + start / stop tick generation + [0:0] + read-write + + + + + WATCHDOG_CYCLES + 0x00000034 + 0x00000000 + + + WATCHDOG_CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + WATCHDOG_COUNT + 0x00000038 + 0x00000000 + + + WATCHDOG_COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [8:0] + read-only + + + + + RISCV_CTRL + 0x0000003c + Controls the tick generator + 0x00000000 + + + RUNNING + Is the tick generator running? + [1:1] + read-only + + + ENABLE + start / stop tick generation + [0:0] + read-write + + + + + RISCV_CYCLES + 0x00000040 + 0x00000000 + + + RISCV_CYCLES + Total number of clk_tick cycles before the next tick. + [8:0] + read-write + + + + + RISCV_COUNT + 0x00000044 + 0x00000000 + + + RISCV_COUNT + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + [8:0] + read-only + + + + + + + PADS_BANK0 + 0x40038000 + + 0 + 204 + registers + + + + VOLTAGE_SELECT + 0x00000000 + Voltage select. Per bank control + 0x00000000 + + + VOLTAGE_SELECT + [0:0] + read-write + + + 3v3 + 0 + Set voltage to 3.3V (DVDD >= 2V5) + + + 1v8 + 1 + Set voltage to 1.8V (DVDD <= 1V8) + + + + + + + GPIO0 + 0x00000004 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO1 + 0x00000008 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO2 + 0x0000000c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO3 + 0x00000010 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO4 + 0x00000014 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO5 + 0x00000018 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO6 + 0x0000001c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO7 + 0x00000020 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO8 + 0x00000024 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO9 + 0x00000028 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO10 + 0x0000002c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO11 + 0x00000030 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO12 + 0x00000034 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO13 + 0x00000038 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO14 + 0x0000003c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO15 + 0x00000040 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO16 + 0x00000044 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO17 + 0x00000048 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO18 + 0x0000004c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO19 + 0x00000050 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO20 + 0x00000054 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO21 + 0x00000058 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO22 + 0x0000005c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO23 + 0x00000060 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO24 + 0x00000064 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO25 + 0x00000068 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO26 + 0x0000006c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO27 + 0x00000070 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO28 + 0x00000074 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO29 + 0x00000078 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO30 + 0x0000007c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO31 + 0x00000080 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO32 + 0x00000084 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO33 + 0x00000088 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO34 + 0x0000008c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO35 + 0x00000090 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO36 + 0x00000094 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO37 + 0x00000098 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO38 + 0x0000009c + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO39 + 0x000000a0 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO40 + 0x000000a4 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO41 + 0x000000a8 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO42 + 0x000000ac + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO43 + 0x000000b0 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO44 + 0x000000b4 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO45 + 0x000000b8 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO46 + 0x000000bc + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO47 + 0x000000c0 + 0x00000116 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + SWCLK + 0x000000c4 + 0x0000005a + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + SWD + 0x000000c8 + 0x0000005a + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + + + PADS_QSPI + 0x40040000 + + 0 + 28 + registers + + + + VOLTAGE_SELECT + 0x00000000 + Voltage select. Per bank control + 0x00000000 + + + VOLTAGE_SELECT + [0:0] + read-write + + + 3v3 + 0 + Set voltage to 3.3V (DVDD >= 2V5) + + + 1v8 + 1 + Set voltage to 1.8V (DVDD <= 1V8) + + + + + + + GPIO_QSPI_SCLK + 0x00000004 + 0x00000156 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD0 + 0x00000008 + 0x00000156 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD1 + 0x0000000c + 0x00000156 + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD2 + 0x00000010 + 0x0000015a + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SD3 + 0x00000014 + 0x0000015a + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + GPIO_QSPI_SS + 0x00000018 + 0x0000015a + + + ISO + Pad isolation control. Remove this once the pad is configured by software. + [8:8] + read-write + + + OD + Output disable. Has priority over output enable from peripherals + [7:7] + read-write + + + IE + Input enable + [6:6] + read-write + + + DRIVE + Drive strength. + [5:4] + read-write + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + + + PUE + Pull up enable + [3:3] + read-write + + + PDE + Pull down enable + [2:2] + read-write + + + SCHMITT + Enable schmitt trigger + [1:1] + read-write + + + SLEWFAST + Slew rate control. 1 = Fast, 0 = Slow + [0:0] + read-write + + + + + + + IO_QSPI + 0x40030000 + + 0 + 576 + registers + + + IO_IRQ_QSPI + 23 + + + IO_IRQ_QSPI_NS + 24 + + + + USBPHY_DP_STATUS + 0x00000000 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + USBPHY_DP_CTRL + 0x00000004 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + siob_proc_56 + 5 + + + null + 31 + + + + + + + USBPHY_DM_STATUS + 0x00000008 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + USBPHY_DM_CTRL + 0x0000000c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + siob_proc_57 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SCLK_STATUS + 0x00000010 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO_QSPI_SCLK_CTRL + 0x00000014 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sclk + 0 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + siob_proc_58 + 5 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO_QSPI_SS_STATUS + 0x00000018 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO_QSPI_SS_CTRL + 0x0000001c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_ss_n_0 + 0 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + siob_proc_59 + 5 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO_QSPI_SD0_STATUS + 0x00000020 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO_QSPI_SD0_CTRL + 0x00000024 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd0 + 0 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + siob_proc_60 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SD1_STATUS + 0x00000028 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO_QSPI_SD1_CTRL + 0x0000002c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd1 + 0 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + siob_proc_61 + 5 + + + null + 31 + + + + + + + GPIO_QSPI_SD2_STATUS + 0x00000030 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO_QSPI_SD2_CTRL + 0x00000034 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd2 + 0 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + siob_proc_62 + 5 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO_QSPI_SD3_STATUS + 0x00000038 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO_QSPI_SD3_CTRL + 0x0000003c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + xip_sd3 + 0 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + siob_proc_63 + 5 + + + uart0_rx + 11 + + + null + 31 + + + + + + + IRQSUMMARY_PROC0_SECURE + 0x00000200 + 0x00000000 + + + GPIO_QSPI_SD3 + [7:7] + read-only + + + GPIO_QSPI_SD2 + [6:6] + read-only + + + GPIO_QSPI_SD1 + [5:5] + read-only + + + GPIO_QSPI_SD0 + [4:4] + read-only + + + GPIO_QSPI_SS + [3:3] + read-only + + + GPIO_QSPI_SCLK + [2:2] + read-only + + + USBPHY_DM + [1:1] + read-only + + + USBPHY_DP + [0:0] + read-only + + + + + IRQSUMMARY_PROC0_NONSECURE + 0x00000204 + 0x00000000 + + + GPIO_QSPI_SD3 + [7:7] + read-only + + + GPIO_QSPI_SD2 + [6:6] + read-only + + + GPIO_QSPI_SD1 + [5:5] + read-only + + + GPIO_QSPI_SD0 + [4:4] + read-only + + + GPIO_QSPI_SS + [3:3] + read-only + + + GPIO_QSPI_SCLK + [2:2] + read-only + + + USBPHY_DM + [1:1] + read-only + + + USBPHY_DP + [0:0] + read-only + + + + + IRQSUMMARY_PROC1_SECURE + 0x00000208 + 0x00000000 + + + GPIO_QSPI_SD3 + [7:7] + read-only + + + GPIO_QSPI_SD2 + [6:6] + read-only + + + GPIO_QSPI_SD1 + [5:5] + read-only + + + GPIO_QSPI_SD0 + [4:4] + read-only + + + GPIO_QSPI_SS + [3:3] + read-only + + + GPIO_QSPI_SCLK + [2:2] + read-only + + + USBPHY_DM + [1:1] + read-only + + + USBPHY_DP + [0:0] + read-only + + + + + IRQSUMMARY_PROC1_NONSECURE + 0x0000020c + 0x00000000 + + + GPIO_QSPI_SD3 + [7:7] + read-only + + + GPIO_QSPI_SD2 + [6:6] + read-only + + + GPIO_QSPI_SD1 + [5:5] + read-only + + + GPIO_QSPI_SD0 + [4:4] + read-only + + + GPIO_QSPI_SS + [3:3] + read-only + + + GPIO_QSPI_SCLK + [2:2] + read-only + + + USBPHY_DM + [1:1] + read-only + + + USBPHY_DP + [0:0] + read-only + + + + + IRQSUMMARY_DORMANT_WAKE_SECURE + 0x00000210 + 0x00000000 + + + GPIO_QSPI_SD3 + [7:7] + read-only + + + GPIO_QSPI_SD2 + [6:6] + read-only + + + GPIO_QSPI_SD1 + [5:5] + read-only + + + GPIO_QSPI_SD0 + [4:4] + read-only + + + GPIO_QSPI_SS + [3:3] + read-only + + + GPIO_QSPI_SCLK + [2:2] + read-only + + + USBPHY_DM + [1:1] + read-only + + + USBPHY_DP + [0:0] + read-only + + + + + IRQSUMMARY_DORMANT_WAKE_NONSECURE + 0x00000214 + 0x00000000 + + + GPIO_QSPI_SD3 + [7:7] + read-only + + + GPIO_QSPI_SD2 + [6:6] + read-only + + + GPIO_QSPI_SD1 + [5:5] + read-only + + + GPIO_QSPI_SD0 + [4:4] + read-only + + + GPIO_QSPI_SS + [3:3] + read-only + + + GPIO_QSPI_SCLK + [2:2] + read-only + + + USBPHY_DM + [1:1] + read-only + + + USBPHY_DP + [0:0] + read-only + + + + + INTR + 0x00000218 + Raw Interrupts + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-only + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + oneToClear + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + oneToClear + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-only + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-only + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + oneToClear + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + oneToClear + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-only + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTE + 0x0000021c + Interrupt Enable for proc0 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-write + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-write + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-write + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-write + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF + 0x00000220 + Interrupt Force for proc0 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-write + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-write + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-write + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-write + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTS + 0x00000224 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-only + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-only + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-only + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-only + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-only + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-only + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-only + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-only + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-only + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-only + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-only + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-only + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-only + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-only + + + USBPHY_DM_EDGE_LOW + [6:6] + read-only + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-only + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-only + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-only + + + USBPHY_DP_EDGE_LOW + [2:2] + read-only + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-only + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTE + 0x00000228 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-write + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-write + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-write + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-write + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF + 0x0000022c + Interrupt Force for proc1 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-write + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-write + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-write + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-write + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTS + 0x00000230 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-only + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-only + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-only + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-only + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-only + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-only + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-only + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-only + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-only + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-only + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-only + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-only + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-only + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-only + + + USBPHY_DM_EDGE_LOW + [6:6] + read-only + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-only + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-only + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-only + + + USBPHY_DP_EDGE_LOW + [2:2] + read-only + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-only + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTE + 0x00000234 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-write + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-write + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-write + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-write + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF + 0x00000238 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-write + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-write + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-write + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-write + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-write + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-write + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-write + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-write + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-write + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-write + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-write + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-write + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-write + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-write + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-write + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-write + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-write + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-write + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-write + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-write + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-write + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-write + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-write + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-write + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-write + + + USBPHY_DM_EDGE_LOW + [6:6] + read-write + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-write + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-write + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-write + + + USBPHY_DP_EDGE_LOW + [2:2] + read-write + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-write + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTS + 0x0000023c + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO_QSPI_SD3_EDGE_HIGH + [31:31] + read-only + + + GPIO_QSPI_SD3_EDGE_LOW + [30:30] + read-only + + + GPIO_QSPI_SD3_LEVEL_HIGH + [29:29] + read-only + + + GPIO_QSPI_SD3_LEVEL_LOW + [28:28] + read-only + + + GPIO_QSPI_SD2_EDGE_HIGH + [27:27] + read-only + + + GPIO_QSPI_SD2_EDGE_LOW + [26:26] + read-only + + + GPIO_QSPI_SD2_LEVEL_HIGH + [25:25] + read-only + + + GPIO_QSPI_SD2_LEVEL_LOW + [24:24] + read-only + + + GPIO_QSPI_SD1_EDGE_HIGH + [23:23] + read-only + + + GPIO_QSPI_SD1_EDGE_LOW + [22:22] + read-only + + + GPIO_QSPI_SD1_LEVEL_HIGH + [21:21] + read-only + + + GPIO_QSPI_SD1_LEVEL_LOW + [20:20] + read-only + + + GPIO_QSPI_SD0_EDGE_HIGH + [19:19] + read-only + + + GPIO_QSPI_SD0_EDGE_LOW + [18:18] + read-only + + + GPIO_QSPI_SD0_LEVEL_HIGH + [17:17] + read-only + + + GPIO_QSPI_SD0_LEVEL_LOW + [16:16] + read-only + + + GPIO_QSPI_SS_EDGE_HIGH + [15:15] + read-only + + + GPIO_QSPI_SS_EDGE_LOW + [14:14] + read-only + + + GPIO_QSPI_SS_LEVEL_HIGH + [13:13] + read-only + + + GPIO_QSPI_SS_LEVEL_LOW + [12:12] + read-only + + + GPIO_QSPI_SCLK_EDGE_HIGH + [11:11] + read-only + + + GPIO_QSPI_SCLK_EDGE_LOW + [10:10] + read-only + + + GPIO_QSPI_SCLK_LEVEL_HIGH + [9:9] + read-only + + + GPIO_QSPI_SCLK_LEVEL_LOW + [8:8] + read-only + + + USBPHY_DM_EDGE_HIGH + [7:7] + read-only + + + USBPHY_DM_EDGE_LOW + [6:6] + read-only + + + USBPHY_DM_LEVEL_HIGH + [5:5] + read-only + + + USBPHY_DM_LEVEL_LOW + [4:4] + read-only + + + USBPHY_DP_EDGE_HIGH + [3:3] + read-only + + + USBPHY_DP_EDGE_LOW + [2:2] + read-only + + + USBPHY_DP_LEVEL_HIGH + [1:1] + read-only + + + USBPHY_DP_LEVEL_LOW + [0:0] + read-only + + + + + + + IO_BANK0 + 0x40028000 + + 0 + 800 + registers + + + IO_IRQ_BANK0 + 21 + + + IO_IRQ_BANK0_NS + 22 + + + + GPIO0_STATUS + 0x00000000 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO0_CTRL + 0x00000004 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tck + 0 + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_0 + 4 + + + siob_proc_0 + 5 + + + pio0_0 + 6 + + + pio1_0 + 7 + + + pio2_0 + 8 + + + xip_ss_n_1 + 9 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO1_STATUS + 0x00000008 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO1_CTRL + 0x0000000c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tms + 0 + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_0 + 4 + + + siob_proc_1 + 5 + + + pio0_1 + 6 + + + pio1_1 + 7 + + + pio2_1 + 8 + + + coresight_traceclk + 9 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO2_STATUS + 0x00000010 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO2_CTRL + 0x00000014 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tdi + 0 + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_1 + 4 + + + siob_proc_2 + 5 + + + pio0_2 + 6 + + + pio1_2 + 7 + + + pio2_2 + 8 + + + coresight_tracedata_0 + 9 + + + usb_muxing_vbus_en + 10 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO3_STATUS + 0x00000018 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO3_CTRL + 0x0000001c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + jtag_tdo + 0 + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_1 + 4 + + + siob_proc_3 + 5 + + + pio0_3 + 6 + + + pio1_3 + 7 + + + pio2_3 + 8 + + + coresight_tracedata_1 + 9 + + + usb_muxing_overcurr_detect + 10 + + + uart0_rx + 11 + + + null + 31 + + + + + + + GPIO4_STATUS + 0x00000020 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO4_CTRL + 0x00000024 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_2 + 4 + + + siob_proc_4 + 5 + + + pio0_4 + 6 + + + pio1_4 + 7 + + + pio2_4 + 8 + + + coresight_tracedata_2 + 9 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO5_STATUS + 0x00000028 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO5_CTRL + 0x0000002c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_2 + 4 + + + siob_proc_5 + 5 + + + pio0_5 + 6 + + + pio1_5 + 7 + + + pio2_5 + 8 + + + coresight_tracedata_3 + 9 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO6_STATUS + 0x00000030 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO6_CTRL + 0x00000034 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_3 + 4 + + + siob_proc_6 + 5 + + + pio0_6 + 6 + + + pio1_6 + 7 + + + pio2_6 + 8 + + + usb_muxing_overcurr_detect + 10 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO7_STATUS + 0x00000038 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO7_CTRL + 0x0000003c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_3 + 4 + + + siob_proc_7 + 5 + + + pio0_7 + 6 + + + pio1_7 + 7 + + + pio2_7 + 8 + + + usb_muxing_vbus_detect + 10 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO8_STATUS + 0x00000040 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO8_CTRL + 0x00000044 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_4 + 4 + + + siob_proc_8 + 5 + + + pio0_8 + 6 + + + pio1_8 + 7 + + + pio2_8 + 8 + + + xip_ss_n_1 + 9 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO9_STATUS + 0x00000048 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO9_CTRL + 0x0000004c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_4 + 4 + + + siob_proc_9 + 5 + + + pio0_9 + 6 + + + pio1_9 + 7 + + + pio2_9 + 8 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO10_STATUS + 0x00000050 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO10_CTRL + 0x00000054 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_5 + 4 + + + siob_proc_10 + 5 + + + pio0_10 + 6 + + + pio1_10 + 7 + + + pio2_10 + 8 + + + usb_muxing_vbus_detect + 10 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO11_STATUS + 0x00000058 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO11_CTRL + 0x0000005c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_5 + 4 + + + siob_proc_11 + 5 + + + pio0_11 + 6 + + + pio1_11 + 7 + + + pio2_11 + 8 + + + usb_muxing_vbus_en + 10 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO12_STATUS + 0x00000060 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO12_CTRL + 0x00000064 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_0 + 0 + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_6 + 4 + + + siob_proc_12 + 5 + + + pio0_12 + 6 + + + pio1_12 + 7 + + + pio2_12 + 8 + + + clocks_gpin_0 + 9 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO13_STATUS + 0x00000068 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO13_CTRL + 0x0000006c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_1 + 0 + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_6 + 4 + + + siob_proc_13 + 5 + + + pio0_13 + 6 + + + pio1_13 + 7 + + + pio2_13 + 8 + + + clocks_gpout_0 + 9 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO14_STATUS + 0x00000070 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO14_CTRL + 0x00000074 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_2 + 0 + + + spi1_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_7 + 4 + + + siob_proc_14 + 5 + + + pio0_14 + 6 + + + pio1_14 + 7 + + + pio2_14 + 8 + + + clocks_gpin_1 + 9 + + + usb_muxing_vbus_en + 10 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO15_STATUS + 0x00000078 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO15_CTRL + 0x0000007c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_3 + 0 + + + spi1_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_7 + 4 + + + siob_proc_15 + 5 + + + pio0_15 + 6 + + + pio1_15 + 7 + + + pio2_15 + 8 + + + clocks_gpout_1 + 9 + + + usb_muxing_overcurr_detect + 10 + + + uart0_rx + 11 + + + null + 31 + + + + + + + GPIO16_STATUS + 0x00000080 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO16_CTRL + 0x00000084 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_4 + 0 + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_0 + 4 + + + siob_proc_16 + 5 + + + pio0_16 + 6 + + + pio1_16 + 7 + + + pio2_16 + 8 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO17_STATUS + 0x00000088 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO17_CTRL + 0x0000008c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_5 + 0 + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_0 + 4 + + + siob_proc_17 + 5 + + + pio0_17 + 6 + + + pio1_17 + 7 + + + pio2_17 + 8 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO18_STATUS + 0x00000090 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO18_CTRL + 0x00000094 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_6 + 0 + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_1 + 4 + + + siob_proc_18 + 5 + + + pio0_18 + 6 + + + pio1_18 + 7 + + + pio2_18 + 8 + + + usb_muxing_overcurr_detect + 10 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO19_STATUS + 0x00000098 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO19_CTRL + 0x0000009c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + hstx_7 + 0 + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_1 + 4 + + + siob_proc_19 + 5 + + + pio0_19 + 6 + + + pio1_19 + 7 + + + pio2_19 + 8 + + + xip_ss_n_1 + 9 + + + usb_muxing_vbus_detect + 10 + + + uart0_rx + 11 + + + null + 31 + + + + + + + GPIO20_STATUS + 0x000000a0 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO20_CTRL + 0x000000a4 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_2 + 4 + + + siob_proc_20 + 5 + + + pio0_20 + 6 + + + pio1_20 + 7 + + + pio2_20 + 8 + + + clocks_gpin_0 + 9 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO21_STATUS + 0x000000a8 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO21_CTRL + 0x000000ac + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_2 + 4 + + + siob_proc_21 + 5 + + + pio0_21 + 6 + + + pio1_21 + 7 + + + pio2_21 + 8 + + + clocks_gpout_0 + 9 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO22_STATUS + 0x000000b0 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO22_CTRL + 0x000000b4 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_3 + 4 + + + siob_proc_22 + 5 + + + pio0_22 + 6 + + + pio1_22 + 7 + + + pio2_22 + 8 + + + clocks_gpin_1 + 9 + + + usb_muxing_vbus_detect + 10 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO23_STATUS + 0x000000b8 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO23_CTRL + 0x000000bc + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_3 + 4 + + + siob_proc_23 + 5 + + + pio0_23 + 6 + + + pio1_23 + 7 + + + pio2_23 + 8 + + + clocks_gpout_1 + 9 + + + usb_muxing_vbus_en + 10 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO24_STATUS + 0x000000c0 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO24_CTRL + 0x000000c4 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_4 + 4 + + + siob_proc_24 + 5 + + + pio0_24 + 6 + + + pio1_24 + 7 + + + pio2_24 + 8 + + + clocks_gpout_2 + 9 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO25_STATUS + 0x000000c8 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO25_CTRL + 0x000000cc + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_4 + 4 + + + siob_proc_25 + 5 + + + pio0_25 + 6 + + + pio1_25 + 7 + + + pio2_25 + 8 + + + clocks_gpout_3 + 9 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO26_STATUS + 0x000000d0 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO26_CTRL + 0x000000d4 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_5 + 4 + + + siob_proc_26 + 5 + + + pio0_26 + 6 + + + pio1_26 + 7 + + + pio2_26 + 8 + + + usb_muxing_vbus_en + 10 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO27_STATUS + 0x000000d8 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO27_CTRL + 0x000000dc + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_5 + 4 + + + siob_proc_27 + 5 + + + pio0_27 + 6 + + + pio1_27 + 7 + + + pio2_27 + 8 + + + usb_muxing_overcurr_detect + 10 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO28_STATUS + 0x000000e0 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO28_CTRL + 0x000000e4 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_6 + 4 + + + siob_proc_28 + 5 + + + pio0_28 + 6 + + + pio1_28 + 7 + + + pio2_28 + 8 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO29_STATUS + 0x000000e8 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO29_CTRL + 0x000000ec + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_6 + 4 + + + siob_proc_29 + 5 + + + pio0_29 + 6 + + + pio1_29 + 7 + + + pio2_29 + 8 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO30_STATUS + 0x000000f0 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO30_CTRL + 0x000000f4 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_7 + 4 + + + siob_proc_30 + 5 + + + pio0_30 + 6 + + + pio1_30 + 7 + + + pio2_30 + 8 + + + usb_muxing_overcurr_detect + 10 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO31_STATUS + 0x000000f8 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO31_CTRL + 0x000000fc + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_7 + 4 + + + siob_proc_31 + 5 + + + pio0_31 + 6 + + + pio1_31 + 7 + + + pio2_31 + 8 + + + usb_muxing_vbus_detect + 10 + + + uart0_rx + 11 + + + null + 31 + + + + + + + GPIO32_STATUS + 0x00000100 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO32_CTRL + 0x00000104 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_8 + 4 + + + siob_proc_32 + 5 + + + pio0_32 + 6 + + + pio1_32 + 7 + + + pio2_32 + 8 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO33_STATUS + 0x00000108 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO33_CTRL + 0x0000010c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_8 + 4 + + + siob_proc_33 + 5 + + + pio0_33 + 6 + + + pio1_33 + 7 + + + pio2_33 + 8 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO34_STATUS + 0x00000110 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO34_CTRL + 0x00000114 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_9 + 4 + + + siob_proc_34 + 5 + + + pio0_34 + 6 + + + pio1_34 + 7 + + + pio2_34 + 8 + + + usb_muxing_vbus_detect + 10 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO35_STATUS + 0x00000118 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO35_CTRL + 0x0000011c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_9 + 4 + + + siob_proc_35 + 5 + + + pio0_35 + 6 + + + pio1_35 + 7 + + + pio2_35 + 8 + + + usb_muxing_vbus_en + 10 + + + uart0_rx + 11 + + + null + 31 + + + + + + + GPIO36_STATUS + 0x00000120 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO36_CTRL + 0x00000124 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_10 + 4 + + + siob_proc_36 + 5 + + + pio0_36 + 6 + + + pio1_36 + 7 + + + pio2_36 + 8 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO37_STATUS + 0x00000128 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO37_CTRL + 0x0000012c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_10 + 4 + + + siob_proc_37 + 5 + + + pio0_37 + 6 + + + pio1_37 + 7 + + + pio2_37 + 8 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO38_STATUS + 0x00000130 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO38_CTRL + 0x00000134 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_11 + 4 + + + siob_proc_38 + 5 + + + pio0_38 + 6 + + + pio1_38 + 7 + + + pio2_38 + 8 + + + usb_muxing_vbus_en + 10 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO39_STATUS + 0x00000138 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO39_CTRL + 0x0000013c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_11 + 4 + + + siob_proc_39 + 5 + + + pio0_39 + 6 + + + pio1_39 + 7 + + + pio2_39 + 8 + + + usb_muxing_overcurr_detect + 10 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO40_STATUS + 0x00000140 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO40_CTRL + 0x00000144 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_8 + 4 + + + siob_proc_40 + 5 + + + pio0_40 + 6 + + + pio1_40 + 7 + + + pio2_40 + 8 + + + usb_muxing_vbus_detect + 10 + + + null + 31 + + + + + + + GPIO41_STATUS + 0x00000148 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO41_CTRL + 0x0000014c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_8 + 4 + + + siob_proc_41 + 5 + + + pio0_41 + 6 + + + pio1_41 + 7 + + + pio2_41 + 8 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO42_STATUS + 0x00000150 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO42_CTRL + 0x00000154 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_9 + 4 + + + siob_proc_42 + 5 + + + pio0_42 + 6 + + + pio1_42 + 7 + + + pio2_42 + 8 + + + usb_muxing_overcurr_detect + 10 + + + uart1_tx + 11 + + + null + 31 + + + + + + + GPIO43_STATUS + 0x00000158 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO43_CTRL + 0x0000015c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_9 + 4 + + + siob_proc_43 + 5 + + + pio0_43 + 6 + + + pio1_43 + 7 + + + pio2_43 + 8 + + + usb_muxing_vbus_detect + 10 + + + uart1_rx + 11 + + + null + 31 + + + + + + + GPIO44_STATUS + 0x00000160 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO44_CTRL + 0x00000164 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_10 + 4 + + + siob_proc_44 + 5 + + + pio0_44 + 6 + + + pio1_44 + 7 + + + pio2_44 + 8 + + + usb_muxing_vbus_en + 10 + + + null + 31 + + + + + + + GPIO45_STATUS + 0x00000168 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO45_CTRL + 0x0000016c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_10 + 4 + + + siob_proc_45 + 5 + + + pio0_45 + 6 + + + pio1_45 + 7 + + + pio2_45 + 8 + + + usb_muxing_overcurr_detect + 10 + + + null + 31 + + + + + + + GPIO46_STATUS + 0x00000170 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO46_CTRL + 0x00000174 + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_11 + 4 + + + siob_proc_46 + 5 + + + pio0_46 + 6 + + + pio1_46 + 7 + + + pio2_46 + 8 + + + usb_muxing_vbus_detect + 10 + + + uart0_tx + 11 + + + null + 31 + + + + + + + GPIO47_STATUS + 0x00000178 + 0x00000000 + + + IRQTOPROC + interrupt to processors, after override is applied + [26:26] + read-only + + + INFROMPAD + input signal from pad, before filtering and override are applied + [17:17] + read-only + + + OETOPAD + output enable to pad after register override is applied + [13:13] + read-only + + + OUTTOPAD + output signal to pad after register override is applied + [9:9] + read-only + + + + + GPIO47_CTRL + 0x0000017c + 0x0000001f + + + IRQOVER + [29:28] + read-write + + + NORMAL + 0 + don't invert the interrupt + + + INVERT + 1 + invert the interrupt + + + LOW + 2 + drive interrupt low + + + HIGH + 3 + drive interrupt high + + + + + INOVER + [17:16] + read-write + + + NORMAL + 0 + don't invert the peri input + + + INVERT + 1 + invert the peri input + + + LOW + 2 + drive peri input low + + + HIGH + 3 + drive peri input high + + + + + OEOVER + [15:14] + read-write + + + NORMAL + 0 + drive output enable from peripheral signal selected by funcsel + + + INVERT + 1 + drive output enable from inverse of peripheral signal selected by funcsel + + + DISABLE + 2 + disable output + + + ENABLE + 3 + enable output + + + + + OUTOVER + [13:12] + read-write + + + NORMAL + 0 + drive output from peripheral signal selected by funcsel + + + INVERT + 1 + drive output from inverse of peripheral signal selected by funcsel + + + LOW + 2 + drive output low + + + HIGH + 3 + drive output high + + + + + FUNCSEL + 0-31 -> selects pin function according to the gpio table + 31 == NULL + [4:0] + read-write + + + spi1_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_11 + 4 + + + siob_proc_47 + 5 + + + pio0_47 + 6 + + + pio1_47 + 7 + + + pio2_47 + 8 + + + xip_ss_n_1 + 9 + + + usb_muxing_vbus_en + 10 + + + uart0_rx + 11 + + + null + 31 + + + + + + + IRQSUMMARY_PROC0_SECURE0 + 0x00000200 + 0x00000000 + + + GPIO31 + [31:31] + read-only + + + GPIO30 + [30:30] + read-only + + + GPIO29 + [29:29] + read-only + + + GPIO28 + [28:28] + read-only + + + GPIO27 + [27:27] + read-only + + + GPIO26 + [26:26] + read-only + + + GPIO25 + [25:25] + read-only + + + GPIO24 + [24:24] + read-only + + + GPIO23 + [23:23] + read-only + + + GPIO22 + [22:22] + read-only + + + GPIO21 + [21:21] + read-only + + + GPIO20 + [20:20] + read-only + + + GPIO19 + [19:19] + read-only + + + GPIO18 + [18:18] + read-only + + + GPIO17 + [17:17] + read-only + + + GPIO16 + [16:16] + read-only + + + GPIO15 + [15:15] + read-only + + + GPIO14 + [14:14] + read-only + + + GPIO13 + [13:13] + read-only + + + GPIO12 + [12:12] + read-only + + + GPIO11 + [11:11] + read-only + + + GPIO10 + [10:10] + read-only + + + GPIO9 + [9:9] + read-only + + + GPIO8 + [8:8] + read-only + + + GPIO7 + [7:7] + read-only + + + GPIO6 + [6:6] + read-only + + + GPIO5 + [5:5] + read-only + + + GPIO4 + [4:4] + read-only + + + GPIO3 + [3:3] + read-only + + + GPIO2 + [2:2] + read-only + + + GPIO1 + [1:1] + read-only + + + GPIO0 + [0:0] + read-only + + + + + IRQSUMMARY_PROC0_SECURE1 + 0x00000204 + 0x00000000 + + + GPIO47 + [15:15] + read-only + + + GPIO46 + [14:14] + read-only + + + GPIO45 + [13:13] + read-only + + + GPIO44 + [12:12] + read-only + + + GPIO43 + [11:11] + read-only + + + GPIO42 + [10:10] + read-only + + + GPIO41 + [9:9] + read-only + + + GPIO40 + [8:8] + read-only + + + GPIO39 + [7:7] + read-only + + + GPIO38 + [6:6] + read-only + + + GPIO37 + [5:5] + read-only + + + GPIO36 + [4:4] + read-only + + + GPIO35 + [3:3] + read-only + + + GPIO34 + [2:2] + read-only + + + GPIO33 + [1:1] + read-only + + + GPIO32 + [0:0] + read-only + + + + + IRQSUMMARY_PROC0_NONSECURE0 + 0x00000208 + 0x00000000 + + + GPIO31 + [31:31] + read-only + + + GPIO30 + [30:30] + read-only + + + GPIO29 + [29:29] + read-only + + + GPIO28 + [28:28] + read-only + + + GPIO27 + [27:27] + read-only + + + GPIO26 + [26:26] + read-only + + + GPIO25 + [25:25] + read-only + + + GPIO24 + [24:24] + read-only + + + GPIO23 + [23:23] + read-only + + + GPIO22 + [22:22] + read-only + + + GPIO21 + [21:21] + read-only + + + GPIO20 + [20:20] + read-only + + + GPIO19 + [19:19] + read-only + + + GPIO18 + [18:18] + read-only + + + GPIO17 + [17:17] + read-only + + + GPIO16 + [16:16] + read-only + + + GPIO15 + [15:15] + read-only + + + GPIO14 + [14:14] + read-only + + + GPIO13 + [13:13] + read-only + + + GPIO12 + [12:12] + read-only + + + GPIO11 + [11:11] + read-only + + + GPIO10 + [10:10] + read-only + + + GPIO9 + [9:9] + read-only + + + GPIO8 + [8:8] + read-only + + + GPIO7 + [7:7] + read-only + + + GPIO6 + [6:6] + read-only + + + GPIO5 + [5:5] + read-only + + + GPIO4 + [4:4] + read-only + + + GPIO3 + [3:3] + read-only + + + GPIO2 + [2:2] + read-only + + + GPIO1 + [1:1] + read-only + + + GPIO0 + [0:0] + read-only + + + + + IRQSUMMARY_PROC0_NONSECURE1 + 0x0000020c + 0x00000000 + + + GPIO47 + [15:15] + read-only + + + GPIO46 + [14:14] + read-only + + + GPIO45 + [13:13] + read-only + + + GPIO44 + [12:12] + read-only + + + GPIO43 + [11:11] + read-only + + + GPIO42 + [10:10] + read-only + + + GPIO41 + [9:9] + read-only + + + GPIO40 + [8:8] + read-only + + + GPIO39 + [7:7] + read-only + + + GPIO38 + [6:6] + read-only + + + GPIO37 + [5:5] + read-only + + + GPIO36 + [4:4] + read-only + + + GPIO35 + [3:3] + read-only + + + GPIO34 + [2:2] + read-only + + + GPIO33 + [1:1] + read-only + + + GPIO32 + [0:0] + read-only + + + + + IRQSUMMARY_PROC1_SECURE0 + 0x00000210 + 0x00000000 + + + GPIO31 + [31:31] + read-only + + + GPIO30 + [30:30] + read-only + + + GPIO29 + [29:29] + read-only + + + GPIO28 + [28:28] + read-only + + + GPIO27 + [27:27] + read-only + + + GPIO26 + [26:26] + read-only + + + GPIO25 + [25:25] + read-only + + + GPIO24 + [24:24] + read-only + + + GPIO23 + [23:23] + read-only + + + GPIO22 + [22:22] + read-only + + + GPIO21 + [21:21] + read-only + + + GPIO20 + [20:20] + read-only + + + GPIO19 + [19:19] + read-only + + + GPIO18 + [18:18] + read-only + + + GPIO17 + [17:17] + read-only + + + GPIO16 + [16:16] + read-only + + + GPIO15 + [15:15] + read-only + + + GPIO14 + [14:14] + read-only + + + GPIO13 + [13:13] + read-only + + + GPIO12 + [12:12] + read-only + + + GPIO11 + [11:11] + read-only + + + GPIO10 + [10:10] + read-only + + + GPIO9 + [9:9] + read-only + + + GPIO8 + [8:8] + read-only + + + GPIO7 + [7:7] + read-only + + + GPIO6 + [6:6] + read-only + + + GPIO5 + [5:5] + read-only + + + GPIO4 + [4:4] + read-only + + + GPIO3 + [3:3] + read-only + + + GPIO2 + [2:2] + read-only + + + GPIO1 + [1:1] + read-only + + + GPIO0 + [0:0] + read-only + + + + + IRQSUMMARY_PROC1_SECURE1 + 0x00000214 + 0x00000000 + + + GPIO47 + [15:15] + read-only + + + GPIO46 + [14:14] + read-only + + + GPIO45 + [13:13] + read-only + + + GPIO44 + [12:12] + read-only + + + GPIO43 + [11:11] + read-only + + + GPIO42 + [10:10] + read-only + + + GPIO41 + [9:9] + read-only + + + GPIO40 + [8:8] + read-only + + + GPIO39 + [7:7] + read-only + + + GPIO38 + [6:6] + read-only + + + GPIO37 + [5:5] + read-only + + + GPIO36 + [4:4] + read-only + + + GPIO35 + [3:3] + read-only + + + GPIO34 + [2:2] + read-only + + + GPIO33 + [1:1] + read-only + + + GPIO32 + [0:0] + read-only + + + + + IRQSUMMARY_PROC1_NONSECURE0 + 0x00000218 + 0x00000000 + + + GPIO31 + [31:31] + read-only + + + GPIO30 + [30:30] + read-only + + + GPIO29 + [29:29] + read-only + + + GPIO28 + [28:28] + read-only + + + GPIO27 + [27:27] + read-only + + + GPIO26 + [26:26] + read-only + + + GPIO25 + [25:25] + read-only + + + GPIO24 + [24:24] + read-only + + + GPIO23 + [23:23] + read-only + + + GPIO22 + [22:22] + read-only + + + GPIO21 + [21:21] + read-only + + + GPIO20 + [20:20] + read-only + + + GPIO19 + [19:19] + read-only + + + GPIO18 + [18:18] + read-only + + + GPIO17 + [17:17] + read-only + + + GPIO16 + [16:16] + read-only + + + GPIO15 + [15:15] + read-only + + + GPIO14 + [14:14] + read-only + + + GPIO13 + [13:13] + read-only + + + GPIO12 + [12:12] + read-only + + + GPIO11 + [11:11] + read-only + + + GPIO10 + [10:10] + read-only + + + GPIO9 + [9:9] + read-only + + + GPIO8 + [8:8] + read-only + + + GPIO7 + [7:7] + read-only + + + GPIO6 + [6:6] + read-only + + + GPIO5 + [5:5] + read-only + + + GPIO4 + [4:4] + read-only + + + GPIO3 + [3:3] + read-only + + + GPIO2 + [2:2] + read-only + + + GPIO1 + [1:1] + read-only + + + GPIO0 + [0:0] + read-only + + + + + IRQSUMMARY_PROC1_NONSECURE1 + 0x0000021c + 0x00000000 + + + GPIO47 + [15:15] + read-only + + + GPIO46 + [14:14] + read-only + + + GPIO45 + [13:13] + read-only + + + GPIO44 + [12:12] + read-only + + + GPIO43 + [11:11] + read-only + + + GPIO42 + [10:10] + read-only + + + GPIO41 + [9:9] + read-only + + + GPIO40 + [8:8] + read-only + + + GPIO39 + [7:7] + read-only + + + GPIO38 + [6:6] + read-only + + + GPIO37 + [5:5] + read-only + + + GPIO36 + [4:4] + read-only + + + GPIO35 + [3:3] + read-only + + + GPIO34 + [2:2] + read-only + + + GPIO33 + [1:1] + read-only + + + GPIO32 + [0:0] + read-only + + + + + IRQSUMMARY_DORMANT_WAKE_SECURE0 + 0x00000220 + 0x00000000 + + + GPIO31 + [31:31] + read-only + + + GPIO30 + [30:30] + read-only + + + GPIO29 + [29:29] + read-only + + + GPIO28 + [28:28] + read-only + + + GPIO27 + [27:27] + read-only + + + GPIO26 + [26:26] + read-only + + + GPIO25 + [25:25] + read-only + + + GPIO24 + [24:24] + read-only + + + GPIO23 + [23:23] + read-only + + + GPIO22 + [22:22] + read-only + + + GPIO21 + [21:21] + read-only + + + GPIO20 + [20:20] + read-only + + + GPIO19 + [19:19] + read-only + + + GPIO18 + [18:18] + read-only + + + GPIO17 + [17:17] + read-only + + + GPIO16 + [16:16] + read-only + + + GPIO15 + [15:15] + read-only + + + GPIO14 + [14:14] + read-only + + + GPIO13 + [13:13] + read-only + + + GPIO12 + [12:12] + read-only + + + GPIO11 + [11:11] + read-only + + + GPIO10 + [10:10] + read-only + + + GPIO9 + [9:9] + read-only + + + GPIO8 + [8:8] + read-only + + + GPIO7 + [7:7] + read-only + + + GPIO6 + [6:6] + read-only + + + GPIO5 + [5:5] + read-only + + + GPIO4 + [4:4] + read-only + + + GPIO3 + [3:3] + read-only + + + GPIO2 + [2:2] + read-only + + + GPIO1 + [1:1] + read-only + + + GPIO0 + [0:0] + read-only + + + + + IRQSUMMARY_DORMANT_WAKE_SECURE1 + 0x00000224 + 0x00000000 + + + GPIO47 + [15:15] + read-only + + + GPIO46 + [14:14] + read-only + + + GPIO45 + [13:13] + read-only + + + GPIO44 + [12:12] + read-only + + + GPIO43 + [11:11] + read-only + + + GPIO42 + [10:10] + read-only + + + GPIO41 + [9:9] + read-only + + + GPIO40 + [8:8] + read-only + + + GPIO39 + [7:7] + read-only + + + GPIO38 + [6:6] + read-only + + + GPIO37 + [5:5] + read-only + + + GPIO36 + [4:4] + read-only + + + GPIO35 + [3:3] + read-only + + + GPIO34 + [2:2] + read-only + + + GPIO33 + [1:1] + read-only + + + GPIO32 + [0:0] + read-only + + + + + IRQSUMMARY_DORMANT_WAKE_NONSECURE0 + 0x00000228 + 0x00000000 + + + GPIO31 + [31:31] + read-only + + + GPIO30 + [30:30] + read-only + + + GPIO29 + [29:29] + read-only + + + GPIO28 + [28:28] + read-only + + + GPIO27 + [27:27] + read-only + + + GPIO26 + [26:26] + read-only + + + GPIO25 + [25:25] + read-only + + + GPIO24 + [24:24] + read-only + + + GPIO23 + [23:23] + read-only + + + GPIO22 + [22:22] + read-only + + + GPIO21 + [21:21] + read-only + + + GPIO20 + [20:20] + read-only + + + GPIO19 + [19:19] + read-only + + + GPIO18 + [18:18] + read-only + + + GPIO17 + [17:17] + read-only + + + GPIO16 + [16:16] + read-only + + + GPIO15 + [15:15] + read-only + + + GPIO14 + [14:14] + read-only + + + GPIO13 + [13:13] + read-only + + + GPIO12 + [12:12] + read-only + + + GPIO11 + [11:11] + read-only + + + GPIO10 + [10:10] + read-only + + + GPIO9 + [9:9] + read-only + + + GPIO8 + [8:8] + read-only + + + GPIO7 + [7:7] + read-only + + + GPIO6 + [6:6] + read-only + + + GPIO5 + [5:5] + read-only + + + GPIO4 + [4:4] + read-only + + + GPIO3 + [3:3] + read-only + + + GPIO2 + [2:2] + read-only + + + GPIO1 + [1:1] + read-only + + + GPIO0 + [0:0] + read-only + + + + + IRQSUMMARY_DORMANT_WAKE_NONSECURE1 + 0x0000022c + 0x00000000 + + + GPIO47 + [15:15] + read-only + + + GPIO46 + [14:14] + read-only + + + GPIO45 + [13:13] + read-only + + + GPIO44 + [12:12] + read-only + + + GPIO43 + [11:11] + read-only + + + GPIO42 + [10:10] + read-only + + + GPIO41 + [9:9] + read-only + + + GPIO40 + [8:8] + read-only + + + GPIO39 + [7:7] + read-only + + + GPIO38 + [6:6] + read-only + + + GPIO37 + [5:5] + read-only + + + GPIO36 + [4:4] + read-only + + + GPIO35 + [3:3] + read-only + + + GPIO34 + [2:2] + read-only + + + GPIO33 + [1:1] + read-only + + + GPIO32 + [0:0] + read-only + + + + + INTR0 + 0x00000230 + Raw Interrupts + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO7_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO6_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO5_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO4_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO3_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO2_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO1_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO0_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + INTR1 + 0x00000234 + Raw Interrupts + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO15_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO14_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO13_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO12_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO11_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO10_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO9_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO8_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + INTR2 + 0x00000238 + Raw Interrupts + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO23_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO22_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO21_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO20_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO19_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO18_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO17_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO16_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + INTR3 + 0x0000023c + Raw Interrupts + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO31_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO31_LEVEL_HIGH + [29:29] + read-only + + + GPIO31_LEVEL_LOW + [28:28] + read-only + + + GPIO30_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO30_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO30_LEVEL_HIGH + [25:25] + read-only + + + GPIO30_LEVEL_LOW + [24:24] + read-only + + + GPIO29_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO29_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO28_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO27_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO26_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO25_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO24_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + INTR4 + 0x00000240 + Raw Interrupts + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO39_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO39_LEVEL_HIGH + [29:29] + read-only + + + GPIO39_LEVEL_LOW + [28:28] + read-only + + + GPIO38_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO38_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO38_LEVEL_HIGH + [25:25] + read-only + + + GPIO38_LEVEL_LOW + [24:24] + read-only + + + GPIO37_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO37_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO37_LEVEL_HIGH + [21:21] + read-only + + + GPIO37_LEVEL_LOW + [20:20] + read-only + + + GPIO36_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO36_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO36_LEVEL_HIGH + [17:17] + read-only + + + GPIO36_LEVEL_LOW + [16:16] + read-only + + + GPIO35_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO35_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO35_LEVEL_HIGH + [13:13] + read-only + + + GPIO35_LEVEL_LOW + [12:12] + read-only + + + GPIO34_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO34_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO34_LEVEL_HIGH + [9:9] + read-only + + + GPIO34_LEVEL_LOW + [8:8] + read-only + + + GPIO33_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO33_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO33_LEVEL_HIGH + [5:5] + read-only + + + GPIO33_LEVEL_LOW + [4:4] + read-only + + + GPIO32_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO32_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO32_LEVEL_HIGH + [1:1] + read-only + + + GPIO32_LEVEL_LOW + [0:0] + read-only + + + + + INTR5 + 0x00000244 + Raw Interrupts + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + oneToClear + + + GPIO47_EDGE_LOW + [30:30] + read-write + oneToClear + + + GPIO47_LEVEL_HIGH + [29:29] + read-only + + + GPIO47_LEVEL_LOW + [28:28] + read-only + + + GPIO46_EDGE_HIGH + [27:27] + read-write + oneToClear + + + GPIO46_EDGE_LOW + [26:26] + read-write + oneToClear + + + GPIO46_LEVEL_HIGH + [25:25] + read-only + + + GPIO46_LEVEL_LOW + [24:24] + read-only + + + GPIO45_EDGE_HIGH + [23:23] + read-write + oneToClear + + + GPIO45_EDGE_LOW + [22:22] + read-write + oneToClear + + + GPIO45_LEVEL_HIGH + [21:21] + read-only + + + GPIO45_LEVEL_LOW + [20:20] + read-only + + + GPIO44_EDGE_HIGH + [19:19] + read-write + oneToClear + + + GPIO44_EDGE_LOW + [18:18] + read-write + oneToClear + + + GPIO44_LEVEL_HIGH + [17:17] + read-only + + + GPIO44_LEVEL_LOW + [16:16] + read-only + + + GPIO43_EDGE_HIGH + [15:15] + read-write + oneToClear + + + GPIO43_EDGE_LOW + [14:14] + read-write + oneToClear + + + GPIO43_LEVEL_HIGH + [13:13] + read-only + + + GPIO43_LEVEL_LOW + [12:12] + read-only + + + GPIO42_EDGE_HIGH + [11:11] + read-write + oneToClear + + + GPIO42_EDGE_LOW + [10:10] + read-write + oneToClear + + + GPIO42_LEVEL_HIGH + [9:9] + read-only + + + GPIO42_LEVEL_LOW + [8:8] + read-only + + + GPIO41_EDGE_HIGH + [7:7] + read-write + oneToClear + + + GPIO41_EDGE_LOW + [6:6] + read-write + oneToClear + + + GPIO41_LEVEL_HIGH + [5:5] + read-only + + + GPIO41_LEVEL_LOW + [4:4] + read-only + + + GPIO40_EDGE_HIGH + [3:3] + read-write + oneToClear + + + GPIO40_EDGE_LOW + [2:2] + read-write + oneToClear + + + GPIO40_LEVEL_HIGH + [1:1] + read-only + + + GPIO40_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTE0 + 0x00000248 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE1 + 0x0000024c + Interrupt Enable for proc0 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE2 + 0x00000250 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE3 + 0x00000254 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + + + GPIO31_EDGE_LOW + [30:30] + read-write + + + GPIO31_LEVEL_HIGH + [29:29] + read-write + + + GPIO31_LEVEL_LOW + [28:28] + read-write + + + GPIO30_EDGE_HIGH + [27:27] + read-write + + + GPIO30_EDGE_LOW + [26:26] + read-write + + + GPIO30_LEVEL_HIGH + [25:25] + read-write + + + GPIO30_LEVEL_LOW + [24:24] + read-write + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE4 + 0x00000258 + Interrupt Enable for proc0 + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + + + GPIO39_EDGE_LOW + [30:30] + read-write + + + GPIO39_LEVEL_HIGH + [29:29] + read-write + + + GPIO39_LEVEL_LOW + [28:28] + read-write + + + GPIO38_EDGE_HIGH + [27:27] + read-write + + + GPIO38_EDGE_LOW + [26:26] + read-write + + + GPIO38_LEVEL_HIGH + [25:25] + read-write + + + GPIO38_LEVEL_LOW + [24:24] + read-write + + + GPIO37_EDGE_HIGH + [23:23] + read-write + + + GPIO37_EDGE_LOW + [22:22] + read-write + + + GPIO37_LEVEL_HIGH + [21:21] + read-write + + + GPIO37_LEVEL_LOW + [20:20] + read-write + + + GPIO36_EDGE_HIGH + [19:19] + read-write + + + GPIO36_EDGE_LOW + [18:18] + read-write + + + GPIO36_LEVEL_HIGH + [17:17] + read-write + + + GPIO36_LEVEL_LOW + [16:16] + read-write + + + GPIO35_EDGE_HIGH + [15:15] + read-write + + + GPIO35_EDGE_LOW + [14:14] + read-write + + + GPIO35_LEVEL_HIGH + [13:13] + read-write + + + GPIO35_LEVEL_LOW + [12:12] + read-write + + + GPIO34_EDGE_HIGH + [11:11] + read-write + + + GPIO34_EDGE_LOW + [10:10] + read-write + + + GPIO34_LEVEL_HIGH + [9:9] + read-write + + + GPIO34_LEVEL_LOW + [8:8] + read-write + + + GPIO33_EDGE_HIGH + [7:7] + read-write + + + GPIO33_EDGE_LOW + [6:6] + read-write + + + GPIO33_LEVEL_HIGH + [5:5] + read-write + + + GPIO33_LEVEL_LOW + [4:4] + read-write + + + GPIO32_EDGE_HIGH + [3:3] + read-write + + + GPIO32_EDGE_LOW + [2:2] + read-write + + + GPIO32_LEVEL_HIGH + [1:1] + read-write + + + GPIO32_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTE5 + 0x0000025c + Interrupt Enable for proc0 + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + + + GPIO47_EDGE_LOW + [30:30] + read-write + + + GPIO47_LEVEL_HIGH + [29:29] + read-write + + + GPIO47_LEVEL_LOW + [28:28] + read-write + + + GPIO46_EDGE_HIGH + [27:27] + read-write + + + GPIO46_EDGE_LOW + [26:26] + read-write + + + GPIO46_LEVEL_HIGH + [25:25] + read-write + + + GPIO46_LEVEL_LOW + [24:24] + read-write + + + GPIO45_EDGE_HIGH + [23:23] + read-write + + + GPIO45_EDGE_LOW + [22:22] + read-write + + + GPIO45_LEVEL_HIGH + [21:21] + read-write + + + GPIO45_LEVEL_LOW + [20:20] + read-write + + + GPIO44_EDGE_HIGH + [19:19] + read-write + + + GPIO44_EDGE_LOW + [18:18] + read-write + + + GPIO44_LEVEL_HIGH + [17:17] + read-write + + + GPIO44_LEVEL_LOW + [16:16] + read-write + + + GPIO43_EDGE_HIGH + [15:15] + read-write + + + GPIO43_EDGE_LOW + [14:14] + read-write + + + GPIO43_LEVEL_HIGH + [13:13] + read-write + + + GPIO43_LEVEL_LOW + [12:12] + read-write + + + GPIO42_EDGE_HIGH + [11:11] + read-write + + + GPIO42_EDGE_LOW + [10:10] + read-write + + + GPIO42_LEVEL_HIGH + [9:9] + read-write + + + GPIO42_LEVEL_LOW + [8:8] + read-write + + + GPIO41_EDGE_HIGH + [7:7] + read-write + + + GPIO41_EDGE_LOW + [6:6] + read-write + + + GPIO41_LEVEL_HIGH + [5:5] + read-write + + + GPIO41_LEVEL_LOW + [4:4] + read-write + + + GPIO40_EDGE_HIGH + [3:3] + read-write + + + GPIO40_EDGE_LOW + [2:2] + read-write + + + GPIO40_LEVEL_HIGH + [1:1] + read-write + + + GPIO40_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF0 + 0x00000260 + Interrupt Force for proc0 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF1 + 0x00000264 + Interrupt Force for proc0 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF2 + 0x00000268 + Interrupt Force for proc0 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF3 + 0x0000026c + Interrupt Force for proc0 + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + + + GPIO31_EDGE_LOW + [30:30] + read-write + + + GPIO31_LEVEL_HIGH + [29:29] + read-write + + + GPIO31_LEVEL_LOW + [28:28] + read-write + + + GPIO30_EDGE_HIGH + [27:27] + read-write + + + GPIO30_EDGE_LOW + [26:26] + read-write + + + GPIO30_LEVEL_HIGH + [25:25] + read-write + + + GPIO30_LEVEL_LOW + [24:24] + read-write + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF4 + 0x00000270 + Interrupt Force for proc0 + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + + + GPIO39_EDGE_LOW + [30:30] + read-write + + + GPIO39_LEVEL_HIGH + [29:29] + read-write + + + GPIO39_LEVEL_LOW + [28:28] + read-write + + + GPIO38_EDGE_HIGH + [27:27] + read-write + + + GPIO38_EDGE_LOW + [26:26] + read-write + + + GPIO38_LEVEL_HIGH + [25:25] + read-write + + + GPIO38_LEVEL_LOW + [24:24] + read-write + + + GPIO37_EDGE_HIGH + [23:23] + read-write + + + GPIO37_EDGE_LOW + [22:22] + read-write + + + GPIO37_LEVEL_HIGH + [21:21] + read-write + + + GPIO37_LEVEL_LOW + [20:20] + read-write + + + GPIO36_EDGE_HIGH + [19:19] + read-write + + + GPIO36_EDGE_LOW + [18:18] + read-write + + + GPIO36_LEVEL_HIGH + [17:17] + read-write + + + GPIO36_LEVEL_LOW + [16:16] + read-write + + + GPIO35_EDGE_HIGH + [15:15] + read-write + + + GPIO35_EDGE_LOW + [14:14] + read-write + + + GPIO35_LEVEL_HIGH + [13:13] + read-write + + + GPIO35_LEVEL_LOW + [12:12] + read-write + + + GPIO34_EDGE_HIGH + [11:11] + read-write + + + GPIO34_EDGE_LOW + [10:10] + read-write + + + GPIO34_LEVEL_HIGH + [9:9] + read-write + + + GPIO34_LEVEL_LOW + [8:8] + read-write + + + GPIO33_EDGE_HIGH + [7:7] + read-write + + + GPIO33_EDGE_LOW + [6:6] + read-write + + + GPIO33_LEVEL_HIGH + [5:5] + read-write + + + GPIO33_LEVEL_LOW + [4:4] + read-write + + + GPIO32_EDGE_HIGH + [3:3] + read-write + + + GPIO32_EDGE_LOW + [2:2] + read-write + + + GPIO32_LEVEL_HIGH + [1:1] + read-write + + + GPIO32_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTF5 + 0x00000274 + Interrupt Force for proc0 + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + + + GPIO47_EDGE_LOW + [30:30] + read-write + + + GPIO47_LEVEL_HIGH + [29:29] + read-write + + + GPIO47_LEVEL_LOW + [28:28] + read-write + + + GPIO46_EDGE_HIGH + [27:27] + read-write + + + GPIO46_EDGE_LOW + [26:26] + read-write + + + GPIO46_LEVEL_HIGH + [25:25] + read-write + + + GPIO46_LEVEL_LOW + [24:24] + read-write + + + GPIO45_EDGE_HIGH + [23:23] + read-write + + + GPIO45_EDGE_LOW + [22:22] + read-write + + + GPIO45_LEVEL_HIGH + [21:21] + read-write + + + GPIO45_LEVEL_LOW + [20:20] + read-write + + + GPIO44_EDGE_HIGH + [19:19] + read-write + + + GPIO44_EDGE_LOW + [18:18] + read-write + + + GPIO44_LEVEL_HIGH + [17:17] + read-write + + + GPIO44_LEVEL_LOW + [16:16] + read-write + + + GPIO43_EDGE_HIGH + [15:15] + read-write + + + GPIO43_EDGE_LOW + [14:14] + read-write + + + GPIO43_LEVEL_HIGH + [13:13] + read-write + + + GPIO43_LEVEL_LOW + [12:12] + read-write + + + GPIO42_EDGE_HIGH + [11:11] + read-write + + + GPIO42_EDGE_LOW + [10:10] + read-write + + + GPIO42_LEVEL_HIGH + [9:9] + read-write + + + GPIO42_LEVEL_LOW + [8:8] + read-write + + + GPIO41_EDGE_HIGH + [7:7] + read-write + + + GPIO41_EDGE_LOW + [6:6] + read-write + + + GPIO41_LEVEL_HIGH + [5:5] + read-write + + + GPIO41_LEVEL_LOW + [4:4] + read-write + + + GPIO40_EDGE_HIGH + [3:3] + read-write + + + GPIO40_EDGE_LOW + [2:2] + read-write + + + GPIO40_LEVEL_HIGH + [1:1] + read-write + + + GPIO40_LEVEL_LOW + [0:0] + read-write + + + + + PROC0_INTS0 + 0x00000278 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-only + + + GPIO7_EDGE_LOW + [30:30] + read-only + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-only + + + GPIO6_EDGE_LOW + [26:26] + read-only + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-only + + + GPIO5_EDGE_LOW + [22:22] + read-only + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-only + + + GPIO4_EDGE_LOW + [18:18] + read-only + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-only + + + GPIO3_EDGE_LOW + [14:14] + read-only + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-only + + + GPIO2_EDGE_LOW + [10:10] + read-only + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-only + + + GPIO1_EDGE_LOW + [6:6] + read-only + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-only + + + GPIO0_EDGE_LOW + [2:2] + read-only + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS1 + 0x0000027c + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-only + + + GPIO15_EDGE_LOW + [30:30] + read-only + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-only + + + GPIO14_EDGE_LOW + [26:26] + read-only + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-only + + + GPIO13_EDGE_LOW + [22:22] + read-only + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-only + + + GPIO12_EDGE_LOW + [18:18] + read-only + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-only + + + GPIO11_EDGE_LOW + [14:14] + read-only + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-only + + + GPIO10_EDGE_LOW + [10:10] + read-only + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-only + + + GPIO9_EDGE_LOW + [6:6] + read-only + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-only + + + GPIO8_EDGE_LOW + [2:2] + read-only + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS2 + 0x00000280 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-only + + + GPIO23_EDGE_LOW + [30:30] + read-only + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-only + + + GPIO22_EDGE_LOW + [26:26] + read-only + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-only + + + GPIO21_EDGE_LOW + [22:22] + read-only + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-only + + + GPIO20_EDGE_LOW + [18:18] + read-only + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-only + + + GPIO19_EDGE_LOW + [14:14] + read-only + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-only + + + GPIO18_EDGE_LOW + [10:10] + read-only + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-only + + + GPIO17_EDGE_LOW + [6:6] + read-only + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-only + + + GPIO16_EDGE_LOW + [2:2] + read-only + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS3 + 0x00000284 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-only + + + GPIO31_EDGE_LOW + [30:30] + read-only + + + GPIO31_LEVEL_HIGH + [29:29] + read-only + + + GPIO31_LEVEL_LOW + [28:28] + read-only + + + GPIO30_EDGE_HIGH + [27:27] + read-only + + + GPIO30_EDGE_LOW + [26:26] + read-only + + + GPIO30_LEVEL_HIGH + [25:25] + read-only + + + GPIO30_LEVEL_LOW + [24:24] + read-only + + + GPIO29_EDGE_HIGH + [23:23] + read-only + + + GPIO29_EDGE_LOW + [22:22] + read-only + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-only + + + GPIO28_EDGE_LOW + [18:18] + read-only + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-only + + + GPIO27_EDGE_LOW + [14:14] + read-only + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-only + + + GPIO26_EDGE_LOW + [10:10] + read-only + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-only + + + GPIO25_EDGE_LOW + [6:6] + read-only + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-only + + + GPIO24_EDGE_LOW + [2:2] + read-only + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS4 + 0x00000288 + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-only + + + GPIO39_EDGE_LOW + [30:30] + read-only + + + GPIO39_LEVEL_HIGH + [29:29] + read-only + + + GPIO39_LEVEL_LOW + [28:28] + read-only + + + GPIO38_EDGE_HIGH + [27:27] + read-only + + + GPIO38_EDGE_LOW + [26:26] + read-only + + + GPIO38_LEVEL_HIGH + [25:25] + read-only + + + GPIO38_LEVEL_LOW + [24:24] + read-only + + + GPIO37_EDGE_HIGH + [23:23] + read-only + + + GPIO37_EDGE_LOW + [22:22] + read-only + + + GPIO37_LEVEL_HIGH + [21:21] + read-only + + + GPIO37_LEVEL_LOW + [20:20] + read-only + + + GPIO36_EDGE_HIGH + [19:19] + read-only + + + GPIO36_EDGE_LOW + [18:18] + read-only + + + GPIO36_LEVEL_HIGH + [17:17] + read-only + + + GPIO36_LEVEL_LOW + [16:16] + read-only + + + GPIO35_EDGE_HIGH + [15:15] + read-only + + + GPIO35_EDGE_LOW + [14:14] + read-only + + + GPIO35_LEVEL_HIGH + [13:13] + read-only + + + GPIO35_LEVEL_LOW + [12:12] + read-only + + + GPIO34_EDGE_HIGH + [11:11] + read-only + + + GPIO34_EDGE_LOW + [10:10] + read-only + + + GPIO34_LEVEL_HIGH + [9:9] + read-only + + + GPIO34_LEVEL_LOW + [8:8] + read-only + + + GPIO33_EDGE_HIGH + [7:7] + read-only + + + GPIO33_EDGE_LOW + [6:6] + read-only + + + GPIO33_LEVEL_HIGH + [5:5] + read-only + + + GPIO33_LEVEL_LOW + [4:4] + read-only + + + GPIO32_EDGE_HIGH + [3:3] + read-only + + + GPIO32_EDGE_LOW + [2:2] + read-only + + + GPIO32_LEVEL_HIGH + [1:1] + read-only + + + GPIO32_LEVEL_LOW + [0:0] + read-only + + + + + PROC0_INTS5 + 0x0000028c + Interrupt status after masking & forcing for proc0 + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-only + + + GPIO47_EDGE_LOW + [30:30] + read-only + + + GPIO47_LEVEL_HIGH + [29:29] + read-only + + + GPIO47_LEVEL_LOW + [28:28] + read-only + + + GPIO46_EDGE_HIGH + [27:27] + read-only + + + GPIO46_EDGE_LOW + [26:26] + read-only + + + GPIO46_LEVEL_HIGH + [25:25] + read-only + + + GPIO46_LEVEL_LOW + [24:24] + read-only + + + GPIO45_EDGE_HIGH + [23:23] + read-only + + + GPIO45_EDGE_LOW + [22:22] + read-only + + + GPIO45_LEVEL_HIGH + [21:21] + read-only + + + GPIO45_LEVEL_LOW + [20:20] + read-only + + + GPIO44_EDGE_HIGH + [19:19] + read-only + + + GPIO44_EDGE_LOW + [18:18] + read-only + + + GPIO44_LEVEL_HIGH + [17:17] + read-only + + + GPIO44_LEVEL_LOW + [16:16] + read-only + + + GPIO43_EDGE_HIGH + [15:15] + read-only + + + GPIO43_EDGE_LOW + [14:14] + read-only + + + GPIO43_LEVEL_HIGH + [13:13] + read-only + + + GPIO43_LEVEL_LOW + [12:12] + read-only + + + GPIO42_EDGE_HIGH + [11:11] + read-only + + + GPIO42_EDGE_LOW + [10:10] + read-only + + + GPIO42_LEVEL_HIGH + [9:9] + read-only + + + GPIO42_LEVEL_LOW + [8:8] + read-only + + + GPIO41_EDGE_HIGH + [7:7] + read-only + + + GPIO41_EDGE_LOW + [6:6] + read-only + + + GPIO41_LEVEL_HIGH + [5:5] + read-only + + + GPIO41_LEVEL_LOW + [4:4] + read-only + + + GPIO40_EDGE_HIGH + [3:3] + read-only + + + GPIO40_EDGE_LOW + [2:2] + read-only + + + GPIO40_LEVEL_HIGH + [1:1] + read-only + + + GPIO40_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTE0 + 0x00000290 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE1 + 0x00000294 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE2 + 0x00000298 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE3 + 0x0000029c + Interrupt Enable for proc1 + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + + + GPIO31_EDGE_LOW + [30:30] + read-write + + + GPIO31_LEVEL_HIGH + [29:29] + read-write + + + GPIO31_LEVEL_LOW + [28:28] + read-write + + + GPIO30_EDGE_HIGH + [27:27] + read-write + + + GPIO30_EDGE_LOW + [26:26] + read-write + + + GPIO30_LEVEL_HIGH + [25:25] + read-write + + + GPIO30_LEVEL_LOW + [24:24] + read-write + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE4 + 0x000002a0 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + + + GPIO39_EDGE_LOW + [30:30] + read-write + + + GPIO39_LEVEL_HIGH + [29:29] + read-write + + + GPIO39_LEVEL_LOW + [28:28] + read-write + + + GPIO38_EDGE_HIGH + [27:27] + read-write + + + GPIO38_EDGE_LOW + [26:26] + read-write + + + GPIO38_LEVEL_HIGH + [25:25] + read-write + + + GPIO38_LEVEL_LOW + [24:24] + read-write + + + GPIO37_EDGE_HIGH + [23:23] + read-write + + + GPIO37_EDGE_LOW + [22:22] + read-write + + + GPIO37_LEVEL_HIGH + [21:21] + read-write + + + GPIO37_LEVEL_LOW + [20:20] + read-write + + + GPIO36_EDGE_HIGH + [19:19] + read-write + + + GPIO36_EDGE_LOW + [18:18] + read-write + + + GPIO36_LEVEL_HIGH + [17:17] + read-write + + + GPIO36_LEVEL_LOW + [16:16] + read-write + + + GPIO35_EDGE_HIGH + [15:15] + read-write + + + GPIO35_EDGE_LOW + [14:14] + read-write + + + GPIO35_LEVEL_HIGH + [13:13] + read-write + + + GPIO35_LEVEL_LOW + [12:12] + read-write + + + GPIO34_EDGE_HIGH + [11:11] + read-write + + + GPIO34_EDGE_LOW + [10:10] + read-write + + + GPIO34_LEVEL_HIGH + [9:9] + read-write + + + GPIO34_LEVEL_LOW + [8:8] + read-write + + + GPIO33_EDGE_HIGH + [7:7] + read-write + + + GPIO33_EDGE_LOW + [6:6] + read-write + + + GPIO33_LEVEL_HIGH + [5:5] + read-write + + + GPIO33_LEVEL_LOW + [4:4] + read-write + + + GPIO32_EDGE_HIGH + [3:3] + read-write + + + GPIO32_EDGE_LOW + [2:2] + read-write + + + GPIO32_LEVEL_HIGH + [1:1] + read-write + + + GPIO32_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTE5 + 0x000002a4 + Interrupt Enable for proc1 + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + + + GPIO47_EDGE_LOW + [30:30] + read-write + + + GPIO47_LEVEL_HIGH + [29:29] + read-write + + + GPIO47_LEVEL_LOW + [28:28] + read-write + + + GPIO46_EDGE_HIGH + [27:27] + read-write + + + GPIO46_EDGE_LOW + [26:26] + read-write + + + GPIO46_LEVEL_HIGH + [25:25] + read-write + + + GPIO46_LEVEL_LOW + [24:24] + read-write + + + GPIO45_EDGE_HIGH + [23:23] + read-write + + + GPIO45_EDGE_LOW + [22:22] + read-write + + + GPIO45_LEVEL_HIGH + [21:21] + read-write + + + GPIO45_LEVEL_LOW + [20:20] + read-write + + + GPIO44_EDGE_HIGH + [19:19] + read-write + + + GPIO44_EDGE_LOW + [18:18] + read-write + + + GPIO44_LEVEL_HIGH + [17:17] + read-write + + + GPIO44_LEVEL_LOW + [16:16] + read-write + + + GPIO43_EDGE_HIGH + [15:15] + read-write + + + GPIO43_EDGE_LOW + [14:14] + read-write + + + GPIO43_LEVEL_HIGH + [13:13] + read-write + + + GPIO43_LEVEL_LOW + [12:12] + read-write + + + GPIO42_EDGE_HIGH + [11:11] + read-write + + + GPIO42_EDGE_LOW + [10:10] + read-write + + + GPIO42_LEVEL_HIGH + [9:9] + read-write + + + GPIO42_LEVEL_LOW + [8:8] + read-write + + + GPIO41_EDGE_HIGH + [7:7] + read-write + + + GPIO41_EDGE_LOW + [6:6] + read-write + + + GPIO41_LEVEL_HIGH + [5:5] + read-write + + + GPIO41_LEVEL_LOW + [4:4] + read-write + + + GPIO40_EDGE_HIGH + [3:3] + read-write + + + GPIO40_EDGE_LOW + [2:2] + read-write + + + GPIO40_LEVEL_HIGH + [1:1] + read-write + + + GPIO40_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF0 + 0x000002a8 + Interrupt Force for proc1 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF1 + 0x000002ac + Interrupt Force for proc1 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF2 + 0x000002b0 + Interrupt Force for proc1 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF3 + 0x000002b4 + Interrupt Force for proc1 + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + + + GPIO31_EDGE_LOW + [30:30] + read-write + + + GPIO31_LEVEL_HIGH + [29:29] + read-write + + + GPIO31_LEVEL_LOW + [28:28] + read-write + + + GPIO30_EDGE_HIGH + [27:27] + read-write + + + GPIO30_EDGE_LOW + [26:26] + read-write + + + GPIO30_LEVEL_HIGH + [25:25] + read-write + + + GPIO30_LEVEL_LOW + [24:24] + read-write + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF4 + 0x000002b8 + Interrupt Force for proc1 + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + + + GPIO39_EDGE_LOW + [30:30] + read-write + + + GPIO39_LEVEL_HIGH + [29:29] + read-write + + + GPIO39_LEVEL_LOW + [28:28] + read-write + + + GPIO38_EDGE_HIGH + [27:27] + read-write + + + GPIO38_EDGE_LOW + [26:26] + read-write + + + GPIO38_LEVEL_HIGH + [25:25] + read-write + + + GPIO38_LEVEL_LOW + [24:24] + read-write + + + GPIO37_EDGE_HIGH + [23:23] + read-write + + + GPIO37_EDGE_LOW + [22:22] + read-write + + + GPIO37_LEVEL_HIGH + [21:21] + read-write + + + GPIO37_LEVEL_LOW + [20:20] + read-write + + + GPIO36_EDGE_HIGH + [19:19] + read-write + + + GPIO36_EDGE_LOW + [18:18] + read-write + + + GPIO36_LEVEL_HIGH + [17:17] + read-write + + + GPIO36_LEVEL_LOW + [16:16] + read-write + + + GPIO35_EDGE_HIGH + [15:15] + read-write + + + GPIO35_EDGE_LOW + [14:14] + read-write + + + GPIO35_LEVEL_HIGH + [13:13] + read-write + + + GPIO35_LEVEL_LOW + [12:12] + read-write + + + GPIO34_EDGE_HIGH + [11:11] + read-write + + + GPIO34_EDGE_LOW + [10:10] + read-write + + + GPIO34_LEVEL_HIGH + [9:9] + read-write + + + GPIO34_LEVEL_LOW + [8:8] + read-write + + + GPIO33_EDGE_HIGH + [7:7] + read-write + + + GPIO33_EDGE_LOW + [6:6] + read-write + + + GPIO33_LEVEL_HIGH + [5:5] + read-write + + + GPIO33_LEVEL_LOW + [4:4] + read-write + + + GPIO32_EDGE_HIGH + [3:3] + read-write + + + GPIO32_EDGE_LOW + [2:2] + read-write + + + GPIO32_LEVEL_HIGH + [1:1] + read-write + + + GPIO32_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTF5 + 0x000002bc + Interrupt Force for proc1 + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + + + GPIO47_EDGE_LOW + [30:30] + read-write + + + GPIO47_LEVEL_HIGH + [29:29] + read-write + + + GPIO47_LEVEL_LOW + [28:28] + read-write + + + GPIO46_EDGE_HIGH + [27:27] + read-write + + + GPIO46_EDGE_LOW + [26:26] + read-write + + + GPIO46_LEVEL_HIGH + [25:25] + read-write + + + GPIO46_LEVEL_LOW + [24:24] + read-write + + + GPIO45_EDGE_HIGH + [23:23] + read-write + + + GPIO45_EDGE_LOW + [22:22] + read-write + + + GPIO45_LEVEL_HIGH + [21:21] + read-write + + + GPIO45_LEVEL_LOW + [20:20] + read-write + + + GPIO44_EDGE_HIGH + [19:19] + read-write + + + GPIO44_EDGE_LOW + [18:18] + read-write + + + GPIO44_LEVEL_HIGH + [17:17] + read-write + + + GPIO44_LEVEL_LOW + [16:16] + read-write + + + GPIO43_EDGE_HIGH + [15:15] + read-write + + + GPIO43_EDGE_LOW + [14:14] + read-write + + + GPIO43_LEVEL_HIGH + [13:13] + read-write + + + GPIO43_LEVEL_LOW + [12:12] + read-write + + + GPIO42_EDGE_HIGH + [11:11] + read-write + + + GPIO42_EDGE_LOW + [10:10] + read-write + + + GPIO42_LEVEL_HIGH + [9:9] + read-write + + + GPIO42_LEVEL_LOW + [8:8] + read-write + + + GPIO41_EDGE_HIGH + [7:7] + read-write + + + GPIO41_EDGE_LOW + [6:6] + read-write + + + GPIO41_LEVEL_HIGH + [5:5] + read-write + + + GPIO41_LEVEL_LOW + [4:4] + read-write + + + GPIO40_EDGE_HIGH + [3:3] + read-write + + + GPIO40_EDGE_LOW + [2:2] + read-write + + + GPIO40_LEVEL_HIGH + [1:1] + read-write + + + GPIO40_LEVEL_LOW + [0:0] + read-write + + + + + PROC1_INTS0 + 0x000002c0 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-only + + + GPIO7_EDGE_LOW + [30:30] + read-only + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-only + + + GPIO6_EDGE_LOW + [26:26] + read-only + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-only + + + GPIO5_EDGE_LOW + [22:22] + read-only + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-only + + + GPIO4_EDGE_LOW + [18:18] + read-only + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-only + + + GPIO3_EDGE_LOW + [14:14] + read-only + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-only + + + GPIO2_EDGE_LOW + [10:10] + read-only + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-only + + + GPIO1_EDGE_LOW + [6:6] + read-only + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-only + + + GPIO0_EDGE_LOW + [2:2] + read-only + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS1 + 0x000002c4 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-only + + + GPIO15_EDGE_LOW + [30:30] + read-only + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-only + + + GPIO14_EDGE_LOW + [26:26] + read-only + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-only + + + GPIO13_EDGE_LOW + [22:22] + read-only + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-only + + + GPIO12_EDGE_LOW + [18:18] + read-only + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-only + + + GPIO11_EDGE_LOW + [14:14] + read-only + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-only + + + GPIO10_EDGE_LOW + [10:10] + read-only + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-only + + + GPIO9_EDGE_LOW + [6:6] + read-only + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-only + + + GPIO8_EDGE_LOW + [2:2] + read-only + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS2 + 0x000002c8 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-only + + + GPIO23_EDGE_LOW + [30:30] + read-only + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-only + + + GPIO22_EDGE_LOW + [26:26] + read-only + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-only + + + GPIO21_EDGE_LOW + [22:22] + read-only + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-only + + + GPIO20_EDGE_LOW + [18:18] + read-only + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-only + + + GPIO19_EDGE_LOW + [14:14] + read-only + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-only + + + GPIO18_EDGE_LOW + [10:10] + read-only + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-only + + + GPIO17_EDGE_LOW + [6:6] + read-only + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-only + + + GPIO16_EDGE_LOW + [2:2] + read-only + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS3 + 0x000002cc + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-only + + + GPIO31_EDGE_LOW + [30:30] + read-only + + + GPIO31_LEVEL_HIGH + [29:29] + read-only + + + GPIO31_LEVEL_LOW + [28:28] + read-only + + + GPIO30_EDGE_HIGH + [27:27] + read-only + + + GPIO30_EDGE_LOW + [26:26] + read-only + + + GPIO30_LEVEL_HIGH + [25:25] + read-only + + + GPIO30_LEVEL_LOW + [24:24] + read-only + + + GPIO29_EDGE_HIGH + [23:23] + read-only + + + GPIO29_EDGE_LOW + [22:22] + read-only + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-only + + + GPIO28_EDGE_LOW + [18:18] + read-only + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-only + + + GPIO27_EDGE_LOW + [14:14] + read-only + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-only + + + GPIO26_EDGE_LOW + [10:10] + read-only + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-only + + + GPIO25_EDGE_LOW + [6:6] + read-only + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-only + + + GPIO24_EDGE_LOW + [2:2] + read-only + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS4 + 0x000002d0 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-only + + + GPIO39_EDGE_LOW + [30:30] + read-only + + + GPIO39_LEVEL_HIGH + [29:29] + read-only + + + GPIO39_LEVEL_LOW + [28:28] + read-only + + + GPIO38_EDGE_HIGH + [27:27] + read-only + + + GPIO38_EDGE_LOW + [26:26] + read-only + + + GPIO38_LEVEL_HIGH + [25:25] + read-only + + + GPIO38_LEVEL_LOW + [24:24] + read-only + + + GPIO37_EDGE_HIGH + [23:23] + read-only + + + GPIO37_EDGE_LOW + [22:22] + read-only + + + GPIO37_LEVEL_HIGH + [21:21] + read-only + + + GPIO37_LEVEL_LOW + [20:20] + read-only + + + GPIO36_EDGE_HIGH + [19:19] + read-only + + + GPIO36_EDGE_LOW + [18:18] + read-only + + + GPIO36_LEVEL_HIGH + [17:17] + read-only + + + GPIO36_LEVEL_LOW + [16:16] + read-only + + + GPIO35_EDGE_HIGH + [15:15] + read-only + + + GPIO35_EDGE_LOW + [14:14] + read-only + + + GPIO35_LEVEL_HIGH + [13:13] + read-only + + + GPIO35_LEVEL_LOW + [12:12] + read-only + + + GPIO34_EDGE_HIGH + [11:11] + read-only + + + GPIO34_EDGE_LOW + [10:10] + read-only + + + GPIO34_LEVEL_HIGH + [9:9] + read-only + + + GPIO34_LEVEL_LOW + [8:8] + read-only + + + GPIO33_EDGE_HIGH + [7:7] + read-only + + + GPIO33_EDGE_LOW + [6:6] + read-only + + + GPIO33_LEVEL_HIGH + [5:5] + read-only + + + GPIO33_LEVEL_LOW + [4:4] + read-only + + + GPIO32_EDGE_HIGH + [3:3] + read-only + + + GPIO32_EDGE_LOW + [2:2] + read-only + + + GPIO32_LEVEL_HIGH + [1:1] + read-only + + + GPIO32_LEVEL_LOW + [0:0] + read-only + + + + + PROC1_INTS5 + 0x000002d4 + Interrupt status after masking & forcing for proc1 + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-only + + + GPIO47_EDGE_LOW + [30:30] + read-only + + + GPIO47_LEVEL_HIGH + [29:29] + read-only + + + GPIO47_LEVEL_LOW + [28:28] + read-only + + + GPIO46_EDGE_HIGH + [27:27] + read-only + + + GPIO46_EDGE_LOW + [26:26] + read-only + + + GPIO46_LEVEL_HIGH + [25:25] + read-only + + + GPIO46_LEVEL_LOW + [24:24] + read-only + + + GPIO45_EDGE_HIGH + [23:23] + read-only + + + GPIO45_EDGE_LOW + [22:22] + read-only + + + GPIO45_LEVEL_HIGH + [21:21] + read-only + + + GPIO45_LEVEL_LOW + [20:20] + read-only + + + GPIO44_EDGE_HIGH + [19:19] + read-only + + + GPIO44_EDGE_LOW + [18:18] + read-only + + + GPIO44_LEVEL_HIGH + [17:17] + read-only + + + GPIO44_LEVEL_LOW + [16:16] + read-only + + + GPIO43_EDGE_HIGH + [15:15] + read-only + + + GPIO43_EDGE_LOW + [14:14] + read-only + + + GPIO43_LEVEL_HIGH + [13:13] + read-only + + + GPIO43_LEVEL_LOW + [12:12] + read-only + + + GPIO42_EDGE_HIGH + [11:11] + read-only + + + GPIO42_EDGE_LOW + [10:10] + read-only + + + GPIO42_LEVEL_HIGH + [9:9] + read-only + + + GPIO42_LEVEL_LOW + [8:8] + read-only + + + GPIO41_EDGE_HIGH + [7:7] + read-only + + + GPIO41_EDGE_LOW + [6:6] + read-only + + + GPIO41_LEVEL_HIGH + [5:5] + read-only + + + GPIO41_LEVEL_LOW + [4:4] + read-only + + + GPIO40_EDGE_HIGH + [3:3] + read-only + + + GPIO40_EDGE_LOW + [2:2] + read-only + + + GPIO40_LEVEL_HIGH + [1:1] + read-only + + + GPIO40_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTE0 + 0x000002d8 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE1 + 0x000002dc + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE2 + 0x000002e0 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE3 + 0x000002e4 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + + + GPIO31_EDGE_LOW + [30:30] + read-write + + + GPIO31_LEVEL_HIGH + [29:29] + read-write + + + GPIO31_LEVEL_LOW + [28:28] + read-write + + + GPIO30_EDGE_HIGH + [27:27] + read-write + + + GPIO30_EDGE_LOW + [26:26] + read-write + + + GPIO30_LEVEL_HIGH + [25:25] + read-write + + + GPIO30_LEVEL_LOW + [24:24] + read-write + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE4 + 0x000002e8 + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + + + GPIO39_EDGE_LOW + [30:30] + read-write + + + GPIO39_LEVEL_HIGH + [29:29] + read-write + + + GPIO39_LEVEL_LOW + [28:28] + read-write + + + GPIO38_EDGE_HIGH + [27:27] + read-write + + + GPIO38_EDGE_LOW + [26:26] + read-write + + + GPIO38_LEVEL_HIGH + [25:25] + read-write + + + GPIO38_LEVEL_LOW + [24:24] + read-write + + + GPIO37_EDGE_HIGH + [23:23] + read-write + + + GPIO37_EDGE_LOW + [22:22] + read-write + + + GPIO37_LEVEL_HIGH + [21:21] + read-write + + + GPIO37_LEVEL_LOW + [20:20] + read-write + + + GPIO36_EDGE_HIGH + [19:19] + read-write + + + GPIO36_EDGE_LOW + [18:18] + read-write + + + GPIO36_LEVEL_HIGH + [17:17] + read-write + + + GPIO36_LEVEL_LOW + [16:16] + read-write + + + GPIO35_EDGE_HIGH + [15:15] + read-write + + + GPIO35_EDGE_LOW + [14:14] + read-write + + + GPIO35_LEVEL_HIGH + [13:13] + read-write + + + GPIO35_LEVEL_LOW + [12:12] + read-write + + + GPIO34_EDGE_HIGH + [11:11] + read-write + + + GPIO34_EDGE_LOW + [10:10] + read-write + + + GPIO34_LEVEL_HIGH + [9:9] + read-write + + + GPIO34_LEVEL_LOW + [8:8] + read-write + + + GPIO33_EDGE_HIGH + [7:7] + read-write + + + GPIO33_EDGE_LOW + [6:6] + read-write + + + GPIO33_LEVEL_HIGH + [5:5] + read-write + + + GPIO33_LEVEL_LOW + [4:4] + read-write + + + GPIO32_EDGE_HIGH + [3:3] + read-write + + + GPIO32_EDGE_LOW + [2:2] + read-write + + + GPIO32_LEVEL_HIGH + [1:1] + read-write + + + GPIO32_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTE5 + 0x000002ec + Interrupt Enable for dormant_wake + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + + + GPIO47_EDGE_LOW + [30:30] + read-write + + + GPIO47_LEVEL_HIGH + [29:29] + read-write + + + GPIO47_LEVEL_LOW + [28:28] + read-write + + + GPIO46_EDGE_HIGH + [27:27] + read-write + + + GPIO46_EDGE_LOW + [26:26] + read-write + + + GPIO46_LEVEL_HIGH + [25:25] + read-write + + + GPIO46_LEVEL_LOW + [24:24] + read-write + + + GPIO45_EDGE_HIGH + [23:23] + read-write + + + GPIO45_EDGE_LOW + [22:22] + read-write + + + GPIO45_LEVEL_HIGH + [21:21] + read-write + + + GPIO45_LEVEL_LOW + [20:20] + read-write + + + GPIO44_EDGE_HIGH + [19:19] + read-write + + + GPIO44_EDGE_LOW + [18:18] + read-write + + + GPIO44_LEVEL_HIGH + [17:17] + read-write + + + GPIO44_LEVEL_LOW + [16:16] + read-write + + + GPIO43_EDGE_HIGH + [15:15] + read-write + + + GPIO43_EDGE_LOW + [14:14] + read-write + + + GPIO43_LEVEL_HIGH + [13:13] + read-write + + + GPIO43_LEVEL_LOW + [12:12] + read-write + + + GPIO42_EDGE_HIGH + [11:11] + read-write + + + GPIO42_EDGE_LOW + [10:10] + read-write + + + GPIO42_LEVEL_HIGH + [9:9] + read-write + + + GPIO42_LEVEL_LOW + [8:8] + read-write + + + GPIO41_EDGE_HIGH + [7:7] + read-write + + + GPIO41_EDGE_LOW + [6:6] + read-write + + + GPIO41_LEVEL_HIGH + [5:5] + read-write + + + GPIO41_LEVEL_LOW + [4:4] + read-write + + + GPIO40_EDGE_HIGH + [3:3] + read-write + + + GPIO40_EDGE_LOW + [2:2] + read-write + + + GPIO40_LEVEL_HIGH + [1:1] + read-write + + + GPIO40_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF0 + 0x000002f0 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-write + + + GPIO7_EDGE_LOW + [30:30] + read-write + + + GPIO7_LEVEL_HIGH + [29:29] + read-write + + + GPIO7_LEVEL_LOW + [28:28] + read-write + + + GPIO6_EDGE_HIGH + [27:27] + read-write + + + GPIO6_EDGE_LOW + [26:26] + read-write + + + GPIO6_LEVEL_HIGH + [25:25] + read-write + + + GPIO6_LEVEL_LOW + [24:24] + read-write + + + GPIO5_EDGE_HIGH + [23:23] + read-write + + + GPIO5_EDGE_LOW + [22:22] + read-write + + + GPIO5_LEVEL_HIGH + [21:21] + read-write + + + GPIO5_LEVEL_LOW + [20:20] + read-write + + + GPIO4_EDGE_HIGH + [19:19] + read-write + + + GPIO4_EDGE_LOW + [18:18] + read-write + + + GPIO4_LEVEL_HIGH + [17:17] + read-write + + + GPIO4_LEVEL_LOW + [16:16] + read-write + + + GPIO3_EDGE_HIGH + [15:15] + read-write + + + GPIO3_EDGE_LOW + [14:14] + read-write + + + GPIO3_LEVEL_HIGH + [13:13] + read-write + + + GPIO3_LEVEL_LOW + [12:12] + read-write + + + GPIO2_EDGE_HIGH + [11:11] + read-write + + + GPIO2_EDGE_LOW + [10:10] + read-write + + + GPIO2_LEVEL_HIGH + [9:9] + read-write + + + GPIO2_LEVEL_LOW + [8:8] + read-write + + + GPIO1_EDGE_HIGH + [7:7] + read-write + + + GPIO1_EDGE_LOW + [6:6] + read-write + + + GPIO1_LEVEL_HIGH + [5:5] + read-write + + + GPIO1_LEVEL_LOW + [4:4] + read-write + + + GPIO0_EDGE_HIGH + [3:3] + read-write + + + GPIO0_EDGE_LOW + [2:2] + read-write + + + GPIO0_LEVEL_HIGH + [1:1] + read-write + + + GPIO0_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF1 + 0x000002f4 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-write + + + GPIO15_EDGE_LOW + [30:30] + read-write + + + GPIO15_LEVEL_HIGH + [29:29] + read-write + + + GPIO15_LEVEL_LOW + [28:28] + read-write + + + GPIO14_EDGE_HIGH + [27:27] + read-write + + + GPIO14_EDGE_LOW + [26:26] + read-write + + + GPIO14_LEVEL_HIGH + [25:25] + read-write + + + GPIO14_LEVEL_LOW + [24:24] + read-write + + + GPIO13_EDGE_HIGH + [23:23] + read-write + + + GPIO13_EDGE_LOW + [22:22] + read-write + + + GPIO13_LEVEL_HIGH + [21:21] + read-write + + + GPIO13_LEVEL_LOW + [20:20] + read-write + + + GPIO12_EDGE_HIGH + [19:19] + read-write + + + GPIO12_EDGE_LOW + [18:18] + read-write + + + GPIO12_LEVEL_HIGH + [17:17] + read-write + + + GPIO12_LEVEL_LOW + [16:16] + read-write + + + GPIO11_EDGE_HIGH + [15:15] + read-write + + + GPIO11_EDGE_LOW + [14:14] + read-write + + + GPIO11_LEVEL_HIGH + [13:13] + read-write + + + GPIO11_LEVEL_LOW + [12:12] + read-write + + + GPIO10_EDGE_HIGH + [11:11] + read-write + + + GPIO10_EDGE_LOW + [10:10] + read-write + + + GPIO10_LEVEL_HIGH + [9:9] + read-write + + + GPIO10_LEVEL_LOW + [8:8] + read-write + + + GPIO9_EDGE_HIGH + [7:7] + read-write + + + GPIO9_EDGE_LOW + [6:6] + read-write + + + GPIO9_LEVEL_HIGH + [5:5] + read-write + + + GPIO9_LEVEL_LOW + [4:4] + read-write + + + GPIO8_EDGE_HIGH + [3:3] + read-write + + + GPIO8_EDGE_LOW + [2:2] + read-write + + + GPIO8_LEVEL_HIGH + [1:1] + read-write + + + GPIO8_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF2 + 0x000002f8 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-write + + + GPIO23_EDGE_LOW + [30:30] + read-write + + + GPIO23_LEVEL_HIGH + [29:29] + read-write + + + GPIO23_LEVEL_LOW + [28:28] + read-write + + + GPIO22_EDGE_HIGH + [27:27] + read-write + + + GPIO22_EDGE_LOW + [26:26] + read-write + + + GPIO22_LEVEL_HIGH + [25:25] + read-write + + + GPIO22_LEVEL_LOW + [24:24] + read-write + + + GPIO21_EDGE_HIGH + [23:23] + read-write + + + GPIO21_EDGE_LOW + [22:22] + read-write + + + GPIO21_LEVEL_HIGH + [21:21] + read-write + + + GPIO21_LEVEL_LOW + [20:20] + read-write + + + GPIO20_EDGE_HIGH + [19:19] + read-write + + + GPIO20_EDGE_LOW + [18:18] + read-write + + + GPIO20_LEVEL_HIGH + [17:17] + read-write + + + GPIO20_LEVEL_LOW + [16:16] + read-write + + + GPIO19_EDGE_HIGH + [15:15] + read-write + + + GPIO19_EDGE_LOW + [14:14] + read-write + + + GPIO19_LEVEL_HIGH + [13:13] + read-write + + + GPIO19_LEVEL_LOW + [12:12] + read-write + + + GPIO18_EDGE_HIGH + [11:11] + read-write + + + GPIO18_EDGE_LOW + [10:10] + read-write + + + GPIO18_LEVEL_HIGH + [9:9] + read-write + + + GPIO18_LEVEL_LOW + [8:8] + read-write + + + GPIO17_EDGE_HIGH + [7:7] + read-write + + + GPIO17_EDGE_LOW + [6:6] + read-write + + + GPIO17_LEVEL_HIGH + [5:5] + read-write + + + GPIO17_LEVEL_LOW + [4:4] + read-write + + + GPIO16_EDGE_HIGH + [3:3] + read-write + + + GPIO16_EDGE_LOW + [2:2] + read-write + + + GPIO16_LEVEL_HIGH + [1:1] + read-write + + + GPIO16_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF3 + 0x000002fc + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-write + + + GPIO31_EDGE_LOW + [30:30] + read-write + + + GPIO31_LEVEL_HIGH + [29:29] + read-write + + + GPIO31_LEVEL_LOW + [28:28] + read-write + + + GPIO30_EDGE_HIGH + [27:27] + read-write + + + GPIO30_EDGE_LOW + [26:26] + read-write + + + GPIO30_LEVEL_HIGH + [25:25] + read-write + + + GPIO30_LEVEL_LOW + [24:24] + read-write + + + GPIO29_EDGE_HIGH + [23:23] + read-write + + + GPIO29_EDGE_LOW + [22:22] + read-write + + + GPIO29_LEVEL_HIGH + [21:21] + read-write + + + GPIO29_LEVEL_LOW + [20:20] + read-write + + + GPIO28_EDGE_HIGH + [19:19] + read-write + + + GPIO28_EDGE_LOW + [18:18] + read-write + + + GPIO28_LEVEL_HIGH + [17:17] + read-write + + + GPIO28_LEVEL_LOW + [16:16] + read-write + + + GPIO27_EDGE_HIGH + [15:15] + read-write + + + GPIO27_EDGE_LOW + [14:14] + read-write + + + GPIO27_LEVEL_HIGH + [13:13] + read-write + + + GPIO27_LEVEL_LOW + [12:12] + read-write + + + GPIO26_EDGE_HIGH + [11:11] + read-write + + + GPIO26_EDGE_LOW + [10:10] + read-write + + + GPIO26_LEVEL_HIGH + [9:9] + read-write + + + GPIO26_LEVEL_LOW + [8:8] + read-write + + + GPIO25_EDGE_HIGH + [7:7] + read-write + + + GPIO25_EDGE_LOW + [6:6] + read-write + + + GPIO25_LEVEL_HIGH + [5:5] + read-write + + + GPIO25_LEVEL_LOW + [4:4] + read-write + + + GPIO24_EDGE_HIGH + [3:3] + read-write + + + GPIO24_EDGE_LOW + [2:2] + read-write + + + GPIO24_LEVEL_HIGH + [1:1] + read-write + + + GPIO24_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF4 + 0x00000300 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-write + + + GPIO39_EDGE_LOW + [30:30] + read-write + + + GPIO39_LEVEL_HIGH + [29:29] + read-write + + + GPIO39_LEVEL_LOW + [28:28] + read-write + + + GPIO38_EDGE_HIGH + [27:27] + read-write + + + GPIO38_EDGE_LOW + [26:26] + read-write + + + GPIO38_LEVEL_HIGH + [25:25] + read-write + + + GPIO38_LEVEL_LOW + [24:24] + read-write + + + GPIO37_EDGE_HIGH + [23:23] + read-write + + + GPIO37_EDGE_LOW + [22:22] + read-write + + + GPIO37_LEVEL_HIGH + [21:21] + read-write + + + GPIO37_LEVEL_LOW + [20:20] + read-write + + + GPIO36_EDGE_HIGH + [19:19] + read-write + + + GPIO36_EDGE_LOW + [18:18] + read-write + + + GPIO36_LEVEL_HIGH + [17:17] + read-write + + + GPIO36_LEVEL_LOW + [16:16] + read-write + + + GPIO35_EDGE_HIGH + [15:15] + read-write + + + GPIO35_EDGE_LOW + [14:14] + read-write + + + GPIO35_LEVEL_HIGH + [13:13] + read-write + + + GPIO35_LEVEL_LOW + [12:12] + read-write + + + GPIO34_EDGE_HIGH + [11:11] + read-write + + + GPIO34_EDGE_LOW + [10:10] + read-write + + + GPIO34_LEVEL_HIGH + [9:9] + read-write + + + GPIO34_LEVEL_LOW + [8:8] + read-write + + + GPIO33_EDGE_HIGH + [7:7] + read-write + + + GPIO33_EDGE_LOW + [6:6] + read-write + + + GPIO33_LEVEL_HIGH + [5:5] + read-write + + + GPIO33_LEVEL_LOW + [4:4] + read-write + + + GPIO32_EDGE_HIGH + [3:3] + read-write + + + GPIO32_EDGE_LOW + [2:2] + read-write + + + GPIO32_LEVEL_HIGH + [1:1] + read-write + + + GPIO32_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTF5 + 0x00000304 + Interrupt Force for dormant_wake + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-write + + + GPIO47_EDGE_LOW + [30:30] + read-write + + + GPIO47_LEVEL_HIGH + [29:29] + read-write + + + GPIO47_LEVEL_LOW + [28:28] + read-write + + + GPIO46_EDGE_HIGH + [27:27] + read-write + + + GPIO46_EDGE_LOW + [26:26] + read-write + + + GPIO46_LEVEL_HIGH + [25:25] + read-write + + + GPIO46_LEVEL_LOW + [24:24] + read-write + + + GPIO45_EDGE_HIGH + [23:23] + read-write + + + GPIO45_EDGE_LOW + [22:22] + read-write + + + GPIO45_LEVEL_HIGH + [21:21] + read-write + + + GPIO45_LEVEL_LOW + [20:20] + read-write + + + GPIO44_EDGE_HIGH + [19:19] + read-write + + + GPIO44_EDGE_LOW + [18:18] + read-write + + + GPIO44_LEVEL_HIGH + [17:17] + read-write + + + GPIO44_LEVEL_LOW + [16:16] + read-write + + + GPIO43_EDGE_HIGH + [15:15] + read-write + + + GPIO43_EDGE_LOW + [14:14] + read-write + + + GPIO43_LEVEL_HIGH + [13:13] + read-write + + + GPIO43_LEVEL_LOW + [12:12] + read-write + + + GPIO42_EDGE_HIGH + [11:11] + read-write + + + GPIO42_EDGE_LOW + [10:10] + read-write + + + GPIO42_LEVEL_HIGH + [9:9] + read-write + + + GPIO42_LEVEL_LOW + [8:8] + read-write + + + GPIO41_EDGE_HIGH + [7:7] + read-write + + + GPIO41_EDGE_LOW + [6:6] + read-write + + + GPIO41_LEVEL_HIGH + [5:5] + read-write + + + GPIO41_LEVEL_LOW + [4:4] + read-write + + + GPIO40_EDGE_HIGH + [3:3] + read-write + + + GPIO40_EDGE_LOW + [2:2] + read-write + + + GPIO40_LEVEL_HIGH + [1:1] + read-write + + + GPIO40_LEVEL_LOW + [0:0] + read-write + + + + + DORMANT_WAKE_INTS0 + 0x00000308 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO7_EDGE_HIGH + [31:31] + read-only + + + GPIO7_EDGE_LOW + [30:30] + read-only + + + GPIO7_LEVEL_HIGH + [29:29] + read-only + + + GPIO7_LEVEL_LOW + [28:28] + read-only + + + GPIO6_EDGE_HIGH + [27:27] + read-only + + + GPIO6_EDGE_LOW + [26:26] + read-only + + + GPIO6_LEVEL_HIGH + [25:25] + read-only + + + GPIO6_LEVEL_LOW + [24:24] + read-only + + + GPIO5_EDGE_HIGH + [23:23] + read-only + + + GPIO5_EDGE_LOW + [22:22] + read-only + + + GPIO5_LEVEL_HIGH + [21:21] + read-only + + + GPIO5_LEVEL_LOW + [20:20] + read-only + + + GPIO4_EDGE_HIGH + [19:19] + read-only + + + GPIO4_EDGE_LOW + [18:18] + read-only + + + GPIO4_LEVEL_HIGH + [17:17] + read-only + + + GPIO4_LEVEL_LOW + [16:16] + read-only + + + GPIO3_EDGE_HIGH + [15:15] + read-only + + + GPIO3_EDGE_LOW + [14:14] + read-only + + + GPIO3_LEVEL_HIGH + [13:13] + read-only + + + GPIO3_LEVEL_LOW + [12:12] + read-only + + + GPIO2_EDGE_HIGH + [11:11] + read-only + + + GPIO2_EDGE_LOW + [10:10] + read-only + + + GPIO2_LEVEL_HIGH + [9:9] + read-only + + + GPIO2_LEVEL_LOW + [8:8] + read-only + + + GPIO1_EDGE_HIGH + [7:7] + read-only + + + GPIO1_EDGE_LOW + [6:6] + read-only + + + GPIO1_LEVEL_HIGH + [5:5] + read-only + + + GPIO1_LEVEL_LOW + [4:4] + read-only + + + GPIO0_EDGE_HIGH + [3:3] + read-only + + + GPIO0_EDGE_LOW + [2:2] + read-only + + + GPIO0_LEVEL_HIGH + [1:1] + read-only + + + GPIO0_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS1 + 0x0000030c + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO15_EDGE_HIGH + [31:31] + read-only + + + GPIO15_EDGE_LOW + [30:30] + read-only + + + GPIO15_LEVEL_HIGH + [29:29] + read-only + + + GPIO15_LEVEL_LOW + [28:28] + read-only + + + GPIO14_EDGE_HIGH + [27:27] + read-only + + + GPIO14_EDGE_LOW + [26:26] + read-only + + + GPIO14_LEVEL_HIGH + [25:25] + read-only + + + GPIO14_LEVEL_LOW + [24:24] + read-only + + + GPIO13_EDGE_HIGH + [23:23] + read-only + + + GPIO13_EDGE_LOW + [22:22] + read-only + + + GPIO13_LEVEL_HIGH + [21:21] + read-only + + + GPIO13_LEVEL_LOW + [20:20] + read-only + + + GPIO12_EDGE_HIGH + [19:19] + read-only + + + GPIO12_EDGE_LOW + [18:18] + read-only + + + GPIO12_LEVEL_HIGH + [17:17] + read-only + + + GPIO12_LEVEL_LOW + [16:16] + read-only + + + GPIO11_EDGE_HIGH + [15:15] + read-only + + + GPIO11_EDGE_LOW + [14:14] + read-only + + + GPIO11_LEVEL_HIGH + [13:13] + read-only + + + GPIO11_LEVEL_LOW + [12:12] + read-only + + + GPIO10_EDGE_HIGH + [11:11] + read-only + + + GPIO10_EDGE_LOW + [10:10] + read-only + + + GPIO10_LEVEL_HIGH + [9:9] + read-only + + + GPIO10_LEVEL_LOW + [8:8] + read-only + + + GPIO9_EDGE_HIGH + [7:7] + read-only + + + GPIO9_EDGE_LOW + [6:6] + read-only + + + GPIO9_LEVEL_HIGH + [5:5] + read-only + + + GPIO9_LEVEL_LOW + [4:4] + read-only + + + GPIO8_EDGE_HIGH + [3:3] + read-only + + + GPIO8_EDGE_LOW + [2:2] + read-only + + + GPIO8_LEVEL_HIGH + [1:1] + read-only + + + GPIO8_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS2 + 0x00000310 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO23_EDGE_HIGH + [31:31] + read-only + + + GPIO23_EDGE_LOW + [30:30] + read-only + + + GPIO23_LEVEL_HIGH + [29:29] + read-only + + + GPIO23_LEVEL_LOW + [28:28] + read-only + + + GPIO22_EDGE_HIGH + [27:27] + read-only + + + GPIO22_EDGE_LOW + [26:26] + read-only + + + GPIO22_LEVEL_HIGH + [25:25] + read-only + + + GPIO22_LEVEL_LOW + [24:24] + read-only + + + GPIO21_EDGE_HIGH + [23:23] + read-only + + + GPIO21_EDGE_LOW + [22:22] + read-only + + + GPIO21_LEVEL_HIGH + [21:21] + read-only + + + GPIO21_LEVEL_LOW + [20:20] + read-only + + + GPIO20_EDGE_HIGH + [19:19] + read-only + + + GPIO20_EDGE_LOW + [18:18] + read-only + + + GPIO20_LEVEL_HIGH + [17:17] + read-only + + + GPIO20_LEVEL_LOW + [16:16] + read-only + + + GPIO19_EDGE_HIGH + [15:15] + read-only + + + GPIO19_EDGE_LOW + [14:14] + read-only + + + GPIO19_LEVEL_HIGH + [13:13] + read-only + + + GPIO19_LEVEL_LOW + [12:12] + read-only + + + GPIO18_EDGE_HIGH + [11:11] + read-only + + + GPIO18_EDGE_LOW + [10:10] + read-only + + + GPIO18_LEVEL_HIGH + [9:9] + read-only + + + GPIO18_LEVEL_LOW + [8:8] + read-only + + + GPIO17_EDGE_HIGH + [7:7] + read-only + + + GPIO17_EDGE_LOW + [6:6] + read-only + + + GPIO17_LEVEL_HIGH + [5:5] + read-only + + + GPIO17_LEVEL_LOW + [4:4] + read-only + + + GPIO16_EDGE_HIGH + [3:3] + read-only + + + GPIO16_EDGE_LOW + [2:2] + read-only + + + GPIO16_LEVEL_HIGH + [1:1] + read-only + + + GPIO16_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS3 + 0x00000314 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO31_EDGE_HIGH + [31:31] + read-only + + + GPIO31_EDGE_LOW + [30:30] + read-only + + + GPIO31_LEVEL_HIGH + [29:29] + read-only + + + GPIO31_LEVEL_LOW + [28:28] + read-only + + + GPIO30_EDGE_HIGH + [27:27] + read-only + + + GPIO30_EDGE_LOW + [26:26] + read-only + + + GPIO30_LEVEL_HIGH + [25:25] + read-only + + + GPIO30_LEVEL_LOW + [24:24] + read-only + + + GPIO29_EDGE_HIGH + [23:23] + read-only + + + GPIO29_EDGE_LOW + [22:22] + read-only + + + GPIO29_LEVEL_HIGH + [21:21] + read-only + + + GPIO29_LEVEL_LOW + [20:20] + read-only + + + GPIO28_EDGE_HIGH + [19:19] + read-only + + + GPIO28_EDGE_LOW + [18:18] + read-only + + + GPIO28_LEVEL_HIGH + [17:17] + read-only + + + GPIO28_LEVEL_LOW + [16:16] + read-only + + + GPIO27_EDGE_HIGH + [15:15] + read-only + + + GPIO27_EDGE_LOW + [14:14] + read-only + + + GPIO27_LEVEL_HIGH + [13:13] + read-only + + + GPIO27_LEVEL_LOW + [12:12] + read-only + + + GPIO26_EDGE_HIGH + [11:11] + read-only + + + GPIO26_EDGE_LOW + [10:10] + read-only + + + GPIO26_LEVEL_HIGH + [9:9] + read-only + + + GPIO26_LEVEL_LOW + [8:8] + read-only + + + GPIO25_EDGE_HIGH + [7:7] + read-only + + + GPIO25_EDGE_LOW + [6:6] + read-only + + + GPIO25_LEVEL_HIGH + [5:5] + read-only + + + GPIO25_LEVEL_LOW + [4:4] + read-only + + + GPIO24_EDGE_HIGH + [3:3] + read-only + + + GPIO24_EDGE_LOW + [2:2] + read-only + + + GPIO24_LEVEL_HIGH + [1:1] + read-only + + + GPIO24_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS4 + 0x00000318 + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO39_EDGE_HIGH + [31:31] + read-only + + + GPIO39_EDGE_LOW + [30:30] + read-only + + + GPIO39_LEVEL_HIGH + [29:29] + read-only + + + GPIO39_LEVEL_LOW + [28:28] + read-only + + + GPIO38_EDGE_HIGH + [27:27] + read-only + + + GPIO38_EDGE_LOW + [26:26] + read-only + + + GPIO38_LEVEL_HIGH + [25:25] + read-only + + + GPIO38_LEVEL_LOW + [24:24] + read-only + + + GPIO37_EDGE_HIGH + [23:23] + read-only + + + GPIO37_EDGE_LOW + [22:22] + read-only + + + GPIO37_LEVEL_HIGH + [21:21] + read-only + + + GPIO37_LEVEL_LOW + [20:20] + read-only + + + GPIO36_EDGE_HIGH + [19:19] + read-only + + + GPIO36_EDGE_LOW + [18:18] + read-only + + + GPIO36_LEVEL_HIGH + [17:17] + read-only + + + GPIO36_LEVEL_LOW + [16:16] + read-only + + + GPIO35_EDGE_HIGH + [15:15] + read-only + + + GPIO35_EDGE_LOW + [14:14] + read-only + + + GPIO35_LEVEL_HIGH + [13:13] + read-only + + + GPIO35_LEVEL_LOW + [12:12] + read-only + + + GPIO34_EDGE_HIGH + [11:11] + read-only + + + GPIO34_EDGE_LOW + [10:10] + read-only + + + GPIO34_LEVEL_HIGH + [9:9] + read-only + + + GPIO34_LEVEL_LOW + [8:8] + read-only + + + GPIO33_EDGE_HIGH + [7:7] + read-only + + + GPIO33_EDGE_LOW + [6:6] + read-only + + + GPIO33_LEVEL_HIGH + [5:5] + read-only + + + GPIO33_LEVEL_LOW + [4:4] + read-only + + + GPIO32_EDGE_HIGH + [3:3] + read-only + + + GPIO32_EDGE_LOW + [2:2] + read-only + + + GPIO32_LEVEL_HIGH + [1:1] + read-only + + + GPIO32_LEVEL_LOW + [0:0] + read-only + + + + + DORMANT_WAKE_INTS5 + 0x0000031c + Interrupt status after masking & forcing for dormant_wake + 0x00000000 + + + GPIO47_EDGE_HIGH + [31:31] + read-only + + + GPIO47_EDGE_LOW + [30:30] + read-only + + + GPIO47_LEVEL_HIGH + [29:29] + read-only + + + GPIO47_LEVEL_LOW + [28:28] + read-only + + + GPIO46_EDGE_HIGH + [27:27] + read-only + + + GPIO46_EDGE_LOW + [26:26] + read-only + + + GPIO46_LEVEL_HIGH + [25:25] + read-only + + + GPIO46_LEVEL_LOW + [24:24] + read-only + + + GPIO45_EDGE_HIGH + [23:23] + read-only + + + GPIO45_EDGE_LOW + [22:22] + read-only + + + GPIO45_LEVEL_HIGH + [21:21] + read-only + + + GPIO45_LEVEL_LOW + [20:20] + read-only + + + GPIO44_EDGE_HIGH + [19:19] + read-only + + + GPIO44_EDGE_LOW + [18:18] + read-only + + + GPIO44_LEVEL_HIGH + [17:17] + read-only + + + GPIO44_LEVEL_LOW + [16:16] + read-only + + + GPIO43_EDGE_HIGH + [15:15] + read-only + + + GPIO43_EDGE_LOW + [14:14] + read-only + + + GPIO43_LEVEL_HIGH + [13:13] + read-only + + + GPIO43_LEVEL_LOW + [12:12] + read-only + + + GPIO42_EDGE_HIGH + [11:11] + read-only + + + GPIO42_EDGE_LOW + [10:10] + read-only + + + GPIO42_LEVEL_HIGH + [9:9] + read-only + + + GPIO42_LEVEL_LOW + [8:8] + read-only + + + GPIO41_EDGE_HIGH + [7:7] + read-only + + + GPIO41_EDGE_LOW + [6:6] + read-only + + + GPIO41_LEVEL_HIGH + [5:5] + read-only + + + GPIO41_LEVEL_LOW + [4:4] + read-only + + + GPIO40_EDGE_HIGH + [3:3] + read-only + + + GPIO40_EDGE_LOW + [2:2] + read-only + + + GPIO40_LEVEL_HIGH + [1:1] + read-only + + + GPIO40_LEVEL_LOW + [0:0] + read-only + + + + + + + SYSINFO + 0x40000000 + + 0 + 24 + registers + + + + CHIP_ID + 0x00000000 + JEDEC JEP-106 compliant chip identifier. + 0x00000001 + + + REVISION + [31:28] + read-only + + + PART + [27:12] + read-only + + + MANUFACTURER + [11:1] + read-only + + + STOP_BIT + [0:0] + read-only + + + + + PACKAGE_SEL + 0x00000004 + 0x00000000 + + + PACKAGE_SEL + [0:0] + read-only + + + + + PLATFORM + 0x00000008 + Platform register. Allows software to know what environment it is running in during pre-production development. Post-production, the PLATFORM is always ASIC, non-SIM. + 0x00000000 + + + GATESIM + [4:4] + read-only + + + BATCHSIM + [3:3] + read-only + + + HDLSIM + [2:2] + read-only + + + ASIC + [1:1] + read-only + + + FPGA + [0:0] + read-only + + + + + GITREF_RP2350 + 0x00000014 + Git hash of the chip source. Used to identify chip version. + 0x00000000 + + + GITREF_RP2350 + [31:0] + read-only + + + + + + + SHA256 + SHA-256 hash function implementation + 0x400f8000 + + 0 + 40 + registers + + + + CSR + 0x00000000 + Control and status register + 0x00001206 + + + BSWAP + Enable byte swapping of 32-bit values at the point they are committed to the SHA message scheduler. + + This block's bus interface assembles byte/halfword data into message words in little-endian order, so that DMAing the same buffer with different transfer sizes always gives the same result on a little-endian system like RP2350. + + However, when marshalling bytes into blocks, SHA expects that the first byte is the *most significant* in each message word. To resolve this, once the bus interface has accumulated 32 bits of data (either a word write, two halfword writes in little-endian order, or four byte writes in little-endian order) the final value can be byte-swapped before passing to the actual SHA core. + + This feature is enabled by default because using the SHA core to checksum byte buffers is expected to be more common than having preformatted SHA message words lying around. + [12:12] + read-write + + + DMA_SIZE + Configure DREQ logic for the correct DMA data size. Must be configured before the DMA channel is triggered. + + The SHA-256 core's DREQ logic requests one entire block of data at once, since there is no FIFO, and data goes straight into the core's message schedule and digest hardware. Therefore, when transferring data with DMA, CSR_DMA_SIZE must be configured in advance so that the correct number of transfers can be requested per block. + [9:8] + read-write + + + 8bit + 0 + + + 16bit + 1 + + + 32bit + 2 + + + + + ERR_WDATA_NOT_RDY + Set when a write occurs whilst the SHA-256 core is not ready for data (WDATA_RDY is low). Write one to clear. + [4:4] + read-write + oneToClear + + + SUM_VLD + If 1, the SHA-256 checksum presented in registers SUM0 through SUM7 is currently valid. + + Goes low when WDATA is first written, then returns high once 16 words have been written and the digest of the current 512-bit block has subsequently completed. + [2:2] + read-only + + + WDATA_RDY + If 1, the SHA-256 core is ready to accept more data through the WDATA register. + + After writing 16 words, this flag will go low for 57 cycles whilst the core completes its digest. + [1:1] + read-only + + + START + Write 1 to prepare the SHA-256 core for a new checksum. + + The SUMx registers are initialised to the proper values (fractional bits of square roots of first 8 primes) and internal counters are cleared. This immediately forces WDATA_RDY and SUM_VLD high. + + START must be written before initiating a DMA transfer to the SHA-256 core, because the core will always request 16 transfers at a time (1 512-bit block). Additionally, the DMA channel should be configured for a multiple of 16 32-bit transfers. + [0:0] + write-only + + + + + WDATA + 0x00000004 + Write data register + 0x00000000 + + + WDATA + After pulsing START and writing 16 words of data to this register, WDATA_RDY will go low and the SHA-256 core will complete the digest of the current 512-bit block. + + Software is responsible for ensuring the data is correctly padded and terminated to a whole number of 512-bit blocks. + + After this, WDATA_RDY will return high, and more data can be written (if any). + + This register supports word, halfword and byte writes, so that DMA from non-word-aligned buffers can be supported. The total amount of data per block remains the same (16 words, 32 halfwords or 64 bytes) and byte/halfword transfers must not be mixed within a block. + [31:0] + write-only + + + + + SUM0 + 0x00000008 + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM0 + [31:0] + read-only + + + + + SUM1 + 0x0000000c + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM1 + [31:0] + read-only + + + + + SUM2 + 0x00000010 + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM2 + [31:0] + read-only + + + + + SUM3 + 0x00000014 + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM3 + [31:0] + read-only + + + + + SUM4 + 0x00000018 + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM4 + [31:0] + read-only + + + + + SUM5 + 0x0000001c + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM5 + [31:0] + read-only + + + + + SUM6 + 0x00000020 + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM6 + [31:0] + read-only + + + + + SUM7 + 0x00000024 + 256-bit checksum result. Contents are undefined when CSR_SUM_VLD is 0. + 0x00000000 + + + SUM7 + [31:0] + read-only + + + + + + + HSTX_FIFO + FIFO status and write access for HSTX + 0x50600000 + + 0 + 8 + registers + + + + STAT + 0x00000000 + FIFO status + 0x00000000 + + + WOF + FIFO was written when full. Write 1 to clear. + [10:10] + read-write + oneToClear + + + EMPTY + [9:9] + read-only + + + FULL + [8:8] + read-only + + + LEVEL + [7:0] + read-only + + + + + FIFO + 0x00000004 + Write access to FIFO + 0x00000000 + + + FIFO + [31:0] + write-only + + + + + + + HSTX_CTRL + Control interface to HSTX. For FIFO write access and status, see the HSTX_FIFO register block. + 0x400c0000 + + 0 + 44 + registers + + + + CSR + 0x00000000 + 0x10050600 + + + CLKDIV + Clock period of the generated clock, measured in HSTX clock cycles. Can be odd or even. The generated clock advances only on cycles where the shift register shifts. + + For example, a clkdiv of 5 would generate a complete output clock period for every 5 HSTX clocks (or every 10 half-clocks). + + A CLKDIV value of 0 is mapped to a period of 16 HSTX clock cycles. + [31:28] + read-write + + + CLKPHASE + Set the initial phase of the generated clock. + + A CLKPHASE of 0 means the clock is initially low, and the first rising edge occurs after one half period of the generated clock (i.e. CLKDIV/2 cycles of clk_hstx). Incrementing CLKPHASE by 1 will advance the initial clock phase by one half clk_hstx period. For example, if CLKDIV=2 and CLKPHASE=1: + + * The clock will be initially low + + * The first rising edge will be 0.5 clk_hstx cycles after asserting first data + + * The first falling edge will be 1.5 clk_hstx cycles after asserting first data + + This configuration would be suitable for serialising at a bit rate of clk_hstx with a centre-aligned DDR clock. + + When the HSTX is halted by clearing CSR_EN, the clock generator will return to its initial phase as configured by the CLKPHASE field. + + Note CLKPHASE must be strictly less than double the value of CLKDIV (one full period), else its operation is undefined. + [27:24] + read-write + + + N_SHIFTS + Number of times to shift the shift register before refilling it from the FIFO. (A count of how many times it has been shifted, *not* the total shift distance.) + + A register value of 0 means shift 32 times. + [20:16] + read-write + + + SHIFT + How many bits to right-rotate the shift register by each cycle. + + The use of a rotate rather than a shift allows left shifts to be emulated, by subtracting the left-shift amount from 32. It also allows data to be repeated, when the product of SHIFT and N_SHIFTS is greater than 32. + [12:8] + read-write + + + COUPLED_SEL + Select which PIO to use for coupled mode operation. + [6:5] + read-write + + + COUPLED_MODE + Enable the PIO-to-HSTX 1:1 connection. The HSTX must be clocked *directly* from the system clock (not just from some other clock source of the same frequency) for this synchronous interface to function correctly. + + When COUPLED_MODE is set, BITx_SEL_P and SEL_N indices 24 through 31 will select bits from the 8-bit PIO-to-HSTX path, rather than shifter bits. Indices of 0 through 23 will still index the shift register as normal. + + The PIO outputs connected to the PIO-to-HSTX bus are those same outputs that would appear on the HSTX-capable pins if those pins' FUNCSELs were set to PIO instead of HSTX. + + For example, if HSTX is on GPIOs 12 through 19, then PIO outputs 12 through 19 are connected to the HSTX when coupled mode is engaged. + [4:4] + read-write + + + EXPAND_EN + Enable the command expander. When 0, raw FIFO data is passed directly to the output shift register. When 1, the command expander can perform simple operations such as run length decoding on data between the FIFO and the shift register. + + Do not change CXPD_EN whilst EN is set. It's safe to set CXPD_EN simultaneously with setting EN. + [1:1] + read-write + + + EN + When EN is 1, the HSTX will shift out data as it appears in the FIFO. As long as there is data, the HSTX shift register will shift once per clock cycle, and the frequency of popping from the FIFO is determined by the ratio of SHIFT and SHIFT_THRESH. + + When EN is 0, the FIFO is not popped. The shift counter and clock generator are also reset to their initial state for as long as EN is low. Note the initial phase of the clock generator can be configured by the CLKPHASE field. + + Once the HSTX is enabled again, and data is pushed to the FIFO, the generated clock's first rising edge will be one half-period after the first data is launched. + [0:0] + read-write + + + + + BIT0 + 0x00000004 + Data control register for output bit 0 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT1 + 0x00000008 + Data control register for output bit 1 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT2 + 0x0000000c + Data control register for output bit 2 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT3 + 0x00000010 + Data control register for output bit 3 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT4 + 0x00000014 + Data control register for output bit 4 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT5 + 0x00000018 + Data control register for output bit 5 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT6 + 0x0000001c + Data control register for output bit 6 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + BIT7 + 0x00000020 + Data control register for output bit 7 + 0x00000000 + + + CLK + Connect this output to the generated clock, rather than the data shift register. SEL_P and SEL_N are ignored if this bit is set, but INV can still be set to generate an antiphase clock. + [17:17] + read-write + + + INV + Invert this data output (logical NOT) + [16:16] + read-write + + + SEL_N + Shift register data bit select for the second half of the HSTX clock cycle + [12:8] + read-write + + + SEL_P + Shift register data bit select for the first half of the HSTX clock cycle + [4:0] + read-write + + + + + EXPAND_SHIFT + 0x00000024 + Configure the optional shifter inside the command expander + 0x01000100 + + + ENC_N_SHIFTS + Number of times to consume from the shift register before refilling it from the FIFO, when the current command is an encoded data command (e.g. TMDS). A register value of 0 means shift 32 times. + [28:24] + read-write + + + ENC_SHIFT + How many bits to right-rotate the shift register by each time data is pushed to the output shifter, when the current command is an encoded data command (e.g. TMDS). + [20:16] + read-write + + + RAW_N_SHIFTS + Number of times to consume from the shift register before refilling it from the FIFO, when the current command is a raw data command. A register value of 0 means shift 32 times. + [12:8] + read-write + + + RAW_SHIFT + How many bits to right-rotate the shift register by each time data is pushed to the output shifter, when the current command is a raw data command. + [4:0] + read-write + + + + + EXPAND_TMDS + 0x00000028 + Configure the optional TMDS encoder inside the command expander + 0x00000000 + + + L2_NBITS + Number of valid data bits for the lane 2 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits. + [23:21] + read-write + + + L2_ROT + Right-rotate applied to the current shifter data before the lane 2 TMDS encoder. + [20:16] + read-write + + + L1_NBITS + Number of valid data bits for the lane 1 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits. + [15:13] + read-write + + + L1_ROT + Right-rotate applied to the current shifter data before the lane 1 TMDS encoder. + [12:8] + read-write + + + L0_NBITS + Number of valid data bits for the lane 0 TMDS encoder, starting from bit 7 of the rotated data. Field values of 0 -> 7 encode counts of 1 -> 8 bits. + [7:5] + read-write + + + L0_ROT + Right-rotate applied to the current shifter data before the lane 0 TMDS encoder. + [4:0] + read-write + + + + + + + EPPB + Cortex-M33 EPPB vendor register block for RP2350 + 0xe0080000 + + 0 + 12 + registers + + + + NMI_MASK0 + 0x00000000 + NMI mask for IRQs 0 through 31. This register is core-local, and is reset by a processor warm reset. + 0x00000000 + + + NMI_MASK0 + [31:0] + read-write + + + + + NMI_MASK1 + 0x00000004 + NMI mask for IRQs 0 though 51. This register is core-local, and is reset by a processor warm reset. + 0x00000000 + + + NMI_MASK1 + [19:0] + read-write + + + + + SLEEPCTRL + 0x00000008 + Nonstandard sleep control register + 0x00000002 + + + WICENACK + Status signal from the processor's interrupt controller. Changes to WICENREQ are eventually reflected in WICENACK. + [2:2] + read-only + + + WICENREQ + 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. + [1:1] + read-write + + + LIGHT_SLEEP + 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. + [0:0] + read-write + + + + + + + PPB + TEAL registers accessible through the debug interface + 0xe0000000 + + 0 + 274432 + registers + + + + ITM_STIM0 + 0x00000000 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM1 + 0x00000004 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM2 + 0x00000008 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM3 + 0x0000000c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM4 + 0x00000010 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM5 + 0x00000014 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM6 + 0x00000018 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM7 + 0x0000001c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM8 + 0x00000020 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM9 + 0x00000024 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM10 + 0x00000028 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM11 + 0x0000002c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM12 + 0x00000030 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM13 + 0x00000034 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM14 + 0x00000038 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM15 + 0x0000003c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM16 + 0x00000040 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM17 + 0x00000044 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM18 + 0x00000048 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM19 + 0x0000004c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM20 + 0x00000050 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM21 + 0x00000054 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM22 + 0x00000058 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM23 + 0x0000005c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM24 + 0x00000060 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM25 + 0x00000064 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM26 + 0x00000068 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM27 + 0x0000006c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM28 + 0x00000070 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM29 + 0x00000074 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM30 + 0x00000078 + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_STIM31 + 0x0000007c + Provides the interface for generating Instrumentation packets + 0x00000000 + + + STIMULUS + 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. + [31:0] + read-write + + + + + ITM_TER0 + 0x00000e00 + Provide an individual enable bit for each ITM_STIM register + 0x00000000 + + + STIMENA + For STIMENA[m] in ITM_TER*n, controls whether ITM_STIM(32*n + m) is enabled + [31:0] + read-write + + + + + ITM_TPR + 0x00000e40 + Controls which stimulus ports can be accessed by unprivileged code + 0x00000000 + + + PRIVMASK + Bit mask to enable tracing on ITM stimulus ports + [3:0] + read-write + + + + + ITM_TCR + 0x00000e80 + Configures and controls transfers through the ITM interface + 0x00000000 + + + BUSY + Indicates whether the ITM is currently processing events + [23:23] + read-only + + + TRACEBUSID + 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 + [22:16] + read-write + + + GTSFREQ + Defines how often the ITM generates a global timestamp, based on the global timestamp clock frequency, or disables generation of global timestamps + [11:10] + read-write + + + TSPRESCALE + Local timestamp prescaler, used with the trace packet reference clock + [9:8] + read-write + + + STALLENA + Stall the PE to guarantee delivery of Data Trace packets. + [5:5] + read-write + + + SWOENA + Enables asynchronous clocking of the timestamp counter + [4:4] + read-write + + + TXENA + Enables forwarding of hardware event packet from the DWT unit to the ITM for output to the TPIU + [3:3] + read-write + + + SYNCENA + Enables Synchronization packet transmission for a synchronous TPIU + [2:2] + read-write + + + TSENA + Enables Local timestamp generation + [1:1] + read-write + + + ITMENA + Enables the ITM + [0:0] + read-write + + + + + INT_ATREADY + 0x00000ef0 + Integration Mode: Read ATB Ready + 0x00000000 + + + AFVALID + A read of this bit returns the value of AFVALID + [1:1] + read-only + + + ATREADY + A read of this bit returns the value of ATREADY + [0:0] + read-only + + + + + INT_ATVALID + 0x00000ef8 + Integration Mode: Write ATB Valid + 0x00000000 + + + AFREADY + A write to this bit gives the value of AFREADY + [1:1] + read-write + + + ATREADY + A write to this bit gives the value of ATVALID + [0:0] + read-write + + + + + ITM_ITCTRL + 0x00000f00 + Integration Mode Control Register + 0x00000000 + + + IME + 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. + [0:0] + read-write + + + + + ITM_DEVARCH + 0x00000fbc + Provides CoreSight discovery information for the ITM + 0x47701a01 + + + ARCHITECT + 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. + [31:21] + read-only + + + PRESENT + Defines that the DEVARCH register is present + [20:20] + read-only + + + REVISION + Defines the architecture revision of the component + [19:16] + read-only + + + ARCHVER + Defines the architecture version of the component + [15:12] + read-only + + + ARCHPART + Defines the architecture of the component + [11:0] + read-only + + + + + ITM_DEVTYPE + 0x00000fcc + Provides CoreSight discovery information for the ITM + 0x00000043 + + + SUB + Component sub-type + [7:4] + read-only + + + MAJOR + Component major type + [3:0] + read-only + + + + + ITM_PIDR4 + 0x00000fd0 + Provides CoreSight discovery information for the ITM + 0x00000004 + + + SIZE + See CoreSight Architecture Specification + [7:4] + read-only + + + DES_2 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + ITM_PIDR5 + 0x00000fd4 + Provides CoreSight discovery information for the ITM + 0x00000000 + + + ITM_PIDR5 + [31:0] + read-write + + + + + ITM_PIDR6 + 0x00000fd8 + Provides CoreSight discovery information for the ITM + 0x00000000 + + + ITM_PIDR6 + [31:0] + read-write + + + + + ITM_PIDR7 + 0x00000fdc + Provides CoreSight discovery information for the ITM + 0x00000000 + + + ITM_PIDR7 + [31:0] + read-write + + + + + ITM_PIDR0 + 0x00000fe0 + Provides CoreSight discovery information for the ITM + 0x00000021 + + + PART_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + ITM_PIDR1 + 0x00000fe4 + Provides CoreSight discovery information for the ITM + 0x000000bd + + + DES_0 + See CoreSight Architecture Specification + [7:4] + read-only + + + PART_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + ITM_PIDR2 + 0x00000fe8 + Provides CoreSight discovery information for the ITM + 0x0000000b + + + REVISION + See CoreSight Architecture Specification + [7:4] + read-only + + + JEDEC + See CoreSight Architecture Specification + [3:3] + read-only + + + DES_1 + See CoreSight Architecture Specification + [2:0] + read-only + + + + + ITM_PIDR3 + 0x00000fec + Provides CoreSight discovery information for the ITM + 0x00000000 + + + REVAND + See CoreSight Architecture Specification + [7:4] + read-only + + + CMOD + See CoreSight Architecture Specification + [3:0] + read-only + + + + + ITM_CIDR0 + 0x00000ff0 + Provides CoreSight discovery information for the ITM + 0x0000000d + + + PRMBL_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + ITM_CIDR1 + 0x00000ff4 + Provides CoreSight discovery information for the ITM + 0x00000090 + + + CLASS + See CoreSight Architecture Specification + [7:4] + read-only + + + PRMBL_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + ITM_CIDR2 + 0x00000ff8 + Provides CoreSight discovery information for the ITM + 0x00000005 + + + PRMBL_2 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + ITM_CIDR3 + 0x00000ffc + Provides CoreSight discovery information for the ITM + 0x000000b1 + + + PRMBL_3 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DWT_CTRL + 0x00001000 + Provides configuration and status information for the DWT unit, and used to control features of the unit + 0x73741824 + + + NUMCOMP + Number of DWT comparators implemented + [31:28] + read-only + + + NOTRCPKT + Indicates whether the implementation does not support trace + [27:27] + read-only + + + NOEXTTRIG + Reserved, RAZ + [26:26] + read-only + + + NOCYCCNT + Indicates whether the implementation does not include a cycle counter + [25:25] + read-only + + + NOPRFCNT + Indicates whether the implementation does not include the profiling counters + [24:24] + read-only + + + CYCDISS + Controls whether the cycle counter is disabled in Secure state + [23:23] + read-write + + + CYCEVTENA + Enables Event Counter packet generation on POSTCNT underflow + [22:22] + read-write + + + FOLDEVTENA + Enables DWT_FOLDCNT counter + [21:21] + read-write + + + LSUEVTENA + Enables DWT_LSUCNT counter + [20:20] + read-write + + + SLEEPEVTENA + Enable DWT_SLEEPCNT counter + [19:19] + read-write + + + EXCEVTENA + Enables DWT_EXCCNT counter + [18:18] + read-write + + + CPIEVTENA + Enables DWT_CPICNT counter + [17:17] + read-write + + + EXTTRCENA + Enables generation of Exception Trace packets + [16:16] + read-write + + + PCSAMPLENA + Enables use of POSTCNT counter as a timer for Periodic PC Sample packet generation + [12:12] + read-write + + + SYNCTAP + Selects the position of the synchronization packet counter tap on the CYCCNT counter. This determines the Synchronization packet rate + [11:10] + read-write + + + CYCTAP + Selects the position of the POSTCNT tap on the CYCCNT counter + [9:9] + read-write + + + POSTINIT + Initial value for the POSTCNT counter + [8:5] + read-write + + + POSTPRESET + Reload value for the POSTCNT counter + [4:1] + read-write + + + CYCCNTENA + Enables CYCCNT + [0:0] + read-write + + + + + DWT_CYCCNT + 0x00001004 + Shows or sets the value of the processor cycle counter, CYCCNT + 0x00000000 + + + CYCCNT + Increments one on each processor clock cycle when DWT_CTRL.CYCCNTENA == 1 and DEMCR.TRCENA == 1. On overflow, CYCCNT wraps to zero + [31:0] + read-write + + + + + DWT_EXCCNT + 0x0000100c + Counts the total cycles spent in exception processing + 0x00000000 + + + EXCCNT + 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. + [7:0] + read-write + + + + + DWT_LSUCNT + 0x00001014 + Increments on the additional cycles required to execute all load or store instructions + 0x00000000 + + + LSUCNT + 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. + [7:0] + read-write + + + + + DWT_FOLDCNT + 0x00001018 + Increments on the additional cycles required to execute all load or store instructions + 0x00000000 + + + FOLDCNT + 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 + [7:0] + read-write + + + + + DWT_COMP0 + 0x00001020 + Provides a reference value for use by watchpoint comparator 0 + 0x00000000 + + + DWT_COMP0 + [31:0] + read-write + + + + + DWT_FUNCTION0 + 0x00001028 + Controls the operation of watchpoint comparator 0 + 0x58000000 + + + ID + Identifies the capabilities for MATCH for comparator *n + [31:27] + read-only + + + MATCHED + Set to 1 when the comparator matches + [24:24] + read-only + + + DATAVSIZE + Defines the size of the object being watched for by Data Value and Data Address comparators + [11:10] + read-write + + + ACTION + Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH + [5:4] + read-write + + + MATCH + Controls the type of match generated by this comparator + [3:0] + read-write + + + + + DWT_COMP1 + 0x00001030 + Provides a reference value for use by watchpoint comparator 1 + 0x00000000 + + + DWT_COMP1 + [31:0] + read-write + + + + + DWT_FUNCTION1 + 0x00001038 + Controls the operation of watchpoint comparator 1 + 0x89000828 + + + ID + Identifies the capabilities for MATCH for comparator *n + [31:27] + read-only + + + MATCHED + Set to 1 when the comparator matches + [24:24] + read-only + + + DATAVSIZE + Defines the size of the object being watched for by Data Value and Data Address comparators + [11:10] + read-write + + + ACTION + Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH + [5:4] + read-write + + + MATCH + Controls the type of match generated by this comparator + [3:0] + read-write + + + + + DWT_COMP2 + 0x00001040 + Provides a reference value for use by watchpoint comparator 2 + 0x00000000 + + + DWT_COMP2 + [31:0] + read-write + + + + + DWT_FUNCTION2 + 0x00001048 + Controls the operation of watchpoint comparator 2 + 0x50000000 + + + ID + Identifies the capabilities for MATCH for comparator *n + [31:27] + read-only + + + MATCHED + Set to 1 when the comparator matches + [24:24] + read-only + + + DATAVSIZE + Defines the size of the object being watched for by Data Value and Data Address comparators + [11:10] + read-write + + + ACTION + Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH + [5:4] + read-write + + + MATCH + Controls the type of match generated by this comparator + [3:0] + read-write + + + + + DWT_COMP3 + 0x00001050 + Provides a reference value for use by watchpoint comparator 3 + 0x00000000 + + + DWT_COMP3 + [31:0] + read-write + + + + + DWT_FUNCTION3 + 0x00001058 + Controls the operation of watchpoint comparator 3 + 0x20000800 + + + ID + Identifies the capabilities for MATCH for comparator *n + [31:27] + read-only + + + MATCHED + Set to 1 when the comparator matches + [24:24] + read-only + + + DATAVSIZE + Defines the size of the object being watched for by Data Value and Data Address comparators + [11:10] + read-write + + + ACTION + Defines the action on a match. This field is ignored and the comparator generates no actions if it is disabled by MATCH + [5:4] + read-write + + + MATCH + Controls the type of match generated by this comparator + [3:0] + read-write + + + + + DWT_DEVARCH + 0x00001fbc + Provides CoreSight discovery information for the DWT + 0x47701a02 + + + ARCHITECT + 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. + [31:21] + read-only + + + PRESENT + Defines that the DEVARCH register is present + [20:20] + read-only + + + REVISION + Defines the architecture revision of the component + [19:16] + read-only + + + ARCHVER + Defines the architecture version of the component + [15:12] + read-only + + + ARCHPART + Defines the architecture of the component + [11:0] + read-only + + + + + DWT_DEVTYPE + 0x00001fcc + Provides CoreSight discovery information for the DWT + 0x00000000 + + + SUB + Component sub-type + [7:4] + read-only + + + MAJOR + Component major type + [3:0] + read-only + + + + + DWT_PIDR4 + 0x00001fd0 + Provides CoreSight discovery information for the DWT + 0x00000004 + + + SIZE + See CoreSight Architecture Specification + [7:4] + read-only + + + DES_2 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DWT_PIDR5 + 0x00001fd4 + Provides CoreSight discovery information for the DWT + 0x00000000 + + + DWT_PIDR5 + [31:0] + read-write + + + + + DWT_PIDR6 + 0x00001fd8 + Provides CoreSight discovery information for the DWT + 0x00000000 + + + DWT_PIDR6 + [31:0] + read-write + + + + + DWT_PIDR7 + 0x00001fdc + Provides CoreSight discovery information for the DWT + 0x00000000 + + + DWT_PIDR7 + [31:0] + read-write + + + + + DWT_PIDR0 + 0x00001fe0 + Provides CoreSight discovery information for the DWT + 0x00000021 + + + PART_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DWT_PIDR1 + 0x00001fe4 + Provides CoreSight discovery information for the DWT + 0x000000bd + + + DES_0 + See CoreSight Architecture Specification + [7:4] + read-only + + + PART_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DWT_PIDR2 + 0x00001fe8 + Provides CoreSight discovery information for the DWT + 0x0000000b + + + REVISION + See CoreSight Architecture Specification + [7:4] + read-only + + + JEDEC + See CoreSight Architecture Specification + [3:3] + read-only + + + DES_1 + See CoreSight Architecture Specification + [2:0] + read-only + + + + + DWT_PIDR3 + 0x00001fec + Provides CoreSight discovery information for the DWT + 0x00000000 + + + REVAND + See CoreSight Architecture Specification + [7:4] + read-only + + + CMOD + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DWT_CIDR0 + 0x00001ff0 + Provides CoreSight discovery information for the DWT + 0x0000000d + + + PRMBL_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DWT_CIDR1 + 0x00001ff4 + Provides CoreSight discovery information for the DWT + 0x00000090 + + + CLASS + See CoreSight Architecture Specification + [7:4] + read-only + + + PRMBL_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DWT_CIDR2 + 0x00001ff8 + Provides CoreSight discovery information for the DWT + 0x00000005 + + + PRMBL_2 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DWT_CIDR3 + 0x00001ffc + Provides CoreSight discovery information for the DWT + 0x000000b1 + + + PRMBL_3 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + FP_CTRL + 0x00002000 + Provides FPB implementation information, and the global enable for the FPB unit + 0x60005580 + + + REV + Flash Patch and Breakpoint Unit architecture revision + [31:28] + read-only + + + NUM_CODE_14_12_ + 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 + [14:12] + read-only + + + NUM_LIT + Indicates the number of implemented literal address comparators. The Literal Address comparators are numbered from NUM_CODE to NUM_CODE + NUM_LIT - 1 + [11:8] + read-only + + + NUM_CODE_7_4_ + 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 + [7:4] + read-only + + + KEY + Writes to the FP_CTRL are ignored unless KEY is concurrently written to one + [1:1] + read-write + + + ENABLE + Enables the FPB + [0:0] + read-write + + + + + FP_REMAP + 0x00002004 + Indicates whether the implementation supports Flash Patch remap and, if it does, holds the target address for remap + 0x00000000 + + + RMPSPT + Indicates whether the FPB unit supports the Flash Patch remap function + [29:29] + read-only + + + REMAP + Holds the bits[28:5] of the Flash Patch remap address + [28:5] + read-only + + + + + FP_COMP0 + 0x00002008 + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP1 + 0x0000200c + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP2 + 0x00002010 + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP3 + 0x00002014 + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP4 + 0x00002018 + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP5 + 0x0000201c + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP6 + 0x00002020 + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_COMP7 + 0x00002024 + 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 + 0x00000000 + + + BE + Selects between flashpatch and breakpoint functionality + [0:0] + read-write + + + + + FP_DEVARCH + 0x00002fbc + Provides CoreSight discovery information for the FPB + 0x47701a03 + + + ARCHITECT + 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. + [31:21] + read-only + + + PRESENT + Defines that the DEVARCH register is present + [20:20] + read-only + + + REVISION + Defines the architecture revision of the component + [19:16] + read-only + + + ARCHVER + Defines the architecture version of the component + [15:12] + read-only + + + ARCHPART + Defines the architecture of the component + [11:0] + read-only + + + + + FP_DEVTYPE + 0x00002fcc + Provides CoreSight discovery information for the FPB + 0x00000000 + + + SUB + Component sub-type + [7:4] + read-only + + + MAJOR + Component major type + [3:0] + read-only + + + + + FP_PIDR4 + 0x00002fd0 + Provides CoreSight discovery information for the FP + 0x00000004 + + + SIZE + See CoreSight Architecture Specification + [7:4] + read-only + + + DES_2 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + FP_PIDR5 + 0x00002fd4 + Provides CoreSight discovery information for the FP + 0x00000000 + + + FP_PIDR5 + [31:0] + read-write + + + + + FP_PIDR6 + 0x00002fd8 + Provides CoreSight discovery information for the FP + 0x00000000 + + + FP_PIDR6 + [31:0] + read-write + + + + + FP_PIDR7 + 0x00002fdc + Provides CoreSight discovery information for the FP + 0x00000000 + + + FP_PIDR7 + [31:0] + read-write + + + + + FP_PIDR0 + 0x00002fe0 + Provides CoreSight discovery information for the FP + 0x00000021 + + + PART_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + FP_PIDR1 + 0x00002fe4 + Provides CoreSight discovery information for the FP + 0x000000bd + + + DES_0 + See CoreSight Architecture Specification + [7:4] + read-only + + + PART_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + FP_PIDR2 + 0x00002fe8 + Provides CoreSight discovery information for the FP + 0x0000000b + + + REVISION + See CoreSight Architecture Specification + [7:4] + read-only + + + JEDEC + See CoreSight Architecture Specification + [3:3] + read-only + + + DES_1 + See CoreSight Architecture Specification + [2:0] + read-only + + + + + FP_PIDR3 + 0x00002fec + Provides CoreSight discovery information for the FP + 0x00000000 + + + REVAND + See CoreSight Architecture Specification + [7:4] + read-only + + + CMOD + See CoreSight Architecture Specification + [3:0] + read-only + + + + + FP_CIDR0 + 0x00002ff0 + Provides CoreSight discovery information for the FP + 0x0000000d + + + PRMBL_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + FP_CIDR1 + 0x00002ff4 + Provides CoreSight discovery information for the FP + 0x00000090 + + + CLASS + See CoreSight Architecture Specification + [7:4] + read-only + + + PRMBL_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + FP_CIDR2 + 0x00002ff8 + Provides CoreSight discovery information for the FP + 0x00000005 + + + PRMBL_2 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + FP_CIDR3 + 0x00002ffc + Provides CoreSight discovery information for the FP + 0x000000b1 + + + PRMBL_3 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + ICTR + 0x0000e004 + Provides information about the interrupt controller + 0x00000001 + + + INTLINESNUM + 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 + [3:0] + read-only + + + + + ACTLR + 0x0000e008 + Provides IMPLEMENTATION DEFINED configuration and control options + 0x00000000 + + + EXTEXCLALL + External Exclusives Allowed with no MPU + [29:29] + read-write + + + DISITMATBFLUSH + Disable ATB Flush + [12:12] + read-write + + + FPEXCODIS + Disable FPU exception outputs + [10:10] + read-write + + + DISOOFP + Disable out-of-order FP instruction completion + [9:9] + read-write + + + DISFOLD + Disable dual-issue. + [2:2] + read-write + + + DISMCYCINT + Disable dual-issue. + [0:0] + read-write + + + + + SYST_CSR + 0x0000e010 + Use the SysTick Control and Status Register to enable the SysTick features. + 0x00000000 + + + COUNTFLAG + Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger. + [16:16] + read-only + + + CLKSOURCE + 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. + [2:2] + read-write + + + TICKINT + 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. + [1:1] + read-write + + + ENABLE + Enable SysTick counter: + 0 = Counter disabled. + 1 = Counter enabled. + [0:0] + read-write + + + + + SYST_RVR + 0x0000e014 + 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. + 0x00000000 + + + RELOAD + Value to load into the SysTick Current Value Register when the counter reaches 0. + [23:0] + read-write + + + + + SYST_CVR + 0x0000e018 + Use the SysTick Current Value Register to find the current value in the register. The reset value of this register is UNKNOWN. + 0x00000000 + + + CURRENT + 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. + [23:0] + read-write + + + + + SYST_CALIB + 0x0000e01c + Use the SysTick Calibration Value Register to enable software to scale to any required speed using divide and multiply. + 0x00000000 + + + NOREF + 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. + [31:31] + read-only + + + SKEW + If reads as 1, the calibration value for 10ms is inexact (due to clock frequency). + [30:30] + read-only + + + TENMS + 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. + [23:0] + read-only + + + + + NVIC_ISER0 + 0x0000e100 + Enables or reads the enabled state of each group of 32 interrupts + 0x00000000 + + + SETENA + For SETENA[m] in NVIC_ISER*n, indicates whether interrupt 32*n + m is enabled + [31:0] + read-write + + + + + NVIC_ISER1 + 0x0000e104 + Enables or reads the enabled state of each group of 32 interrupts + 0x00000000 + + + SETENA + For SETENA[m] in NVIC_ISER*n, indicates whether interrupt 32*n + m is enabled + [31:0] + read-write + + + + + NVIC_ICER0 + 0x0000e180 + Clears or reads the enabled state of each group of 32 interrupts + 0x00000000 + + + CLRENA + For CLRENA[m] in NVIC_ICER*n, indicates whether interrupt 32*n + m is enabled + [31:0] + read-write + + + + + NVIC_ICER1 + 0x0000e184 + Clears or reads the enabled state of each group of 32 interrupts + 0x00000000 + + + CLRENA + For CLRENA[m] in NVIC_ICER*n, indicates whether interrupt 32*n + m is enabled + [31:0] + read-write + + + + + NVIC_ISPR0 + 0x0000e200 + Enables or reads the pending state of each group of 32 interrupts + 0x00000000 + + + SETPEND + For SETPEND[m] in NVIC_ISPR*n, indicates whether interrupt 32*n + m is pending + [31:0] + read-write + + + + + NVIC_ISPR1 + 0x0000e204 + Enables or reads the pending state of each group of 32 interrupts + 0x00000000 + + + SETPEND + For SETPEND[m] in NVIC_ISPR*n, indicates whether interrupt 32*n + m is pending + [31:0] + read-write + + + + + NVIC_ICPR0 + 0x0000e280 + Clears or reads the pending state of each group of 32 interrupts + 0x00000000 + + + CLRPEND + For CLRPEND[m] in NVIC_ICPR*n, indicates whether interrupt 32*n + m is pending + [31:0] + read-write + + + + + NVIC_ICPR1 + 0x0000e284 + Clears or reads the pending state of each group of 32 interrupts + 0x00000000 + + + CLRPEND + For CLRPEND[m] in NVIC_ICPR*n, indicates whether interrupt 32*n + m is pending + [31:0] + read-write + + + + + NVIC_IABR0 + 0x0000e300 + For each group of 32 interrupts, shows the active state of each interrupt + 0x00000000 + + + ACTIVE + For ACTIVE[m] in NVIC_IABR*n, indicates the active state for interrupt 32*n+m + [31:0] + read-write + + + + + NVIC_IABR1 + 0x0000e304 + For each group of 32 interrupts, shows the active state of each interrupt + 0x00000000 + + + ACTIVE + For ACTIVE[m] in NVIC_IABR*n, indicates the active state for interrupt 32*n+m + [31:0] + read-write + + + + + NVIC_ITNS0 + 0x0000e380 + For each group of 32 interrupts, determines whether each interrupt targets Non-secure or Secure state + 0x00000000 + + + ITNS + For ITNS[m] in NVIC_ITNS*n, `IAAMO the target Security state for interrupt 32*n+m + [31:0] + read-write + + + + + NVIC_ITNS1 + 0x0000e384 + For each group of 32 interrupts, determines whether each interrupt targets Non-secure or Secure state + 0x00000000 + + + ITNS + For ITNS[m] in NVIC_ITNS*n, `IAAMO the target Security state for interrupt 32*n+m + [31:0] + read-write + + + + + NVIC_IPR0 + 0x0000e400 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR1 + 0x0000e404 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR2 + 0x0000e408 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR3 + 0x0000e40c + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR4 + 0x0000e410 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR5 + 0x0000e414 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR6 + 0x0000e418 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR7 + 0x0000e41c + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR8 + 0x0000e420 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR9 + 0x0000e424 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR10 + 0x0000e428 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR11 + 0x0000e42c + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR12 + 0x0000e430 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR13 + 0x0000e434 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR14 + 0x0000e438 + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + NVIC_IPR15 + 0x0000e43c + Sets or reads interrupt priorities + 0x00000000 + + + PRI_N3 + For register NVIC_IPRn, the priority of interrupt number 4*n+3, or RES0 if the PE does not implement this interrupt + [31:28] + read-write + + + PRI_N2 + For register NVIC_IPRn, the priority of interrupt number 4*n+2, or RES0 if the PE does not implement this interrupt + [23:20] + read-write + + + PRI_N1 + For register NVIC_IPRn, the priority of interrupt number 4*n+1, or RES0 if the PE does not implement this interrupt + [15:12] + read-write + + + PRI_N0 + For register NVIC_IPRn, the priority of interrupt number 4*n+0, or RES0 if the PE does not implement this interrupt + [7:4] + read-write + + + + + CPUID + 0x0000ed00 + Provides identification information for the PE, including an implementer code for the device and a device ID number + 0x411fd210 + + + IMPLEMENTER + This field must hold an implementer code that has been assigned by ARM + [31:24] + read-only + + + VARIANT + IMPLEMENTATION DEFINED variant number. Typically, this field is used to distinguish between different product variants, or major revisions of a product + [23:20] + read-only + + + ARCHITECTURE + Defines the Architecture implemented by the PE + [19:16] + read-only + + + PARTNO + IMPLEMENTATION DEFINED primary part number for the device + [15:4] + read-only + + + REVISION + IMPLEMENTATION DEFINED revision number for the device + [3:0] + read-only + + + + + ICSR + 0x0000ed04 + Controls and provides status information for NMI, PendSV, SysTick and interrupts + 0x00000000 + + + PENDNMISET + Indicates whether the NMI exception is pending + [31:31] + read-only + + + PENDNMICLR + Allows the NMI exception pend state to be cleared + [30:30] + read-write + + + PENDSVSET + Indicates whether the PendSV `FTSSS exception is pending + [28:28] + read-only + + + PENDSVCLR + Allows the PendSV exception pend state to be cleared `FTSSS + [27:27] + read-write + + + PENDSTSET + Indicates whether the SysTick `FTSSS exception is pending + [26:26] + read-only + + + PENDSTCLR + Allows the SysTick exception pend state to be cleared `FTSSS + [25:25] + read-write + + + STTNS + Controls whether in a single SysTick implementation, the SysTick is Secure or Non-secure + [24:24] + read-write + + + ISRPREEMPT + Indicates whether a pending exception will be serviced on exit from debug halt state + [23:23] + read-only + + + ISRPENDING + Indicates whether an external interrupt, generated by the NVIC, is pending + [22:22] + read-only + + + VECTPENDING + The exception number of the highest priority pending and enabled interrupt + [20:12] + read-only + + + RETTOBASE + In Handler mode, indicates whether there is more than one active exception + [11:11] + read-only + + + VECTACTIVE + The exception number of the current executing exception + [8:0] + read-only + + + + + VTOR + 0x0000ed08 + The VTOR indicates the offset of the vector table base address from memory address 0x00000000. + 0x00000000 + + + TBLOFF + Vector table base offset field. It contains bits[31:7] of the offset of the table base from the bottom of the memory map. + [31:7] + read-write + + + + + AIRCR + 0x0000ed0c + 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. + 0x00000000 + + + VECTKEY + Register key: + Reads as Unknown + On writes, write 0x05FA to VECTKEY, otherwise the write is ignored. + [31:16] + read-write + + + ENDIANESS + Data endianness implemented: + 0 = Little-endian. + [15:15] + read-only + + + PRIS + 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. + [14:14] + read-write + + + BFHFNMINS + 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. + [13:13] + read-write + + + PRIGROUP + 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 + [10:8] + read-write + + + SYSRESETREQS + System reset request, Secure state only. + 0 SYSRESETREQ functionality is available to both Security states. + 1 SYSRESETREQ functionality is only available to Secure state. + [3:3] + read-write + + + SYSRESETREQ + 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. + [2:2] + read-write + + + VECTCLRACTIVE + 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. + [1:1] + read-write + + + + + SCR + 0x0000ed10 + 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. + 0x00000000 + + + SEVONPEND + 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. + [4:4] + read-write + + + SLEEPDEEPS + 0 SLEEPDEEP is available to both security states + 1 SLEEPDEEP is only available to Secure state + [3:3] + read-write + + + SLEEPDEEP + Controls whether the processor uses sleep or deep sleep as its low power mode: + 0 = Sleep. + 1 = Deep sleep. + [2:2] + read-write + + + SLEEPONEXIT + 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. + [1:1] + read-write + + + + + CCR + 0x0000ed14 + Sets or returns configuration and control data + 0x00000201 + + + BP + Enables program flow prediction `FTSSS + [18:18] + read-only + + + IC + This is a global enable bit for instruction caches in the selected Security state + [17:17] + read-only + + + DC + Enables data caching of all data accesses to Normal memory `FTSSS + [16:16] + read-only + + + STKOFHFNMIGN + Controls the effect of a stack limit violation while executing at a requested priority less than 0 + [10:10] + read-write + + + RES1 + Reserved, RES1 + [9:9] + read-only + + + BFHFNMIGN + Determines the effect of precise BusFaults on handlers running at a requested priority less than 0 + [8:8] + read-write + + + DIV_0_TRP + Controls the generation of a DIVBYZERO UsageFault when attempting to perform integer division by zero + [4:4] + read-write + + + UNALIGN_TRP + Controls the trapping of unaligned word or halfword accesses + [3:3] + read-write + + + USERSETMPEND + Determines whether unprivileged accesses are permitted to pend interrupts via the STIR + [1:1] + read-write + + + RES1_1 + Reserved, RES1 + [0:0] + read-only + + + + + SHPR1 + 0x0000ed18 + Sets or returns priority for system handlers 4 - 7 + 0x00000000 + + + PRI_7_3 + Priority of system handler 7, SecureFault + [31:29] + read-write + + + PRI_6_3 + Priority of system handler 6, SecureFault + [23:21] + read-write + + + PRI_5_3 + Priority of system handler 5, SecureFault + [15:13] + read-write + + + PRI_4_3 + Priority of system handler 4, SecureFault + [7:5] + read-write + + + + + SHPR2 + 0x0000ed1c + Sets or returns priority for system handlers 8 - 11 + 0x00000000 + + + PRI_11_3 + Priority of system handler 11, SecureFault + [31:29] + read-write + + + PRI_10 + Reserved, RES0 + [23:16] + read-only + + + PRI_9 + Reserved, RES0 + [15:8] + read-only + + + PRI_8 + Reserved, RES0 + [7:0] + read-only + + + + + SHPR3 + 0x0000ed20 + Sets or returns priority for system handlers 12 - 15 + 0x00000000 + + + PRI_15_3 + Priority of system handler 15, SecureFault + [31:29] + read-write + + + PRI_14_3 + Priority of system handler 14, SecureFault + [23:21] + read-write + + + PRI_13 + Reserved, RES0 + [15:8] + read-only + + + PRI_12_3 + Priority of system handler 12, SecureFault + [7:5] + read-write + + + + + SHCSR + 0x0000ed24 + Provides access to the active and pending status of system exceptions + 0x00000000 + + + HARDFAULTPENDED + `IAAMO the pending state of the HardFault exception `CTTSSS + [21:21] + read-write + + + SECUREFAULTPENDED + `IAAMO the pending state of the SecureFault exception + [20:20] + read-write + + + SECUREFAULTENA + `DW the SecureFault exception is enabled + [19:19] + read-write + + + USGFAULTENA + `DW the UsageFault exception is enabled `FTSSS + [18:18] + read-write + + + BUSFAULTENA + `DW the BusFault exception is enabled + [17:17] + read-write + + + MEMFAULTENA + `DW the MemManage exception is enabled `FTSSS + [16:16] + read-write + + + SVCALLPENDED + `IAAMO the pending state of the SVCall exception `FTSSS + [15:15] + read-write + + + BUSFAULTPENDED + `IAAMO the pending state of the BusFault exception + [14:14] + read-write + + + MEMFAULTPENDED + `IAAMO the pending state of the MemManage exception `FTSSS + [13:13] + read-write + + + USGFAULTPENDED + The UsageFault exception is banked between Security states, `IAAMO the pending state of the UsageFault exception `FTSSS + [12:12] + read-write + + + SYSTICKACT + `IAAMO the active state of the SysTick exception `FTSSS + [11:11] + read-write + + + PENDSVACT + `IAAMO the active state of the PendSV exception `FTSSS + [10:10] + read-write + + + MONITORACT + `IAAMO the active state of the DebugMonitor exception + [8:8] + read-write + + + SVCALLACT + `IAAMO the active state of the SVCall exception `FTSSS + [7:7] + read-write + + + NMIACT + `IAAMO the active state of the NMI exception + [5:5] + read-write + + + SECUREFAULTACT + `IAAMO the active state of the SecureFault exception + [4:4] + read-write + + + USGFAULTACT + `IAAMO the active state of the UsageFault exception `FTSSS + [3:3] + read-write + + + HARDFAULTACT + Indicates and allows limited modification of the active state of the HardFault exception `FTSSS + [2:2] + read-write + + + BUSFAULTACT + `IAAMO the active state of the BusFault exception + [1:1] + read-write + + + MEMFAULTACT + `IAAMO the active state of the MemManage exception `FTSSS + [0:0] + read-write + + + + + CFSR + 0x0000ed28 + 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 + 0x00000000 + + + UFSR_DIVBYZERO + Sticky flag indicating whether an integer division by zero error has occurred + [25:25] + read-write + + + UFSR_UNALIGNED + Sticky flag indicating whether an unaligned access error has occurred + [24:24] + read-write + + + UFSR_STKOF + Sticky flag indicating whether a stack overflow error has occurred + [20:20] + read-write + + + UFSR_NOCP + Sticky flag indicating whether a coprocessor disabled or not present error has occurred + [19:19] + read-write + + + UFSR_INVPC + Sticky flag indicating whether an integrity check error has occurred + [18:18] + read-write + + + UFSR_INVSTATE + Sticky flag indicating whether an EPSR.T or EPSR.IT validity error has occurred + [17:17] + read-write + + + UFSR_UNDEFINSTR + Sticky flag indicating whether an undefined instruction error has occurred + [16:16] + read-write + + + BFSR_BFARVALID + Indicates validity of the contents of the BFAR register + [15:15] + read-write + + + BFSR_LSPERR + Records whether a BusFault occurred during FP lazy state preservation + [13:13] + read-write + + + BFSR_STKERR + Records whether a derived BusFault occurred during exception entry stacking + [12:12] + read-write + + + BFSR_UNSTKERR + Records whether a derived BusFault occurred during exception return unstacking + [11:11] + read-write + + + BFSR_IMPRECISERR + Records whether an imprecise data access error has occurred + [10:10] + read-write + + + BFSR_PRECISERR + Records whether a precise data access error has occurred + [9:9] + read-write + + + BFSR_IBUSERR + Records whether a BusFault on an instruction prefetch has occurred + [8:8] + read-write + + + MMFSR + Provides information on MemManage exceptions + [7:0] + read-write + + + + + HFSR + 0x0000ed2c + Shows the cause of any HardFaults + 0x00000000 + + + DEBUGEVT + Indicates when a Debug event has occurred + [31:31] + read-write + + + FORCED + 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 + [30:30] + read-write + + + VECTTBL + Indicates when a fault has occurred because of a vector table read error on exception processing + [1:1] + read-write + + + + + DFSR + 0x0000ed30 + Shows which debug event occurred + 0x00000000 + + + EXTERNAL + Sticky flag indicating whether an External debug request debug event has occurred + [4:4] + read-write + + + VCATCH + Sticky flag indicating whether a Vector catch debug event has occurred + [3:3] + read-write + + + DWTTRAP + Sticky flag indicating whether a Watchpoint debug event has occurred + [2:2] + read-write + + + BKPT + Sticky flag indicating whether a Breakpoint debug event has occurred + [1:1] + read-write + + + HALTED + Sticky flag indicating that a Halt request debug event or Step debug event has occurred + [0:0] + read-write + + + + + MMFAR + 0x0000ed34 + Shows the address of the memory location that caused an MPU fault + 0x00000000 + + + ADDRESS + 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 + [31:0] + read-write + + + + + BFAR + 0x0000ed38 + Shows the address associated with a precise data access BusFault + 0x00000000 + + + ADDRESS + 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 + [31:0] + read-write + + + + + ID_PFR0 + 0x0000ed40 + Gives top-level information about the instruction set supported by the PE + 0x00000030 + + + STATE1 + T32 instruction set support + [7:4] + read-only + + + STATE0 + A32 instruction set support + [3:0] + read-only + + + + + ID_PFR1 + 0x0000ed44 + Gives information about the programmers' model and Extensions support + 0x00000520 + + + MPROGMOD + Identifies support for the M-Profile programmers' model support + [11:8] + read-only + + + SECURITY + Identifies whether the Security Extension is implemented + [7:4] + read-only + + + + + ID_DFR0 + 0x0000ed48 + Provides top level information about the debug system + 0x00200000 + + + MPROFDBG + Indicates the supported M-profile debug architecture + [23:20] + read-only + + + + + ID_AFR0 + 0x0000ed4c + Provides information about the IMPLEMENTATION DEFINED features of the PE + 0x00000000 + + + IMPDEF3 + IMPLEMENTATION DEFINED meaning + [15:12] + read-only + + + IMPDEF2 + IMPLEMENTATION DEFINED meaning + [11:8] + read-only + + + IMPDEF1 + IMPLEMENTATION DEFINED meaning + [7:4] + read-only + + + IMPDEF0 + IMPLEMENTATION DEFINED meaning + [3:0] + read-only + + + + + ID_MMFR0 + 0x0000ed50 + Provides information about the implemented memory model and memory management support + 0x00101f40 + + + AUXREG + Indicates support for Auxiliary Control Registers + [23:20] + read-only + + + TCM + Indicates support for tightly coupled memories (TCMs) + [19:16] + read-only + + + SHARELVL + Indicates the number of shareability levels implemented + [15:12] + read-only + + + OUTERSHR + Indicates the outermost shareability domain implemented + [11:8] + read-only + + + PMSA + Indicates support for the protected memory system architecture (PMSA) + [7:4] + read-only + + + + + ID_MMFR1 + 0x0000ed54 + Provides information about the implemented memory model and memory management support + 0x00000000 + + + ID_MMFR1 + [31:0] + read-write + + + + + ID_MMFR2 + 0x0000ed58 + Provides information about the implemented memory model and memory management support + 0x01000000 + + + WFISTALL + Indicates the support for Wait For Interrupt (WFI) stalling + [27:24] + read-only + + + + + ID_MMFR3 + 0x0000ed5c + Provides information about the implemented memory model and memory management support + 0x00000000 + + + BPMAINT + Indicates the supported branch predictor maintenance + [11:8] + read-only + + + CMAINTSW + Indicates the supported cache maintenance operations by set/way + [7:4] + read-only + + + CMAINTVA + Indicates the supported cache maintenance operations by address + [3:0] + read-only + + + + + ID_ISAR0 + 0x0000ed60 + Provides information about the instruction set implemented by the PE + 0x08092300 + + + DIVIDE + Indicates the supported Divide instructions + [27:24] + read-only + + + DEBUG + Indicates the implemented Debug instructions + [23:20] + read-only + + + COPROC + Indicates the supported Coprocessor instructions + [19:16] + read-only + + + CMPBRANCH + Indicates the supported combined Compare and Branch instructions + [15:12] + read-only + + + BITFIELD + Indicates the supported bit field instructions + [11:8] + read-only + + + BITCOUNT + Indicates the supported bit count instructions + [7:4] + read-only + + + + + ID_ISAR1 + 0x0000ed64 + Provides information about the instruction set implemented by the PE + 0x05725000 + + + INTERWORK + Indicates the implemented Interworking instructions + [27:24] + read-only + + + IMMEDIATE + Indicates the implemented for data-processing instructions with long immediates + [23:20] + read-only + + + IFTHEN + Indicates the implemented If-Then instructions + [19:16] + read-only + + + EXTEND + Indicates the implemented Extend instructions + [15:12] + read-only + + + + + ID_ISAR2 + 0x0000ed68 + Provides information about the instruction set implemented by the PE + 0x30173426 + + + REVERSAL + Indicates the implemented Reversal instructions + [31:28] + read-only + + + MULTU + Indicates the implemented advanced unsigned Multiply instructions + [23:20] + read-only + + + MULTS + Indicates the implemented advanced signed Multiply instructions + [19:16] + read-only + + + MULT + Indicates the implemented additional Multiply instructions + [15:12] + read-only + + + MULTIACCESSINT + Indicates the support for interruptible multi-access instructions + [11:8] + read-only + + + MEMHINT + Indicates the implemented Memory Hint instructions + [7:4] + read-only + + + LOADSTORE + Indicates the implemented additional load/store instructions + [3:0] + read-only + + + + + ID_ISAR3 + 0x0000ed6c + Provides information about the instruction set implemented by the PE + 0x07895729 + + + TRUENOP + Indicates the implemented true NOP instructions + [27:24] + read-only + + + T32COPY + Indicates the support for T32 non flag-setting MOV instructions + [23:20] + read-only + + + TABBRANCH + Indicates the implemented Table Branch instructions + [19:16] + read-only + + + SYNCHPRIM + Used in conjunction with ID_ISAR4.SynchPrim_frac to indicate the implemented Synchronization Primitive instructions + [15:12] + read-only + + + SVC + Indicates the implemented SVC instructions + [11:8] + read-only + + + SIMD + Indicates the implemented SIMD instructions + [7:4] + read-only + + + SATURATE + Indicates the implemented saturating instructions + [3:0] + read-only + + + + + ID_ISAR4 + 0x0000ed70 + Provides information about the instruction set implemented by the PE + 0x01310132 + + + PSR_M + Indicates the implemented M profile instructions to modify the PSRs + [27:24] + read-only + + + SYNCPRIM_FRAC + Used in conjunction with ID_ISAR3.SynchPrim to indicate the implemented Synchronization Primitive instructions + [23:20] + read-only + + + BARRIER + Indicates the implemented Barrier instructions + [19:16] + read-only + + + WRITEBACK + Indicates the support for writeback addressing modes + [11:8] + read-only + + + WITHSHIFTS + Indicates the support for writeback addressing modes + [7:4] + read-only + + + UNPRIV + Indicates the implemented unprivileged instructions + [3:0] + read-only + + + + + ID_ISAR5 + 0x0000ed74 + Provides information about the instruction set implemented by the PE + 0x00000000 + + + ID_ISAR5 + [31:0] + read-write + + + + + CTR + 0x0000ed7c + Provides information about the architecture of the caches. CTR is RES0 if CLIDR is zero. + 0x8000c000 + + + RES1 + Reserved, RES1 + [31:31] + read-only + + + CWG + 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 + [27:24] + read-only + + + ERG + 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 + [23:20] + read-only + + + DMINLINE + 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 + [19:16] + read-only + + + RES1_1 + Reserved, RES1 + [15:14] + read-only + + + IMINLINE + Log2 of the number of words in the smallest cache line of all the instruction caches that are controlled by the PE + [3:0] + read-only + + + + + CPACR + 0x0000ed88 + Specifies the access privileges for coprocessors and the FP Extension + 0x00000000 + + + CP11 + 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 + [23:22] + read-write + + + CP10 + Defines the access rights for the floating-point functionality + [21:20] + read-write + + + CP7 + Controls access privileges for coprocessor 7 + [15:14] + read-write + + + CP6 + Controls access privileges for coprocessor 6 + [13:12] + read-write + + + CP5 + Controls access privileges for coprocessor 5 + [11:10] + read-write + + + CP4 + Controls access privileges for coprocessor 4 + [9:8] + read-write + + + CP3 + Controls access privileges for coprocessor 3 + [7:6] + read-write + + + CP2 + Controls access privileges for coprocessor 2 + [5:4] + read-write + + + CP1 + Controls access privileges for coprocessor 1 + [3:2] + read-write + + + CP0 + Controls access privileges for coprocessor 0 + [1:0] + read-write + + + + + NSACR + 0x0000ed8c + Defines the Non-secure access permissions for both the FP Extension and coprocessors CP0 to CP7 + 0x00000000 + + + CP11 + Enables Non-secure access to the Floating-point Extension + [11:11] + read-write + + + CP10 + Enables Non-secure access to the Floating-point Extension + [10:10] + read-write + + + CP7 + Enables Non-secure access to coprocessor CP7 + [7:7] + read-write + + + CP6 + Enables Non-secure access to coprocessor CP6 + [6:6] + read-write + + + CP5 + Enables Non-secure access to coprocessor CP5 + [5:5] + read-write + + + CP4 + Enables Non-secure access to coprocessor CP4 + [4:4] + read-write + + + CP3 + Enables Non-secure access to coprocessor CP3 + [3:3] + read-write + + + CP2 + Enables Non-secure access to coprocessor CP2 + [2:2] + read-write + + + CP1 + Enables Non-secure access to coprocessor CP1 + [1:1] + read-write + + + CP0 + Enables Non-secure access to coprocessor CP0 + [0:0] + read-write + + + + + MPU_TYPE + 0x0000ed90 + The MPU Type Register indicates how many regions the MPU `FTSSS supports + 0x00000800 + + + DREGION + Number of regions supported by the MPU + [15:8] + read-only + + + SEPARATE + Indicates support for separate instructions and data address regions + [0:0] + read-only + + + + + MPU_CTRL + 0x0000ed94 + 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 + 0x00000000 + + + PRIVDEFENA + Controls whether the default memory map is enabled for privileged software + [2:2] + read-write + + + HFNMIENA + 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 + [1:1] + read-write + + + ENABLE + Enables the MPU + [0:0] + read-write + + + + + MPU_RNR + 0x0000ed98 + Selects the region currently accessed by MPU_RBAR and MPU_RLAR + 0x00000000 + + + REGION + Indicates the memory region accessed by MPU_RBAR and MPU_RLAR + [2:0] + read-write + + + + + MPU_RBAR + 0x0000ed9c + Provides indirect read and write access to the base address of the currently selected MPU region `FTSSS + 0x00000000 + + + BASE + 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 + [31:5] + read-write + + + SH + Defines the Shareability domain of this region for Normal memory + [4:3] + read-write + + + AP + Defines the access permissions for this region + [2:1] + read-write + + + XN + Defines whether code can be executed from this region + [0:0] + read-write + + + + + MPU_RLAR + 0x0000eda0 + Provides indirect read and write access to the limit address of the currently selected MPU region `FTSSS + 0x00000000 + + + LIMIT + 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 + [31:5] + read-write + + + ATTRINDX + Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields + [3:1] + read-write + + + EN + Region enable + [0:0] + read-write + + + + + MPU_RBAR_A1 + 0x0000eda4 + Provides indirect read and write access to the base address of the MPU region selected by MPU_RNR[7:2]:(1[1:0]) `FTSSS + 0x00000000 + + + BASE + 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 + [31:5] + read-write + + + SH + Defines the Shareability domain of this region for Normal memory + [4:3] + read-write + + + AP + Defines the access permissions for this region + [2:1] + read-write + + + XN + Defines whether code can be executed from this region + [0:0] + read-write + + + + + MPU_RLAR_A1 + 0x0000eda8 + 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 + 0x00000000 + + + LIMIT + 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 + [31:5] + read-write + + + ATTRINDX + Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields + [3:1] + read-write + + + EN + Region enable + [0:0] + read-write + + + + + MPU_RBAR_A2 + 0x0000edac + Provides indirect read and write access to the base address of the MPU region selected by MPU_RNR[7:2]:(2[1:0]) `FTSSS + 0x00000000 + + + BASE + 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 + [31:5] + read-write + + + SH + Defines the Shareability domain of this region for Normal memory + [4:3] + read-write + + + AP + Defines the access permissions for this region + [2:1] + read-write + + + XN + Defines whether code can be executed from this region + [0:0] + read-write + + + + + MPU_RLAR_A2 + 0x0000edb0 + 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 + 0x00000000 + + + LIMIT + 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 + [31:5] + read-write + + + ATTRINDX + Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields + [3:1] + read-write + + + EN + Region enable + [0:0] + read-write + + + + + MPU_RBAR_A3 + 0x0000edb4 + Provides indirect read and write access to the base address of the MPU region selected by MPU_RNR[7:2]:(3[1:0]) `FTSSS + 0x00000000 + + + BASE + 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 + [31:5] + read-write + + + SH + Defines the Shareability domain of this region for Normal memory + [4:3] + read-write + + + AP + Defines the access permissions for this region + [2:1] + read-write + + + XN + Defines whether code can be executed from this region + [0:0] + read-write + + + + + MPU_RLAR_A3 + 0x0000edb8 + 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 + 0x00000000 + + + LIMIT + 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 + [31:5] + read-write + + + ATTRINDX + Associates a set of attributes in the MPU_MAIR0 and MPU_MAIR1 fields + [3:1] + read-write + + + EN + Region enable + [0:0] + read-write + + + + + MPU_MAIR0 + 0x0000edc0 + Along with MPU_MAIR1, provides the memory attribute encodings corresponding to the AttrIndex values + 0x00000000 + + + ATTR3 + Memory attribute encoding for MPU regions with an AttrIndex of 3 + [31:24] + read-write + + + ATTR2 + Memory attribute encoding for MPU regions with an AttrIndex of 2 + [23:16] + read-write + + + ATTR1 + Memory attribute encoding for MPU regions with an AttrIndex of 1 + [15:8] + read-write + + + ATTR0 + Memory attribute encoding for MPU regions with an AttrIndex of 0 + [7:0] + read-write + + + + + MPU_MAIR1 + 0x0000edc4 + Along with MPU_MAIR0, provides the memory attribute encodings corresponding to the AttrIndex values + 0x00000000 + + + ATTR7 + Memory attribute encoding for MPU regions with an AttrIndex of 7 + [31:24] + read-write + + + ATTR6 + Memory attribute encoding for MPU regions with an AttrIndex of 6 + [23:16] + read-write + + + ATTR5 + Memory attribute encoding for MPU regions with an AttrIndex of 5 + [15:8] + read-write + + + ATTR4 + Memory attribute encoding for MPU regions with an AttrIndex of 4 + [7:0] + read-write + + + + + SAU_CTRL + 0x0000edd0 + Allows enabling of the Security Attribution Unit + 0x00000000 + + + ALLNS + When SAU_CTRL.ENABLE is 0 this bit controls if the memory is marked as Non-secure or Secure + [1:1] + read-write + + + ENABLE + Enables the SAU + [0:0] + read-write + + + + + SAU_TYPE + 0x0000edd4 + Indicates the number of regions implemented by the Security Attribution Unit + 0x00000008 + + + SREGION + The number of implemented SAU regions + [7:0] + read-only + + + + + SAU_RNR + 0x0000edd8 + Selects the region currently accessed by SAU_RBAR and SAU_RLAR + 0x00000000 + + + REGION + Indicates the SAU region accessed by SAU_RBAR and SAU_RLAR + [7:0] + read-write + + + + + SAU_RBAR + 0x0000eddc + Provides indirect read and write access to the base address of the currently selected SAU region + 0x00000000 + + + BADDR + Holds bits [31:5] of the base address for the selected SAU region + [31:5] + read-write + + + + + SAU_RLAR + 0x0000ede0 + Provides indirect read and write access to the limit address of the currently selected SAU region + 0x00000000 + + + LADDR + Holds bits [31:5] of the limit address for the selected SAU region + [31:5] + read-write + + + NSC + Controls whether Non-secure state is permitted to execute an SG instruction from this region + [1:1] + read-write + + + ENABLE + SAU region enable + [0:0] + read-write + + + + + SFSR + 0x0000ede4 + Provides information about any security related faults + 0x00000000 + + + LSERR + Sticky flag indicating that an error occurred during lazy state activation or deactivation + [7:7] + read-write + + + SFARVALID + 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 + [6:6] + read-write + + + LSPERR + Stick flag indicating that an SAU or IDAU violation occurred during the lazy preservation of floating-point state + [5:5] + read-write + + + INVTRAN + 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 + [4:4] + read-write + + + AUVIOL + 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 + [3:3] + read-write + + + INVER + 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 + [2:2] + read-write + + + INVIS + This bit is set if the integrity signature in an exception stack frame is found to be invalid during the unstacking operation + [1:1] + read-write + + + INVEP + 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 + [0:0] + read-write + + + + + SFAR + 0x0000ede8 + Shows the address of the memory location that caused a Security violation + 0x00000000 + + + ADDRESS + 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 + [31:0] + read-write + + + + + DHCSR + 0x0000edf0 + Controls halting debug + 0x00000000 + + + S_RESTART_ST + 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 + [26:26] + read-only + + + S_RESET_ST + Indicates whether the PE has been reset since the last read of the DHCSR + [25:25] + read-only + + + S_RETIRE_ST + Set to 1 every time the PE retires one of more instructions + [24:24] + read-only + + + S_SDE + Indicates whether Secure invasive debug is allowed + [20:20] + read-only + + + S_LOCKUP + Indicates whether the PE is in Lockup state + [19:19] + read-only + + + S_SLEEP + Indicates whether the PE is sleeping + [18:18] + read-only + + + S_HALT + Indicates whether the PE is in Debug state + [17:17] + read-only + + + S_REGRDY + Handshake flag to transfers through the DCRDR + [16:16] + read-only + + + C_SNAPSTALL + Allow imprecise entry to Debug state + [5:5] + read-write + + + C_MASKINTS + When debug is enabled, the debugger can write to this bit to mask PendSV, SysTick and external configurable interrupts + [3:3] + read-write + + + C_STEP + Enable single instruction step + [2:2] + read-write + + + C_HALT + PE enter Debug state halt request + [1:1] + read-write + + + C_DEBUGEN + Enable Halting debug + [0:0] + read-write + + + + + DCRSR + 0x0000edf4 + 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 + 0x00000000 + + + REGWNR + Specifies the access type for the transfer + [16:16] + read-write + + + REGSEL + Specifies the general-purpose register, special-purpose register, or FP register to transfer + [6:0] + read-write + + + + + DCRDR + 0x0000edf8 + 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 + 0x00000000 + + + DBGTMP + Provides debug access for reading and writing the general-purpose registers, special-purpose registers, and Floating-point Extension registers + [31:0] + read-write + + + + + DEMCR + 0x0000edfc + Manages vector catch behavior and DebugMonitor handling when debugging + 0x00000000 + + + TRCENA + Global enable for all DWT and ITM features + [24:24] + read-write + + + SDME + Indicates whether the DebugMonitor targets the Secure or the Non-secure state and whether debug events are allowed in Secure state + [20:20] + read-only + + + MON_REQ + DebugMonitor semaphore bit + [19:19] + read-write + + + MON_STEP + Enable DebugMonitor stepping + [18:18] + read-write + + + MON_PEND + Sets or clears the pending state of the DebugMonitor exception + [17:17] + read-write + + + MON_EN + Enable the DebugMonitor exception + [16:16] + read-write + + + VC_SFERR + SecureFault exception halting debug vector catch enable + [11:11] + read-write + + + VC_HARDERR + HardFault exception halting debug vector catch enable + [10:10] + read-write + + + VC_INTERR + Enable halting debug vector catch for faults during exception entry and return + [9:9] + read-write + + + VC_BUSERR + BusFault exception halting debug vector catch enable + [8:8] + read-write + + + VC_STATERR + Enable halting debug trap on a UsageFault exception caused by a state information error, for example an Undefined Instruction exception + [7:7] + read-write + + + VC_CHKERR + Enable halting debug trap on a UsageFault exception caused by a checking error, for example an alignment check error + [6:6] + read-write + + + VC_NOCPERR + Enable halting debug trap on a UsageFault caused by an access to a coprocessor + [5:5] + read-write + + + VC_MMERR + Enable halting debug trap on a MemManage exception + [4:4] + read-write + + + VC_CORERESET + Enable Reset Vector Catch. This causes a warm reset to halt a running system + [0:0] + read-write + + + + + DSCSR + 0x0000ee08 + Provides control and status information for Secure debug + 0x00000000 + + + CDSKEY + Writes to the CDS bit are ignored unless CDSKEY is concurrently written to zero + [17:17] + read-write + + + CDS + This field indicates the current Security state of the processor + [16:16] + read-write + + + SBRSEL + 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 + [1:1] + read-write + + + SBRSELEN + 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 + [0:0] + read-write + + + + + STIR + 0x0000ef00 + Provides a mechanism for software to generate an interrupt + 0x00000000 + + + INTID + Indicates the interrupt to be pended. The value written is (ExceptionNumber - 16) + [8:0] + read-write + + + + + FPCCR + 0x0000ef34 + Holds control data for the Floating-point extension + 0x20000472 + + + ASPEN + When this bit is set to 1, execution of a floating-point instruction sets the CONTROL.FPCA bit to 1 + [31:31] + read-write + + + LSPEN + Enables lazy context save of floating-point state + [30:30] + read-write + + + LSPENS + This bit controls whether the LSPEN bit is writeable from the Non-secure state + [29:29] + read-write + + + CLRONRET + Clear floating-point caller saved registers on exception return + [28:28] + read-write + + + CLRONRETS + This bit controls whether the CLRONRET bit is writeable from the Non-secure state + [27:27] + read-write + + + TS + Treat floating-point registers as Secure enable + [26:26] + read-write + + + UFRDY + Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the UsageFault exception to pending + [10:10] + read-write + + + SPLIMVIOL + 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 + [9:9] + read-write + + + MONRDY + Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the DebugMonitor exception to pending + [8:8] + read-write + + + SFRDY + 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 + [7:7] + read-write + + + BFRDY + Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the BusFault exception to pending + [6:6] + read-write + + + MMRDY + Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the MemManage exception to pending + [5:5] + read-write + + + HFRDY + Indicates whether the software executing when the PE allocated the floating-point stack frame was able to set the HardFault exception to pending + [4:4] + read-write + + + THREAD + Indicates the PE mode when it allocated the floating-point stack frame + [3:3] + read-write + + + S + 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 + [2:2] + read-write + + + USER + Indicates the privilege level of the software executing when the PE allocated the floating-point stack frame + [1:1] + read-write + + + LSPACT + Indicates whether lazy preservation of the floating-point state is active + [0:0] + read-write + + + + + FPCAR + 0x0000ef38 + Holds the location of the unpopulated floating-point register space allocated on an exception stack frame + 0x00000000 + + + ADDRESS + The location of the unpopulated floating-point register space allocated on an exception stack frame + [31:3] + read-write + + + + + FPDSCR + 0x0000ef3c + 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 + 0x00000000 + + + AHP + Default value for FPSCR.AHP + [26:26] + read-write + + + DN + Default value for FPSCR.DN + [25:25] + read-write + + + FZ + Default value for FPSCR.FZ + [24:24] + read-write + + + RMODE + Default value for FPSCR.RMode + [23:22] + read-write + + + + + MVFR0 + 0x0000ef40 + Describes the features provided by the Floating-point Extension + 0x60540601 + + + FPROUND + Indicates the rounding modes supported by the FP Extension + [31:28] + read-only + + + FPSQRT + Indicates the support for FP square root operations + [23:20] + read-only + + + FPDIVIDE + Indicates the support for FP divide operations + [19:16] + read-only + + + FPDP + Indicates support for FP double-precision operations + [11:8] + read-only + + + FPSP + Indicates support for FP single-precision operations + [7:4] + read-only + + + SIMDREG + Indicates size of FP register file + [3:0] + read-only + + + + + MVFR1 + 0x0000ef44 + Describes the features provided by the Floating-point Extension + 0x85000089 + + + FMAC + Indicates whether the FP Extension implements the fused multiply accumulate instructions + [31:28] + read-only + + + FPHP + Indicates whether the FP Extension implements half-precision FP conversion instructions + [27:24] + read-only + + + FPDNAN + Indicates whether the FP hardware implementation supports NaN propagation + [7:4] + read-only + + + FPFTZ + Indicates whether subnormals are always flushed-to-zero + [3:0] + read-only + + + + + MVFR2 + 0x0000ef48 + Describes the features provided by the Floating-point Extension + 0x00000060 + + + FPMISC + Indicates support for miscellaneous FP features + [7:4] + read-only + + + + + DDEVARCH + 0x0000efbc + Provides CoreSight discovery information for the SCS + 0x47702a04 + + + ARCHITECT + 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. + [31:21] + read-only + + + PRESENT + Defines that the DEVARCH register is present + [20:20] + read-only + + + REVISION + Defines the architecture revision of the component + [19:16] + read-only + + + ARCHVER + Defines the architecture version of the component + [15:12] + read-only + + + ARCHPART + Defines the architecture of the component + [11:0] + read-only + + + + + DDEVTYPE + 0x0000efcc + Provides CoreSight discovery information for the SCS + 0x00000000 + + + SUB + Component sub-type + [7:4] + read-only + + + MAJOR + CoreSight major type + [3:0] + read-only + + + + + DPIDR4 + 0x0000efd0 + Provides CoreSight discovery information for the SCS + 0x00000004 + + + SIZE + See CoreSight Architecture Specification + [7:4] + read-only + + + DES_2 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DPIDR5 + 0x0000efd4 + Provides CoreSight discovery information for the SCS + 0x00000000 + + + DPIDR5 + [31:0] + read-write + + + + + DPIDR6 + 0x0000efd8 + Provides CoreSight discovery information for the SCS + 0x00000000 + + + DPIDR6 + [31:0] + read-write + + + + + DPIDR7 + 0x0000efdc + Provides CoreSight discovery information for the SCS + 0x00000000 + + + DPIDR7 + [31:0] + read-write + + + + + DPIDR0 + 0x0000efe0 + Provides CoreSight discovery information for the SCS + 0x00000021 + + + PART_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DPIDR1 + 0x0000efe4 + Provides CoreSight discovery information for the SCS + 0x000000bd + + + DES_0 + See CoreSight Architecture Specification + [7:4] + read-only + + + PART_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DPIDR2 + 0x0000efe8 + Provides CoreSight discovery information for the SCS + 0x0000000b + + + REVISION + See CoreSight Architecture Specification + [7:4] + read-only + + + JEDEC + See CoreSight Architecture Specification + [3:3] + read-only + + + DES_1 + See CoreSight Architecture Specification + [2:0] + read-only + + + + + DPIDR3 + 0x0000efec + Provides CoreSight discovery information for the SCS + 0x00000000 + + + REVAND + See CoreSight Architecture Specification + [7:4] + read-only + + + CMOD + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DCIDR0 + 0x0000eff0 + Provides CoreSight discovery information for the SCS + 0x0000000d + + + PRMBL_0 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DCIDR1 + 0x0000eff4 + Provides CoreSight discovery information for the SCS + 0x00000090 + + + CLASS + See CoreSight Architecture Specification + [7:4] + read-only + + + PRMBL_1 + See CoreSight Architecture Specification + [3:0] + read-only + + + + + DCIDR2 + 0x0000eff8 + Provides CoreSight discovery information for the SCS + 0x00000005 + + + PRMBL_2 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + DCIDR3 + 0x0000effc + Provides CoreSight discovery information for the SCS + 0x000000b1 + + + PRMBL_3 + See CoreSight Architecture Specification + [7:0] + read-only + + + + + TRCPRGCTLR + 0x00041004 + Programming Control Register + 0x00000000 + + + EN + Trace Unit Enable + [0:0] + read-write + + + + + TRCSTATR + 0x0004100c + The TRCSTATR indicates the ETM-Teal status + 0x00000000 + + + PMSTABLE + Indicates whether the ETM-Teal registers are stable and can be read + [1:1] + read-only + + + IDLE + Indicates that the trace unit is inactive + [0:0] + read-only + + + + + TRCCONFIGR + 0x00041010 + The TRCCONFIGR sets the basic tracing options for the trace unit + 0x00000000 + + + RS + Return stack enable + [12:12] + read-write + + + TS + Global timestamp tracing + [11:11] + read-write + + + COND + Conditional instruction tracing + [10:5] + read-write + + + CCI + Cycle counting in instruction trace + [4:4] + read-write + + + BB + Branch broadcast mode + [3:3] + read-write + + + + + TRCEVENTCTL0R + 0x00041020 + The TRCEVENTCTL0R controls the tracing of events in the trace stream. The events also drive the ETM-Teal external outputs. + 0x00000000 + + + TYPE1 + Selects the resource type for event 1 + [15:15] + read-write + + + SEL1 + 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] + [10:8] + read-write + + + TYPE0 + Selects the resource type for event 0 + [7:7] + read-write + + + SEL0 + 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] + [2:0] + read-write + + + + + TRCEVENTCTL1R + 0x00041024 + The TRCEVENTCTL1R controls how the events selected by TRCEVENTCTL0R behave + 0x00000000 + + + LPOVERRIDE + Low power state behavior override + [12:12] + read-write + + + ATB + ATB enabled + [11:11] + read-write + + + INSTEN1 + One bit per event, to enable generation of an event element in the instruction trace stream when the selected event occurs + [1:1] + read-write + + + INSTEN0 + One bit per event, to enable generation of an event element in the instruction trace stream when the selected event occurs + [0:0] + read-write + + + + + TRCSTALLCTLR + 0x0004102c + The TRCSTALLCTLR enables ETM-Teal to stall the processor if the ETM-Teal FIFO goes over the programmed level to minimize risk of overflow + 0x00000000 + + + INSTPRIORITY + Reserved, RES0 + [10:10] + read-only + + + ISTALL + Stall processor based on instruction trace buffer space + [8:8] + read-write + + + LEVEL + 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 + [3:2] + read-write + + + + + TRCTSCTLR + 0x00041030 + The TRCTSCTLR controls the insertion of global timestamps into the trace stream. A timestamp is always inserted into the instruction trace stream + 0x00000000 + + + TYPE0 + Selects the resource type for event 0 + [7:7] + read-write + + + SEL0 + 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] + [1:0] + read-write + + + + + TRCSYNCPR + 0x00041034 + 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 + 0x0000000a + + + PERIOD + 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 + [4:0] + read-only + + + + + TRCCCCTLR + 0x00041038 + The TRCCCCTLR sets the threshold value for instruction trace cycle counting. The threshold represents the minimum interval between cycle count trace packets + 0x00000000 + + + THRESHOLD + Instruction trace cycle count threshold + [11:0] + read-write + + + + + TRCVICTLR + 0x00041080 + The TRCVICTLR controls instruction trace filtering + 0x00000000 + + + EXLEVEL_S3 + In Secure state, each bit controls whether instruction tracing is enabled for the corresponding exception level + [19:19] + read-write + + + EXLEVEL_S0 + In Secure state, each bit controls whether instruction tracing is enabled for the corresponding exception level + [16:16] + read-write + + + TRCERR + Selects whether a system error exception must always be traced + [11:11] + read-write + + + TRCRESET + Selects whether a reset exception must always be traced + [10:10] + read-write + + + SSSTATUS + Indicates the current status of the start/stop logic + [9:9] + read-write + + + TYPE0 + Selects the resource type for event 0 + [7:7] + read-write + + + SEL0 + 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] + [1:0] + read-write + + + + + TRCCNTRLDVR0 + 0x00041140 + The TRCCNTRLDVR defines the reload value for the reduced function counter + 0x00000000 + + + VALUE + Defines the reload value for the counter. This value is loaded into the counter each time the reload event occurs + [15:0] + read-write + + + + + TRCIDR8 + 0x00041180 + TRCIDR8 + 0x00000000 + + + MAXSPEC + reads as `ImpDef + [31:0] + read-only + + + + + TRCIDR9 + 0x00041184 + TRCIDR9 + 0x00000000 + + + NUMP0KEY + reads as `ImpDef + [31:0] + read-only + + + + + TRCIDR10 + 0x00041188 + TRCIDR10 + 0x00000000 + + + NUMP1KEY + reads as `ImpDef + [31:0] + read-only + + + + + TRCIDR11 + 0x0004118c + TRCIDR11 + 0x00000000 + + + NUMP1SPC + reads as `ImpDef + [31:0] + read-only + + + + + TRCIDR12 + 0x00041190 + TRCIDR12 + 0x00000001 + + + NUMCONDKEY + reads as `ImpDef + [31:0] + read-only + + + + + TRCIDR13 + 0x00041194 + TRCIDR13 + 0x00000000 + + + NUMCONDSPC + reads as `ImpDef + [31:0] + read-only + + + + + TRCIMSPEC + 0x000411c0 + The TRCIMSPEC shows the presence of any IMPLEMENTATION SPECIFIC features, and enables any features that are provided + 0x00000000 + + + SUPPORT + Reserved, RES0 + [3:0] + read-only + + + + + TRCIDR0 + 0x000411e0 + TRCIDR0 + 0x280006e1 + + + COMMOPT + reads as `ImpDef + [29:29] + read-only + + + TSSIZE + reads as `ImpDef + [28:24] + read-only + + + TRCEXDATA + reads as `ImpDef + [17:17] + read-only + + + QSUPP + reads as `ImpDef + [16:15] + read-only + + + QFILT + reads as `ImpDef + [14:14] + read-only + + + CONDTYPE + reads as `ImpDef + [13:12] + read-only + + + NUMEVENT + reads as `ImpDef + [11:10] + read-only + + + RETSTACK + reads as `ImpDef + [9:9] + read-only + + + TRCCCI + reads as `ImpDef + [7:7] + read-only + + + TRCCOND + reads as `ImpDef + [6:6] + read-only + + + TRCBB + reads as `ImpDef + [5:5] + read-only + + + TRCDATA + reads as `ImpDef + [4:3] + read-only + + + INSTP0 + reads as `ImpDef + [2:1] + read-only + + + RES1 + Reserved, RES1 + [0:0] + read-only + + + + + TRCIDR1 + 0x000411e4 + TRCIDR1 + 0x4100f421 + + + DESIGNER + reads as `ImpDef + [31:24] + read-only + + + RES1 + Reserved, RES1 + [15:12] + read-only + + + TRCARCHMAJ + reads as 0b0100 + [11:8] + read-only + + + TRCARCHMIN + reads as 0b0000 + [7:4] + read-only + + + REVISION + reads as `ImpDef + [3:0] + read-only + + + + + TRCIDR2 + 0x000411e8 + TRCIDR2 + 0x00000004 + + + CCSIZE + reads as `ImpDef + [28:25] + read-only + + + DVSIZE + reads as `ImpDef + [24:20] + read-only + + + DASIZE + reads as `ImpDef + [19:15] + read-only + + + VMIDSIZE + reads as `ImpDef + [14:10] + read-only + + + CIDSIZE + reads as `ImpDef + [9:5] + read-only + + + IASIZE + reads as `ImpDef + [4:0] + read-only + + + + + TRCIDR3 + 0x000411ec + TRCIDR3 + 0x0f090004 + + + NOOVERFLOW + reads as `ImpDef + [31:31] + read-only + + + NUMPROC + reads as `ImpDef + [30:28] + read-only + + + SYSSTALL + reads as `ImpDef + [27:27] + read-only + + + STALLCTL + reads as `ImpDef + [26:26] + read-only + + + SYNCPR + reads as `ImpDef + [25:25] + read-only + + + TRCERR + reads as `ImpDef + [24:24] + read-only + + + EXLEVEL_NS + reads as `ImpDef + [23:20] + read-only + + + EXLEVEL_S + reads as `ImpDef + [19:16] + read-only + + + CCITMIN + reads as `ImpDef + [11:0] + read-only + + + + + TRCIDR4 + 0x000411f0 + TRCIDR4 + 0x00114000 + + + NUMVMIDC + reads as `ImpDef + [31:28] + read-only + + + NUMCIDC + reads as `ImpDef + [27:24] + read-only + + + NUMSSCC + reads as `ImpDef + [23:20] + read-only + + + NUMRSPAIR + reads as `ImpDef + [19:16] + read-only + + + NUMPC + reads as `ImpDef + [15:12] + read-only + + + SUPPDAC + reads as `ImpDef + [8:8] + read-only + + + NUMDVC + reads as `ImpDef + [7:4] + read-only + + + NUMACPAIRS + reads as `ImpDef + [3:0] + read-only + + + + + TRCIDR5 + 0x000411f4 + TRCIDR5 + 0x90c70004 + + + REDFUNCNTR + reads as `ImpDef + [31:31] + read-only + + + NUMCNTR + reads as `ImpDef + [30:28] + read-only + + + NUMSEQSTATE + reads as `ImpDef + [27:25] + read-only + + + LPOVERRIDE + reads as `ImpDef + [23:23] + read-only + + + ATBTRIG + reads as `ImpDef + [22:22] + read-only + + + TRACEIDSIZE + reads as 0x07 + [21:16] + read-only + + + NUMEXTINSEL + reads as `ImpDef + [11:9] + read-only + + + NUMEXTIN + reads as `ImpDef + [8:0] + read-only + + + + + TRCIDR6 + 0x000411f8 + TRCIDR6 + 0x00000000 + + + TRCIDR6 + [31:0] + read-write + + + + + TRCIDR7 + 0x000411fc + TRCIDR7 + 0x00000000 + + + TRCIDR7 + [31:0] + read-write + + + + + TRCRSCTLR2 + 0x00041208 + The TRCRSCTLR controls the trace resources + 0x00000000 + + + PAIRINV + Inverts the result of a combined pair of resources. This bit is only implemented on the lower register for a pair of resource selectors + [21:21] + read-write + + + INV + Inverts the selected resources + [20:20] + read-write + + + GROUP + Selects a group of resource + [18:16] + read-write + + + SELECT + Selects one or more resources from the wanted group. One bit is provided per resource from the group + [7:0] + read-write + + + + + TRCRSCTLR3 + 0x0004120c + The TRCRSCTLR controls the trace resources + 0x00000000 + + + PAIRINV + Inverts the result of a combined pair of resources. This bit is only implemented on the lower register for a pair of resource selectors + [21:21] + read-write + + + INV + Inverts the selected resources + [20:20] + read-write + + + GROUP + Selects a group of resource + [18:16] + read-write + + + SELECT + Selects one or more resources from the wanted group. One bit is provided per resource from the group + [7:0] + read-write + + + + + TRCSSCSR + 0x000412a0 + Controls the corresponding single-shot comparator resource + 0x00000000 + + + STATUS + Single-shot status bit. Indicates if any of the comparators, that TRCSSCCRn.SAC or TRCSSCCRn.ARC selects, have matched + [31:31] + read-write + + + PC + Reserved, RES1 + [3:3] + read-only + + + DV + Reserved, RES0 + [2:2] + read-only + + + DA + Reserved, RES0 + [1:1] + read-only + + + INST + Reserved, RES0 + [0:0] + read-only + + + + + TRCSSPCICR + 0x000412c0 + Selects the PE comparator inputs for Single-shot control + 0x00000000 + + + PC + 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 + [3:0] + read-write + + + + + TRCPDCR + 0x00041310 + Requests the system to provide power to the trace unit + 0x00000000 + + + PU + Powerup request bit: + [3:3] + read-write + + + + + TRCPDSR + 0x00041314 + Returns the following information about the trace unit: - OS Lock status. - Core power domain status. - Power interruption status + 0x00000003 + + + OSLK + OS Lock status bit: + [5:5] + read-only + + + STICKYPD + Sticky powerdown status bit. Indicates whether the trace register state is valid: + [1:1] + read-only + + + POWER + Power status bit: + [0:0] + read-only + + + + + TRCITATBIDR + 0x00041ee4 + Trace Integration ATB Identification Register + 0x00000000 + + + ID + Trace ID + [6:0] + read-write + + + + + TRCITIATBINR + 0x00041ef4 + Trace Integration Instruction ATB In Register + 0x00000000 + + + AFVALIDM + Integration Mode instruction AFVALIDM in + [1:1] + read-write + + + ATREADYM + Integration Mode instruction ATREADYM in + [0:0] + read-write + + + + + TRCITIATBOUTR + 0x00041efc + Trace Integration Instruction ATB Out Register + 0x00000000 + + + AFREADY + Integration Mode instruction AFREADY out + [1:1] + read-write + + + ATVALID + Integration Mode instruction ATVALID out + [0:0] + read-write + + + + + TRCCLAIMSET + 0x00041fa0 + Claim Tag Set Register + 0x0000000f + + + SET3 + When a write to one of these bits occurs, with the value: + [3:3] + read-write + + + SET2 + When a write to one of these bits occurs, with the value: + [2:2] + read-write + + + SET1 + When a write to one of these bits occurs, with the value: + [1:1] + read-write + + + SET0 + When a write to one of these bits occurs, with the value: + [0:0] + read-write + + + + + TRCCLAIMCLR + 0x00041fa4 + Claim Tag Clear Register + 0x00000000 + + + CLR3 + When a write to one of these bits occurs, with the value: + [3:3] + read-write + + + CLR2 + When a write to one of these bits occurs, with the value: + [2:2] + read-write + + + CLR1 + When a write to one of these bits occurs, with the value: + [1:1] + read-write + + + CLR0 + When a write to one of these bits occurs, with the value: + [0:0] + read-write + + + + + TRCAUTHSTATUS + 0x00041fb8 + Returns the level of tracing that the trace unit can support + 0x00000000 + + + SNID + Indicates whether the system enables the trace unit to support Secure non-invasive debug: + [7:6] + read-only + + + SID + Indicates whether the trace unit supports Secure invasive debug: + [5:4] + read-only + + + NSNID + Indicates whether the system enables the trace unit to support Non-secure non-invasive debug: + [3:2] + read-only + + + NSID + Indicates whether the trace unit supports Non-secure invasive debug: + [1:0] + read-only + + + + + TRCDEVARCH + 0x00041fbc + TRCDEVARCH + 0x47724a13 + + + ARCHITECT + reads as 0b01000111011 + [31:21] + read-only + + + PRESENT + reads as 0b1 + [20:20] + read-only + + + REVISION + reads as 0b0000 + [19:16] + read-only + + + ARCHID + reads as 0b0100101000010011 + [15:0] + read-only + + + + + TRCDEVID + 0x00041fc8 + TRCDEVID + 0x00000000 + + + TRCDEVID + [31:0] + read-write + + + + + TRCDEVTYPE + 0x00041fcc + TRCDEVTYPE + 0x00000013 + + + SUB + reads as 0b0001 + [7:4] + read-only + + + MAJOR + reads as 0b0011 + [3:0] + read-only + + + + + TRCPIDR4 + 0x00041fd0 + TRCPIDR4 + 0x00000004 + + + SIZE + reads as `ImpDef + [7:4] + read-only + + + DES_2 + reads as `ImpDef + [3:0] + read-only + + + + + TRCPIDR5 + 0x00041fd4 + TRCPIDR5 + 0x00000000 + + + TRCPIDR5 + [31:0] + read-write + + + + + TRCPIDR6 + 0x00041fd8 + TRCPIDR6 + 0x00000000 + + + TRCPIDR6 + [31:0] + read-write + + + + + TRCPIDR7 + 0x00041fdc + TRCPIDR7 + 0x00000000 + + + TRCPIDR7 + [31:0] + read-write + + + + + TRCPIDR0 + 0x00041fe0 + TRCPIDR0 + 0x00000021 + + + PART_0 + reads as `ImpDef + [7:0] + read-only + + + + + TRCPIDR1 + 0x00041fe4 + TRCPIDR1 + 0x000000bd + + + DES_0 + reads as `ImpDef + [7:4] + read-only + + + PART_0 + reads as `ImpDef + [3:0] + read-only + + + + + TRCPIDR2 + 0x00041fe8 + TRCPIDR2 + 0x0000002b + + + REVISION + reads as `ImpDef + [7:4] + read-only + + + JEDEC + reads as 0b1 + [3:3] + read-only + + + DES_0 + reads as `ImpDef + [2:0] + read-only + + + + + TRCPIDR3 + 0x00041fec + TRCPIDR3 + 0x00000000 + + + REVAND + reads as `ImpDef + [7:4] + read-only + + + CMOD + reads as `ImpDef + [3:0] + read-only + + + + + TRCCIDR0 + 0x00041ff0 + TRCCIDR0 + 0x0000000d + + + PRMBL_0 + reads as 0b00001101 + [7:0] + read-only + + + + + TRCCIDR1 + 0x00041ff4 + TRCCIDR1 + 0x00000090 + + + CLASS + reads as 0b1001 + [7:4] + read-only + + + PRMBL_1 + reads as 0b0000 + [3:0] + read-only + + + + + TRCCIDR2 + 0x00041ff8 + TRCCIDR2 + 0x00000005 + + + PRMBL_2 + reads as 0b00000101 + [7:0] + read-only + + + + + TRCCIDR3 + 0x00041ffc + TRCCIDR3 + 0x000000b1 + + + PRMBL_3 + reads as 0b10110001 + [7:0] + read-only + + + + + CTICONTROL + 0x00042000 + CTI Control Register + 0x00000000 + + + GLBEN + Enables or disables the CTI + [0:0] + read-write + + + + + CTIINTACK + 0x00042010 + CTI Interrupt Acknowledge Register + 0x00000000 + + + INTACK + 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. + [7:0] + read-write + + + + + CTIAPPSET + 0x00042014 + CTI Application Trigger Set Register + 0x00000000 + + + APPSET + Setting a bit HIGH generates a channel event for the selected channel. There is one bit of the register for each channel + [3:0] + read-write + + + + + CTIAPPCLEAR + 0x00042018 + CTI Application Trigger Clear Register + 0x00000000 + + + APPCLEAR + Sets the corresponding bits in the CTIAPPSET to 0. There is one bit of the register for each channel. + [3:0] + read-write + + + + + CTIAPPPULSE + 0x0004201c + CTI Application Pulse Register + 0x00000000 + + + APPULSE + Setting a bit HIGH generates a channel event pulse for the selected channel. There is one bit of the register for each channel. + [3:0] + read-write + + + + + CTIINEN0 + 0x00042020 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN1 + 0x00042024 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN2 + 0x00042028 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN3 + 0x0004202c + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN4 + 0x00042030 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN5 + 0x00042034 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN6 + 0x00042038 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIINEN7 + 0x0004203c + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINEN + 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 + [3:0] + read-write + + + + + CTIOUTEN0 + 0x000420a0 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN1 + 0x000420a4 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN2 + 0x000420a8 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN3 + 0x000420ac + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN4 + 0x000420b0 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN5 + 0x000420b4 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN6 + 0x000420b8 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTIOUTEN7 + 0x000420bc + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGOUTEN + 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. + [3:0] + read-write + + + + + CTITRIGINSTATUS + 0x00042130 + CTI Trigger to Channel Enable Registers + 0x00000000 + + + TRIGINSTATUS + 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. + [7:0] + read-only + + + + + CTITRIGOUTSTATUS + 0x00042134 + CTI Trigger In Status Register + 0x00000000 + + + TRIGOUTSTATUS + Shows the status of the ctitrigout outputs. There is one bit of the field for each trigger output. + [7:0] + read-only + + + + + CTICHINSTATUS + 0x00042138 + CTI Channel In Status Register + 0x00000000 + + + CTICHOUTSTATUS + Shows the status of the ctichout outputs. There is one bit of the field for each channel output + [3:0] + read-only + + + + + CTIGATE + 0x00042140 + Enable CTI Channel Gate register + 0x0000000f + + + CTIGATEEN3 + Enable ctichout3. Set to 0 to disable channel propagation. + [3:3] + read-write + + + CTIGATEEN2 + Enable ctichout2. Set to 0 to disable channel propagation. + [2:2] + read-write + + + CTIGATEEN1 + Enable ctichout1. Set to 0 to disable channel propagation. + [1:1] + read-write + + + CTIGATEEN0 + Enable ctichout0. Set to 0 to disable channel propagation. + [0:0] + read-write + + + + + ASICCTL + 0x00042144 + External Multiplexer Control register + 0x00000000 + + + ASICCTL + [31:0] + read-write + + + + + ITCHOUT + 0x00042ee4 + Integration Test Channel Output register + 0x00000000 + + + CTCHOUT + Sets the value of the ctichout outputs + [3:0] + read-write + + + + + ITTRIGOUT + 0x00042ee8 + Integration Test Trigger Output register + 0x00000000 + + + CTTRIGOUT + Sets the value of the ctitrigout outputs + [7:0] + read-write + + + + + ITCHIN + 0x00042ef4 + Integration Test Channel Input register + 0x00000000 + + + CTCHIN + Reads the value of the ctichin inputs. + [3:0] + read-only + + + + + ITCTRL + 0x00042f00 + Integration Mode Control register + 0x00000000 + + + IME + Integration Mode Enable + [0:0] + read-write + + + + + DEVARCH + 0x00042fbc + Device Architecture register + 0x47701a14 + + + ARCHITECT + Indicates the component architect + [31:21] + read-only + + + PRESENT + Indicates whether the DEVARCH register is present + [20:20] + read-only + + + REVISION + Indicates the architecture revision + [19:16] + read-only + + + ARCHID + Indicates the component + [15:0] + read-only + + + + + DEVID + 0x00042fc8 + Device Configuration register + 0x00040800 + + + NUMCH + Number of ECT channels available + [19:16] + read-only + + + NUMTRIG + Number of ECT triggers available. + [15:8] + read-only + + + EXTMUXNUM + 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. + [4:0] + read-only + + + + + DEVTYPE + 0x00042fcc + Device Type Identifier register + 0x00000014 + + + SUB + 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. + [7:4] + read-only + + + MAJOR + Major classification of the type of the debug component as specified in the ARM Architecture Specification for this debug and trace component. + [3:0] + read-only + + + + + PIDR4 + 0x00042fd0 + CoreSight Peripheral ID4 + 0x00000004 + + + SIZE + Always 0b0000. Indicates that the device only occupies 4KB of memory + [7:4] + read-only + + + DES_2 + Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component. + [3:0] + read-only + + + + + PIDR5 + 0x00042fd4 + CoreSight Peripheral ID5 + 0x00000000 + + + PIDR5 + [31:0] + read-write + + + + + PIDR6 + 0x00042fd8 + CoreSight Peripheral ID6 + 0x00000000 + + + PIDR6 + [31:0] + read-write + + + + + PIDR7 + 0x00042fdc + CoreSight Peripheral ID7 + 0x00000000 + + + PIDR7 + [31:0] + read-write + + + + + PIDR0 + 0x00042fe0 + CoreSight Peripheral ID0 + 0x00000021 + + + PART_0 + Bits[7:0] of the 12-bit part number of the component. The designer of the component assigns this part number. + [7:0] + read-only + + + + + PIDR1 + 0x00042fe4 + CoreSight Peripheral ID1 + 0x000000bd + + + DES_0 + Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component. + [7:4] + read-only + + + PART_1 + Bits[11:8] of the 12-bit part number of the component. The designer of the component assigns this part number. + [3:0] + read-only + + + + + PIDR2 + 0x00042fe8 + CoreSight Peripheral ID2 + 0x0000000b + + + REVISION + This device is at r1p0 + [7:4] + read-only + + + JEDEC + Always 1. Indicates that the JEDEC-assigned designer ID is used. + [3:3] + read-only + + + DES_1 + Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component. + [2:0] + read-only + + + + + PIDR3 + 0x00042fec + CoreSight Peripheral ID3 + 0x00000000 + + + REVAND + 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. + [7:4] + read-only + + + CMOD + 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. + [3:0] + read-only + + + + + CIDR0 + 0x00042ff0 + CoreSight Component ID0 + 0x0000000d + + + PRMBL_0 + Preamble[0]. Contains bits[7:0] of the component identification code + [7:0] + read-only + + + + + CIDR1 + 0x00042ff4 + CoreSight Component ID1 + 0x00000090 + + + CLASS + 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. + [7:4] + read-only + + + PRMBL_1 + Preamble[1]. Contains bits[11:8] of the component identification code. + [3:0] + read-only + + + + + CIDR2 + 0x00042ff8 + CoreSight Component ID2 + 0x00000005 + + + PRMBL_2 + Preamble[2]. Contains bits[23:16] of the component identification code. + [7:0] + read-only + + + + + CIDR3 + 0x00042ffc + CoreSight Component ID3 + 0x000000b1 + + + PRMBL_3 + Preamble[3]. Contains bits[31:24] of the component identification code. + [7:0] + read-only + + + + + + + PPB_NS + 0xe0020000 + + + QMI + 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. + 0x400d0000 + + 0 + 84 + registers + + + + DIRECT_CSR + 0x00000000 + 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. + 0x01800000 + + + RXDELAY + Delay the read data sample timing, in units of one half of a system clock cycle. (Not necessarily half of an SCK cycle.) + [31:30] + read-write + + + CLKDIV + 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. + [29:22] + read-write + + + RXLEVEL + Current level of DIRECT_RX FIFO + [20:18] + read-only + + + RXFULL + 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. + [17:17] + read-only + + + RXEMPTY + 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. + [16:16] + read-only + + + TXLEVEL + Current level of DIRECT_TX FIFO + [14:12] + read-only + + + TXEMPTY + 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. + [11:11] + read-only + + + TXFULL + When 1, the DIRECT_TX FIFO is currently full. If the processor tries to write more data, that data will be ignored. + [10:10] + read-only + + + AUTO_CS1N + When 1, automatically assert the CS1n chip select line whenever the BUSY flag is set. + [7:7] + read-write + + + AUTO_CS0N + When 1, automatically assert the CS0n chip select line whenever the BUSY flag is set. + [6:6] + read-write + + + ASSERT_CS1N + When 1, assert (i.e. drive low) the CS1n chip select line. + + Note that this applies even when DIRECT_CSR_EN is 0. + [3:3] + read-write + + + ASSERT_CS0N + When 1, assert (i.e. drive low) the CS0n chip select line. + + Note that this applies even when DIRECT_CSR_EN is 0. + [2:2] + read-write + + + BUSY + 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.) + [1:1] + read-only + + + EN + 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. + [0:0] + read-write + + + + + DIRECT_TX + 0x00000004 + Transmit FIFO for direct mode + 0x00000000 + + + NOPUSH + 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. + [20:20] + write-only + + + OE + 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. + [19:19] + write-only + + + DWIDTH + 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. + [18:18] + write-only + + + IWIDTH + Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely. + [17:16] + write-only + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + DATA + 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. + [15:0] + write-only + + + + + DIRECT_RX + 0x00000008 + Receive FIFO for direct mode + 0x00000000 + + + DIRECT_RX + 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. + [15:0] + read-only + modify + + + + + M0_TIMING + 0x0000000c + Timing configuration register for memory address window 0. + 0x40000004 + + + COOLDOWN + 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. + [31:30] + read-write + + + PAGEBREAK + 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. + [29:28] + read-write + + + NONE + 0 + No page boundary is enforced + + + 256 + 1 + Break bursts crossing a 256-byte page boundary + + + 1024 + 2 + Break bursts crossing a 1024-byte quad-page boundary + + + 4096 + 3 + Break bursts crossing a 4096-byte sector boundary + + + + + SELECT_SETUP + 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. + [25:25] + read-write + + + SELECT_HOLD + 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. + [24:23] + read-write + + + MAX_SELECT + 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. + [22:17] + read-write + + + MIN_DESELECT + 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. + [16:12] + read-write + + + RXDELAY + 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. + [10:8] + read-write + + + CLKDIV + 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. + [7:0] + read-write + + + + + M0_RFMT + 0x00000010 + 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. + 0x00001000 + + + DTR + 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. + [28:28] + read-write + + + DUMMY_LEN + 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) + [18:16] + read-write + + + NONE + 0 + No dummy phase + + + 4 + 1 + 4 dummy bits + + + 8 + 2 + 8 dummy bits + + + 12 + 3 + 12 dummy bits + + + 16 + 4 + 16 dummy bits + + + 20 + 5 + 20 dummy bits + + + 24 + 6 + 24 dummy bits + + + 28 + 7 + 28 dummy bits + + + + + SUFFIX_LEN + 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. + [15:14] + read-write + + + NONE + 0 + No suffix + + + 8 + 2 + 8-bit suffix + + + + + PREFIX_LEN + Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single) + [12:12] + read-write + + + NONE + 0 + No prefix + + + 8 + 1 + 8-bit prefix + + + + + DATA_WIDTH + The width used for the data transfer + [9:8] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + DUMMY_WIDTH + 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. + [7:6] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + SUFFIX_WIDTH + The width used for the post-address command suffix, if any + [5:4] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + ADDR_WIDTH + The transfer width used for the address. The address phase always transfers 24 bits in total. + [3:2] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + PREFIX_WIDTH + The transfer width used for the command prefix, if any + [1:0] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + + + M0_RCMD + 0x00000014 + 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. + 0x0000a003 + + + SUFFIX + The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero. + [15:8] + read-write + + + PREFIX + The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero. + [7:0] + read-write + + + + + M0_WFMT + 0x00000018 + 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. + 0x00001000 + + + DTR + 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. + [28:28] + read-write + + + DUMMY_LEN + 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) + [18:16] + read-write + + + NONE + 0 + No dummy phase + + + 4 + 1 + 4 dummy bits + + + 8 + 2 + 8 dummy bits + + + 12 + 3 + 12 dummy bits + + + 16 + 4 + 16 dummy bits + + + 20 + 5 + 20 dummy bits + + + 24 + 6 + 24 dummy bits + + + 28 + 7 + 28 dummy bits + + + + + SUFFIX_LEN + 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. + [15:14] + read-write + + + NONE + 0 + No suffix + + + 8 + 2 + 8-bit suffix + + + + + PREFIX_LEN + Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single) + [12:12] + read-write + + + NONE + 0 + No prefix + + + 8 + 1 + 8-bit prefix + + + + + DATA_WIDTH + The width used for the data transfer + [9:8] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + DUMMY_WIDTH + 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. + [7:6] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + SUFFIX_WIDTH + The width used for the post-address command suffix, if any + [5:4] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + ADDR_WIDTH + The transfer width used for the address. The address phase always transfers 24 bits in total. + [3:2] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + PREFIX_WIDTH + The transfer width used for the command prefix, if any + [1:0] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + + + M0_WCMD + 0x0000001c + 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. + 0x0000a002 + + + SUFFIX + The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero. + [15:8] + read-write + + + PREFIX + The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero. + [7:0] + read-write + + + + + M1_TIMING + 0x00000020 + Timing configuration register for memory address window 1. + 0x40000004 + + + COOLDOWN + 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. + [31:30] + read-write + + + PAGEBREAK + 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. + [29:28] + read-write + + + NONE + 0 + No page boundary is enforced + + + 256 + 1 + Break bursts crossing a 256-byte page boundary + + + 1024 + 2 + Break bursts crossing a 1024-byte quad-page boundary + + + 4096 + 3 + Break bursts crossing a 4096-byte sector boundary + + + + + SELECT_SETUP + 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. + [25:25] + read-write + + + SELECT_HOLD + 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. + [24:23] + read-write + + + MAX_SELECT + 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. + [22:17] + read-write + + + MIN_DESELECT + 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. + [16:12] + read-write + + + RXDELAY + 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. + [10:8] + read-write + + + CLKDIV + 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. + [7:0] + read-write + + + + + M1_RFMT + 0x00000024 + 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. + 0x00001000 + + + DTR + 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. + [28:28] + read-write + + + DUMMY_LEN + 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) + [18:16] + read-write + + + NONE + 0 + No dummy phase + + + 4 + 1 + 4 dummy bits + + + 8 + 2 + 8 dummy bits + + + 12 + 3 + 12 dummy bits + + + 16 + 4 + 16 dummy bits + + + 20 + 5 + 20 dummy bits + + + 24 + 6 + 24 dummy bits + + + 28 + 7 + 28 dummy bits + + + + + SUFFIX_LEN + 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. + [15:14] + read-write + + + NONE + 0 + No suffix + + + 8 + 2 + 8-bit suffix + + + + + PREFIX_LEN + Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single) + [12:12] + read-write + + + NONE + 0 + No prefix + + + 8 + 1 + 8-bit prefix + + + + + DATA_WIDTH + The width used for the data transfer + [9:8] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + DUMMY_WIDTH + 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. + [7:6] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + SUFFIX_WIDTH + The width used for the post-address command suffix, if any + [5:4] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + ADDR_WIDTH + The transfer width used for the address. The address phase always transfers 24 bits in total. + [3:2] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + PREFIX_WIDTH + The transfer width used for the command prefix, if any + [1:0] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + + + M1_RCMD + 0x00000028 + 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. + 0x0000a003 + + + SUFFIX + The command suffix bits following the address, if Mx_RFMT_SUFFIX_LEN is nonzero. + [15:8] + read-write + + + PREFIX + The command prefix bits to prepend on each new transfer, if Mx_RFMT_PREFIX_LEN is nonzero. + [7:0] + read-write + + + + + M1_WFMT + 0x0000002c + 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. + 0x00001000 + + + DTR + 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. + [28:28] + read-write + + + DUMMY_LEN + 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) + [18:16] + read-write + + + NONE + 0 + No dummy phase + + + 4 + 1 + 4 dummy bits + + + 8 + 2 + 8 dummy bits + + + 12 + 3 + 12 dummy bits + + + 16 + 4 + 16 dummy bits + + + 20 + 5 + 20 dummy bits + + + 24 + 6 + 24 dummy bits + + + 28 + 7 + 28 dummy bits + + + + + SUFFIX_LEN + 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. + [15:14] + read-write + + + NONE + 0 + No suffix + + + 8 + 2 + 8-bit suffix + + + + + PREFIX_LEN + Length of command prefix, in units of 8 bits. (i.e. 2 cycles for quad width, 4 for dual, 8 for single) + [12:12] + read-write + + + NONE + 0 + No prefix + + + 8 + 1 + 8-bit prefix + + + + + DATA_WIDTH + The width used for the data transfer + [9:8] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + DUMMY_WIDTH + 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. + [7:6] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + SUFFIX_WIDTH + The width used for the post-address command suffix, if any + [5:4] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + ADDR_WIDTH + The transfer width used for the address. The address phase always transfers 24 bits in total. + [3:2] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + PREFIX_WIDTH + The transfer width used for the command prefix, if any + [1:0] + read-write + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + + + M1_WCMD + 0x00000030 + 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. + 0x0000a002 + + + SUFFIX + The command suffix bits following the address, if Mx_WFMT_SUFFIX_LEN is nonzero. + [15:8] + read-write + + + PREFIX + The command prefix bits to prepend on each new transfer, if Mx_WFMT_PREFIX_LEN is nonzero. + [7:0] + read-write + + + + + ATRANS0 + 0x00000034 + 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. + 0x04000000 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS1 + 0x00000038 + 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. + 0x04000400 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS2 + 0x0000003c + 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. + 0x04000800 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS3 + 0x00000040 + 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. + 0x04000c00 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS4 + 0x00000044 + 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. + 0x04000000 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS5 + 0x00000048 + 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. + 0x04000400 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS6 + 0x0000004c + 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. + 0x04000800 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + ATRANS7 + 0x00000050 + 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. + 0x04000c00 + + + SIZE + 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. + [26:16] + read-write + + + BASE + 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. + [11:0] + read-write + + + + + + + XIP_CTRL + QSPI flash execute-in-place block + 0x400c8000 + + 0 + 32 + registers + + + + CTRL + 0x00000000 + Cache control register. Read-only from a Non-secure context. + 0x00000083 + + + WRITABLE_M1 + 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. + [11:11] + read-write + + + WRITABLE_M0 + 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. + [10:10] + read-write + + + SPLIT_WAYS + 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. + [9:9] + read-write + + + MAINT_NONSEC + 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. + [8:8] + read-write + + + NO_UNTRANSLATED_NONSEC + When 1, Non-secure accesses to the uncached, untranslated window (addr[27:26] == 3) will generate a bus error. + [7:7] + read-write + + + NO_UNTRANSLATED_SEC + When 1, Secure accesses to the uncached, untranslated window (addr[27:26] == 3) will generate a bus error. + [6:6] + read-write + + + NO_UNCACHED_NONSEC + 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. + [5:5] + read-write + + + NO_UNCACHED_SEC + 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. + [4:4] + read-write + + + POWER_DOWN + 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. + [3:3] + read-write + + + EN_NONSECURE + 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. + [1:1] + read-write + + + EN_SECURE + 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. + [0:0] + read-write + + + + + STAT + 0x00000008 + 0x00000002 + + + FIFO_FULL + 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. + [2:2] + read-only + + + FIFO_EMPTY + When 1, indicates the XIP streaming FIFO is completely empty. + [1:1] + read-only + + + + + CTR_HIT + 0x0000000c + Cache Hit counter + 0x00000000 + + + CTR_HIT + 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. + [31:0] + read-write + oneToClear + + + + + CTR_ACC + 0x00000010 + Cache Access counter + 0x00000000 + + + CTR_ACC + 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. + [31:0] + read-write + oneToClear + + + + + STREAM_ADDR + 0x00000014 + FIFO stream address + 0x00000000 + + + STREAM_ADDR + 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. + [31:2] + read-write + + + + + STREAM_CTR + 0x00000018 + FIFO stream control + 0x00000000 + + + STREAM_CTR + 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) + [21:0] + read-write + + + + + STREAM_FIFO + 0x0000001c + FIFO stream data + 0x00000000 + + + STREAM_FIFO + 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. + [31:0] + read-only + modify + + + + + + + XIP_AUX + Auxiliary DMA access to XIP FIFOs, via fast AHB bus access + 0x50500000 + + 0 + 12 + registers + + + + STREAM + 0x00000000 + Read the XIP stream FIFO (fast bus access to XIP_CTRL_STREAM_FIFO) + 0x00000000 + + + STREAM + [31:0] + read-only + modify + + + + + QMI_DIRECT_TX + 0x00000004 + Write to the QMI direct-mode TX FIFO (fast bus access to QMI_DIRECT_TX) + 0x00000000 + + + NOPUSH + 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. + [20:20] + write-only + + + OE + 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. + [19:19] + write-only + + + DWIDTH + 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. + [18:18] + write-only + + + IWIDTH + Configure whether this FIFO record is transferred with single/dual/quad interface width (0/1/2). Different widths can be mixed freely. + [17:16] + write-only + + + S + 0 + Single width + + + D + 1 + Dual width + + + Q + 2 + Quad width + + + + + DATA + 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. + [15:0] + write-only + + + + + QMI_DIRECT_RX + 0x00000008 + Read from the QMI direct-mode RX FIFO (fast bus access to QMI_DIRECT_RX) + 0x00000000 + + + QMI_DIRECT_RX + 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. + [15:0] + read-only + modify + + + + + + + SYSCFG + Register block for various chip control signals + 0x40008000 + + 0 + 24 + registers + + + + PROC_CONFIG + 0x00000000 + Configuration for processors + 0x00000000 + + + PROC1_HALTED + Indication that proc1 has halted + [1:1] + read-only + + + PROC0_HALTED + Indication that proc0 has halted + [0:0] + read-only + + + + + PROC_IN_SYNC_BYPASS + 0x00000004 + 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. + 0x00000000 + + + GPIO + [31:0] + read-write + + + + + PROC_IN_SYNC_BYPASS_HI + 0x00000008 + 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 + 0x00000000 + + + QSPI_SD + [31:28] + read-write + + + QSPI_CSN + [27:27] + read-write + + + QSPI_SCK + [26:26] + read-write + + + USB_DM + [25:25] + read-write + + + USB_DP + [24:24] + read-write + + + GPIO + [15:0] + read-write + + + + + DBGFORCE + 0x0000000c + Directly control the chip SWD debug port + 0x00000006 + + + ATTACH + Attach chip debug port to syscfg controls, and disconnect it from external SWD pads. + [3:3] + read-write + + + SWCLK + Directly drive SWCLK, if ATTACH is set + [2:2] + read-write + + + SWDI + Directly drive SWDIO input, if ATTACH is set + [1:1] + read-write + + + SWDO + Observe the value of SWDIO output. + [0:0] + read-only + + + + + MEMPOWERDOWN + 0x00000010 + 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 + 0x00000000 + + + BOOTRAM + [12:12] + read-write + + + ROM + [11:11] + read-write + + + USB + [10:10] + read-write + + + SRAM9 + [9:9] + read-write + + + SRAM8 + [8:8] + read-write + + + SRAM7 + [7:7] + read-write + + + SRAM6 + [6:6] + read-write + + + SRAM5 + [5:5] + read-write + + + SRAM4 + [4:4] + read-write + + + SRAM3 + [3:3] + read-write + + + SRAM2 + [2:2] + read-write + + + SRAM1 + [1:1] + read-write + + + SRAM0 + [0:0] + read-write + + + + + AUXCTRL + 0x00000014 + Auxiliary system control register + 0x00000000 + + + AUXCTRL + * 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. + [7:0] + read-write + + + + + + + XOSC + Controls the crystal oscillator + 0x40048000 + + 0 + 20 + registers + + + + CTRL + 0x00000000 + Crystal Oscillator Control + 0x00000000 + + + ENABLE + 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 + [23:12] + read-write + + + DISABLE + 3358 + + + ENABLE + 4011 + + + + + FREQ_RANGE + 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 + [11:0] + read-write + + + 1_15MHZ + 2720 + + + 10_30MHZ + 2721 + + + 25_60MHZ + 2722 + + + 40_100MHZ + 2723 + + + + + + + STATUS + 0x00000004 + Crystal Oscillator Status + 0x00000000 + + + STABLE + Oscillator is running and stable + [31:31] + read-only + + + BADWRITE + An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT + [24:24] + read-write + oneToClear + + + ENABLED + Oscillator is enabled but not necessarily running and stable, resets to 0 + [12:12] + read-only + + + FREQ_RANGE + The current frequency range setting + [1:0] + read-only + + + 1_15MHZ + 0 + + + 10_30MHZ + 1 + + + 25_60MHZ + 2 + + + 40_100MHZ + 3 + + + + + + + DORMANT + 0x00000008 + Crystal Oscillator pause control + 0x00000000 + + + DORMANT + 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 + [31:0] + read-write + + + dormant + 1668246881 + + + WAKE + 2002873189 + + + + + + + STARTUP + 0x0000000c + Controls the startup delay + 0x00000000 + + + X4 + 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. + [20:20] + read-write + + + DELAY + in multiples of 256*xtal_period. The reset value of 0xc4 corresponds to approx 50 000 cycles. + [13:0] + read-write + + + + + COUNT + 0x00000010 + 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. + 0x00000000 + + + COUNT + [15:0] + read-write + + + + + + + PLL_SYS + 0x40050000 + + 0 + 32 + registers + + + PLL_SYS_IRQ + 42 + + + + CS + 0x00000000 + Control and Status + GENERAL CONSTRAINTS: + Reference clock frequency min=5MHz, max=800MHz + Feedback divider min=16, max=320 + VCO frequency min=750MHz, max=1600MHz + 0x00000001 + + + LOCK + PLL is locked + [31:31] + read-only + + + LOCK_N + PLL is not locked + Ideally this is cleared when PLL lock is seen and this should never normally be set + [30:30] + read-write + oneToClear + + + BYPASS + 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. + [8:8] + read-write + + + REFDIV + 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. + [5:0] + read-write + + + + + PWR + 0x00000004 + Controls the PLL power modes. + 0x0000002d + + + VCOPD + PLL VCO powerdown + To save power set high when PLL output not required or bypass=1. + [5:5] + read-write + + + POSTDIVPD + PLL post divider powerdown + To save power set high when PLL output not required or bypass=1. + [3:3] + read-write + + + DSMPD + PLL DSM powerdown + Nothing is achieved by setting this low. + [2:2] + read-write + + + PD + PLL powerdown + To save power set high when PLL output not required. + [0:0] + read-write + + + + + FBDIV_INT + 0x00000008 + Feedback divisor + (note: this PLL does not support fractional division) + 0x00000000 + + + FBDIV_INT + see ctrl reg description for constraints + [11:0] + read-write + + + + + PRIM + 0x0000000c + 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 + 0x00077000 + + + POSTDIV1 + divide by 1-7 + [18:16] + read-write + + + POSTDIV2 + divide by 1-7 + [14:12] + read-write + + + + + INTR + 0x00000010 + Raw Interrupts + 0x00000000 + + + LOCK_N_STICKY + [0:0] + read-write + oneToClear + + + + + INTE + 0x00000014 + Interrupt Enable + 0x00000000 + + + LOCK_N_STICKY + [0:0] + read-write + + + + + INTF + 0x00000018 + Interrupt Force + 0x00000000 + + + LOCK_N_STICKY + [0:0] + read-write + + + + + INTS + 0x0000001c + Interrupt status after masking & forcing + 0x00000000 + + + LOCK_N_STICKY + [0:0] + read-only + + + + + + + PLL_USB + 0x40058000 + + PLL_USB_IRQ + 43 + + + + ACCESSCTRL + Hardware access control registers + 0x40060000 + + 0 + 236 + registers + + + + LOCK + 0x00000000 + 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. + 0x00000004 + + + DEBUG + [3:3] + read-write + + + DMA + [2:2] + read-only + + + CORE1 + [1:1] + read-write + + + CORE0 + [0:0] + read-write + + + + + FORCE_CORE_NS + 0x00000004 + 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. + 0x00000000 + + + CORE1 + [1:1] + read-write + + + + + CFGRESET + 0x00000008 + 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. + 0x00000000 + + + CFGRESET + [0:0] + write-only + + + + + GPIO_NSMASK0 + 0x0000000c + 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 + 0x00000000 + + + GPIO_NSMASK0 + [31:0] + read-write + + + + + GPIO_NSMASK1 + 0x00000010 + 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. + 0x00000000 + + + QSPI_SD + [31:28] + read-write + + + QSPI_CSN + [27:27] + read-write + + + QSPI_SCK + [26:26] + read-write + + + USB_DM + [25:25] + read-write + + + USB_DP + [24:24] + read-write + + + GPIO + [15:0] + read-write + + + + + ROM + 0x00000014 + 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. + 0x000000ff + + + DBG + If 1, ROM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, ROM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, ROM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, ROM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, ROM can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, ROM can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, ROM can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + XIP_MAIN + 0x00000018 + 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. + 0x000000ff + + + DBG + If 1, XIP_MAIN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, XIP_MAIN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, XIP_MAIN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, XIP_MAIN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, XIP_MAIN can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, XIP_MAIN can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, XIP_MAIN can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM0 + 0x0000001c + 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. + 0x000000ff + + + DBG + If 1, SRAM0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM1 + 0x00000020 + 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. + 0x000000ff + + + DBG + If 1, SRAM1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM2 + 0x00000024 + 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. + 0x000000ff + + + DBG + If 1, SRAM2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM2 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM2 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM2 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM3 + 0x00000028 + 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. + 0x000000ff + + + DBG + If 1, SRAM3 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM3 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM3 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM3 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM3 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM3 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM3 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM4 + 0x0000002c + 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. + 0x000000ff + + + DBG + If 1, SRAM4 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM4 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM4 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM4 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM4 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM4 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM4 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM5 + 0x00000030 + 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. + 0x000000ff + + + DBG + If 1, SRAM5 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM5 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM5 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM5 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM5 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM5 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM5 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM6 + 0x00000034 + 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. + 0x000000ff + + + DBG + If 1, SRAM6 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM6 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM6 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM6 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM6 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM6 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM6 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM7 + 0x00000038 + 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. + 0x000000ff + + + DBG + If 1, SRAM7 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM7 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM7 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM7 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM7 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM7 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM7 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM8 + 0x0000003c + 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. + 0x000000ff + + + DBG + If 1, SRAM8 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM8 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM8 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM8 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM8 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM8 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM8 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SRAM9 + 0x00000040 + 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. + 0x000000ff + + + DBG + If 1, SRAM9 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SRAM9 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SRAM9 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SRAM9 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SRAM9 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SRAM9 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SRAM9 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + DMA + 0x00000044 + 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. + 0x000000fc + + + DBG + If 1, DMA can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, DMA can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, DMA can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, DMA can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, DMA can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, DMA can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, DMA can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + USBCTRL + 0x00000048 + 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. + 0x000000fc + + + DBG + If 1, USBCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, USBCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, USBCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, USBCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, USBCTRL can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, USBCTRL can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, USBCTRL can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PIO0 + 0x0000004c + 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. + 0x000000fc + + + DBG + If 1, PIO0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PIO0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PIO0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PIO0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PIO0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PIO0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PIO0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PIO1 + 0x00000050 + 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. + 0x000000fc + + + DBG + If 1, PIO1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PIO1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PIO1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PIO1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PIO1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PIO1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PIO1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PIO2 + 0x00000054 + 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. + 0x000000fc + + + DBG + If 1, PIO2 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PIO2 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PIO2 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PIO2 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PIO2 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PIO2 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PIO2 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + CORESIGHT_TRACE + 0x00000058 + 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. + 0x000000b8 + + + DBG + If 1, CORESIGHT_TRACE can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, CORESIGHT_TRACE can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, CORESIGHT_TRACE can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, CORESIGHT_TRACE can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, CORESIGHT_TRACE can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, CORESIGHT_TRACE can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, CORESIGHT_TRACE can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + CORESIGHT_PERIPH + 0x0000005c + 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. + 0x000000b8 + + + DBG + If 1, CORESIGHT_PERIPH can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, CORESIGHT_PERIPH can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, CORESIGHT_PERIPH can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, CORESIGHT_PERIPH can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, CORESIGHT_PERIPH can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, CORESIGHT_PERIPH can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, CORESIGHT_PERIPH can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SYSINFO + 0x00000060 + 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. + 0x000000ff + + + DBG + If 1, SYSINFO can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SYSINFO can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SYSINFO can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SYSINFO can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SYSINFO can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SYSINFO can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SYSINFO can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + RESETS + 0x00000064 + 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. + 0x000000fc + + + DBG + If 1, RESETS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, RESETS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, RESETS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, RESETS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, RESETS can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, RESETS can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, RESETS can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + IO_BANK0 + 0x00000068 + 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. + 0x000000fc + + + DBG + If 1, IO_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, IO_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, IO_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, IO_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, IO_BANK0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, IO_BANK0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, IO_BANK0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + IO_BANK1 + 0x0000006c + 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. + 0x000000fc + + + DBG + If 1, IO_BANK1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, IO_BANK1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, IO_BANK1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, IO_BANK1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, IO_BANK1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, IO_BANK1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, IO_BANK1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PADS_BANK0 + 0x00000070 + 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. + 0x000000fc + + + DBG + If 1, PADS_BANK0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PADS_BANK0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PADS_BANK0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PADS_BANK0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PADS_BANK0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PADS_BANK0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PADS_BANK0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PADS_QSPI + 0x00000074 + 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. + 0x000000fc + + + DBG + If 1, PADS_QSPI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PADS_QSPI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PADS_QSPI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PADS_QSPI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PADS_QSPI can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PADS_QSPI can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PADS_QSPI can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + BUSCTRL + 0x00000078 + 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. + 0x000000fc + + + DBG + If 1, BUSCTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, BUSCTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, BUSCTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, BUSCTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, BUSCTRL can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, BUSCTRL can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, BUSCTRL can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + ADC0 + 0x0000007c + 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. + 0x000000fc + + + DBG + If 1, ADC0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, ADC0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, ADC0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, ADC0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, ADC0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, ADC0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, ADC0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + HSTX + 0x00000080 + 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. + 0x000000fc + + + DBG + If 1, HSTX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, HSTX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, HSTX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, HSTX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, HSTX can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, HSTX can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, HSTX can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + I2C0 + 0x00000084 + 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. + 0x000000fc + + + DBG + If 1, I2C0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, I2C0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, I2C0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, I2C0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, I2C0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, I2C0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, I2C0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + I2C1 + 0x00000088 + 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. + 0x000000fc + + + DBG + If 1, I2C1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, I2C1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, I2C1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, I2C1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, I2C1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, I2C1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, I2C1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PWM + 0x0000008c + 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. + 0x000000fc + + + DBG + If 1, PWM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PWM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PWM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PWM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PWM can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PWM can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PWM can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SPI0 + 0x00000090 + 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. + 0x000000fc + + + DBG + If 1, SPI0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SPI0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SPI0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SPI0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SPI0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SPI0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SPI0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SPI1 + 0x00000094 + 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. + 0x000000fc + + + DBG + If 1, SPI1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SPI1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SPI1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SPI1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SPI1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SPI1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SPI1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + TIMER0 + 0x00000098 + 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. + 0x000000fc + + + DBG + If 1, TIMER0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, TIMER0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, TIMER0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, TIMER0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, TIMER0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, TIMER0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, TIMER0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + TIMER1 + 0x0000009c + 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. + 0x000000fc + + + DBG + If 1, TIMER1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, TIMER1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, TIMER1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, TIMER1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, TIMER1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, TIMER1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, TIMER1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + UART0 + 0x000000a0 + 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. + 0x000000fc + + + DBG + If 1, UART0 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, UART0 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, UART0 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, UART0 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, UART0 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, UART0 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, UART0 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + UART1 + 0x000000a4 + 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. + 0x000000fc + + + DBG + If 1, UART1 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, UART1 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, UART1 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, UART1 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, UART1 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, UART1 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, UART1 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + OTP + 0x000000a8 + 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. + 0x000000fc + + + DBG + If 1, OTP can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, OTP can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, OTP can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, OTP can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, OTP can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, OTP can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, OTP can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + TBMAN + 0x000000ac + 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. + 0x000000fc + + + DBG + If 1, TBMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, TBMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, TBMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, TBMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, TBMAN can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, TBMAN can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, TBMAN can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + POWMAN + 0x000000b0 + 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. + 0x000000b8 + + + DBG + If 1, POWMAN can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, POWMAN can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, POWMAN can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, POWMAN can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, POWMAN can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, POWMAN can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, POWMAN can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + TRNG + 0x000000b4 + 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. + 0x000000b8 + + + DBG + If 1, TRNG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, TRNG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, TRNG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, TRNG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, TRNG can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, TRNG can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, TRNG can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SHA256 + 0x000000b8 + 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. + 0x000000f8 + + + DBG + If 1, SHA256 can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SHA256 can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SHA256 can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SHA256 can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SHA256 can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SHA256 can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SHA256 can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + SYSCFG + 0x000000bc + 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. + 0x000000b8 + + + DBG + If 1, SYSCFG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, SYSCFG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, SYSCFG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, SYSCFG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, SYSCFG can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, SYSCFG can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, SYSCFG can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + CLOCKS + 0x000000c0 + 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. + 0x000000b8 + + + DBG + If 1, CLOCKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, CLOCKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, CLOCKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, CLOCKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, CLOCKS can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, CLOCKS can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, CLOCKS can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + XOSC + 0x000000c4 + 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. + 0x000000b8 + + + DBG + If 1, XOSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, XOSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, XOSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, XOSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, XOSC can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, XOSC can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, XOSC can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + ROSC + 0x000000c8 + 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. + 0x000000b8 + + + DBG + If 1, ROSC can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, ROSC can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, ROSC can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, ROSC can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, ROSC can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, ROSC can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, ROSC can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PLL_SYS + 0x000000cc + 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. + 0x000000b8 + + + DBG + If 1, PLL_SYS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PLL_SYS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PLL_SYS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PLL_SYS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PLL_SYS can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PLL_SYS can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PLL_SYS can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + PLL_USB + 0x000000d0 + 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. + 0x000000b8 + + + DBG + If 1, PLL_USB can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, PLL_USB can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, PLL_USB can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, PLL_USB can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, PLL_USB can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, PLL_USB can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, PLL_USB can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + TICKS + 0x000000d4 + 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. + 0x000000b8 + + + DBG + If 1, TICKS can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, TICKS can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, TICKS can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, TICKS can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, TICKS can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, TICKS can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, TICKS can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + WATCHDOG + 0x000000d8 + 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. + 0x000000b8 + + + DBG + If 1, WATCHDOG can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, WATCHDOG can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, WATCHDOG can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, WATCHDOG can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, WATCHDOG can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, WATCHDOG can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, WATCHDOG can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + RSM + 0x000000dc + 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. + 0x000000b8 + + + DBG + If 1, RSM can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, RSM can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, RSM can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, RSM can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, RSM can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, RSM can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, RSM can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + XIP_CTRL + 0x000000e0 + 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. + 0x000000b8 + + + DBG + If 1, XIP_CTRL can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, XIP_CTRL can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, XIP_CTRL can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, XIP_CTRL can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, XIP_CTRL can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, XIP_CTRL can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, XIP_CTRL can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + XIP_QMI + 0x000000e4 + 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. + 0x000000b8 + + + DBG + If 1, XIP_QMI can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, XIP_QMI can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, XIP_QMI can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, XIP_QMI can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, XIP_QMI can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, XIP_QMI can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, XIP_QMI can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + XIP_AUX + 0x000000e8 + 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. + 0x000000f8 + + + DBG + If 1, XIP_AUX can be accessed by the debugger, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [7:7] + read-write + + + DMA + If 1, XIP_AUX can be accessed by the DMA, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [6:6] + read-write + + + CORE1 + If 1, XIP_AUX can be accessed by core 1, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [5:5] + read-write + + + CORE0 + If 1, XIP_AUX can be accessed by core 0, at security/privilege levels permitted by SP/NSP/SU/NSU in this register. + [4:4] + read-write + + + SP + If 1, XIP_AUX can be accessed from a Secure, Privileged context. + [3:3] + read-write + + + SU + If 1, and SP is also set, XIP_AUX can be accessed from a Secure, Unprivileged context. + [2:2] + read-write + + + NSP + If 1, XIP_AUX can be accessed from a Non-secure, Privileged context. + [1:1] + read-write + + + NSU + 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. + [0:0] + read-write + + + + + + + UART0 + 0x40070000 + + 0 + 4096 + registers + + + UART0_IRQ + 33 + + + + UARTDR + 0x00000000 + Data Register, UARTDR + 0x00000000 + + + OE + 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. + [11:11] + read-only + + + BE + 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. + [10:10] + read-only + + + PE + 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. + [9:9] + read-only + + + FE + 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. + [8:8] + read-only + + + DATA + Receive (read) data character. Transmit (write) data character. + [7:0] + read-write + modify + + + + + UARTRSR + 0x00000004 + Receive Status Register/Error Clear Register, UARTRSR/UARTECR + 0x00000000 + + + OE + 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. + [3:3] + read-write + oneToClear + + + BE + 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. + [2:2] + read-write + oneToClear + + + PE + 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. + [1:1] + read-write + oneToClear + + + FE + 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. + [0:0] + read-write + oneToClear + + + + + UARTFR + 0x00000018 + Flag Register, UARTFR + 0x00000090 + + + RI + 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. + [8:8] + read-only + + + TXFE + 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. + [7:7] + read-only + + + RXFF + 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. + [6:6] + read-only + + + TXFF + 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. + [5:5] + read-only + + + RXFE + 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. + [4:4] + read-only + + + BUSY + 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. + [3:3] + read-only + + + DCD + 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. + [2:2] + read-only + + + DSR + 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. + [1:1] + read-only + + + CTS + 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. + [0:0] + read-only + + + + + UARTILPR + 0x00000020 + IrDA Low-Power Counter Register, UARTILPR + 0x00000000 + + + ILPDVSR + 8-bit low-power divisor value. These bits are cleared to 0 at reset. + [7:0] + read-write + + + + + UARTIBRD + 0x00000024 + Integer Baud Rate Register, UARTIBRD + 0x00000000 + + + BAUD_DIVINT + The integer baud rate divisor. These bits are cleared to 0 on reset. + [15:0] + read-write + + + + + UARTFBRD + 0x00000028 + Fractional Baud Rate Register, UARTFBRD + 0x00000000 + + + BAUD_DIVFRAC + The fractional baud rate divisor. These bits are cleared to 0 on reset. + [5:0] + read-write + + + + + UARTLCR_H + 0x0000002c + Line Control Register, UARTLCR_H + 0x00000000 + + + SPS + 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. + [7:7] + read-write + + + WLEN + 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. + [6:5] + read-write + + + FEN + 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). + [4:4] + read-write + + + STP2 + 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. + [3:3] + read-write + + + EPS + 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. + [2:2] + read-write + + + PEN + Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled. + [1:1] + read-write + + + BRK + 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. + [0:0] + read-write + + + + + UARTCR + 0x00000030 + Control Register, UARTCR + 0x00000300 + + + CTSEN + 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. + [15:15] + read-write + + + RTSEN + 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. + [14:14] + read-write + + + OUT2 + 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). + [13:13] + read-write + + + OUT1 + 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). + [12:12] + read-write + + + RTS + 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. + [11:11] + read-write + + + DTR + 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. + [10:10] + read-write + + + RXE + 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. + [9:9] + read-write + + + TXE + 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. + [8:8] + read-write + + + LBE + 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. + [7:7] + read-write + + + SIRLP + 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. + [2:2] + read-write + + + SIREN + 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. + [1:1] + read-write + + + UARTEN + 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. + [0:0] + read-write + + + + + UARTIFLS + 0x00000034 + Interrupt FIFO Level Select Register, UARTIFLS + 0x00000012 + + + RXIFLSEL + 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. + [5:3] + read-write + + + TXIFLSEL + 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. + [2:0] + read-write + + + + + UARTIMSC + 0x00000038 + Interrupt Mask Set/Clear Register, UARTIMSC + 0x00000000 + + + OEIM + 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. + [10:10] + read-write + + + BEIM + 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. + [9:9] + read-write + + + PEIM + 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. + [8:8] + read-write + + + FEIM + 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. + [7:7] + read-write + + + RTIM + 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. + [6:6] + read-write + + + TXIM + 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. + [5:5] + read-write + + + RXIM + 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. + [4:4] + read-write + + + DSRMIM + 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. + [3:3] + read-write + + + DCDMIM + 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. + [2:2] + read-write + + + CTSMIM + 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. + [1:1] + read-write + + + RIMIM + 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. + [0:0] + read-write + + + + + UARTRIS + 0x0000003c + Raw Interrupt Status Register, UARTRIS + 0x00000000 + + + OERIS + Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt. + [10:10] + read-only + + + BERIS + Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt. + [9:9] + read-only + + + PERIS + Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt. + [8:8] + read-only + + + FERIS + Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt. + [7:7] + read-only + + + RTRIS + Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a + [6:6] + read-only + + + TXRIS + Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt. + [5:5] + read-only + + + RXRIS + Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt. + [4:4] + read-only + + + DSRRMIS + nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt. + [3:3] + read-only + + + DCDRMIS + nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt. + [2:2] + read-only + + + CTSRMIS + nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt. + [1:1] + read-only + + + RIRMIS + nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt. + [0:0] + read-only + + + + + UARTMIS + 0x00000040 + Masked Interrupt Status Register, UARTMIS + 0x00000000 + + + OEMIS + Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt. + [10:10] + read-only + + + BEMIS + Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt. + [9:9] + read-only + + + PEMIS + Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt. + [8:8] + read-only + + + FEMIS + Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt. + [7:7] + read-only + + + RTMIS + Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt. + [6:6] + read-only + + + TXMIS + Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt. + [5:5] + read-only + + + RXMIS + Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt. + [4:4] + read-only + + + DSRMMIS + nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt. + [3:3] + read-only + + + DCDMMIS + nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt. + [2:2] + read-only + + + CTSMMIS + nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt. + [1:1] + read-only + + + RIMMIS + nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt. + [0:0] + read-only + + + + + UARTICR + 0x00000044 + Interrupt Clear Register, UARTICR + 0x00000000 + + + OEIC + Overrun error interrupt clear. Clears the UARTOEINTR interrupt. + [10:10] + read-write + oneToClear + + + BEIC + Break error interrupt clear. Clears the UARTBEINTR interrupt. + [9:9] + read-write + oneToClear + + + PEIC + Parity error interrupt clear. Clears the UARTPEINTR interrupt. + [8:8] + read-write + oneToClear + + + FEIC + Framing error interrupt clear. Clears the UARTFEINTR interrupt. + [7:7] + read-write + oneToClear + + + RTIC + Receive timeout interrupt clear. Clears the UARTRTINTR interrupt. + [6:6] + read-write + oneToClear + + + TXIC + Transmit interrupt clear. Clears the UARTTXINTR interrupt. + [5:5] + read-write + oneToClear + + + RXIC + Receive interrupt clear. Clears the UARTRXINTR interrupt. + [4:4] + read-write + oneToClear + + + DSRMIC + nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt. + [3:3] + read-write + oneToClear + + + DCDMIC + nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt. + [2:2] + read-write + oneToClear + + + CTSMIC + nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt. + [1:1] + read-write + oneToClear + + + RIMIC + nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt. + [0:0] + read-write + oneToClear + + + + + UARTDMACR + 0x00000048 + DMA Control Register, UARTDMACR + 0x00000000 + + + DMAONERR + 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. + [2:2] + read-write + + + TXDMAE + Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. + [1:1] + read-write + + + RXDMAE + Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled. + [0:0] + read-write + + + + + UARTPERIPHID0 + 0x00000fe0 + UARTPeriphID0 Register + 0x00000011 + + + PARTNUMBER0 + These bits read back as 0x11 + [7:0] + read-only + + + + + UARTPERIPHID1 + 0x00000fe4 + UARTPeriphID1 Register + 0x00000010 + + + DESIGNER0 + These bits read back as 0x1 + [7:4] + read-only + + + PARTNUMBER1 + These bits read back as 0x0 + [3:0] + read-only + + + + + UARTPERIPHID2 + 0x00000fe8 + UARTPeriphID2 Register + 0x00000034 + + + REVISION + This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3 + [7:4] + read-only + + + DESIGNER1 + These bits read back as 0x4 + [3:0] + read-only + + + + + UARTPERIPHID3 + 0x00000fec + UARTPeriphID3 Register + 0x00000000 + + + CONFIGURATION + These bits read back as 0x00 + [7:0] + read-only + + + + + UARTPCELLID0 + 0x00000ff0 + UARTPCellID0 Register + 0x0000000d + + + UARTPCELLID0 + These bits read back as 0x0D + [7:0] + read-only + + + + + UARTPCELLID1 + 0x00000ff4 + UARTPCellID1 Register + 0x000000f0 + + + UARTPCELLID1 + These bits read back as 0xF0 + [7:0] + read-only + + + + + UARTPCELLID2 + 0x00000ff8 + UARTPCellID2 Register + 0x00000005 + + + UARTPCELLID2 + These bits read back as 0x05 + [7:0] + read-only + + + + + UARTPCELLID3 + 0x00000ffc + UARTPCellID3 Register + 0x000000b1 + + + UARTPCELLID3 + These bits read back as 0xB1 + [7:0] + read-only + + + + + + + UART1 + 0x40078000 + + UART1_IRQ + 34 + + + + ROSC + 0x400e8000 + + 0 + 40 + registers + + + + CTRL + 0x00000000 + Ring Oscillator control + 0x00000aa0 + + + ENABLE + 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. + [23:12] + read-write + + + DISABLE + 3358 + + + ENABLE + 4011 + + + + + FREQ_RANGE + 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 + [11:0] + read-write + + + LOW + 4004 + + + MEDIUM + 4005 + + + HIGH + 4007 + + + TOOHIGH + 4006 + + + + + + + FREQA + 0x00000004 + 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 + 0x00000000 + + + PASSWD + Set to 0x9696 to apply the settings + Any other value in this field will set all drive strengths to 0 + [31:16] + read-write + + + PASS + 38550 + + + + + DS3 + Stage 3 drive strength + [14:12] + read-write + + + DS2 + Stage 2 drive strength + [10:8] + read-write + + + DS1_RANDOM + Randomises the stage 1 drive strength + [7:7] + read-write + + + DS1 + Stage 1 drive strength + [6:4] + read-write + + + DS0_RANDOM + Randomises the stage 0 drive strength + [3:3] + read-write + + + DS0 + Stage 0 drive strength + [2:0] + read-write + + + + + FREQB + 0x00000008 + For a detailed description see freqa register + 0x00000000 + + + PASSWD + Set to 0x9696 to apply the settings + Any other value in this field will set all drive strengths to 0 + [31:16] + read-write + + + PASS + 38550 + + + + + DS7 + Stage 7 drive strength + [14:12] + read-write + + + DS6 + Stage 6 drive strength + [10:8] + read-write + + + DS5 + Stage 5 drive strength + [6:4] + read-write + + + DS4 + Stage 4 drive strength + [2:0] + read-write + + + + + RANDOM + 0x0000000c + Loads a value to the LFSR randomiser + 0x3f04b16d + + + SEED + [31:0] + read-write + + + + + DORMANT + 0x00000010 + Ring Oscillator pause control + 0x00000000 + + + DORMANT + 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 + [31:0] + read-write + + + dormant + 1668246881 + + + WAKE + 2002873189 + + + + + + + DIV + 0x00000014 + Controls the output divider + 0x00000000 + + + DIV + 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 + [15:0] + read-write + + + PASS + 43520 + + + + + + + PHASE + 0x00000018 + Controls the phase shifted output + 0x00000008 + + + PASSWD + set to 0xaa + any other value enables the output with shift=0 + [11:4] + read-write + + + ENABLE + enable the phase-shifted output + this can be changed on-the-fly + [3:3] + read-write + + + FLIP + invert the phase-shifted output + this is ignored when div=1 + [2:2] + read-write + + + SHIFT + 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 + [1:0] + read-write + + + + + STATUS + 0x0000001c + Ring Oscillator Status + 0x00000000 + + + STABLE + Oscillator is running and stable + [31:31] + read-only + + + BADWRITE + An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT + [24:24] + read-write + oneToClear + + + DIV_RUNNING + post-divider is running + this resets to 0 but transitions to 1 during chip startup + [16:16] + read-only + + + ENABLED + Oscillator is enabled but not necessarily running and stable + this resets to 0 but transitions to 1 during chip startup + [12:12] + read-only + + + + + RANDOMBIT + 0x00000020 + 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 + 0x00000001 + + + RANDOMBIT + [0:0] + read-only + + + + + COUNT + 0x00000024 + 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. + 0x00000000 + + + COUNT + [15:0] + read-write + + + + + + + POWMAN + Controls vreg, bor, lposc, chip resets & xosc startup, powman and provides scratch register for general use and for bootcode use + 0x40100000 + + 0 + 240 + registers + + + POWMAN_IRQ_POW + 44 + + + POWMAN_IRQ_TIMER + 45 + + + + BADPASSWD + 0x00000000 + Indicates a bad password has been used + 0x00000000 + + + BADPASSWD + [0:0] + read-write + oneToClear + + + + + VREG_CTRL + 0x00000004 + Voltage Regulator Control + 0x00008050 + + + RST_N + returns the regulator to its startup settings + 0 - reset + 1 - not reset (default) + [15:15] + read-write + + + UNLOCK + unlocks the VREG control interface after power up + 0 - Locked (default) + 1 - Unlocked + It cannot be relocked when it is unlocked. + [13:13] + read-write + + + ISOLATE + isolates the VREG control interface + 0 - not isolated (default) + 1 - isolated + [12:12] + read-write + + + DISABLE_VOLTAGE_LIMIT + 0=not disabled, 1=enabled + [8:8] + read-write + + + HT_TH + 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 + [6:4] + read-write + + + + + VREG_STS + 0x00000008 + Voltage Regulator Status + 0x00000000 + + + VOUT_OK + output regulation status + 0=not in regulation, 1=in regulation + [4:4] + read-only + + + STARTUP + startup status + 0=startup complete, 1=starting up + [0:0] + read-only + + + + + VREG + 0x0000000c + Voltage Regulator Settings + 0x000000b0 + + + UPDATE_IN_PROGRESS + regulator state is being updated + writes to the vreg register will be ignored when this field is set + [15:15] + read-only + + + VSEL + 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 + [8:4] + read-write + + + HIZ + high impedance mode select + 0=not in high impedance mode, 1=in high impedance mode + [1:1] + read-write + + + + + VREG_LP_ENTRY + 0x00000010 + Voltage Regulator Low Power Entry Settings + 0x000000b4 + + + VSEL + 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 + [8:4] + read-write + + + MODE + 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) + [2:2] + read-write + + + HIZ + high impedance mode select + 0=not in high impedance mode, 1=in high impedance mode + [1:1] + read-write + + + + + VREG_LP_EXIT + 0x00000014 + Voltage Regulator Low Power Exit Settings + 0x000000b0 + + + VSEL + 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 + [8:4] + read-write + + + MODE + 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) + [2:2] + read-write + + + HIZ + high impedance mode select + 0=not in high impedance mode, 1=in high impedance mode + [1:1] + read-write + + + + + BOD_CTRL + 0x00000018 + Brown-out Detection Control + 0x00000000 + + + ISOLATE + isolates the brown-out detection control interface + 0 - not isolated (default) + 1 - isolated + [12:12] + read-write + + + + + BOD + 0x0000001c + Brown-out Detection Settings + 0x000000b1 + + + VSEL + 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 + [8:4] + read-write + + + EN + enable brown-out detection + 0=not enabled, 1=enabled + [0:0] + read-write + + + + + BOD_LP_ENTRY + 0x00000020 + Brown-out Detection Low Power Entry Settings + 0x000000b0 + + + VSEL + 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 + [8:4] + read-write + + + EN + enable brown-out detection + 0=not enabled, 1=enabled + [0:0] + read-write + + + + + BOD_LP_EXIT + 0x00000024 + Brown-out Detection Low Power Exit Settings + 0x000000b1 + + + VSEL + 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 + [8:4] + read-write + + + EN + enable brown-out detection + 0=not enabled, 1=enabled + [0:0] + read-write + + + + + LPOSC + 0x00000028 + Low power oscillator control register. + 0x00000203 + + + TRIM + Frequency trim - the trim step is typically 1% of the reset frequency, but can be up to 3% + [9:4] + read-write + + + MODE + This feature has been removed + [1:0] + read-write + + + + + CHIP_RESET + 0x0000002c + Chip reset control and status + 0x00000000 + + + HAD_WATCHDOG_RESET_RSM + 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 + [28:28] + read-only + + + HAD_HZD_SYS_RESET_REQ + 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 + [27:27] + read-only + + + HAD_GLITCH_DETECT + 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 + [26:26] + read-only + + + HAD_SWCORE_PD + 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 + [25:25] + read-only + + + HAD_WATCHDOG_RESET_SWCORE + 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 + [24:24] + read-only + + + HAD_WATCHDOG_RESET_POWMAN + 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 + [23:23] + read-only + + + HAD_WATCHDOG_RESET_POWMAN_ASYNC + 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 + [22:22] + read-only + + + HAD_RESCUE + 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 + [21:21] + read-only + + + HAD_DP_RESET_REQ + 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 + [19:19] + read-only + + + HAD_RUN_LOW + 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 + [18:18] + read-only + + + HAD_BOR + 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 + [17:17] + read-only + + + HAD_POR + 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 + [16:16] + read-only + + + RESCUE_FLAG + 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. + [4:4] + read-write + oneToClear + + + DOUBLE_TAP + This flag is set by double-tapping RUN. It tells bootcode to go into the bootloader. + [0:0] + read-write + + + + + WDSEL + 0x00000030 + 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. + 0x00000000 + + + RESET_RSM + 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 + [12:12] + read-write + + + RESET_SWCORE + 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 + [8:8] + read-write + + + RESET_POWMAN + 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 + [4:4] + read-write + + + RESET_POWMAN_ASYNC + 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 + [0:0] + read-write + + + + + SEQ_CFG + 0x00000034 + For configuration of the power sequencer + Writes are ignored while POWMAN_STATE_CHANGING=1 + 0x001011f0 + + + USING_FAST_POWCK + 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) + [20:20] + read-only + + + USING_BOD_LP + Indicates the brown-out detector (BOD) mode + 0 = BOD high power mode which is the default + 1 = BOD low power mode + [17:17] + read-only + + + USING_VREG_LP + Indicates the voltage regulator (VREG) mode + 0 = VREG high power mode which is the default + 1 = VREG low power mode + [16:16] + read-only + + + USE_FAST_POWCK + 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 + [12:12] + read-write + + + RUN_LPOSC_IN_LP + 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 + [8:8] + read-write + + + USE_BOD_HP + 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 + [7:7] + read-write + + + USE_BOD_LP + 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 + [6:6] + read-write + + + USE_VREG_HP + 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 + [5:5] + read-write + + + USE_VREG_LP + 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 + [4:4] + read-write + + + HW_PWRUP_SRAM0 + 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 + [1:1] + read-write + + + HW_PWRUP_SRAM1 + 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 + [0:0] + read-write + + + + + STATE + 0x00000038 + 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. + 0x0000000f + + + CHANGING + [13:13] + read-only + + + WAITING + [12:12] + read-only + + + BAD_HW_REQ + Bad hardware initiated state request. Went back to state 0 (i.e. everything powered up) + [11:11] + read-only + + + BAD_SW_REQ + Bad software initiated state request. No action taken. + [10:10] + read-only + + + PWRUP_WHILE_WAITING + Request ignored because of a pending pwrup request. See current_pwrup_req. Note this blocks powering up AND powering down. + [9:9] + read-write + oneToClear + + + REQ_IGNORED + [8:8] + read-write + oneToClear + + + REQ + [7:4] + read-write + + + CURRENT + [3:0] + read-only + + + + + POW_FASTDIV + 0x0000003c + 0x00000040 + + + POW_FASTDIV + 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 + [10:0] + read-write + + + + + POW_DELAY + 0x00000040 + power state machine delays + 0x00002011 + + + SRAM_STEP + 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 + [15:8] + read-write + + + XIP_STEP + timing between the xip power state machine steps + measured in units of the lposc period, 0 gives a delay of 1 unit + [7:4] + read-write + + + SWCORE_STEP + timing between the swcore power state machine steps + measured in units of the lposc period, 0 gives a delay of 1 unit + [3:0] + read-write + + + + + EXT_CTRL0 + 0x00000044 + Configures a gpio as a power mode aware control output + 0x0000003f + + + LP_EXIT_STATE + output level when exiting the low power state + [14:14] + read-write + + + LP_ENTRY_STATE + output level when entering the low power state + [13:13] + read-write + + + INIT_STATE + [12:12] + read-write + + + INIT + [8:8] + read-write + + + GPIO_SELECT + selects from gpio 0->30 + set to 31 to disable this feature + [5:0] + read-write + + + + + EXT_CTRL1 + 0x00000048 + Configures a gpio as a power mode aware control output + 0x0000003f + + + LP_EXIT_STATE + output level when exiting the low power state + [14:14] + read-write + + + LP_ENTRY_STATE + output level when entering the low power state + [13:13] + read-write + + + INIT_STATE + [12:12] + read-write + + + INIT + [8:8] + read-write + + + GPIO_SELECT + selects from gpio 0->30 + set to 31 to disable this feature + [5:0] + read-write + + + + + EXT_TIME_REF + 0x0000004c + 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. + 0x00000000 + + + DRIVE_LPCK + 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 + [4:4] + read-write + + + SOURCE_SEL + 0 -> gpio12 + 1 -> gpio20 + 2 -> gpio14 + 3 -> gpio22 + [1:0] + read-write + + + + + LPOSC_FREQ_KHZ_INT + 0x00000050 + Informs the AON Timer of the integer component of the clock frequency when running off the LPOSC. + 0x00000020 + + + LPOSC_FREQ_KHZ_INT + 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 + [5:0] + read-write + + + + + LPOSC_FREQ_KHZ_FRAC + 0x00000054 + Informs the AON Timer of the fractional component of the clock frequency when running off the LPOSC. + 0x0000c49c + + + LPOSC_FREQ_KHZ_FRAC + 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 + [15:0] + read-write + + + + + XOSC_FREQ_KHZ_INT + 0x00000058 + Informs the AON Timer of the integer component of the clock frequency when running off the XOSC. + 0x00002ee0 + + + XOSC_FREQ_KHZ_INT + 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 + [15:0] + read-write + + + + + XOSC_FREQ_KHZ_FRAC + 0x0000005c + Informs the AON Timer of the fractional component of the clock frequency when running off the XOSC. + 0x00000000 + + + XOSC_FREQ_KHZ_FRAC + 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 + [15:0] + read-write + + + + + SET_TIME_63TO48 + 0x00000060 + 0x00000000 + + + SET_TIME_63TO48 + 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 + [15:0] + read-write + + + + + SET_TIME_47TO32 + 0x00000064 + 0x00000000 + + + SET_TIME_47TO32 + 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 + [15:0] + read-write + + + + + SET_TIME_31TO16 + 0x00000068 + 0x00000000 + + + SET_TIME_31TO16 + 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 + [15:0] + read-write + + + + + SET_TIME_15TO0 + 0x0000006c + 0x00000000 + + + SET_TIME_15TO0 + 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 + [15:0] + read-write + + + + + READ_TIME_UPPER + 0x00000070 + 0x00000000 + + + READ_TIME_UPPER + 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. + [31:0] + read-only + + + + + READ_TIME_LOWER + 0x00000074 + 0x00000000 + + + READ_TIME_LOWER + For reading bits 31:0 of the timer. + [31:0] + read-only + + + + + ALARM_TIME_63TO48 + 0x00000078 + 0x00000000 + + + ALARM_TIME_63TO48 + This field must only be written when POWMAN_ALARM_ENAB=0 + [15:0] + read-write + + + + + ALARM_TIME_47TO32 + 0x0000007c + 0x00000000 + + + ALARM_TIME_47TO32 + This field must only be written when POWMAN_ALARM_ENAB=0 + [15:0] + read-write + + + + + ALARM_TIME_31TO16 + 0x00000080 + 0x00000000 + + + ALARM_TIME_31TO16 + This field must only be written when POWMAN_ALARM_ENAB=0 + [15:0] + read-write + + + + + ALARM_TIME_15TO0 + 0x00000084 + 0x00000000 + + + ALARM_TIME_15TO0 + This field must only be written when POWMAN_ALARM_ENAB=0 + [15:0] + read-write + + + + + TIMER + 0x00000088 + 0x00000000 + + + USING_GPIO_1HZ + Timer is synchronised to a 1hz gpio source + [19:19] + read-only + + + USING_GPIO_1KHZ + Timer is running from a 1khz gpio source + [18:18] + read-only + + + USING_LPOSC + Timer is running from lposc + [17:17] + read-only + + + USING_XOSC + Timer is running from xosc + [16:16] + read-only + + + USE_GPIO_1HZ + Selects the gpio source as the reference for the sec counter. The msec counter will continue to use the lposc or xosc reference. + [13:13] + read-write + + + USE_GPIO_1KHZ + switch to gpio as the source of the 1kHz timer tick + [10:10] + write-only + + + USE_XOSC + switch to xosc as the source of the 1kHz timer tick + [9:9] + write-only + + + USE_LPOSC + Switch to lposc as the source of the 1kHz timer tick + [8:8] + write-only + + + ALARM + Alarm has fired. Write to 1 to clear the alarm. + [6:6] + read-write + oneToClear + + + PWRUP_ON_ALARM + Alarm wakes the chip from low power mode + [5:5] + read-write + + + ALARM_ENAB + Enables the alarm. The alarm must be disabled while writing the alarm time. + [4:4] + read-write + + + CLEAR + Clears the timer, does not disable the timer and does not affect the alarm. This control can be written at any time. + [2:2] + write-only + + + RUN + 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 + [1:1] + read-write + + + NONSEC_WRITE + Control whether Non-secure software can write to the timer registers. All other registers are hardwired to be inaccessible to Non-secure. + [0:0] + read-write + + + + + PWRUP0 + 0x0000008c + 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 + 0x0000003f + + + RAW_STATUS + Value of selected gpio pin (only if enable == 1) + [10:10] + read-only + + + STATUS + Status of gpio wakeup. Write to 1 to clear a latched edge detect. + [9:9] + read-write + oneToClear + + + MODE + 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. + [8:8] + read-write + + + level + 0 + + + edge + 1 + + + + + DIRECTION + [7:7] + read-write + + + low_falling + 0 + + + high_rising + 1 + + + + + ENABLE + 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. + [6:6] + read-write + + + SOURCE + [5:0] + read-write + + + + + PWRUP1 + 0x00000090 + 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 + 0x0000003f + + + RAW_STATUS + Value of selected gpio pin (only if enable == 1) + [10:10] + read-only + + + STATUS + Status of gpio wakeup. Write to 1 to clear a latched edge detect. + [9:9] + read-write + oneToClear + + + MODE + 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. + [8:8] + read-write + + + level + 0 + + + edge + 1 + + + + + DIRECTION + [7:7] + read-write + + + low_falling + 0 + + + high_rising + 1 + + + + + ENABLE + 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. + [6:6] + read-write + + + SOURCE + [5:0] + read-write + + + + + PWRUP2 + 0x00000094 + 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 + 0x0000003f + + + RAW_STATUS + Value of selected gpio pin (only if enable == 1) + [10:10] + read-only + + + STATUS + Status of gpio wakeup. Write to 1 to clear a latched edge detect. + [9:9] + read-write + oneToClear + + + MODE + 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. + [8:8] + read-write + + + level + 0 + + + edge + 1 + + + + + DIRECTION + [7:7] + read-write + + + low_falling + 0 + + + high_rising + 1 + + + + + ENABLE + 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. + [6:6] + read-write + + + SOURCE + [5:0] + read-write + + + + + PWRUP3 + 0x00000098 + 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 + 0x0000003f + + + RAW_STATUS + Value of selected gpio pin (only if enable == 1) + [10:10] + read-only + + + STATUS + Status of gpio wakeup. Write to 1 to clear a latched edge detect. + [9:9] + read-write + oneToClear + + + MODE + 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. + [8:8] + read-write + + + level + 0 + + + edge + 1 + + + + + DIRECTION + [7:7] + read-write + + + low_falling + 0 + + + high_rising + 1 + + + + + ENABLE + 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. + [6:6] + read-write + + + SOURCE + [5:0] + read-write + + + + + CURRENT_PWRUP_REQ + 0x0000009c + 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 + 0x00000000 + + + CURRENT_PWRUP_REQ + [6:0] + read-only + + + + + LAST_SWCORE_PWRUP + 0x000000a0 + 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 + 0x00000000 + + + LAST_SWCORE_PWRUP + [6:0] + read-only + + + + + DBG_PWRCFG + 0x000000a4 + 0x00000000 + + + IGNORE + 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 + [0:0] + read-write + + + + + BOOTDIS + 0x000000a8 + 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. + 0x00000000 + + + NEXT + 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. + [1:1] + read-write + + + NOW + 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. + [0:0] + read-write + oneToClear + + + + + DBGCONFIG + 0x000000ac + 0x00000000 + + + DP_INSTID + Configure DP instance ID for SWD multidrop selection. + Recommend that this is NOT changed until you require debug access in multi-chip environment + [3:0] + read-write + + + + + SCRATCH0 + 0x000000b0 + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH0 + [31:0] + read-write + + + + + SCRATCH1 + 0x000000b4 + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH1 + [31:0] + read-write + + + + + SCRATCH2 + 0x000000b8 + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH2 + [31:0] + read-write + + + + + SCRATCH3 + 0x000000bc + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH3 + [31:0] + read-write + + + + + SCRATCH4 + 0x000000c0 + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH4 + [31:0] + read-write + + + + + SCRATCH5 + 0x000000c4 + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH5 + [31:0] + read-write + + + + + SCRATCH6 + 0x000000c8 + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH6 + [31:0] + read-write + + + + + SCRATCH7 + 0x000000cc + Scratch register. Information persists in low power mode + 0x00000000 + + + SCRATCH7 + [31:0] + read-write + + + + + BOOT0 + 0x000000d0 + Scratch register. Information persists in low power mode + 0x00000000 + + + BOOT0 + [31:0] + read-write + + + + + BOOT1 + 0x000000d4 + Scratch register. Information persists in low power mode + 0x00000000 + + + BOOT1 + [31:0] + read-write + + + + + BOOT2 + 0x000000d8 + Scratch register. Information persists in low power mode + 0x00000000 + + + BOOT2 + [31:0] + read-write + + + + + BOOT3 + 0x000000dc + Scratch register. Information persists in low power mode + 0x00000000 + + + BOOT3 + [31:0] + read-write + + + + + INTR + 0x000000e0 + Raw Interrupts + 0x00000000 + + + PWRUP_WHILE_WAITING + Source is state.pwrup_while_waiting + [3:3] + read-only + + + STATE_REQ_IGNORED + Source is state.req_ignored + [2:2] + read-only + + + TIMER + [1:1] + read-only + + + VREG_OUTPUT_LOW + [0:0] + read-write + oneToClear + + + + + INTE + 0x000000e4 + Interrupt Enable + 0x00000000 + + + PWRUP_WHILE_WAITING + Source is state.pwrup_while_waiting + [3:3] + read-write + + + STATE_REQ_IGNORED + Source is state.req_ignored + [2:2] + read-write + + + TIMER + [1:1] + read-write + + + VREG_OUTPUT_LOW + [0:0] + read-write + + + + + INTF + 0x000000e8 + Interrupt Force + 0x00000000 + + + PWRUP_WHILE_WAITING + Source is state.pwrup_while_waiting + [3:3] + read-write + + + STATE_REQ_IGNORED + Source is state.req_ignored + [2:2] + read-write + + + TIMER + [1:1] + read-write + + + VREG_OUTPUT_LOW + [0:0] + read-write + + + + + INTS + 0x000000ec + Interrupt status after masking & forcing + 0x00000000 + + + PWRUP_WHILE_WAITING + Source is state.pwrup_while_waiting + [3:3] + read-only + + + STATE_REQ_IGNORED + Source is state.req_ignored + [2:2] + read-only + + + TIMER + [1:1] + read-only + + + VREG_OUTPUT_LOW + [0:0] + read-only + + + + + + + WATCHDOG + 0x400d8000 + + 0 + 44 + registers + + + + CTRL + 0x00000000 + Watchdog control + The rst_wdsel register determines which subsystems are reset when the watchdog is triggered. + The watchdog can be triggered in software. + 0x07000000 + + + TRIGGER + Trigger a watchdog reset + [31:31] + write-only + + + ENABLE + When not enabled the watchdog timer is paused + [30:30] + read-write + + + PAUSE_DBG1 + Pause the watchdog timer when processor 1 is in debug mode + [26:26] + read-write + + + PAUSE_DBG0 + Pause the watchdog timer when processor 0 is in debug mode + [25:25] + read-write + + + PAUSE_JTAG + Pause the watchdog timer when JTAG is accessing the bus fabric + [24:24] + read-write + + + TIME + Indicates the time in usec before a watchdog reset will be triggered + [23:0] + read-only + + + + + LOAD + 0x00000004 + Load the watchdog timer. The maximum setting is 0xffffff which corresponds to approximately 16 seconds. + 0x00000000 + + + LOAD + [23:0] + write-only + + + + + REASON + 0x00000008 + 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. + 0x00000000 + + + FORCE + [1:1] + read-only + + + TIMER + [0:0] + read-only + + + + + SCRATCH0 + 0x0000000c + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH0 + [31:0] + read-write + + + + + SCRATCH1 + 0x00000010 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH1 + [31:0] + read-write + + + + + SCRATCH2 + 0x00000014 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH2 + [31:0] + read-write + + + + + SCRATCH3 + 0x00000018 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH3 + [31:0] + read-write + + + + + SCRATCH4 + 0x0000001c + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH4 + [31:0] + read-write + + + + + SCRATCH5 + 0x00000020 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH5 + [31:0] + read-write + + + + + SCRATCH6 + 0x00000024 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH6 + [31:0] + read-write + + + + + SCRATCH7 + 0x00000028 + Scratch register. Information persists through soft reset of the chip. + 0x00000000 + + + SCRATCH7 + [31:0] + read-write + + + + + + + DMA + DMA with separate read and write masters + 0x50000000 + + 0 + 3016 + registers + + + DMA_IRQ_0 + 10 + + + DMA_IRQ_1 + 11 + + + DMA_IRQ_2 + 12 + + + DMA_IRQ_3 + 13 + + + + CH0_READ_ADDR + 0x00000000 + DMA Channel 0 Read Address pointer + 0x00000000 + + + CH0_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH0_WRITE_ADDR + 0x00000004 + DMA Channel 0 Write Address pointer + 0x00000000 + + + CH0_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH0_TRANS_COUNT + 0x00000008 + DMA Channel 0 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH0_CTRL_TRIG + 0x0000000c + DMA Channel 0 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH0_AL1_CTRL + 0x00000010 + Alias for channel 0 CTRL register + 0x00000000 + + + CH0_AL1_CTRL + [31:0] + read-write + + + + + CH0_AL1_READ_ADDR + 0x00000014 + Alias for channel 0 READ_ADDR register + 0x00000000 + + + CH0_AL1_READ_ADDR + [31:0] + read-write + + + + + CH0_AL1_WRITE_ADDR + 0x00000018 + Alias for channel 0 WRITE_ADDR register + 0x00000000 + + + CH0_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH0_AL1_TRANS_COUNT_TRIG + 0x0000001c + 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. + 0x00000000 + + + CH0_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH0_AL2_CTRL + 0x00000020 + Alias for channel 0 CTRL register + 0x00000000 + + + CH0_AL2_CTRL + [31:0] + read-write + + + + + CH0_AL2_TRANS_COUNT + 0x00000024 + Alias for channel 0 TRANS_COUNT register + 0x00000000 + + + CH0_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH0_AL2_READ_ADDR + 0x00000028 + Alias for channel 0 READ_ADDR register + 0x00000000 + + + CH0_AL2_READ_ADDR + [31:0] + read-write + + + + + CH0_AL2_WRITE_ADDR_TRIG + 0x0000002c + 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. + 0x00000000 + + + CH0_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH0_AL3_CTRL + 0x00000030 + Alias for channel 0 CTRL register + 0x00000000 + + + CH0_AL3_CTRL + [31:0] + read-write + + + + + CH0_AL3_WRITE_ADDR + 0x00000034 + Alias for channel 0 WRITE_ADDR register + 0x00000000 + + + CH0_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH0_AL3_TRANS_COUNT + 0x00000038 + Alias for channel 0 TRANS_COUNT register + 0x00000000 + + + CH0_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH0_AL3_READ_ADDR_TRIG + 0x0000003c + 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. + 0x00000000 + + + CH0_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH1_READ_ADDR + 0x00000040 + DMA Channel 1 Read Address pointer + 0x00000000 + + + CH1_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH1_WRITE_ADDR + 0x00000044 + DMA Channel 1 Write Address pointer + 0x00000000 + + + CH1_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH1_TRANS_COUNT + 0x00000048 + DMA Channel 1 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH1_CTRL_TRIG + 0x0000004c + DMA Channel 1 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH1_AL1_CTRL + 0x00000050 + Alias for channel 1 CTRL register + 0x00000000 + + + CH1_AL1_CTRL + [31:0] + read-write + + + + + CH1_AL1_READ_ADDR + 0x00000054 + Alias for channel 1 READ_ADDR register + 0x00000000 + + + CH1_AL1_READ_ADDR + [31:0] + read-write + + + + + CH1_AL1_WRITE_ADDR + 0x00000058 + Alias for channel 1 WRITE_ADDR register + 0x00000000 + + + CH1_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH1_AL1_TRANS_COUNT_TRIG + 0x0000005c + Alias for channel 1 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH1_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH1_AL2_CTRL + 0x00000060 + Alias for channel 1 CTRL register + 0x00000000 + + + CH1_AL2_CTRL + [31:0] + read-write + + + + + CH1_AL2_TRANS_COUNT + 0x00000064 + Alias for channel 1 TRANS_COUNT register + 0x00000000 + + + CH1_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH1_AL2_READ_ADDR + 0x00000068 + Alias for channel 1 READ_ADDR register + 0x00000000 + + + CH1_AL2_READ_ADDR + [31:0] + read-write + + + + + CH1_AL2_WRITE_ADDR_TRIG + 0x0000006c + Alias for channel 1 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH1_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH1_AL3_CTRL + 0x00000070 + Alias for channel 1 CTRL register + 0x00000000 + + + CH1_AL3_CTRL + [31:0] + read-write + + + + + CH1_AL3_WRITE_ADDR + 0x00000074 + Alias for channel 1 WRITE_ADDR register + 0x00000000 + + + CH1_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH1_AL3_TRANS_COUNT + 0x00000078 + Alias for channel 1 TRANS_COUNT register + 0x00000000 + + + CH1_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH1_AL3_READ_ADDR_TRIG + 0x0000007c + Alias for channel 1 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH1_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH2_READ_ADDR + 0x00000080 + DMA Channel 2 Read Address pointer + 0x00000000 + + + CH2_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH2_WRITE_ADDR + 0x00000084 + DMA Channel 2 Write Address pointer + 0x00000000 + + + CH2_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH2_TRANS_COUNT + 0x00000088 + DMA Channel 2 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH2_CTRL_TRIG + 0x0000008c + DMA Channel 2 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH2_AL1_CTRL + 0x00000090 + Alias for channel 2 CTRL register + 0x00000000 + + + CH2_AL1_CTRL + [31:0] + read-write + + + + + CH2_AL1_READ_ADDR + 0x00000094 + Alias for channel 2 READ_ADDR register + 0x00000000 + + + CH2_AL1_READ_ADDR + [31:0] + read-write + + + + + CH2_AL1_WRITE_ADDR + 0x00000098 + Alias for channel 2 WRITE_ADDR register + 0x00000000 + + + CH2_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH2_AL1_TRANS_COUNT_TRIG + 0x0000009c + Alias for channel 2 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH2_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH2_AL2_CTRL + 0x000000a0 + Alias for channel 2 CTRL register + 0x00000000 + + + CH2_AL2_CTRL + [31:0] + read-write + + + + + CH2_AL2_TRANS_COUNT + 0x000000a4 + Alias for channel 2 TRANS_COUNT register + 0x00000000 + + + CH2_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH2_AL2_READ_ADDR + 0x000000a8 + Alias for channel 2 READ_ADDR register + 0x00000000 + + + CH2_AL2_READ_ADDR + [31:0] + read-write + + + + + CH2_AL2_WRITE_ADDR_TRIG + 0x000000ac + Alias for channel 2 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH2_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH2_AL3_CTRL + 0x000000b0 + Alias for channel 2 CTRL register + 0x00000000 + + + CH2_AL3_CTRL + [31:0] + read-write + + + + + CH2_AL3_WRITE_ADDR + 0x000000b4 + Alias for channel 2 WRITE_ADDR register + 0x00000000 + + + CH2_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH2_AL3_TRANS_COUNT + 0x000000b8 + Alias for channel 2 TRANS_COUNT register + 0x00000000 + + + CH2_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH2_AL3_READ_ADDR_TRIG + 0x000000bc + Alias for channel 2 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH2_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH3_READ_ADDR + 0x000000c0 + DMA Channel 3 Read Address pointer + 0x00000000 + + + CH3_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH3_WRITE_ADDR + 0x000000c4 + DMA Channel 3 Write Address pointer + 0x00000000 + + + CH3_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH3_TRANS_COUNT + 0x000000c8 + DMA Channel 3 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH3_CTRL_TRIG + 0x000000cc + DMA Channel 3 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH3_AL1_CTRL + 0x000000d0 + Alias for channel 3 CTRL register + 0x00000000 + + + CH3_AL1_CTRL + [31:0] + read-write + + + + + CH3_AL1_READ_ADDR + 0x000000d4 + Alias for channel 3 READ_ADDR register + 0x00000000 + + + CH3_AL1_READ_ADDR + [31:0] + read-write + + + + + CH3_AL1_WRITE_ADDR + 0x000000d8 + Alias for channel 3 WRITE_ADDR register + 0x00000000 + + + CH3_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH3_AL1_TRANS_COUNT_TRIG + 0x000000dc + Alias for channel 3 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH3_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH3_AL2_CTRL + 0x000000e0 + Alias for channel 3 CTRL register + 0x00000000 + + + CH3_AL2_CTRL + [31:0] + read-write + + + + + CH3_AL2_TRANS_COUNT + 0x000000e4 + Alias for channel 3 TRANS_COUNT register + 0x00000000 + + + CH3_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH3_AL2_READ_ADDR + 0x000000e8 + Alias for channel 3 READ_ADDR register + 0x00000000 + + + CH3_AL2_READ_ADDR + [31:0] + read-write + + + + + CH3_AL2_WRITE_ADDR_TRIG + 0x000000ec + Alias for channel 3 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH3_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH3_AL3_CTRL + 0x000000f0 + Alias for channel 3 CTRL register + 0x00000000 + + + CH3_AL3_CTRL + [31:0] + read-write + + + + + CH3_AL3_WRITE_ADDR + 0x000000f4 + Alias for channel 3 WRITE_ADDR register + 0x00000000 + + + CH3_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH3_AL3_TRANS_COUNT + 0x000000f8 + Alias for channel 3 TRANS_COUNT register + 0x00000000 + + + CH3_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH3_AL3_READ_ADDR_TRIG + 0x000000fc + Alias for channel 3 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH3_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH4_READ_ADDR + 0x00000100 + DMA Channel 4 Read Address pointer + 0x00000000 + + + CH4_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH4_WRITE_ADDR + 0x00000104 + DMA Channel 4 Write Address pointer + 0x00000000 + + + CH4_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH4_TRANS_COUNT + 0x00000108 + DMA Channel 4 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH4_CTRL_TRIG + 0x0000010c + DMA Channel 4 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH4_AL1_CTRL + 0x00000110 + Alias for channel 4 CTRL register + 0x00000000 + + + CH4_AL1_CTRL + [31:0] + read-write + + + + + CH4_AL1_READ_ADDR + 0x00000114 + Alias for channel 4 READ_ADDR register + 0x00000000 + + + CH4_AL1_READ_ADDR + [31:0] + read-write + + + + + CH4_AL1_WRITE_ADDR + 0x00000118 + Alias for channel 4 WRITE_ADDR register + 0x00000000 + + + CH4_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH4_AL1_TRANS_COUNT_TRIG + 0x0000011c + Alias for channel 4 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH4_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH4_AL2_CTRL + 0x00000120 + Alias for channel 4 CTRL register + 0x00000000 + + + CH4_AL2_CTRL + [31:0] + read-write + + + + + CH4_AL2_TRANS_COUNT + 0x00000124 + Alias for channel 4 TRANS_COUNT register + 0x00000000 + + + CH4_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH4_AL2_READ_ADDR + 0x00000128 + Alias for channel 4 READ_ADDR register + 0x00000000 + + + CH4_AL2_READ_ADDR + [31:0] + read-write + + + + + CH4_AL2_WRITE_ADDR_TRIG + 0x0000012c + Alias for channel 4 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH4_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH4_AL3_CTRL + 0x00000130 + Alias for channel 4 CTRL register + 0x00000000 + + + CH4_AL3_CTRL + [31:0] + read-write + + + + + CH4_AL3_WRITE_ADDR + 0x00000134 + Alias for channel 4 WRITE_ADDR register + 0x00000000 + + + CH4_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH4_AL3_TRANS_COUNT + 0x00000138 + Alias for channel 4 TRANS_COUNT register + 0x00000000 + + + CH4_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH4_AL3_READ_ADDR_TRIG + 0x0000013c + Alias for channel 4 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH4_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH5_READ_ADDR + 0x00000140 + DMA Channel 5 Read Address pointer + 0x00000000 + + + CH5_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH5_WRITE_ADDR + 0x00000144 + DMA Channel 5 Write Address pointer + 0x00000000 + + + CH5_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH5_TRANS_COUNT + 0x00000148 + DMA Channel 5 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH5_CTRL_TRIG + 0x0000014c + DMA Channel 5 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH5_AL1_CTRL + 0x00000150 + Alias for channel 5 CTRL register + 0x00000000 + + + CH5_AL1_CTRL + [31:0] + read-write + + + + + CH5_AL1_READ_ADDR + 0x00000154 + Alias for channel 5 READ_ADDR register + 0x00000000 + + + CH5_AL1_READ_ADDR + [31:0] + read-write + + + + + CH5_AL1_WRITE_ADDR + 0x00000158 + Alias for channel 5 WRITE_ADDR register + 0x00000000 + + + CH5_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH5_AL1_TRANS_COUNT_TRIG + 0x0000015c + Alias for channel 5 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH5_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH5_AL2_CTRL + 0x00000160 + Alias for channel 5 CTRL register + 0x00000000 + + + CH5_AL2_CTRL + [31:0] + read-write + + + + + CH5_AL2_TRANS_COUNT + 0x00000164 + Alias for channel 5 TRANS_COUNT register + 0x00000000 + + + CH5_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH5_AL2_READ_ADDR + 0x00000168 + Alias for channel 5 READ_ADDR register + 0x00000000 + + + CH5_AL2_READ_ADDR + [31:0] + read-write + + + + + CH5_AL2_WRITE_ADDR_TRIG + 0x0000016c + Alias for channel 5 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH5_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH5_AL3_CTRL + 0x00000170 + Alias for channel 5 CTRL register + 0x00000000 + + + CH5_AL3_CTRL + [31:0] + read-write + + + + + CH5_AL3_WRITE_ADDR + 0x00000174 + Alias for channel 5 WRITE_ADDR register + 0x00000000 + + + CH5_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH5_AL3_TRANS_COUNT + 0x00000178 + Alias for channel 5 TRANS_COUNT register + 0x00000000 + + + CH5_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH5_AL3_READ_ADDR_TRIG + 0x0000017c + Alias for channel 5 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH5_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH6_READ_ADDR + 0x00000180 + DMA Channel 6 Read Address pointer + 0x00000000 + + + CH6_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH6_WRITE_ADDR + 0x00000184 + DMA Channel 6 Write Address pointer + 0x00000000 + + + CH6_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH6_TRANS_COUNT + 0x00000188 + DMA Channel 6 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH6_CTRL_TRIG + 0x0000018c + DMA Channel 6 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH6_AL1_CTRL + 0x00000190 + Alias for channel 6 CTRL register + 0x00000000 + + + CH6_AL1_CTRL + [31:0] + read-write + + + + + CH6_AL1_READ_ADDR + 0x00000194 + Alias for channel 6 READ_ADDR register + 0x00000000 + + + CH6_AL1_READ_ADDR + [31:0] + read-write + + + + + CH6_AL1_WRITE_ADDR + 0x00000198 + Alias for channel 6 WRITE_ADDR register + 0x00000000 + + + CH6_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH6_AL1_TRANS_COUNT_TRIG + 0x0000019c + Alias for channel 6 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH6_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH6_AL2_CTRL + 0x000001a0 + Alias for channel 6 CTRL register + 0x00000000 + + + CH6_AL2_CTRL + [31:0] + read-write + + + + + CH6_AL2_TRANS_COUNT + 0x000001a4 + Alias for channel 6 TRANS_COUNT register + 0x00000000 + + + CH6_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH6_AL2_READ_ADDR + 0x000001a8 + Alias for channel 6 READ_ADDR register + 0x00000000 + + + CH6_AL2_READ_ADDR + [31:0] + read-write + + + + + CH6_AL2_WRITE_ADDR_TRIG + 0x000001ac + Alias for channel 6 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH6_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH6_AL3_CTRL + 0x000001b0 + Alias for channel 6 CTRL register + 0x00000000 + + + CH6_AL3_CTRL + [31:0] + read-write + + + + + CH6_AL3_WRITE_ADDR + 0x000001b4 + Alias for channel 6 WRITE_ADDR register + 0x00000000 + + + CH6_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH6_AL3_TRANS_COUNT + 0x000001b8 + Alias for channel 6 TRANS_COUNT register + 0x00000000 + + + CH6_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH6_AL3_READ_ADDR_TRIG + 0x000001bc + Alias for channel 6 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH6_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH7_READ_ADDR + 0x000001c0 + DMA Channel 7 Read Address pointer + 0x00000000 + + + CH7_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH7_WRITE_ADDR + 0x000001c4 + DMA Channel 7 Write Address pointer + 0x00000000 + + + CH7_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH7_TRANS_COUNT + 0x000001c8 + DMA Channel 7 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH7_CTRL_TRIG + 0x000001cc + DMA Channel 7 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH7_AL1_CTRL + 0x000001d0 + Alias for channel 7 CTRL register + 0x00000000 + + + CH7_AL1_CTRL + [31:0] + read-write + + + + + CH7_AL1_READ_ADDR + 0x000001d4 + Alias for channel 7 READ_ADDR register + 0x00000000 + + + CH7_AL1_READ_ADDR + [31:0] + read-write + + + + + CH7_AL1_WRITE_ADDR + 0x000001d8 + Alias for channel 7 WRITE_ADDR register + 0x00000000 + + + CH7_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH7_AL1_TRANS_COUNT_TRIG + 0x000001dc + Alias for channel 7 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH7_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH7_AL2_CTRL + 0x000001e0 + Alias for channel 7 CTRL register + 0x00000000 + + + CH7_AL2_CTRL + [31:0] + read-write + + + + + CH7_AL2_TRANS_COUNT + 0x000001e4 + Alias for channel 7 TRANS_COUNT register + 0x00000000 + + + CH7_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH7_AL2_READ_ADDR + 0x000001e8 + Alias for channel 7 READ_ADDR register + 0x00000000 + + + CH7_AL2_READ_ADDR + [31:0] + read-write + + + + + CH7_AL2_WRITE_ADDR_TRIG + 0x000001ec + Alias for channel 7 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH7_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH7_AL3_CTRL + 0x000001f0 + Alias for channel 7 CTRL register + 0x00000000 + + + CH7_AL3_CTRL + [31:0] + read-write + + + + + CH7_AL3_WRITE_ADDR + 0x000001f4 + Alias for channel 7 WRITE_ADDR register + 0x00000000 + + + CH7_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH7_AL3_TRANS_COUNT + 0x000001f8 + Alias for channel 7 TRANS_COUNT register + 0x00000000 + + + CH7_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH7_AL3_READ_ADDR_TRIG + 0x000001fc + Alias for channel 7 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH7_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH8_READ_ADDR + 0x00000200 + DMA Channel 8 Read Address pointer + 0x00000000 + + + CH8_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH8_WRITE_ADDR + 0x00000204 + DMA Channel 8 Write Address pointer + 0x00000000 + + + CH8_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH8_TRANS_COUNT + 0x00000208 + DMA Channel 8 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH8_CTRL_TRIG + 0x0000020c + DMA Channel 8 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH8_AL1_CTRL + 0x00000210 + Alias for channel 8 CTRL register + 0x00000000 + + + CH8_AL1_CTRL + [31:0] + read-write + + + + + CH8_AL1_READ_ADDR + 0x00000214 + Alias for channel 8 READ_ADDR register + 0x00000000 + + + CH8_AL1_READ_ADDR + [31:0] + read-write + + + + + CH8_AL1_WRITE_ADDR + 0x00000218 + Alias for channel 8 WRITE_ADDR register + 0x00000000 + + + CH8_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH8_AL1_TRANS_COUNT_TRIG + 0x0000021c + Alias for channel 8 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH8_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH8_AL2_CTRL + 0x00000220 + Alias for channel 8 CTRL register + 0x00000000 + + + CH8_AL2_CTRL + [31:0] + read-write + + + + + CH8_AL2_TRANS_COUNT + 0x00000224 + Alias for channel 8 TRANS_COUNT register + 0x00000000 + + + CH8_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH8_AL2_READ_ADDR + 0x00000228 + Alias for channel 8 READ_ADDR register + 0x00000000 + + + CH8_AL2_READ_ADDR + [31:0] + read-write + + + + + CH8_AL2_WRITE_ADDR_TRIG + 0x0000022c + Alias for channel 8 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH8_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH8_AL3_CTRL + 0x00000230 + Alias for channel 8 CTRL register + 0x00000000 + + + CH8_AL3_CTRL + [31:0] + read-write + + + + + CH8_AL3_WRITE_ADDR + 0x00000234 + Alias for channel 8 WRITE_ADDR register + 0x00000000 + + + CH8_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH8_AL3_TRANS_COUNT + 0x00000238 + Alias for channel 8 TRANS_COUNT register + 0x00000000 + + + CH8_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH8_AL3_READ_ADDR_TRIG + 0x0000023c + Alias for channel 8 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH8_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH9_READ_ADDR + 0x00000240 + DMA Channel 9 Read Address pointer + 0x00000000 + + + CH9_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH9_WRITE_ADDR + 0x00000244 + DMA Channel 9 Write Address pointer + 0x00000000 + + + CH9_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH9_TRANS_COUNT + 0x00000248 + DMA Channel 9 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH9_CTRL_TRIG + 0x0000024c + DMA Channel 9 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH9_AL1_CTRL + 0x00000250 + Alias for channel 9 CTRL register + 0x00000000 + + + CH9_AL1_CTRL + [31:0] + read-write + + + + + CH9_AL1_READ_ADDR + 0x00000254 + Alias for channel 9 READ_ADDR register + 0x00000000 + + + CH9_AL1_READ_ADDR + [31:0] + read-write + + + + + CH9_AL1_WRITE_ADDR + 0x00000258 + Alias for channel 9 WRITE_ADDR register + 0x00000000 + + + CH9_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH9_AL1_TRANS_COUNT_TRIG + 0x0000025c + Alias for channel 9 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH9_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH9_AL2_CTRL + 0x00000260 + Alias for channel 9 CTRL register + 0x00000000 + + + CH9_AL2_CTRL + [31:0] + read-write + + + + + CH9_AL2_TRANS_COUNT + 0x00000264 + Alias for channel 9 TRANS_COUNT register + 0x00000000 + + + CH9_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH9_AL2_READ_ADDR + 0x00000268 + Alias for channel 9 READ_ADDR register + 0x00000000 + + + CH9_AL2_READ_ADDR + [31:0] + read-write + + + + + CH9_AL2_WRITE_ADDR_TRIG + 0x0000026c + Alias for channel 9 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH9_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH9_AL3_CTRL + 0x00000270 + Alias for channel 9 CTRL register + 0x00000000 + + + CH9_AL3_CTRL + [31:0] + read-write + + + + + CH9_AL3_WRITE_ADDR + 0x00000274 + Alias for channel 9 WRITE_ADDR register + 0x00000000 + + + CH9_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH9_AL3_TRANS_COUNT + 0x00000278 + Alias for channel 9 TRANS_COUNT register + 0x00000000 + + + CH9_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH9_AL3_READ_ADDR_TRIG + 0x0000027c + Alias for channel 9 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH9_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH10_READ_ADDR + 0x00000280 + DMA Channel 10 Read Address pointer + 0x00000000 + + + CH10_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH10_WRITE_ADDR + 0x00000284 + DMA Channel 10 Write Address pointer + 0x00000000 + + + CH10_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH10_TRANS_COUNT + 0x00000288 + DMA Channel 10 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH10_CTRL_TRIG + 0x0000028c + DMA Channel 10 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH10_AL1_CTRL + 0x00000290 + Alias for channel 10 CTRL register + 0x00000000 + + + CH10_AL1_CTRL + [31:0] + read-write + + + + + CH10_AL1_READ_ADDR + 0x00000294 + Alias for channel 10 READ_ADDR register + 0x00000000 + + + CH10_AL1_READ_ADDR + [31:0] + read-write + + + + + CH10_AL1_WRITE_ADDR + 0x00000298 + Alias for channel 10 WRITE_ADDR register + 0x00000000 + + + CH10_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH10_AL1_TRANS_COUNT_TRIG + 0x0000029c + Alias for channel 10 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH10_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH10_AL2_CTRL + 0x000002a0 + Alias for channel 10 CTRL register + 0x00000000 + + + CH10_AL2_CTRL + [31:0] + read-write + + + + + CH10_AL2_TRANS_COUNT + 0x000002a4 + Alias for channel 10 TRANS_COUNT register + 0x00000000 + + + CH10_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH10_AL2_READ_ADDR + 0x000002a8 + Alias for channel 10 READ_ADDR register + 0x00000000 + + + CH10_AL2_READ_ADDR + [31:0] + read-write + + + + + CH10_AL2_WRITE_ADDR_TRIG + 0x000002ac + Alias for channel 10 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH10_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH10_AL3_CTRL + 0x000002b0 + Alias for channel 10 CTRL register + 0x00000000 + + + CH10_AL3_CTRL + [31:0] + read-write + + + + + CH10_AL3_WRITE_ADDR + 0x000002b4 + Alias for channel 10 WRITE_ADDR register + 0x00000000 + + + CH10_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH10_AL3_TRANS_COUNT + 0x000002b8 + Alias for channel 10 TRANS_COUNT register + 0x00000000 + + + CH10_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH10_AL3_READ_ADDR_TRIG + 0x000002bc + Alias for channel 10 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH10_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH11_READ_ADDR + 0x000002c0 + DMA Channel 11 Read Address pointer + 0x00000000 + + + CH11_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH11_WRITE_ADDR + 0x000002c4 + DMA Channel 11 Write Address pointer + 0x00000000 + + + CH11_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH11_TRANS_COUNT + 0x000002c8 + DMA Channel 11 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH11_CTRL_TRIG + 0x000002cc + DMA Channel 11 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH11_AL1_CTRL + 0x000002d0 + Alias for channel 11 CTRL register + 0x00000000 + + + CH11_AL1_CTRL + [31:0] + read-write + + + + + CH11_AL1_READ_ADDR + 0x000002d4 + Alias for channel 11 READ_ADDR register + 0x00000000 + + + CH11_AL1_READ_ADDR + [31:0] + read-write + + + + + CH11_AL1_WRITE_ADDR + 0x000002d8 + Alias for channel 11 WRITE_ADDR register + 0x00000000 + + + CH11_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH11_AL1_TRANS_COUNT_TRIG + 0x000002dc + Alias for channel 11 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH11_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH11_AL2_CTRL + 0x000002e0 + Alias for channel 11 CTRL register + 0x00000000 + + + CH11_AL2_CTRL + [31:0] + read-write + + + + + CH11_AL2_TRANS_COUNT + 0x000002e4 + Alias for channel 11 TRANS_COUNT register + 0x00000000 + + + CH11_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH11_AL2_READ_ADDR + 0x000002e8 + Alias for channel 11 READ_ADDR register + 0x00000000 + + + CH11_AL2_READ_ADDR + [31:0] + read-write + + + + + CH11_AL2_WRITE_ADDR_TRIG + 0x000002ec + Alias for channel 11 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH11_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH11_AL3_CTRL + 0x000002f0 + Alias for channel 11 CTRL register + 0x00000000 + + + CH11_AL3_CTRL + [31:0] + read-write + + + + + CH11_AL3_WRITE_ADDR + 0x000002f4 + Alias for channel 11 WRITE_ADDR register + 0x00000000 + + + CH11_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH11_AL3_TRANS_COUNT + 0x000002f8 + Alias for channel 11 TRANS_COUNT register + 0x00000000 + + + CH11_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH11_AL3_READ_ADDR_TRIG + 0x000002fc + Alias for channel 11 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH11_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH12_READ_ADDR + 0x00000300 + DMA Channel 12 Read Address pointer + 0x00000000 + + + CH12_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH12_WRITE_ADDR + 0x00000304 + DMA Channel 12 Write Address pointer + 0x00000000 + + + CH12_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH12_TRANS_COUNT + 0x00000308 + DMA Channel 12 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH12_CTRL_TRIG + 0x0000030c + DMA Channel 12 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH12_AL1_CTRL + 0x00000310 + Alias for channel 12 CTRL register + 0x00000000 + + + CH12_AL1_CTRL + [31:0] + read-write + + + + + CH12_AL1_READ_ADDR + 0x00000314 + Alias for channel 12 READ_ADDR register + 0x00000000 + + + CH12_AL1_READ_ADDR + [31:0] + read-write + + + + + CH12_AL1_WRITE_ADDR + 0x00000318 + Alias for channel 12 WRITE_ADDR register + 0x00000000 + + + CH12_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH12_AL1_TRANS_COUNT_TRIG + 0x0000031c + Alias for channel 12 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH12_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH12_AL2_CTRL + 0x00000320 + Alias for channel 12 CTRL register + 0x00000000 + + + CH12_AL2_CTRL + [31:0] + read-write + + + + + CH12_AL2_TRANS_COUNT + 0x00000324 + Alias for channel 12 TRANS_COUNT register + 0x00000000 + + + CH12_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH12_AL2_READ_ADDR + 0x00000328 + Alias for channel 12 READ_ADDR register + 0x00000000 + + + CH12_AL2_READ_ADDR + [31:0] + read-write + + + + + CH12_AL2_WRITE_ADDR_TRIG + 0x0000032c + Alias for channel 12 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH12_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH12_AL3_CTRL + 0x00000330 + Alias for channel 12 CTRL register + 0x00000000 + + + CH12_AL3_CTRL + [31:0] + read-write + + + + + CH12_AL3_WRITE_ADDR + 0x00000334 + Alias for channel 12 WRITE_ADDR register + 0x00000000 + + + CH12_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH12_AL3_TRANS_COUNT + 0x00000338 + Alias for channel 12 TRANS_COUNT register + 0x00000000 + + + CH12_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH12_AL3_READ_ADDR_TRIG + 0x0000033c + Alias for channel 12 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH12_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH13_READ_ADDR + 0x00000340 + DMA Channel 13 Read Address pointer + 0x00000000 + + + CH13_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH13_WRITE_ADDR + 0x00000344 + DMA Channel 13 Write Address pointer + 0x00000000 + + + CH13_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH13_TRANS_COUNT + 0x00000348 + DMA Channel 13 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH13_CTRL_TRIG + 0x0000034c + DMA Channel 13 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH13_AL1_CTRL + 0x00000350 + Alias for channel 13 CTRL register + 0x00000000 + + + CH13_AL1_CTRL + [31:0] + read-write + + + + + CH13_AL1_READ_ADDR + 0x00000354 + Alias for channel 13 READ_ADDR register + 0x00000000 + + + CH13_AL1_READ_ADDR + [31:0] + read-write + + + + + CH13_AL1_WRITE_ADDR + 0x00000358 + Alias for channel 13 WRITE_ADDR register + 0x00000000 + + + CH13_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH13_AL1_TRANS_COUNT_TRIG + 0x0000035c + Alias for channel 13 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH13_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH13_AL2_CTRL + 0x00000360 + Alias for channel 13 CTRL register + 0x00000000 + + + CH13_AL2_CTRL + [31:0] + read-write + + + + + CH13_AL2_TRANS_COUNT + 0x00000364 + Alias for channel 13 TRANS_COUNT register + 0x00000000 + + + CH13_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH13_AL2_READ_ADDR + 0x00000368 + Alias for channel 13 READ_ADDR register + 0x00000000 + + + CH13_AL2_READ_ADDR + [31:0] + read-write + + + + + CH13_AL2_WRITE_ADDR_TRIG + 0x0000036c + Alias for channel 13 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH13_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH13_AL3_CTRL + 0x00000370 + Alias for channel 13 CTRL register + 0x00000000 + + + CH13_AL3_CTRL + [31:0] + read-write + + + + + CH13_AL3_WRITE_ADDR + 0x00000374 + Alias for channel 13 WRITE_ADDR register + 0x00000000 + + + CH13_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH13_AL3_TRANS_COUNT + 0x00000378 + Alias for channel 13 TRANS_COUNT register + 0x00000000 + + + CH13_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH13_AL3_READ_ADDR_TRIG + 0x0000037c + Alias for channel 13 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH13_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH14_READ_ADDR + 0x00000380 + DMA Channel 14 Read Address pointer + 0x00000000 + + + CH14_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH14_WRITE_ADDR + 0x00000384 + DMA Channel 14 Write Address pointer + 0x00000000 + + + CH14_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH14_TRANS_COUNT + 0x00000388 + DMA Channel 14 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH14_CTRL_TRIG + 0x0000038c + DMA Channel 14 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH14_AL1_CTRL + 0x00000390 + Alias for channel 14 CTRL register + 0x00000000 + + + CH14_AL1_CTRL + [31:0] + read-write + + + + + CH14_AL1_READ_ADDR + 0x00000394 + Alias for channel 14 READ_ADDR register + 0x00000000 + + + CH14_AL1_READ_ADDR + [31:0] + read-write + + + + + CH14_AL1_WRITE_ADDR + 0x00000398 + Alias for channel 14 WRITE_ADDR register + 0x00000000 + + + CH14_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH14_AL1_TRANS_COUNT_TRIG + 0x0000039c + Alias for channel 14 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH14_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH14_AL2_CTRL + 0x000003a0 + Alias for channel 14 CTRL register + 0x00000000 + + + CH14_AL2_CTRL + [31:0] + read-write + + + + + CH14_AL2_TRANS_COUNT + 0x000003a4 + Alias for channel 14 TRANS_COUNT register + 0x00000000 + + + CH14_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH14_AL2_READ_ADDR + 0x000003a8 + Alias for channel 14 READ_ADDR register + 0x00000000 + + + CH14_AL2_READ_ADDR + [31:0] + read-write + + + + + CH14_AL2_WRITE_ADDR_TRIG + 0x000003ac + Alias for channel 14 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH14_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH14_AL3_CTRL + 0x000003b0 + Alias for channel 14 CTRL register + 0x00000000 + + + CH14_AL3_CTRL + [31:0] + read-write + + + + + CH14_AL3_WRITE_ADDR + 0x000003b4 + Alias for channel 14 WRITE_ADDR register + 0x00000000 + + + CH14_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH14_AL3_TRANS_COUNT + 0x000003b8 + Alias for channel 14 TRANS_COUNT register + 0x00000000 + + + CH14_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH14_AL3_READ_ADDR_TRIG + 0x000003bc + Alias for channel 14 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH14_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + CH15_READ_ADDR + 0x000003c0 + DMA Channel 15 Read Address pointer + 0x00000000 + + + CH15_READ_ADDR + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + [31:0] + read-write + + + + + CH15_WRITE_ADDR + 0x000003c4 + DMA Channel 15 Write Address pointer + 0x00000000 + + + CH15_WRITE_ADDR + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + [31:0] + read-write + + + + + CH15_TRANS_COUNT + 0x000003c8 + DMA Channel 15 Transfer Count + 0x00000000 + + + MODE + 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. + [31:28] + read-write + + + NORMAL + 0 + + + TRIGGER_SELF + 1 + + + ENDLESS + 15 + + + + + COUNT + 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. + [27:0] + read-write + + + + + CH15_CTRL_TRIG + 0x000003cc + DMA Channel 15 Control and Status + 0x00000000 + + + AHB_ERROR + 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. + [31:31] + read-only + + + READ_ERROR + 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) + [30:30] + read-write + oneToClear + + + WRITE_ERROR + 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) + [29:29] + read-write + oneToClear + + + BUSY + 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. + [26:26] + read-only + + + SNIFF_EN + 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. + [25:25] + read-write + + + BSWAP + 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. + [24:24] + read-write + + + IRQ_QUIET + 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. + [23:23] + read-write + + + TREQ_SEL + 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 + [22:17] + read-write + + + PIO0_TX0 + 0 + Select PIO0's TX FIFO 0 as TREQ + + + PIO0_TX1 + 1 + Select PIO0's TX FIFO 1 as TREQ + + + PIO0_TX2 + 2 + Select PIO0's TX FIFO 2 as TREQ + + + PIO0_TX3 + 3 + Select PIO0's TX FIFO 3 as TREQ + + + PIO0_RX0 + 4 + Select PIO0's RX FIFO 0 as TREQ + + + PIO0_RX1 + 5 + Select PIO0's RX FIFO 1 as TREQ + + + PIO0_RX2 + 6 + Select PIO0's RX FIFO 2 as TREQ + + + PIO0_RX3 + 7 + Select PIO0's RX FIFO 3 as TREQ + + + PIO1_TX0 + 8 + Select PIO1's TX FIFO 0 as TREQ + + + PIO1_TX1 + 9 + Select PIO1's TX FIFO 1 as TREQ + + + PIO1_TX2 + 10 + Select PIO1's TX FIFO 2 as TREQ + + + PIO1_TX3 + 11 + Select PIO1's TX FIFO 3 as TREQ + + + PIO1_RX0 + 12 + Select PIO1's RX FIFO 0 as TREQ + + + PIO1_RX1 + 13 + Select PIO1's RX FIFO 1 as TREQ + + + PIO1_RX2 + 14 + Select PIO1's RX FIFO 2 as TREQ + + + PIO1_RX3 + 15 + Select PIO1's RX FIFO 3 as TREQ + + + PIO2_TX0 + 16 + Select PIO2's TX FIFO 0 as TREQ + + + PIO2_TX1 + 17 + Select PIO2's TX FIFO 1 as TREQ + + + PIO2_TX2 + 18 + Select PIO2's TX FIFO 2 as TREQ + + + PIO2_TX3 + 19 + Select PIO2's TX FIFO 3 as TREQ + + + PIO2_RX0 + 20 + Select PIO2's RX FIFO 0 as TREQ + + + PIO2_RX1 + 21 + Select PIO2's RX FIFO 1 as TREQ + + + PIO2_RX2 + 22 + Select PIO2's RX FIFO 2 as TREQ + + + PIO2_RX3 + 23 + Select PIO2's RX FIFO 3 as TREQ + + + SPI0_TX + 24 + Select SPI0's TX FIFO as TREQ + + + SPI0_RX + 25 + Select SPI0's RX FIFO as TREQ + + + SPI1_TX + 26 + Select SPI1's TX FIFO as TREQ + + + SPI1_RX + 27 + Select SPI1's RX FIFO as TREQ + + + UART0_TX + 28 + Select UART0's TX FIFO as TREQ + + + UART0_RX + 29 + Select UART0's RX FIFO as TREQ + + + UART1_TX + 30 + Select UART1's TX FIFO as TREQ + + + UART1_RX + 31 + Select UART1's RX FIFO as TREQ + + + PWM_WRAP0 + 32 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP1 + 33 + Select PWM Counter 1's Wrap Value as TREQ + + + PWM_WRAP2 + 34 + Select PWM Counter 2's Wrap Value as TREQ + + + PWM_WRAP3 + 35 + Select PWM Counter 3's Wrap Value as TREQ + + + PWM_WRAP4 + 36 + Select PWM Counter 4's Wrap Value as TREQ + + + PWM_WRAP5 + 37 + Select PWM Counter 5's Wrap Value as TREQ + + + PWM_WRAP6 + 38 + Select PWM Counter 6's Wrap Value as TREQ + + + PWM_WRAP7 + 39 + Select PWM Counter 7's Wrap Value as TREQ + + + PWM_WRAP8 + 40 + Select PWM Counter 8's Wrap Value as TREQ + + + PWM_WRAP9 + 41 + Select PWM Counter 9's Wrap Value as TREQ + + + PWM_WRAP10 + 42 + Select PWM Counter 0's Wrap Value as TREQ + + + PWM_WRAP11 + 43 + Select PWM Counter 1's Wrap Value as TREQ + + + I2C0_TX + 44 + Select I2C0's TX FIFO as TREQ + + + I2C0_RX + 45 + Select I2C0's RX FIFO as TREQ + + + I2C1_TX + 46 + Select I2C1's TX FIFO as TREQ + + + I2C1_RX + 47 + Select I2C1's RX FIFO as TREQ + + + ADC + 48 + Select the ADC as TREQ + + + XIP_STREAM + 49 + Select the XIP Streaming FIFO as TREQ + + + XIP_QMITX + 50 + Select XIP_QMITX as TREQ + + + XIP_QMIRX + 51 + Select XIP_QMIRX as TREQ + + + HSTX + 52 + Select HSTX as TREQ + + + CORESIGHT + 53 + Select CORESIGHT as TREQ + + + SHA256 + 54 + Select SHA256 as TREQ + + + TIMER0 + 59 + Select Timer 0 as TREQ + + + TIMER1 + 60 + Select Timer 1 as TREQ + + + TIMER2 + 61 + Select Timer 2 as TREQ (Optional) + + + TIMER3 + 62 + Select Timer 3 as TREQ (Optional) + + + PERMANENT + 63 + Permanent request, for unpaced transfers. + + + + + CHAIN_TO + 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. + [16:13] + read-write + + + RING_SEL + 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. + [12:12] + read-write + + + RING_SIZE + 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. + [11:8] + read-write + + + RING_NONE + 0 + + + + + INCR_WRITE_REV + 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. + [7:7] + read-write + + + INCR_WRITE + 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. + [6:6] + read-write + + + INCR_READ_REV + 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. + [5:5] + read-write + + + INCR_READ + 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. + [4:4] + read-write + + + DATA_SIZE + 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. + [3:2] + read-write + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + + + HIGH_PRIORITY + 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. + [1:1] + read-write + + + EN + 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) + [0:0] + read-write + + + + + CH15_AL1_CTRL + 0x000003d0 + Alias for channel 15 CTRL register + 0x00000000 + + + CH15_AL1_CTRL + [31:0] + read-write + + + + + CH15_AL1_READ_ADDR + 0x000003d4 + Alias for channel 15 READ_ADDR register + 0x00000000 + + + CH15_AL1_READ_ADDR + [31:0] + read-write + + + + + CH15_AL1_WRITE_ADDR + 0x000003d8 + Alias for channel 15 WRITE_ADDR register + 0x00000000 + + + CH15_AL1_WRITE_ADDR + [31:0] + read-write + + + + + CH15_AL1_TRANS_COUNT_TRIG + 0x000003dc + Alias for channel 15 TRANS_COUNT register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH15_AL1_TRANS_COUNT_TRIG + [31:0] + read-write + + + + + CH15_AL2_CTRL + 0x000003e0 + Alias for channel 15 CTRL register + 0x00000000 + + + CH15_AL2_CTRL + [31:0] + read-write + + + + + CH15_AL2_TRANS_COUNT + 0x000003e4 + Alias for channel 15 TRANS_COUNT register + 0x00000000 + + + CH15_AL2_TRANS_COUNT + [31:0] + read-write + + + + + CH15_AL2_READ_ADDR + 0x000003e8 + Alias for channel 15 READ_ADDR register + 0x00000000 + + + CH15_AL2_READ_ADDR + [31:0] + read-write + + + + + CH15_AL2_WRITE_ADDR_TRIG + 0x000003ec + Alias for channel 15 WRITE_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH15_AL2_WRITE_ADDR_TRIG + [31:0] + read-write + + + + + CH15_AL3_CTRL + 0x000003f0 + Alias for channel 15 CTRL register + 0x00000000 + + + CH15_AL3_CTRL + [31:0] + read-write + + + + + CH15_AL3_WRITE_ADDR + 0x000003f4 + Alias for channel 15 WRITE_ADDR register + 0x00000000 + + + CH15_AL3_WRITE_ADDR + [31:0] + read-write + + + + + CH15_AL3_TRANS_COUNT + 0x000003f8 + Alias for channel 15 TRANS_COUNT register + 0x00000000 + + + CH15_AL3_TRANS_COUNT + [31:0] + read-write + + + + + CH15_AL3_READ_ADDR_TRIG + 0x000003fc + Alias for channel 15 READ_ADDR register + This is a trigger register (0xc). Writing a nonzero value will + reload the channel counter and start the channel. + 0x00000000 + + + CH15_AL3_READ_ADDR_TRIG + [31:0] + read-write + + + + + INTR + 0x00000400 + Interrupt Status (raw) + 0x00000000 + + + INTR + 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. + [15:0] + read-write + oneToClear + + + + + INTE0 + 0x00000404 + Interrupt Enables for IRQ 0 + 0x00000000 + + + INTE0 + 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. + [15:0] + read-write + + + + + INTF0 + 0x00000408 + Force Interrupts + 0x00000000 + + + INTF0 + Write 1s to force the corresponding bits in INTS0. The interrupt remains asserted until INTF0 is cleared. + [15:0] + read-write + + + + + INTS0 + 0x0000040c + Interrupt Status for IRQ 0 + 0x00000000 + + + INTS0 + 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. + [15:0] + read-write + oneToClear + + + + + INTR1 + 0x00000410 + Interrupt Status (raw) + 0x00000000 + + + INTR1 + 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. + [15:0] + read-write + oneToClear + + + + + INTE1 + 0x00000414 + Interrupt Enables for IRQ 1 + 0x00000000 + + + INTE1 + 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. + [15:0] + read-write + + + + + INTF1 + 0x00000418 + Force Interrupts + 0x00000000 + + + INTF1 + Write 1s to force the corresponding bits in INTS1. The interrupt remains asserted until INTF1 is cleared. + [15:0] + read-write + + + + + INTS1 + 0x0000041c + Interrupt Status for IRQ 1 + 0x00000000 + + + INTS1 + 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. + [15:0] + read-write + oneToClear + + + + + INTR2 + 0x00000420 + Interrupt Status (raw) + 0x00000000 + + + INTR2 + 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. + [15:0] + read-write + oneToClear + + + + + INTE2 + 0x00000424 + Interrupt Enables for IRQ 2 + 0x00000000 + + + INTE2 + 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. + [15:0] + read-write + + + + + INTF2 + 0x00000428 + Force Interrupts + 0x00000000 + + + INTF2 + Write 1s to force the corresponding bits in INTS2. The interrupt remains asserted until INTF2 is cleared. + [15:0] + read-write + + + + + INTS2 + 0x0000042c + Interrupt Status for IRQ 2 + 0x00000000 + + + INTS2 + 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. + [15:0] + read-write + oneToClear + + + + + INTR3 + 0x00000430 + Interrupt Status (raw) + 0x00000000 + + + INTR3 + 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. + [15:0] + read-write + oneToClear + + + + + INTE3 + 0x00000434 + Interrupt Enables for IRQ 3 + 0x00000000 + + + INTE3 + 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. + [15:0] + read-write + + + + + INTF3 + 0x00000438 + Force Interrupts + 0x00000000 + + + INTF3 + Write 1s to force the corresponding bits in INTS3. The interrupt remains asserted until INTF3 is cleared. + [15:0] + read-write + + + + + INTS3 + 0x0000043c + Interrupt Status for IRQ 3 + 0x00000000 + + + INTS3 + 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. + [15:0] + read-write + oneToClear + + + + + TIMER0 + 0x00000440 + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + TIMER1 + 0x00000444 + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + TIMER2 + 0x00000448 + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + TIMER3 + 0x0000044c + 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. + 0x00000000 + + + X + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + [31:16] + read-write + + + Y + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + [15:0] + read-write + + + + + MULTI_CHAN_TRIGGER + 0x00000450 + Trigger one or more channels simultaneously + 0x00000000 + + + MULTI_CHAN_TRIGGER + 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. + [15:0] + write-only + + + + + SNIFF_CTRL + 0x00000454 + Sniffer Control + 0x00000000 + + + OUT_INV + 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. + [11:11] + read-write + + + OUT_REV + 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. + [10:10] + read-write + + + BSWAP + 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. + [9:9] + read-write + + + CALC + [8:5] + read-write + + + CRC32 + 0 + Calculate a CRC-32 (IEEE802.3 polynomial) + + + CRC32R + 1 + Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data + + + CRC16 + 2 + Calculate a CRC-16-CCITT + + + CRC16R + 3 + Calculate a CRC-16-CCITT with bit reversed data + + + EVEN + 14 + XOR reduction over all data. == 1 if the total 1 population count is odd. + + + SUM + 15 + Calculate a simple 32-bit checksum (addition with a 32 bit accumulator) + + + + + DMACH + DMA channel for Sniffer to observe + [4:1] + read-write + + + EN + Enable sniffer + [0:0] + read-write + + + + + SNIFF_DATA + 0x00000458 + Data accumulator for sniff hardware + 0x00000000 + + + SNIFF_DATA + 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. + [31:0] + read-write + + + + + FIFO_LEVELS + 0x00000460 + Debug RAF, WAF, TDF levels + 0x00000000 + + + RAF_LVL + Current Read-Address-FIFO fill level + [23:16] + read-only + + + WAF_LVL + Current Write-Address-FIFO fill level + [15:8] + read-only + + + TDF_LVL + Current Transfer-Data-FIFO fill level + [7:0] + read-only + + + + + CHAN_ABORT + 0x00000464 + Abort an in-progress transfer sequence on one or more channels + 0x00000000 + + + CHAN_ABORT + 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. + [15:0] + write-only + + + + + N_CHANNELS + 0x00000468 + 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. + 0x00000000 + + + N_CHANNELS + [4:0] + read-only + + + + + SECCFG_CH0 + 0x00000480 + 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH1 + 0x00000484 + Security configuration for channel 1. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH2 + 0x00000488 + Security configuration for channel 2. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH3 + 0x0000048c + Security configuration for channel 3. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH4 + 0x00000490 + Security configuration for channel 4. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH5 + 0x00000494 + Security configuration for channel 5. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH6 + 0x00000498 + Security configuration for channel 6. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH7 + 0x0000049c + Security configuration for channel 7. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH8 + 0x000004a0 + Security configuration for channel 8. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH9 + 0x000004a4 + Security configuration for channel 9. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH10 + 0x000004a8 + Security configuration for channel 10. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH11 + 0x000004ac + Security configuration for channel 11. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH12 + 0x000004b0 + Security configuration for channel 12. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH13 + 0x000004b4 + Security configuration for channel 13. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH14 + 0x000004b8 + Security configuration for channel 14. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_CH15 + 0x000004bc + Security configuration for channel 15. 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. + 0x00000003 + + + LOCK + 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. + [2:2] + read-write + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_IRQ0 + 0x000004c0 + 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. + 0x00000003 + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_IRQ1 + 0x000004c4 + Security configuration for IRQ 1. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags. + 0x00000003 + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_IRQ2 + 0x000004c8 + Security configuration for IRQ 2. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags. + 0x00000003 + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_IRQ3 + 0x000004cc + Security configuration for IRQ 3. Control whether the IRQ permits configuration by Non-secure/Unprivileged contexts, and whether it can observe Secure/Privileged channel interrupt flags. + 0x00000003 + + + S + 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. + [1:1] + read-write + + + P + 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. + [0:0] + read-write + + + + + SECCFG_MISC + 0x000004d0 + Miscellaneous security configuration + 0x000003ff + + + TIMER3_S + If 1, the TIMER3 register is only accessible from a Secure context, and timer DREQ 3 is only visible to Secure channels. + [9:9] + read-write + + + TIMER3_P + 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. + [8:8] + read-write + + + TIMER2_S + If 1, the TIMER2 register is only accessible from a Secure context, and timer DREQ 2 is only visible to Secure channels. + [7:7] + read-write + + + TIMER2_P + 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. + [6:6] + read-write + + + TIMER1_S + If 1, the TIMER1 register is only accessible from a Secure context, and timer DREQ 1 is only visible to Secure channels. + [5:5] + read-write + + + TIMER1_P + 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. + [4:4] + read-write + + + TIMER0_S + If 1, the TIMER0 register is only accessible from a Secure context, and timer DREQ 0 is only visible to Secure channels. + [3:3] + read-write + + + TIMER0_P + 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. + [2:2] + read-write + + + SNIFF_S + 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. + [1:1] + read-write + + + SNIFF_P + 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. + [0:0] + read-write + + + + + MPU_CTRL + 0x00000500 + Control register for DMA MPU. Accessible only from a Privileged context. + 0x00000000 + + + NS_HIDE_ADDR + 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. + [3:3] + read-write + + + S + Determine whether an address not covered by an active MPU region is Secure (1) or Non-secure (0) + [2:2] + read-write + + + P + Determine whether an address not covered by an active MPU region is Privileged (1) or Unprivileged (0) + [1:1] + read-write + + + + + MPU_BAR0 + 0x00000504 + Base address register for MPU region 0. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR0 + 0x00000508 + Limit address register for MPU region 0. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR1 + 0x0000050c + Base address register for MPU region 1. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR1 + 0x00000510 + Limit address register for MPU region 1. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR2 + 0x00000514 + Base address register for MPU region 2. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR2 + 0x00000518 + Limit address register for MPU region 2. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR3 + 0x0000051c + Base address register for MPU region 3. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR3 + 0x00000520 + Limit address register for MPU region 3. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR4 + 0x00000524 + Base address register for MPU region 4. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR4 + 0x00000528 + Limit address register for MPU region 4. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR5 + 0x0000052c + Base address register for MPU region 5. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR5 + 0x00000530 + Limit address register for MPU region 5. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR6 + 0x00000534 + Base address register for MPU region 6. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR6 + 0x00000538 + Limit address register for MPU region 6. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + MPU_BAR7 + 0x0000053c + Base address register for MPU region 7. Writable only from a Secure, Privileged context. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + + + MPU_LAR7 + 0x00000540 + Limit address register for MPU region 7. Writable only from a Secure, Privileged context, with the exception of the P bit. + 0x00000000 + + + ADDR + 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. + [31:5] + read-write + + + S + Determines the Secure/Non-secure (=1/0) status of addresses matching this region, if this region is enabled. + [2:2] + read-write + + + P + 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. + [1:1] + read-write + + + EN + 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. + [0:0] + read-write + + + + + CH0_DBG_CTDREQ + 0x00000800 + 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. + 0x00000000 + + + CH0_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH0_DBG_TCR + 0x00000804 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH0_DBG_TCR + [31:0] + read-only + + + + + CH1_DBG_CTDREQ + 0x00000840 + 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. + 0x00000000 + + + CH1_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH1_DBG_TCR + 0x00000844 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH1_DBG_TCR + [31:0] + read-only + + + + + CH2_DBG_CTDREQ + 0x00000880 + 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. + 0x00000000 + + + CH2_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH2_DBG_TCR + 0x00000884 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH2_DBG_TCR + [31:0] + read-only + + + + + CH3_DBG_CTDREQ + 0x000008c0 + 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. + 0x00000000 + + + CH3_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH3_DBG_TCR + 0x000008c4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH3_DBG_TCR + [31:0] + read-only + + + + + CH4_DBG_CTDREQ + 0x00000900 + 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. + 0x00000000 + + + CH4_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH4_DBG_TCR + 0x00000904 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH4_DBG_TCR + [31:0] + read-only + + + + + CH5_DBG_CTDREQ + 0x00000940 + 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. + 0x00000000 + + + CH5_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH5_DBG_TCR + 0x00000944 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH5_DBG_TCR + [31:0] + read-only + + + + + CH6_DBG_CTDREQ + 0x00000980 + 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. + 0x00000000 + + + CH6_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH6_DBG_TCR + 0x00000984 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH6_DBG_TCR + [31:0] + read-only + + + + + CH7_DBG_CTDREQ + 0x000009c0 + 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. + 0x00000000 + + + CH7_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH7_DBG_TCR + 0x000009c4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH7_DBG_TCR + [31:0] + read-only + + + + + CH8_DBG_CTDREQ + 0x00000a00 + 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. + 0x00000000 + + + CH8_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH8_DBG_TCR + 0x00000a04 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH8_DBG_TCR + [31:0] + read-only + + + + + CH9_DBG_CTDREQ + 0x00000a40 + 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. + 0x00000000 + + + CH9_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH9_DBG_TCR + 0x00000a44 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH9_DBG_TCR + [31:0] + read-only + + + + + CH10_DBG_CTDREQ + 0x00000a80 + 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. + 0x00000000 + + + CH10_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH10_DBG_TCR + 0x00000a84 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH10_DBG_TCR + [31:0] + read-only + + + + + CH11_DBG_CTDREQ + 0x00000ac0 + 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. + 0x00000000 + + + CH11_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH11_DBG_TCR + 0x00000ac4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH11_DBG_TCR + [31:0] + read-only + + + + + CH12_DBG_CTDREQ + 0x00000b00 + 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. + 0x00000000 + + + CH12_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH12_DBG_TCR + 0x00000b04 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH12_DBG_TCR + [31:0] + read-only + + + + + CH13_DBG_CTDREQ + 0x00000b40 + 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. + 0x00000000 + + + CH13_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH13_DBG_TCR + 0x00000b44 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH13_DBG_TCR + [31:0] + read-only + + + + + CH14_DBG_CTDREQ + 0x00000b80 + 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. + 0x00000000 + + + CH14_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH14_DBG_TCR + 0x00000b84 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH14_DBG_TCR + [31:0] + read-only + + + + + CH15_DBG_CTDREQ + 0x00000bc0 + 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. + 0x00000000 + + + CH15_DBG_CTDREQ + [5:0] + read-write + oneToClear + + + + + CH15_DBG_TCR + 0x00000bc4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + 0x00000000 + + + CH15_DBG_TCR + [31:0] + read-only + + + + + + + TIMER0 + 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 + 0x400b0000 + + 0 + 76 + registers + + + TIMER0_IRQ_0 + 0 + + + TIMER0_IRQ_1 + 1 + + + TIMER0_IRQ_2 + 2 + + + TIMER0_IRQ_3 + 3 + + + + TIMEHW + 0x00000000 + Write to bits 63:32 of time always write timelw before timehw + 0x00000000 + + + TIMEHW + [31:0] + write-only + + + + + TIMELW + 0x00000004 + Write to bits 31:0 of time writes do not get copied to time until timehw is written + 0x00000000 + + + TIMELW + [31:0] + write-only + + + + + TIMEHR + 0x00000008 + Read from bits 63:32 of time always read timelr before timehr + 0x00000000 + + + TIMEHR + [31:0] + read-only + + + + + TIMELR + 0x0000000c + Read from bits 31:0 of time + 0x00000000 + + + TIMELR + [31:0] + read-only + modify + + + + + ALARM0 + 0x00000010 + Arm alarm 0, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM0 == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM0 + [31:0] + read-write + + + + + ALARM1 + 0x00000014 + Arm alarm 1, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM1 == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM1 + [31:0] + read-write + + + + + ALARM2 + 0x00000018 + Arm alarm 2, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM2 == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM2 + [31:0] + read-write + + + + + ALARM3 + 0x0000001c + Arm alarm 3, and configure the time it will fire. Once armed, the alarm fires when TIMER_ALARM3 == TIMELR. The alarm will disarm itself once it fires, and can be disarmed early using the ARMED status register. + 0x00000000 + + + ALARM3 + [31:0] + read-write + + + + + ARMED + 0x00000020 + 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. + 0x00000000 + + + ARMED + [3:0] + read-write + oneToClear + + + + + TIMERAWH + 0x00000024 + Raw read from bits 63:32 of time (no side effects) + 0x00000000 + + + TIMERAWH + [31:0] + read-only + + + + + TIMERAWL + 0x00000028 + Raw read from bits 31:0 of time (no side effects) + 0x00000000 + + + TIMERAWL + [31:0] + read-only + + + + + DBGPAUSE + 0x0000002c + Set bits high to enable pause when the corresponding debug ports are active + 0x00000007 + + + DBG1 + Pause when processor 1 is in debug mode + [2:2] + read-write + + + DBG0 + Pause when processor 0 is in debug mode + [1:1] + read-write + + + + + PAUSE + 0x00000030 + Set high to pause the timer + 0x00000000 + + + PAUSE + [0:0] + read-write + + + + + LOCKED + 0x00000034 + Set locked bit to disable write access to timer Once set, cannot be cleared (without a reset) + 0x00000000 + + + LOCKED + [0:0] + read-write + + + + + SOURCE + 0x00000038 + 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. + 0x00000000 + + + CLK_SYS + [0:0] + read-write + + + TICK + 0 + + + CLK_SYS + 1 + + + + + + + INTR + 0x0000003c + Raw Interrupts + 0x00000000 + + + ALARM_3 + [3:3] + read-write + oneToClear + + + ALARM_2 + [2:2] + read-write + oneToClear + + + ALARM_1 + [1:1] + read-write + oneToClear + + + ALARM_0 + [0:0] + read-write + oneToClear + + + + + INTE + 0x00000040 + Interrupt Enable + 0x00000000 + + + ALARM_3 + [3:3] + read-write + + + ALARM_2 + [2:2] + read-write + + + ALARM_1 + [1:1] + read-write + + + ALARM_0 + [0:0] + read-write + + + + + INTF + 0x00000044 + Interrupt Force + 0x00000000 + + + ALARM_3 + [3:3] + read-write + + + ALARM_2 + [2:2] + read-write + + + ALARM_1 + [1:1] + read-write + + + ALARM_0 + [0:0] + read-write + + + + + INTS + 0x00000048 + Interrupt status after masking & forcing + 0x00000000 + + + ALARM_3 + [3:3] + read-only + + + ALARM_2 + [2:2] + read-only + + + ALARM_1 + [1:1] + read-only + + + ALARM_0 + [0:0] + read-only + + + + + + + TIMER1 + 0x400b8000 + + TIMER1_IRQ_0 + 4 + + + TIMER1_IRQ_1 + 5 + + + TIMER1_IRQ_2 + 6 + + + TIMER1_IRQ_3 + 7 + + + + PWM + Simple PWM + 0x400a8000 + + 0 + 272 + registers + + + PWM_IRQ_WRAP_0 + 8 + + + PWM_IRQ_WRAP_1 + 9 + + + + CH0_CSR + 0x00000000 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH0_DIV + 0x00000004 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH0_CTR + 0x00000008 + Direct access to the PWM counter + 0x00000000 + + + CH0_CTR + [15:0] + read-write + + + + + CH0_CC + 0x0000000c + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH0_TOP + 0x00000010 + Counter wrap value + 0x0000ffff + + + CH0_TOP + [15:0] + read-write + + + + + CH1_CSR + 0x00000014 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH1_DIV + 0x00000018 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH1_CTR + 0x0000001c + Direct access to the PWM counter + 0x00000000 + + + CH1_CTR + [15:0] + read-write + + + + + CH1_CC + 0x00000020 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH1_TOP + 0x00000024 + Counter wrap value + 0x0000ffff + + + CH1_TOP + [15:0] + read-write + + + + + CH2_CSR + 0x00000028 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH2_DIV + 0x0000002c + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH2_CTR + 0x00000030 + Direct access to the PWM counter + 0x00000000 + + + CH2_CTR + [15:0] + read-write + + + + + CH2_CC + 0x00000034 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH2_TOP + 0x00000038 + Counter wrap value + 0x0000ffff + + + CH2_TOP + [15:0] + read-write + + + + + CH3_CSR + 0x0000003c + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH3_DIV + 0x00000040 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH3_CTR + 0x00000044 + Direct access to the PWM counter + 0x00000000 + + + CH3_CTR + [15:0] + read-write + + + + + CH3_CC + 0x00000048 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH3_TOP + 0x0000004c + Counter wrap value + 0x0000ffff + + + CH3_TOP + [15:0] + read-write + + + + + CH4_CSR + 0x00000050 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH4_DIV + 0x00000054 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH4_CTR + 0x00000058 + Direct access to the PWM counter + 0x00000000 + + + CH4_CTR + [15:0] + read-write + + + + + CH4_CC + 0x0000005c + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH4_TOP + 0x00000060 + Counter wrap value + 0x0000ffff + + + CH4_TOP + [15:0] + read-write + + + + + CH5_CSR + 0x00000064 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH5_DIV + 0x00000068 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH5_CTR + 0x0000006c + Direct access to the PWM counter + 0x00000000 + + + CH5_CTR + [15:0] + read-write + + + + + CH5_CC + 0x00000070 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH5_TOP + 0x00000074 + Counter wrap value + 0x0000ffff + + + CH5_TOP + [15:0] + read-write + + + + + CH6_CSR + 0x00000078 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH6_DIV + 0x0000007c + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH6_CTR + 0x00000080 + Direct access to the PWM counter + 0x00000000 + + + CH6_CTR + [15:0] + read-write + + + + + CH6_CC + 0x00000084 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH6_TOP + 0x00000088 + Counter wrap value + 0x0000ffff + + + CH6_TOP + [15:0] + read-write + + + + + CH7_CSR + 0x0000008c + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH7_DIV + 0x00000090 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH7_CTR + 0x00000094 + Direct access to the PWM counter + 0x00000000 + + + CH7_CTR + [15:0] + read-write + + + + + CH7_CC + 0x00000098 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH7_TOP + 0x0000009c + Counter wrap value + 0x0000ffff + + + CH7_TOP + [15:0] + read-write + + + + + CH8_CSR + 0x000000a0 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH8_DIV + 0x000000a4 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH8_CTR + 0x000000a8 + Direct access to the PWM counter + 0x00000000 + + + CH8_CTR + [15:0] + read-write + + + + + CH8_CC + 0x000000ac + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH8_TOP + 0x000000b0 + Counter wrap value + 0x0000ffff + + + CH8_TOP + [15:0] + read-write + + + + + CH9_CSR + 0x000000b4 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH9_DIV + 0x000000b8 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH9_CTR + 0x000000bc + Direct access to the PWM counter + 0x00000000 + + + CH9_CTR + [15:0] + read-write + + + + + CH9_CC + 0x000000c0 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH9_TOP + 0x000000c4 + Counter wrap value + 0x0000ffff + + + CH9_TOP + [15:0] + read-write + + + + + CH10_CSR + 0x000000c8 + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH10_DIV + 0x000000cc + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH10_CTR + 0x000000d0 + Direct access to the PWM counter + 0x00000000 + + + CH10_CTR + [15:0] + read-write + + + + + CH10_CC + 0x000000d4 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH10_TOP + 0x000000d8 + Counter wrap value + 0x0000ffff + + + CH10_TOP + [15:0] + read-write + + + + + CH11_CSR + 0x000000dc + Control and status register + 0x00000000 + + + PH_ADV + 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) + [7:7] + write-only + + + PH_RET + 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. + [6:6] + write-only + + + DIVMODE + [5:4] + read-write + + + div + 0 + Free-running counting at rate dictated by fractional divider + + + level + 1 + Fractional divider operation is gated by the PWM B pin. + + + rise + 2 + Counter advances with each rising edge of the PWM B pin. + + + fall + 3 + Counter advances with each falling edge of the PWM B pin. + + + + + B_INV + Invert output B + [3:3] + read-write + + + A_INV + Invert output A + [2:2] + read-write + + + PH_CORRECT + 1: Enable phase-correct modulation. 0: Trailing-edge + [1:1] + read-write + + + EN + Enable the PWM channel. + [0:0] + read-write + + + + + CH11_DIV + 0x000000e0 + 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. + 0x00000010 + + + INT + [11:4] + read-write + + + FRAC + [3:0] + read-write + + + + + CH11_CTR + 0x000000e4 + Direct access to the PWM counter + 0x00000000 + + + CH11_CTR + [15:0] + read-write + + + + + CH11_CC + 0x000000e8 + Counter compare values + 0x00000000 + + + B + [31:16] + read-write + + + A + [15:0] + read-write + + + + + CH11_TOP + 0x000000ec + Counter wrap value + 0x0000ffff + + + CH11_TOP + [15:0] + read-write + + + + + EN + 0x000000f0 + 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. + 0x00000000 + + + CH11 + [11:11] + read-write + + + CH10 + [10:10] + read-write + + + CH9 + [9:9] + read-write + + + CH8 + [8:8] + read-write + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + INTR + 0x000000f4 + Raw Interrupts + 0x00000000 + + + CH11 + [11:11] + read-write + oneToClear + + + CH10 + [10:10] + read-write + oneToClear + + + CH9 + [9:9] + read-write + oneToClear + + + CH8 + [8:8] + read-write + oneToClear + + + CH7 + [7:7] + read-write + oneToClear + + + CH6 + [6:6] + read-write + oneToClear + + + CH5 + [5:5] + read-write + oneToClear + + + CH4 + [4:4] + read-write + oneToClear + + + CH3 + [3:3] + read-write + oneToClear + + + CH2 + [2:2] + read-write + oneToClear + + + CH1 + [1:1] + read-write + oneToClear + + + CH0 + [0:0] + read-write + oneToClear + + + + + IRQ0_INTE + 0x000000f8 + Interrupt Enable for irq0 + 0x00000000 + + + CH11 + [11:11] + read-write + + + CH10 + [10:10] + read-write + + + CH9 + [9:9] + read-write + + + CH8 + [8:8] + read-write + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + IRQ0_INTF + 0x000000fc + Interrupt Force for irq0 + 0x00000000 + + + CH11 + [11:11] + read-write + + + CH10 + [10:10] + read-write + + + CH9 + [9:9] + read-write + + + CH8 + [8:8] + read-write + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + IRQ0_INTS + 0x00000100 + Interrupt status after masking & forcing for irq0 + 0x00000000 + + + CH11 + [11:11] + read-only + + + CH10 + [10:10] + read-only + + + CH9 + [9:9] + read-only + + + CH8 + [8:8] + read-only + + + CH7 + [7:7] + read-only + + + CH6 + [6:6] + read-only + + + CH5 + [5:5] + read-only + + + CH4 + [4:4] + read-only + + + CH3 + [3:3] + read-only + + + CH2 + [2:2] + read-only + + + CH1 + [1:1] + read-only + + + CH0 + [0:0] + read-only + + + + + IRQ1_INTE + 0x00000104 + Interrupt Enable for irq1 + 0x00000000 + + + CH11 + [11:11] + read-write + + + CH10 + [10:10] + read-write + + + CH9 + [9:9] + read-write + + + CH8 + [8:8] + read-write + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + IRQ1_INTF + 0x00000108 + Interrupt Force for irq1 + 0x00000000 + + + CH11 + [11:11] + read-write + + + CH10 + [10:10] + read-write + + + CH9 + [9:9] + read-write + + + CH8 + [8:8] + read-write + + + CH7 + [7:7] + read-write + + + CH6 + [6:6] + read-write + + + CH5 + [5:5] + read-write + + + CH4 + [4:4] + read-write + + + CH3 + [3:3] + read-write + + + CH2 + [2:2] + read-write + + + CH1 + [1:1] + read-write + + + CH0 + [0:0] + read-write + + + + + IRQ1_INTS + 0x0000010c + Interrupt status after masking & forcing for irq1 + 0x00000000 + + + CH11 + [11:11] + read-only + + + CH10 + [10:10] + read-only + + + CH9 + [9:9] + read-only + + + CH8 + [8:8] + read-only + + + CH7 + [7:7] + read-only + + + CH6 + [6:6] + read-only + + + CH5 + [5:5] + read-only + + + CH4 + [4:4] + read-only + + + CH3 + [3:3] + read-only + + + CH2 + [2:2] + read-only + + + CH1 + [1:1] + read-only + + + CH0 + [0:0] + read-only + + + + + + + ADC + Control and data interface to SAR ADC + 0x400a0000 + + 0 + 36 + registers + + + ADC_IRQ_FIFO + 35 + + + + CS + 0x00000000 + ADC Control and Status + 0x00000000 + + + RROBIN + 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. + [24:16] + read-write + + + AINSEL + 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 + [15:12] + read-write + + + ERR_STICKY + Some past ADC conversion encountered an error. Write 1 to clear. + [10:10] + read-write + oneToClear + + + ERR + The most recent ADC conversion encountered an error; result is undefined or noisy. + [9:9] + read-only + + + READY + 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed. + 0 whilst conversion in progress. + [8:8] + read-only + + + START_MANY + Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes. + [3:3] + read-write + + + START_ONCE + Start a single conversion. Self-clearing. Ignored if start_many is asserted. + [2:2] + write-only + + + TS_EN + Power on temperature sensor. 1 - enabled. 0 - disabled. + [1:1] + read-write + + + EN + Power on ADC and enable its clock. + 1 - enabled. 0 - disabled. + [0:0] + read-write + + + + + RESULT + 0x00000004 + Result of most recent ADC conversion + 0x00000000 + + + RESULT + [11:0] + read-only + + + + + FCS + 0x00000008 + FIFO control and status + 0x00000000 + + + THRESH + DREQ/IRQ asserted when level >= threshold + [27:24] + read-write + + + LEVEL + The number of conversion results currently waiting in the FIFO + [19:16] + read-only + + + OVER + 1 if the FIFO has been overflowed. Write 1 to clear. + [11:11] + read-write + oneToClear + + + UNDER + 1 if the FIFO has been underflowed. Write 1 to clear. + [10:10] + read-write + oneToClear + + + FULL + [9:9] + read-only + + + EMPTY + [8:8] + read-only + + + DREQ_EN + If 1: assert DMA requests when FIFO contains data + [3:3] + read-write + + + ERR + If 1: conversion error bit appears in the FIFO alongside the result + [2:2] + read-write + + + SHIFT + If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers. + [1:1] + read-write + + + EN + If 1: write result to the FIFO after each conversion. + [0:0] + read-write + + + + + FIFO + 0x0000000c + Conversion result FIFO + 0x00000000 + + + ERR + 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted. + [15:15] + read-only + modify + + + VAL + [11:0] + read-only + modify + + + + + DIV + 0x00000010 + 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 + 0x00000000 + + + INT + Integer part of clock divisor. + [23:8] + read-write + + + FRAC + Fractional part of clock divisor. First-order delta-sigma. + [7:0] + read-write + + + + + INTR + 0x00000014 + Raw Interrupts + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-only + + + + + INTE + 0x00000018 + Interrupt Enable + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-write + + + + + INTF + 0x0000001c + Interrupt Force + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-write + + + + + INTS + 0x00000020 + Interrupt status after masking & forcing + 0x00000000 + + + FIFO + Triggered when the sample FIFO reaches a certain level. + This level can be programmed via the FCS_THRESH field. + [0:0] + read-only + + + + + + + I2C0 + 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 + 0x40090000 + + 0 + 256 + registers + + + I2C0_IRQ + 36 + + + + IC_CON + 0x00000000 + 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. + 0x00000065 + + + STOP_DET_IF_MASTER_ACTIVE + Master issues the STOP_DET interrupt irrespective of whether master is active or not + [10:10] + read-only + + + RX_FIFO_FULL_HLD_CTRL + 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. + [9:9] + read-write + + + DISABLED + 0 + Overflow when RX_FIFO is full + + + ENABLED + 1 + Hold bus when RX_FIFO is full + + + + + TX_EMPTY_CTRL + This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register. + + Reset value: 0x0. + [8:8] + read-write + + + DISABLED + 0 + Default behaviour of TX_EMPTY interrupt + + + ENABLED + 1 + Controlled generation of TX_EMPTY interrupt + + + + + STOP_DET_IFADDRESSED + 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). + [7:7] + read-write + + + DISABLED + 0 + slave issues STOP_DET intr always + + + ENABLED + 1 + slave issues STOP_DET intr only if addressed + + + + + IC_SLAVE_DISABLE + 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. + [6:6] + read-write + + + SLAVE_ENABLED + 0 + Slave mode is enabled + + + SLAVE_DISABLED + 1 + Slave mode is disabled + + + + + IC_RESTART_EN + 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 + [5:5] + read-write + + + DISABLED + 0 + Master restart disabled + + + ENABLED + 1 + Master restart enabled + + + + + IC_10BITADDR_MASTER + 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 + [4:4] + read-write + + + ADDR_7BITS + 0 + Master 7Bit addressing mode + + + ADDR_10BITS + 1 + Master 10Bit addressing mode + + + + + IC_10BITADDR_SLAVE + 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. + [3:3] + read-write + + + ADDR_7BITS + 0 + Slave 7Bit addressing + + + ADDR_10BITS + 1 + Slave 10Bit addressing + + + + + SPEED + 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 + [2:1] + read-write + + + STANDARD + 1 + Standard Speed mode of operation + + + FAST + 2 + Fast or Fast Plus mode of operation + + + HIGH + 3 + High Speed mode of operation + + + + + MASTER_MODE + 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'. + [0:0] + read-write + + + DISABLED + 0 + Master mode is disabled + + + ENABLED + 1 + Master mode is enabled + + + + + + + IC_TAR + 0x00000004 + 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. + 0x00000055 + + + SPECIAL + 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 + [11:11] + read-write + + + DISABLED + 0 + Disables programming of GENERAL_CALL or START_BYTE transmission + + + ENABLED + 1 + Enables programming of GENERAL_CALL or START_BYTE transmission + + + + + GC_OR_START + 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 + [10:10] + read-write + + + GENERAL_CALL + 0 + GENERAL_CALL byte transmission + + + START_BYTE + 1 + START byte transmission + + + + + IC_TAR + 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. + [9:0] + read-write + + + + + IC_SAR + 0x00000008 + I2C Slave Address Register + 0x00000055 + + + IC_SAR + 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. + [9:0] + read-write + + + + + IC_DATA_CMD + 0x00000010 + 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. + 0x00000000 + + + FIRST_DATA_BYTE + 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. + [11:11] + read-only + + + INACTIVE + 0 + Sequential data byte received + + + ACTIVE + 1 + Non sequential data byte received + + + + + RESTART + 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 + [10:10] + write-only + + + DISABLE + 0 + Don't Issue RESTART before this command + + + ENABLE + 1 + Issue RESTART before this command + + + + + STOP + 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 + [9:9] + write-only + + + DISABLE + 0 + Don't Issue STOP after this command + + + ENABLE + 1 + Issue STOP after this command + + + + + CMD + 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 + [8:8] + write-only + + + WRITE + 0 + Master Write Command + + + READ + 1 + Master Read Command + + + + + DAT + 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 + [7:0] + read-write + + + + + IC_SS_SCL_HCNT + 0x00000014 + Standard Speed I2C Clock SCL High Count Register + 0x00000028 + + + IC_SS_SCL_HCNT + 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. + [15:0] + read-write + + + + + IC_SS_SCL_LCNT + 0x00000018 + Standard Speed I2C Clock SCL Low Count Register + 0x0000002f + + + IC_SS_SCL_LCNT + 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. + [15:0] + read-write + + + + + IC_FS_SCL_HCNT + 0x0000001c + Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register + 0x00000006 + + + IC_FS_SCL_HCNT + 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. + [15:0] + read-write + + + + + IC_FS_SCL_LCNT + 0x00000020 + Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register + 0x0000000d + + + IC_FS_SCL_LCNT + 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. + [15:0] + read-write + + + + + IC_INTR_STAT + 0x0000002c + 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. + 0x00000000 + + + R_RESTART_DET + See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit. + + Reset value: 0x0 + [12:12] + read-only + + + INACTIVE + 0 + R_RESTART_DET interrupt is inactive + + + ACTIVE + 1 + R_RESTART_DET interrupt is active + + + + + R_GEN_CALL + See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit. + + Reset value: 0x0 + [11:11] + read-only + + + INACTIVE + 0 + R_GEN_CALL interrupt is inactive + + + ACTIVE + 1 + R_GEN_CALL interrupt is active + + + + + R_START_DET + See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit. + + Reset value: 0x0 + [10:10] + read-only + + + INACTIVE + 0 + R_START_DET interrupt is inactive + + + ACTIVE + 1 + R_START_DET interrupt is active + + + + + R_STOP_DET + See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit. + + Reset value: 0x0 + [9:9] + read-only + + + INACTIVE + 0 + R_STOP_DET interrupt is inactive + + + ACTIVE + 1 + R_STOP_DET interrupt is active + + + + + R_ACTIVITY + See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit. + + Reset value: 0x0 + [8:8] + read-only + + + INACTIVE + 0 + R_ACTIVITY interrupt is inactive + + + ACTIVE + 1 + R_ACTIVITY interrupt is active + + + + + R_RX_DONE + See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit. + + Reset value: 0x0 + [7:7] + read-only + + + INACTIVE + 0 + R_RX_DONE interrupt is inactive + + + ACTIVE + 1 + R_RX_DONE interrupt is active + + + + + R_TX_ABRT + See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit. + + Reset value: 0x0 + [6:6] + read-only + + + INACTIVE + 0 + R_TX_ABRT interrupt is inactive + + + ACTIVE + 1 + R_TX_ABRT interrupt is active + + + + + R_RD_REQ + See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit. + + Reset value: 0x0 + [5:5] + read-only + + + INACTIVE + 0 + R_RD_REQ interrupt is inactive + + + ACTIVE + 1 + R_RD_REQ interrupt is active + + + + + R_TX_EMPTY + See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit. + + Reset value: 0x0 + [4:4] + read-only + + + INACTIVE + 0 + R_TX_EMPTY interrupt is inactive + + + ACTIVE + 1 + R_TX_EMPTY interrupt is active + + + + + R_TX_OVER + See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit. + + Reset value: 0x0 + [3:3] + read-only + + + INACTIVE + 0 + R_TX_OVER interrupt is inactive + + + ACTIVE + 1 + R_TX_OVER interrupt is active + + + + + R_RX_FULL + See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit. + + Reset value: 0x0 + [2:2] + read-only + + + INACTIVE + 0 + R_RX_FULL interrupt is inactive + + + ACTIVE + 1 + R_RX_FULL interrupt is active + + + + + R_RX_OVER + See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit. + + Reset value: 0x0 + [1:1] + read-only + + + INACTIVE + 0 + R_RX_OVER interrupt is inactive + + + ACTIVE + 1 + R_RX_OVER interrupt is active + + + + + R_RX_UNDER + See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit. + + Reset value: 0x0 + [0:0] + read-only + + + INACTIVE + 0 + RX_UNDER interrupt is inactive + + + ACTIVE + 1 + RX_UNDER interrupt is active + + + + + + + IC_INTR_MASK + 0x00000030 + 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. + 0x000008ff + + + M_RESTART_DET + This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [12:12] + read-write + + + ENABLED + 0 + RESTART_DET interrupt is masked + + + DISABLED + 1 + RESTART_DET interrupt is unmasked + + + + + M_GEN_CALL + This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [11:11] + read-write + + + ENABLED + 0 + GEN_CALL interrupt is masked + + + DISABLED + 1 + GEN_CALL interrupt is unmasked + + + + + M_START_DET + This bit masks the R_START_DET interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [10:10] + read-write + + + ENABLED + 0 + START_DET interrupt is masked + + + DISABLED + 1 + START_DET interrupt is unmasked + + + + + M_STOP_DET + This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [9:9] + read-write + + + ENABLED + 0 + STOP_DET interrupt is masked + + + DISABLED + 1 + STOP_DET interrupt is unmasked + + + + + M_ACTIVITY + This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register. + + Reset value: 0x0 + [8:8] + read-write + + + ENABLED + 0 + ACTIVITY interrupt is masked + + + DISABLED + 1 + ACTIVITY interrupt is unmasked + + + + + M_RX_DONE + This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [7:7] + read-write + + + ENABLED + 0 + RX_DONE interrupt is masked + + + DISABLED + 1 + RX_DONE interrupt is unmasked + + + + + M_TX_ABRT + This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [6:6] + read-write + + + ENABLED + 0 + TX_ABORT interrupt is masked + + + DISABLED + 1 + TX_ABORT interrupt is unmasked + + + + + M_RD_REQ + This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [5:5] + read-write + + + ENABLED + 0 + RD_REQ interrupt is masked + + + DISABLED + 1 + RD_REQ interrupt is unmasked + + + + + M_TX_EMPTY + This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [4:4] + read-write + + + ENABLED + 0 + TX_EMPTY interrupt is masked + + + DISABLED + 1 + TX_EMPTY interrupt is unmasked + + + + + M_TX_OVER + This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [3:3] + read-write + + + ENABLED + 0 + TX_OVER interrupt is masked + + + DISABLED + 1 + TX_OVER interrupt is unmasked + + + + + M_RX_FULL + This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [2:2] + read-write + + + ENABLED + 0 + RX_FULL interrupt is masked + + + DISABLED + 1 + RX_FULL interrupt is unmasked + + + + + M_RX_OVER + This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [1:1] + read-write + + + ENABLED + 0 + RX_OVER interrupt is masked + + + DISABLED + 1 + RX_OVER interrupt is unmasked + + + + + M_RX_UNDER + This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register. + + Reset value: 0x1 + [0:0] + read-write + + + ENABLED + 0 + RX_UNDER interrupt is masked + + + DISABLED + 1 + RX_UNDER interrupt is unmasked + + + + + + + IC_RAW_INTR_STAT + 0x00000034 + 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. + 0x00000000 + + + RESTART_DET + 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 + [12:12] + read-only + + + INACTIVE + 0 + RESTART_DET interrupt is inactive + + + ACTIVE + 1 + RESTART_DET interrupt is active + + + + + GEN_CALL + 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 + [11:11] + read-only + + + INACTIVE + 0 + GEN_CALL interrupt is inactive + + + ACTIVE + 1 + GEN_CALL interrupt is active + + + + + START_DET + 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 + [10:10] + read-only + + + INACTIVE + 0 + START_DET interrupt is inactive + + + ACTIVE + 1 + START_DET interrupt is active + + + + + STOP_DET + 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 + [9:9] + read-only + + + INACTIVE + 0 + STOP_DET interrupt is inactive + + + ACTIVE + 1 + STOP_DET interrupt is active + + + + + ACTIVITY + 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 + [8:8] + read-only + + + INACTIVE + 0 + RAW_INTR_ACTIVITY interrupt is inactive + + + ACTIVE + 1 + RAW_INTR_ACTIVITY interrupt is active + + + + + RX_DONE + 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 + [7:7] + read-only + + + INACTIVE + 0 + RX_DONE interrupt is inactive + + + ACTIVE + 1 + RX_DONE interrupt is active + + + + + TX_ABRT + 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 + [6:6] + read-only + + + INACTIVE + 0 + TX_ABRT interrupt is inactive + + + ACTIVE + 1 + TX_ABRT interrupt is active + + + + + RD_REQ + 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 + [5:5] + read-only + + + INACTIVE + 0 + RD_REQ interrupt is inactive + + + ACTIVE + 1 + RD_REQ interrupt is active + + + + + TX_EMPTY + 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. + [4:4] + read-only + + + INACTIVE + 0 + TX_EMPTY interrupt is inactive + + + ACTIVE + 1 + TX_EMPTY interrupt is active + + + + + TX_OVER + 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 + [3:3] + read-only + + + INACTIVE + 0 + TX_OVER interrupt is inactive + + + ACTIVE + 1 + TX_OVER interrupt is active + + + + + RX_FULL + 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 + [2:2] + read-only + + + INACTIVE + 0 + RX_FULL interrupt is inactive + + + ACTIVE + 1 + RX_FULL interrupt is active + + + + + RX_OVER + 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 + [1:1] + read-only + + + INACTIVE + 0 + RX_OVER interrupt is inactive + + + ACTIVE + 1 + RX_OVER interrupt is active + + + + + RX_UNDER + 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 + [0:0] + read-only + + + INACTIVE + 0 + RX_UNDER interrupt is inactive + + + ACTIVE + 1 + RX_UNDER interrupt is active + + + + + + + IC_RX_TL + 0x00000038 + I2C Receive FIFO Threshold Register + 0x00000000 + + + RX_TL + 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. + [7:0] + read-write + + + + + IC_TX_TL + 0x0000003c + I2C Transmit FIFO Threshold Register + 0x00000000 + + + TX_TL + 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. + [7:0] + read-write + + + + + IC_CLR_INTR + 0x00000040 + Clear Combined and Individual Interrupt Register + 0x00000000 + + + CLR_INTR + 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 + [0:0] + read-only + + + + + IC_CLR_RX_UNDER + 0x00000044 + Clear RX_UNDER Interrupt Register + 0x00000000 + + + CLR_RX_UNDER + Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_RX_OVER + 0x00000048 + Clear RX_OVER Interrupt Register + 0x00000000 + + + CLR_RX_OVER + Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_TX_OVER + 0x0000004c + Clear TX_OVER Interrupt Register + 0x00000000 + + + CLR_TX_OVER + Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_RD_REQ + 0x00000050 + Clear RD_REQ Interrupt Register + 0x00000000 + + + CLR_RD_REQ + Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_TX_ABRT + 0x00000054 + Clear TX_ABRT Interrupt Register + 0x00000000 + + + CLR_TX_ABRT + 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 + [0:0] + read-only + + + + + IC_CLR_RX_DONE + 0x00000058 + Clear RX_DONE Interrupt Register + 0x00000000 + + + CLR_RX_DONE + Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_ACTIVITY + 0x0000005c + Clear ACTIVITY Interrupt Register + 0x00000000 + + + CLR_ACTIVITY + 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 + [0:0] + read-only + + + + + IC_CLR_STOP_DET + 0x00000060 + Clear STOP_DET Interrupt Register + 0x00000000 + + + CLR_STOP_DET + Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_START_DET + 0x00000064 + Clear START_DET Interrupt Register + 0x00000000 + + + CLR_START_DET + Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_CLR_GEN_CALL + 0x00000068 + Clear GEN_CALL Interrupt Register + 0x00000000 + + + CLR_GEN_CALL + Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_ENABLE + 0x0000006c + I2C Enable Register + 0x00000000 + + + TX_CMD_BLOCK + 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 + [2:2] + read-write + + + NOT_BLOCKED + 0 + Tx Command execution not blocked + + + BLOCKED + 1 + Tx Command execution blocked + + + + + ABORT + 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 + [1:1] + read-write + + + DISABLE + 0 + ABORT operation not in progress + + + ENABLED + 1 + ABORT operation in progress + + + + + ENABLE + 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 + [0:0] + read-write + + + DISABLED + 0 + I2C is disabled + + + ENABLED + 1 + I2C is enabled + + + + + + + IC_STATUS + 0x00000070 + 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 + 0x00000006 + + + SLV_ACTIVITY + 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 + [6:6] + read-only + + + IDLE + 0 + Slave is idle + + + ACTIVE + 1 + Slave not idle + + + + + MST_ACTIVITY + 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 + [5:5] + read-only + + + IDLE + 0 + Master is idle + + + ACTIVE + 1 + Master not idle + + + + + RFF + 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 + [4:4] + read-only + + + NOT_FULL + 0 + Rx FIFO not full + + + FULL + 1 + Rx FIFO is full + + + + + RFNE + 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 + [3:3] + read-only + + + EMPTY + 0 + Rx FIFO is empty + + + NOT_EMPTY + 1 + Rx FIFO not empty + + + + + TFE + 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 + [2:2] + read-only + + + NON_EMPTY + 0 + Tx FIFO not empty + + + EMPTY + 1 + Tx FIFO is empty + + + + + TFNF + 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 + [1:1] + read-only + + + FULL + 0 + Tx FIFO is full + + + NOT_FULL + 1 + Tx FIFO not full + + + + + ACTIVITY + I2C Activity Status. Reset value: 0x0 + [0:0] + read-only + + + INACTIVE + 0 + I2C is idle + + + ACTIVE + 1 + I2C is active + + + + + + + IC_TXFLR + 0x00000074 + 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. + 0x00000000 + + + TXFLR + Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO. + + Reset value: 0x0 + [4:0] + read-only + + + + + IC_RXFLR + 0x00000078 + 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. + 0x00000000 + + + RXFLR + Receive FIFO Level. Contains the number of valid data entries in the receive FIFO. + + Reset value: 0x0 + [4:0] + read-only + + + + + IC_SDA_HOLD + 0x0000007c + 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. + 0x00000001 + + + IC_SDA_RX_HOLD + 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]. + [23:16] + read-write + + + IC_SDA_TX_HOLD + 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]. + [15:0] + read-write + + + + + IC_TX_ABRT_SOURCE + 0x00000080 + 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. + 0x00000000 + + + TX_FLUSH_CNT + 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 + [31:23] + read-only + + + ABRT_USER_ABRT + 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 + [16:16] + read-only + + + ABRT_USER_ABRT_VOID + 0 + Transfer abort detected by master- scenario not present + + + ABRT_USER_ABRT_GENERATED + 1 + Transfer abort detected by master + + + + + ABRT_SLVRD_INTX + 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 + [15:15] + read-only + + + ABRT_SLVRD_INTX_VOID + 0 + Slave trying to transmit to remote master in read mode- scenario not present + + + ABRT_SLVRD_INTX_GENERATED + 1 + Slave trying to transmit to remote master in read mode + + + + + ABRT_SLV_ARBLOST + 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 + [14:14] + read-only + + + ABRT_SLV_ARBLOST_VOID + 0 + Slave lost arbitration to remote master- scenario not present + + + ABRT_SLV_ARBLOST_GENERATED + 1 + Slave lost arbitration to remote master + + + + + ABRT_SLVFLUSH_TXFIFO + 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 + [13:13] + read-only + + + ABRT_SLVFLUSH_TXFIFO_VOID + 0 + Slave flushes existing data in TX-FIFO upon getting read command- scenario not present + + + ABRT_SLVFLUSH_TXFIFO_GENERATED + 1 + Slave flushes existing data in TX-FIFO upon getting read command + + + + + ARB_LOST + 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 + [12:12] + read-only + + + ABRT_LOST_VOID + 0 + Master or Slave-Transmitter lost arbitration- scenario not present + + + ABRT_LOST_GENERATED + 1 + Master or Slave-Transmitter lost arbitration + + + + + ABRT_MASTER_DIS + 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 + [11:11] + read-only + + + ABRT_MASTER_DIS_VOID + 0 + User initiating master operation when MASTER disabled- scenario not present + + + ABRT_MASTER_DIS_GENERATED + 1 + User initiating master operation when MASTER disabled + + + + + ABRT_10B_RD_NORSTRT + 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 + [10:10] + read-only + + + ABRT_10B_RD_VOID + 0 + Master not trying to read in 10Bit addressing mode when RESTART disabled + + + ABRT_10B_RD_GENERATED + 1 + Master trying to read in 10Bit addressing mode when RESTART disabled + + + + + ABRT_SBYTE_NORSTRT + 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 + [9:9] + read-only + + + ABRT_SBYTE_NORSTRT_VOID + 0 + User trying to send START byte when RESTART disabled- scenario not present + + + ABRT_SBYTE_NORSTRT_GENERATED + 1 + User trying to send START byte when RESTART disabled + + + + + ABRT_HS_NORSTRT + 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 + [8:8] + read-only + + + ABRT_HS_NORSTRT_VOID + 0 + User trying to switch Master to HS mode when RESTART disabled- scenario not present + + + ABRT_HS_NORSTRT_GENERATED + 1 + User trying to switch Master to HS mode when RESTART disabled + + + + + ABRT_SBYTE_ACKDET + 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 + [7:7] + read-only + + + ABRT_SBYTE_ACKDET_VOID + 0 + ACK detected for START byte- scenario not present + + + ABRT_SBYTE_ACKDET_GENERATED + 1 + ACK detected for START byte + + + + + ABRT_HS_ACKDET + 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 + [6:6] + read-only + + + ABRT_HS_ACK_VOID + 0 + HS Master code ACKed in HS Mode- scenario not present + + + ABRT_HS_ACK_GENERATED + 1 + HS Master code ACKed in HS Mode + + + + + ABRT_GCALL_READ + 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 + [5:5] + read-only + + + ABRT_GCALL_READ_VOID + 0 + GCALL is followed by read from bus-scenario not present + + + ABRT_GCALL_READ_GENERATED + 1 + GCALL is followed by read from bus + + + + + ABRT_GCALL_NOACK + 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 + [4:4] + read-only + + + ABRT_GCALL_NOACK_VOID + 0 + GCALL not ACKed by any slave-scenario not present + + + ABRT_GCALL_NOACK_GENERATED + 1 + GCALL not ACKed by any slave + + + + + ABRT_TXDATA_NOACK + 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 + [3:3] + read-only + + + ABRT_TXDATA_NOACK_VOID + 0 + Transmitted data non-ACKed by addressed slave-scenario not present + + + ABRT_TXDATA_NOACK_GENERATED + 1 + Transmitted data not ACKed by addressed slave + + + + + ABRT_10ADDR2_NOACK + 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 + [2:2] + read-only + + + INACTIVE + 0 + This abort is not generated + + + ACTIVE + 1 + Byte 2 of 10Bit Address not ACKed by any slave + + + + + ABRT_10ADDR1_NOACK + 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 + [1:1] + read-only + + + INACTIVE + 0 + This abort is not generated + + + ACTIVE + 1 + Byte 1 of 10Bit Address not ACKed by any slave + + + + + ABRT_7B_ADDR_NOACK + 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 + [0:0] + read-only + + + INACTIVE + 0 + This abort is not generated + + + ACTIVE + 1 + This abort is generated because of NOACK for 7-bit address + + + + + + + IC_SLV_DATA_NACK_ONLY + 0x00000084 + 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. + 0x00000000 + + + NACK + 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 + [0:0] + read-write + + + DISABLED + 0 + Slave receiver generates NACK normally + + + ENABLED + 1 + Slave receiver generates NACK upon data reception only + + + + + + + IC_DMA_CR + 0x00000088 + 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. + 0x00000000 + + + TDMAE + Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0 + [1:1] + read-write + + + DISABLED + 0 + transmit FIFO DMA channel disabled + + + ENABLED + 1 + Transmit FIFO DMA channel enabled + + + + + RDMAE + Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0 + [0:0] + read-write + + + DISABLED + 0 + Receive FIFO DMA channel disabled + + + ENABLED + 1 + Receive FIFO DMA channel enabled + + + + + + + IC_DMA_TDLR + 0x0000008c + DMA Transmit Data Level Register + 0x00000000 + + + DMATDL + 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 + [3:0] + read-write + + + + + IC_DMA_RDLR + 0x00000090 + I2C Receive Data Level Register + 0x00000000 + + + DMARDL + 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 + [3:0] + read-write + + + + + IC_SDA_SETUP + 0x00000094 + 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. + 0x00000064 + + + SDA_SETUP + 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. + [7:0] + read-write + + + + + IC_ACK_GENERAL_CALL + 0x00000098 + 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. + 0x00000001 + + + ACK_GEN_CALL + 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). + [0:0] + read-write + + + DISABLED + 0 + Generate NACK for a General Call + + + ENABLED + 1 + Generate ACK for a General Call + + + + + + + IC_ENABLE_STATUS + 0x0000009c + 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. + 0x00000000 + + + SLV_RX_DATA_LOST + 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 + [2:2] + read-only + + + INACTIVE + 0 + Slave RX Data is not lost + + + ACTIVE + 1 + Slave RX Data is lost + + + + + SLV_DISABLED_WHILE_BUSY + 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 + [1:1] + read-only + + + INACTIVE + 0 + Slave is disabled when it is idle + + + ACTIVE + 1 + Slave is disabled when it is active + + + + + IC_EN + 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 + [0:0] + read-only + + + DISABLED + 0 + I2C disabled + + + ENABLED + 1 + I2C enabled + + + + + + + IC_FS_SPKLEN + 0x000000a0 + 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. + 0x00000007 + + + IC_FS_SPKLEN + 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'. + [7:0] + read-write + + + + + IC_CLR_RESTART_DET + 0x000000a8 + Clear RESTART_DET Interrupt Register + 0x00000000 + + + CLR_RESTART_DET + Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register. + + Reset value: 0x0 + [0:0] + read-only + + + + + IC_COMP_PARAM_1 + 0x000000f4 + 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 + 0x00000000 + + + TX_BUFFER_DEPTH + TX Buffer Depth = 16 + [23:16] + read-only + + + RX_BUFFER_DEPTH + RX Buffer Depth = 16 + [15:8] + read-only + + + ADD_ENCODED_PARAMS + Encoded parameters not visible + [7:7] + read-only + + + HAS_DMA + DMA handshaking signals are enabled + [6:6] + read-only + + + INTR_IO + COMBINED Interrupt outputs + [5:5] + read-only + + + HC_COUNT_VALUES + Programmable count values for each mode. + [4:4] + read-only + + + MAX_SPEED_MODE + MAX SPEED MODE = FAST MODE + [3:2] + read-only + + + APB_DATA_WIDTH + APB data bus width is 32 bits + [1:0] + read-only + + + + + IC_COMP_VERSION + 0x000000f8 + I2C Component Version Register + 0x3230312a + + + IC_COMP_VERSION + [31:0] + read-only + + + + + IC_COMP_TYPE + 0x000000fc + I2C Component Type Register + 0x44570140 + + + IC_COMP_TYPE + 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. + [31:0] + read-only + + + + + + + I2C1 + 0x40098000 + + I2C1_IRQ + 37 + + + + SPI0 + 0x40080000 + + 0 + 4096 + registers + + + SPI0_IRQ + 31 + + + + SSPCR0 + 0x00000000 + Control register 0, SSPCR0 on page 3-4 + 0x00000000 + + + SCR + 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. + [15:8] + read-write + + + SPH + SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. + [7:7] + read-write + + + SPO + SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. + [6:6] + read-write + + + FRF + Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation. + [5:4] + read-write + + + DSS + 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. + [3:0] + read-write + + + + + SSPCR1 + 0x00000004 + Control register 1, SSPCR1 on page 3-5 + 0x00000000 + + + SOD + 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. + [3:3] + read-write + + + MS + 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. + [2:2] + read-write + + + SSE + Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled. + [1:1] + read-write + + + LBM + Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally. + [0:0] + read-write + + + + + SSPDR + 0x00000008 + Data register, SSPDR on page 3-6 + 0x00000000 + + + DATA + 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. + [15:0] + read-write + modify + + + + + SSPSR + 0x0000000c + Status register, SSPSR on page 3-7 + 0x00000003 + + + BSY + 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. + [4:4] + read-only + + + RFF + Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full. + [3:3] + read-only + + + RNE + Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty. + [2:2] + read-only + + + TNF + Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full. + [1:1] + read-only + + + TFE + Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty. + [0:0] + read-only + + + + + SSPCPSR + 0x00000010 + Clock prescale register, SSPCPSR on page 3-8 + 0x00000000 + + + CPSDVSR + 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. + [7:0] + read-write + + + + + SSPIMSC + 0x00000014 + Interrupt mask set or clear register, SSPIMSC on page 3-9 + 0x00000000 + + + TXIM + 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. + [3:3] + read-write + + + RXIM + 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. + [2:2] + read-write + + + RTIM + 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. + [1:1] + read-write + + + RORIM + 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. + [0:0] + read-write + + + + + SSPRIS + 0x00000018 + Raw interrupt status register, SSPRIS on page 3-10 + 0x00000008 + + + TXRIS + Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt + [3:3] + read-only + + + RXRIS + Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt + [2:2] + read-only + + + RTRIS + Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt + [1:1] + read-only + + + RORRIS + Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt + [0:0] + read-only + + + + + SSPMIS + 0x0000001c + Masked interrupt status register, SSPMIS on page 3-11 + 0x00000000 + + + TXMIS + Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt + [3:3] + read-only + + + RXMIS + Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt + [2:2] + read-only + + + RTMIS + Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt + [1:1] + read-only + + + RORMIS + Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt + [0:0] + read-only + + + + + SSPICR + 0x00000020 + Interrupt clear register, SSPICR on page 3-11 + 0x00000000 + + + RTIC + Clears the SSPRTINTR interrupt + [1:1] + read-write + oneToClear + + + RORIC + Clears the SSPRORINTR interrupt + [0:0] + read-write + oneToClear + + + + + SSPDMACR + 0x00000024 + DMA control register, SSPDMACR on page 3-12 + 0x00000000 + + + TXDMAE + Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. + [1:1] + read-write + + + RXDMAE + Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled. + [0:0] + read-write + + + + + SSPPERIPHID0 + 0x00000fe0 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000022 + + + PARTNUMBER0 + These bits read back as 0x22 + [7:0] + read-only + + + + + SSPPERIPHID1 + 0x00000fe4 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000010 + + + DESIGNER0 + These bits read back as 0x1 + [7:4] + read-only + + + PARTNUMBER1 + These bits read back as 0x0 + [3:0] + read-only + + + + + SSPPERIPHID2 + 0x00000fe8 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000034 + + + REVISION + These bits return the peripheral revision + [7:4] + read-only + + + DESIGNER1 + These bits read back as 0x4 + [3:0] + read-only + + + + + SSPPERIPHID3 + 0x00000fec + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + 0x00000000 + + + CONFIGURATION + These bits read back as 0x00 + [7:0] + read-only + + + + + SSPPCELLID0 + 0x00000ff0 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x0000000d + + + SSPPCELLID0 + These bits read back as 0x0D + [7:0] + read-only + + + + + SSPPCELLID1 + 0x00000ff4 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x000000f0 + + + SSPPCELLID1 + These bits read back as 0xF0 + [7:0] + read-only + + + + + SSPPCELLID2 + 0x00000ff8 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x00000005 + + + SSPPCELLID2 + These bits read back as 0x05 + [7:0] + read-only + + + + + SSPPCELLID3 + 0x00000ffc + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + 0x000000b1 + + + SSPPCELLID3 + These bits read back as 0xB1 + [7:0] + read-only + + + + + + + SPI1 + 0x40088000 + + SPI1_IRQ + 32 + + + + PIO0 + Programmable IO block + 0x50200000 + + 0 + 392 + registers + + + PIO0_IRQ_0 + 15 + + + PIO0_IRQ_1 + 16 + + + + CTRL + 0x00000000 + PIO control register + 0x00000000 + + + NEXTPREV_CLKDIV_RESTART + 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. + [26:26] + write-only + + + NEXTPREV_SM_DISABLE + 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. + [25:25] + write-only + + + NEXTPREV_SM_ENABLE + 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. + [24:24] + write-only + + + NEXT_PIO_MASK + 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. + [23:20] + write-only + + + PREV_PIO_MASK + 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. + [19:16] + write-only + + + CLKDIV_RESTART + 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. + [11:8] + write-only + + + SM_RESTART + 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. + [7:4] + write-only + + + SM_ENABLE + 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. + [3:0] + read-write + + + + + FSTAT + 0x00000004 + FIFO status register + 0x0f000f00 + + + TXEMPTY + State machine TX FIFO is empty + [27:24] + read-only + + + TXFULL + State machine TX FIFO is full + [19:16] + read-only + + + RXEMPTY + State machine RX FIFO is empty + [11:8] + read-only + + + RXFULL + State machine RX FIFO is full + [3:0] + read-only + + + + + FDEBUG + 0x00000008 + FIFO debug register + 0x00000000 + + + TXSTALL + State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear. + [27:24] + read-write + oneToClear + + + TXOVER + 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. + [19:16] + read-write + oneToClear + + + RXUNDER + 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. + [11:8] + read-write + oneToClear + + + RXSTALL + 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. + [3:0] + read-write + oneToClear + + + + + FLEVEL + 0x0000000c + FIFO levels + 0x00000000 + + + RX3 + [31:28] + read-only + + + TX3 + [27:24] + read-only + + + RX2 + [23:20] + read-only + + + TX2 + [19:16] + read-only + + + RX1 + [15:12] + read-only + + + TX1 + [11:8] + read-only + + + RX0 + [7:4] + read-only + + + TX0 + [3:0] + read-only + + + + + TXF0 + 0x00000010 + 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. + 0x00000000 + + + TXF0 + [31:0] + write-only + + + + + TXF1 + 0x00000014 + 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. + 0x00000000 + + + TXF1 + [31:0] + write-only + + + + + TXF2 + 0x00000018 + 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. + 0x00000000 + + + TXF2 + [31:0] + write-only + + + + + TXF3 + 0x0000001c + 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. + 0x00000000 + + + TXF3 + [31:0] + write-only + + + + + RXF0 + 0x00000020 + 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. + 0x00000000 + + + RXF0 + [31:0] + read-only + modify + + + + + RXF1 + 0x00000024 + 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. + 0x00000000 + + + RXF1 + [31:0] + read-only + modify + + + + + RXF2 + 0x00000028 + 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. + 0x00000000 + + + RXF2 + [31:0] + read-only + modify + + + + + RXF3 + 0x0000002c + 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. + 0x00000000 + + + RXF3 + [31:0] + read-only + modify + + + + + IRQ + 0x00000030 + 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. + 0x00000000 + + + IRQ + [7:0] + read-write + oneToClear + + + + + IRQ_FORCE + 0x00000034 + 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. + 0x00000000 + + + IRQ_FORCE + [7:0] + write-only + + + + + INPUT_SYNC_BYPASS + 0x00000038 + 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. + 0x00000000 + + + INPUT_SYNC_BYPASS + [31:0] + read-write + + + + + DBG_PADOUT + 0x0000003c + 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. + 0x00000000 + + + DBG_PADOUT + [31:0] + read-only + + + + + DBG_PADOE + 0x00000040 + 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. + 0x00000000 + + + DBG_PADOE + [31:0] + read-only + + + + + DBG_CFGINFO + 0x00000044 + 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. + 0x10000000 + + + VERSION + Version of the core PIO hardware. + [31:28] + read-only + + + v0 + 0 + Version 0 (RP2040) + + + v1 + 1 + Version 1 (RP2350) + + + + + IMEM_SIZE + The size of the instruction memory, measured in units of one instruction + [21:16] + read-only + + + SM_COUNT + The number of state machines this PIO instance is equipped with. + [11:8] + read-only + + + FIFO_DEPTH + The depth of the state machine TX/RX FIFOs, measured in words. + Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double + this depth. + [5:0] + read-only + + + + + INSTR_MEM0 + 0x00000048 + Write-only access to instruction memory location 0 + 0x00000000 + + + INSTR_MEM0 + [15:0] + write-only + + + + + INSTR_MEM1 + 0x0000004c + Write-only access to instruction memory location 1 + 0x00000000 + + + INSTR_MEM1 + [15:0] + write-only + + + + + INSTR_MEM2 + 0x00000050 + Write-only access to instruction memory location 2 + 0x00000000 + + + INSTR_MEM2 + [15:0] + write-only + + + + + INSTR_MEM3 + 0x00000054 + Write-only access to instruction memory location 3 + 0x00000000 + + + INSTR_MEM3 + [15:0] + write-only + + + + + INSTR_MEM4 + 0x00000058 + Write-only access to instruction memory location 4 + 0x00000000 + + + INSTR_MEM4 + [15:0] + write-only + + + + + INSTR_MEM5 + 0x0000005c + Write-only access to instruction memory location 5 + 0x00000000 + + + INSTR_MEM5 + [15:0] + write-only + + + + + INSTR_MEM6 + 0x00000060 + Write-only access to instruction memory location 6 + 0x00000000 + + + INSTR_MEM6 + [15:0] + write-only + + + + + INSTR_MEM7 + 0x00000064 + Write-only access to instruction memory location 7 + 0x00000000 + + + INSTR_MEM7 + [15:0] + write-only + + + + + INSTR_MEM8 + 0x00000068 + Write-only access to instruction memory location 8 + 0x00000000 + + + INSTR_MEM8 + [15:0] + write-only + + + + + INSTR_MEM9 + 0x0000006c + Write-only access to instruction memory location 9 + 0x00000000 + + + INSTR_MEM9 + [15:0] + write-only + + + + + INSTR_MEM10 + 0x00000070 + Write-only access to instruction memory location 10 + 0x00000000 + + + INSTR_MEM10 + [15:0] + write-only + + + + + INSTR_MEM11 + 0x00000074 + Write-only access to instruction memory location 11 + 0x00000000 + + + INSTR_MEM11 + [15:0] + write-only + + + + + INSTR_MEM12 + 0x00000078 + Write-only access to instruction memory location 12 + 0x00000000 + + + INSTR_MEM12 + [15:0] + write-only + + + + + INSTR_MEM13 + 0x0000007c + Write-only access to instruction memory location 13 + 0x00000000 + + + INSTR_MEM13 + [15:0] + write-only + + + + + INSTR_MEM14 + 0x00000080 + Write-only access to instruction memory location 14 + 0x00000000 + + + INSTR_MEM14 + [15:0] + write-only + + + + + INSTR_MEM15 + 0x00000084 + Write-only access to instruction memory location 15 + 0x00000000 + + + INSTR_MEM15 + [15:0] + write-only + + + + + INSTR_MEM16 + 0x00000088 + Write-only access to instruction memory location 16 + 0x00000000 + + + INSTR_MEM16 + [15:0] + write-only + + + + + INSTR_MEM17 + 0x0000008c + Write-only access to instruction memory location 17 + 0x00000000 + + + INSTR_MEM17 + [15:0] + write-only + + + + + INSTR_MEM18 + 0x00000090 + Write-only access to instruction memory location 18 + 0x00000000 + + + INSTR_MEM18 + [15:0] + write-only + + + + + INSTR_MEM19 + 0x00000094 + Write-only access to instruction memory location 19 + 0x00000000 + + + INSTR_MEM19 + [15:0] + write-only + + + + + INSTR_MEM20 + 0x00000098 + Write-only access to instruction memory location 20 + 0x00000000 + + + INSTR_MEM20 + [15:0] + write-only + + + + + INSTR_MEM21 + 0x0000009c + Write-only access to instruction memory location 21 + 0x00000000 + + + INSTR_MEM21 + [15:0] + write-only + + + + + INSTR_MEM22 + 0x000000a0 + Write-only access to instruction memory location 22 + 0x00000000 + + + INSTR_MEM22 + [15:0] + write-only + + + + + INSTR_MEM23 + 0x000000a4 + Write-only access to instruction memory location 23 + 0x00000000 + + + INSTR_MEM23 + [15:0] + write-only + + + + + INSTR_MEM24 + 0x000000a8 + Write-only access to instruction memory location 24 + 0x00000000 + + + INSTR_MEM24 + [15:0] + write-only + + + + + INSTR_MEM25 + 0x000000ac + Write-only access to instruction memory location 25 + 0x00000000 + + + INSTR_MEM25 + [15:0] + write-only + + + + + INSTR_MEM26 + 0x000000b0 + Write-only access to instruction memory location 26 + 0x00000000 + + + INSTR_MEM26 + [15:0] + write-only + + + + + INSTR_MEM27 + 0x000000b4 + Write-only access to instruction memory location 27 + 0x00000000 + + + INSTR_MEM27 + [15:0] + write-only + + + + + INSTR_MEM28 + 0x000000b8 + Write-only access to instruction memory location 28 + 0x00000000 + + + INSTR_MEM28 + [15:0] + write-only + + + + + INSTR_MEM29 + 0x000000bc + Write-only access to instruction memory location 29 + 0x00000000 + + + INSTR_MEM29 + [15:0] + write-only + + + + + INSTR_MEM30 + 0x000000c0 + Write-only access to instruction memory location 30 + 0x00000000 + + + INSTR_MEM30 + [15:0] + write-only + + + + + INSTR_MEM31 + 0x000000c4 + Write-only access to instruction memory location 31 + 0x00000000 + + + INSTR_MEM31 + [15:0] + write-only + + + + + SM0_CLKDIV + 0x000000c8 + Clock divisor register for state machine 0 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM0_EXECCTRL + 0x000000cc + Execution/behavioural settings for state machine 0 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [6:5] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + IRQ + 2 + All-ones if the indexed IRQ flag is raised, otherwise all-zeroes + + + + + STATUS_N + 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. + [4:0] + read-write + + + IRQ + 0 + Index 0-7 of an IRQ flag in this PIO block + + + IRQ_PREVPIO + 8 + Index 0-7 of an IRQ flag in the next lower-numbered PIO block + + + IRQ_NEXTPIO + 16 + Index 0-7 of an IRQ flag in the next higher-numbered PIO block + + + + + + + SM0_SHIFTCTRL + 0x000000d0 + Control behaviour of the input/output shift registers for state machine 0 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + FJOIN_RX_PUT + 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. + [15:15] + read-write + + + FJOIN_RX_GET + 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. + [14:14] + read-write + + + IN_COUNT + 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. + [4:0] + read-write + + + + + SM0_ADDR + 0x000000d4 + Current instruction address of state machine 0 + 0x00000000 + + + SM0_ADDR + [4:0] + read-only + + + + + SM0_INSTR + 0x000000d8 + 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. + 0x00000000 + + + SM0_INSTR + [15:0] + read-write + + + + + SM0_PINCTRL + 0x000000dc + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + SM1_CLKDIV + 0x000000e0 + Clock divisor register for state machine 1 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM1_EXECCTRL + 0x000000e4 + Execution/behavioural settings for state machine 1 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [6:5] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + IRQ + 2 + All-ones if the indexed IRQ flag is raised, otherwise all-zeroes + + + + + STATUS_N + 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. + [4:0] + read-write + + + IRQ + 0 + Index 0-7 of an IRQ flag in this PIO block + + + IRQ_PREVPIO + 8 + Index 0-7 of an IRQ flag in the next lower-numbered PIO block + + + IRQ_NEXTPIO + 16 + Index 0-7 of an IRQ flag in the next higher-numbered PIO block + + + + + + + SM1_SHIFTCTRL + 0x000000e8 + Control behaviour of the input/output shift registers for state machine 1 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + FJOIN_RX_PUT + 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. + [15:15] + read-write + + + FJOIN_RX_GET + 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. + [14:14] + read-write + + + IN_COUNT + 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. + [4:0] + read-write + + + + + SM1_ADDR + 0x000000ec + Current instruction address of state machine 1 + 0x00000000 + + + SM1_ADDR + [4:0] + read-only + + + + + SM1_INSTR + 0x000000f0 + Read to see the instruction currently addressed by state machine 1's program counter + Write to execute an instruction immediately (including jumps) and then resume execution. + 0x00000000 + + + SM1_INSTR + [15:0] + read-write + + + + + SM1_PINCTRL + 0x000000f4 + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + SM2_CLKDIV + 0x000000f8 + Clock divisor register for state machine 2 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM2_EXECCTRL + 0x000000fc + Execution/behavioural settings for state machine 2 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [6:5] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + IRQ + 2 + All-ones if the indexed IRQ flag is raised, otherwise all-zeroes + + + + + STATUS_N + 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. + [4:0] + read-write + + + IRQ + 0 + Index 0-7 of an IRQ flag in this PIO block + + + IRQ_PREVPIO + 8 + Index 0-7 of an IRQ flag in the next lower-numbered PIO block + + + IRQ_NEXTPIO + 16 + Index 0-7 of an IRQ flag in the next higher-numbered PIO block + + + + + + + SM2_SHIFTCTRL + 0x00000100 + Control behaviour of the input/output shift registers for state machine 2 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + FJOIN_RX_PUT + 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. + [15:15] + read-write + + + FJOIN_RX_GET + 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. + [14:14] + read-write + + + IN_COUNT + 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. + [4:0] + read-write + + + + + SM2_ADDR + 0x00000104 + Current instruction address of state machine 2 + 0x00000000 + + + SM2_ADDR + [4:0] + read-only + + + + + SM2_INSTR + 0x00000108 + Read to see the instruction currently addressed by state machine 2's program counter + Write to execute an instruction immediately (including jumps) and then resume execution. + 0x00000000 + + + SM2_INSTR + [15:0] + read-write + + + + + SM2_PINCTRL + 0x0000010c + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + SM3_CLKDIV + 0x00000110 + Clock divisor register for state machine 3 + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + 0x00010000 + + + INT + Effective frequency is sysclk/(int + frac/256). + Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. + [31:16] + read-write + + + FRAC + Fractional part of clock divisor + [15:8] + read-write + + + + + SM3_EXECCTRL + 0x00000114 + Execution/behavioural settings for state machine 3 + 0x0001f000 + + + EXEC_STALLED + If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. + [31:31] + read-only + + + SIDE_EN + 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. + [30:30] + read-write + + + SIDE_PINDIR + If 1, side-set data is asserted to pin directions, instead of pin values + [29:29] + read-write + + + JMP_PIN + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + [28:24] + read-write + + + OUT_EN_SEL + Which data bit to use for inline OUT enable + [23:19] + read-write + + + INLINE_OUT_EN + 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 < ...) + [18:18] + read-write + + + OUT_STICKY + Continuously assert the most recent OUT/SET to the pins + [17:17] + read-write + + + WRAP_TOP + 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. + [16:12] + read-write + + + WRAP_BOTTOM + After reaching wrap_top, execution is wrapped to this address. + [11:7] + read-write + + + STATUS_SEL + Comparison used for the MOV x, STATUS instruction. + [6:5] + read-write + + + TXLEVEL + 0 + All-ones if TX FIFO level < N, otherwise all-zeroes + + + RXLEVEL + 1 + All-ones if RX FIFO level < N, otherwise all-zeroes + + + IRQ + 2 + All-ones if the indexed IRQ flag is raised, otherwise all-zeroes + + + + + STATUS_N + 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. + [4:0] + read-write + + + IRQ + 0 + Index 0-7 of an IRQ flag in this PIO block + + + IRQ_PREVPIO + 8 + Index 0-7 of an IRQ flag in the next lower-numbered PIO block + + + IRQ_NEXTPIO + 16 + Index 0-7 of an IRQ flag in the next higher-numbered PIO block + + + + + + + SM3_SHIFTCTRL + 0x00000118 + Control behaviour of the input/output shift registers for state machine 3 + 0x000c0000 + + + FJOIN_RX + 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. + [31:31] + read-write + + + FJOIN_TX + 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. + [30:30] + read-write + + + PULL_THRESH + Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place. + Write 0 for value of 32. + [29:25] + read-write + + + PUSH_THRESH + Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place. + Write 0 for value of 32. + [24:20] + read-write + + + OUT_SHIFTDIR + 1 = shift out of output shift register to right. 0 = to left. + [19:19] + read-write + + + IN_SHIFTDIR + 1 = shift input shift register to right (data enters from left). 0 = to left. + [18:18] + read-write + + + AUTOPULL + 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. + [17:17] + read-write + + + AUTOPUSH + 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. + [16:16] + read-write + + + FJOIN_RX_PUT + 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. + [15:15] + read-write + + + FJOIN_RX_GET + 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. + [14:14] + read-write + + + IN_COUNT + 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. + [4:0] + read-write + + + + + SM3_ADDR + 0x0000011c + Current instruction address of state machine 3 + 0x00000000 + + + SM3_ADDR + [4:0] + read-only + + + + + SM3_INSTR + 0x00000120 + Read to see the instruction currently addressed by state machine 3's program counter + Write to execute an instruction immediately (including jumps) and then resume execution. + 0x00000000 + + + SM3_INSTR + [15:0] + read-write + + + + + SM3_PINCTRL + 0x00000124 + State machine pin control + 0x14000000 + + + SIDESET_COUNT + 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). + [31:29] + read-write + + + SET_COUNT + The number of pins asserted by a SET. In the range 0 to 5 inclusive. + [28:26] + read-write + + + OUT_COUNT + The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. + [25:20] + read-write + + + IN_BASE + 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. + [19:15] + read-write + + + SIDESET_BASE + 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. + [14:10] + read-write + + + SET_BASE + 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. + [9:5] + read-write + + + OUT_BASE + 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. + [4:0] + read-write + + + + + RXF0_PUTGET0 + 0x00000128 + Direct read/write access to entry 0 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF0_PUTGET0 + [31:0] + read-write + + + + + RXF0_PUTGET1 + 0x0000012c + Direct read/write access to entry 1 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF0_PUTGET1 + [31:0] + read-write + + + + + RXF0_PUTGET2 + 0x00000130 + Direct read/write access to entry 2 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF0_PUTGET2 + [31:0] + read-write + + + + + RXF0_PUTGET3 + 0x00000134 + Direct read/write access to entry 3 of SM0's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF0_PUTGET3 + [31:0] + read-write + + + + + RXF1_PUTGET0 + 0x00000138 + Direct read/write access to entry 0 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF1_PUTGET0 + [31:0] + read-write + + + + + RXF1_PUTGET1 + 0x0000013c + Direct read/write access to entry 1 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF1_PUTGET1 + [31:0] + read-write + + + + + RXF1_PUTGET2 + 0x00000140 + Direct read/write access to entry 2 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF1_PUTGET2 + [31:0] + read-write + + + + + RXF1_PUTGET3 + 0x00000144 + Direct read/write access to entry 3 of SM1's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF1_PUTGET3 + [31:0] + read-write + + + + + RXF2_PUTGET0 + 0x00000148 + Direct read/write access to entry 0 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF2_PUTGET0 + [31:0] + read-write + + + + + RXF2_PUTGET1 + 0x0000014c + Direct read/write access to entry 1 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF2_PUTGET1 + [31:0] + read-write + + + + + RXF2_PUTGET2 + 0x00000150 + Direct read/write access to entry 2 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF2_PUTGET2 + [31:0] + read-write + + + + + RXF2_PUTGET3 + 0x00000154 + Direct read/write access to entry 3 of SM2's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF2_PUTGET3 + [31:0] + read-write + + + + + RXF3_PUTGET0 + 0x00000158 + Direct read/write access to entry 0 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF3_PUTGET0 + [31:0] + read-write + + + + + RXF3_PUTGET1 + 0x0000015c + Direct read/write access to entry 1 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF3_PUTGET1 + [31:0] + read-write + + + + + RXF3_PUTGET2 + 0x00000160 + Direct read/write access to entry 2 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF3_PUTGET2 + [31:0] + read-write + + + + + RXF3_PUTGET3 + 0x00000164 + Direct read/write access to entry 3 of SM3's RX FIFO, if SHIFTCTRL_FJOIN_RX_PUT xor SHIFTCTRL_FJOIN_RX_GET is set. + 0x00000000 + + + RXF3_PUTGET3 + [31:0] + read-write + + + + + GPIOBASE + 0x00000168 + 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). + 0x00000000 + + + GPIOBASE + [4:4] + read-write + + + + + INTR + 0x0000016c + Raw Interrupts + 0x00000000 + + + SM7 + [15:15] + read-only + + + SM6 + [14:14] + read-only + + + SM5 + [13:13] + read-only + + + SM4 + [12:12] + read-only + + + SM3 + [11:11] + read-only + + + SM2 + [10:10] + read-only + + + SM1 + [9:9] + read-only + + + SM0 + [8:8] + read-only + + + SM3_TXNFULL + [7:7] + read-only + + + SM2_TXNFULL + [6:6] + read-only + + + SM1_TXNFULL + [5:5] + read-only + + + SM0_TXNFULL + [4:4] + read-only + + + SM3_RXNEMPTY + [3:3] + read-only + + + SM2_RXNEMPTY + [2:2] + read-only + + + SM1_RXNEMPTY + [1:1] + read-only + + + SM0_RXNEMPTY + [0:0] + read-only + + + + + IRQ0_INTE + 0x00000170 + Interrupt Enable for irq0 + 0x00000000 + + + SM7 + [15:15] + read-write + + + SM6 + [14:14] + read-write + + + SM5 + [13:13] + read-write + + + SM4 + [12:12] + read-write + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ0_INTF + 0x00000174 + Interrupt Force for irq0 + 0x00000000 + + + SM7 + [15:15] + read-write + + + SM6 + [14:14] + read-write + + + SM5 + [13:13] + read-write + + + SM4 + [12:12] + read-write + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ0_INTS + 0x00000178 + Interrupt status after masking & forcing for irq0 + 0x00000000 + + + SM7 + [15:15] + read-only + + + SM6 + [14:14] + read-only + + + SM5 + [13:13] + read-only + + + SM4 + [12:12] + read-only + + + SM3 + [11:11] + read-only + + + SM2 + [10:10] + read-only + + + SM1 + [9:9] + read-only + + + SM0 + [8:8] + read-only + + + SM3_TXNFULL + [7:7] + read-only + + + SM2_TXNFULL + [6:6] + read-only + + + SM1_TXNFULL + [5:5] + read-only + + + SM0_TXNFULL + [4:4] + read-only + + + SM3_RXNEMPTY + [3:3] + read-only + + + SM2_RXNEMPTY + [2:2] + read-only + + + SM1_RXNEMPTY + [1:1] + read-only + + + SM0_RXNEMPTY + [0:0] + read-only + + + + + IRQ1_INTE + 0x0000017c + Interrupt Enable for irq1 + 0x00000000 + + + SM7 + [15:15] + read-write + + + SM6 + [14:14] + read-write + + + SM5 + [13:13] + read-write + + + SM4 + [12:12] + read-write + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ1_INTF + 0x00000180 + Interrupt Force for irq1 + 0x00000000 + + + SM7 + [15:15] + read-write + + + SM6 + [14:14] + read-write + + + SM5 + [13:13] + read-write + + + SM4 + [12:12] + read-write + + + SM3 + [11:11] + read-write + + + SM2 + [10:10] + read-write + + + SM1 + [9:9] + read-write + + + SM0 + [8:8] + read-write + + + SM3_TXNFULL + [7:7] + read-write + + + SM2_TXNFULL + [6:6] + read-write + + + SM1_TXNFULL + [5:5] + read-write + + + SM0_TXNFULL + [4:4] + read-write + + + SM3_RXNEMPTY + [3:3] + read-write + + + SM2_RXNEMPTY + [2:2] + read-write + + + SM1_RXNEMPTY + [1:1] + read-write + + + SM0_RXNEMPTY + [0:0] + read-write + + + + + IRQ1_INTS + 0x00000184 + Interrupt status after masking & forcing for irq1 + 0x00000000 + + + SM7 + [15:15] + read-only + + + SM6 + [14:14] + read-only + + + SM5 + [13:13] + read-only + + + SM4 + [12:12] + read-only + + + SM3 + [11:11] + read-only + + + SM2 + [10:10] + read-only + + + SM1 + [9:9] + read-only + + + SM0 + [8:8] + read-only + + + SM3_TXNFULL + [7:7] + read-only + + + SM2_TXNFULL + [6:6] + read-only + + + SM1_TXNFULL + [5:5] + read-only + + + SM0_TXNFULL + [4:4] + read-only + + + SM3_RXNEMPTY + [3:3] + read-only + + + SM2_RXNEMPTY + [2:2] + read-only + + + SM1_RXNEMPTY + [1:1] + read-only + + + SM0_RXNEMPTY + [0:0] + read-only + + + + + + + PIO1 + 0x50300000 + + PIO1_IRQ_0 + 17 + + + PIO1_IRQ_1 + 18 + + + + PIO2 + 0x50400000 + + PIO2_IRQ_0 + 19 + + + PIO2_IRQ_1 + 20 + + + + BUSCTRL + Register block for busfabric control signals and performance counters + 0x40068000 + + 0 + 44 + registers + + + + BUS_PRIORITY + 0x00000000 + Set the priority of each master for bus arbitration. + 0x00000000 + + + DMA_W + 0 - low priority, 1 - high priority + [12:12] + read-write + + + DMA_R + 0 - low priority, 1 - high priority + [8:8] + read-write + + + PROC1 + 0 - low priority, 1 - high priority + [4:4] + read-write + + + PROC0 + 0 - low priority, 1 - high priority + [0:0] + read-write + + + + + BUS_PRIORITY_ACK + 0x00000004 + Bus priority acknowledge + 0x00000000 + + + BUS_PRIORITY_ACK + 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. + [0:0] + read-only + + + + + PERFCTR_EN + 0x00000008 + 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. + 0x00000000 + + + PERFCTR_EN + [0:0] + read-write + + + + + PERFCTR0 + 0x0000000c + Bus fabric performance counter 0 + 0x00000000 + + + PERFCTR0 + 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 + [23:0] + read-write + oneToClear + + + + + PERFSEL0 + 0x00000010 + Bus fabric performance event select for PERFCTR0 + 0x0000001f + + + PERFSEL0 + 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. + [6:0] + read-write + + + siob_proc1_stall_upstream + 0 + + + siob_proc1_stall_downstream + 1 + + + siob_proc1_access_contested + 2 + + + siob_proc1_access + 3 + + + siob_proc0_stall_upstream + 4 + + + siob_proc0_stall_downstream + 5 + + + siob_proc0_access_contested + 6 + + + siob_proc0_access + 7 + + + apb_stall_upstream + 8 + + + apb_stall_downstream + 9 + + + apb_access_contested + 10 + + + apb_access + 11 + + + fastperi_stall_upstream + 12 + + + fastperi_stall_downstream + 13 + + + fastperi_access_contested + 14 + + + fastperi_access + 15 + + + sram9_stall_upstream + 16 + + + sram9_stall_downstream + 17 + + + sram9_access_contested + 18 + + + sram9_access + 19 + + + sram8_stall_upstream + 20 + + + sram8_stall_downstream + 21 + + + sram8_access_contested + 22 + + + sram8_access + 23 + + + sram7_stall_upstream + 24 + + + sram7_stall_downstream + 25 + + + sram7_access_contested + 26 + + + sram7_access + 27 + + + sram6_stall_upstream + 28 + + + sram6_stall_downstream + 29 + + + sram6_access_contested + 30 + + + sram6_access + 31 + + + sram5_stall_upstream + 32 + + + sram5_stall_downstream + 33 + + + sram5_access_contested + 34 + + + sram5_access + 35 + + + sram4_stall_upstream + 36 + + + sram4_stall_downstream + 37 + + + sram4_access_contested + 38 + + + sram4_access + 39 + + + sram3_stall_upstream + 40 + + + sram3_stall_downstream + 41 + + + sram3_access_contested + 42 + + + sram3_access + 43 + + + sram2_stall_upstream + 44 + + + sram2_stall_downstream + 45 + + + sram2_access_contested + 46 + + + sram2_access + 47 + + + sram1_stall_upstream + 48 + + + sram1_stall_downstream + 49 + + + sram1_access_contested + 50 + + + sram1_access + 51 + + + sram0_stall_upstream + 52 + + + sram0_stall_downstream + 53 + + + sram0_access_contested + 54 + + + sram0_access + 55 + + + xip_main1_stall_upstream + 56 + + + xip_main1_stall_downstream + 57 + + + xip_main1_access_contested + 58 + + + xip_main1_access + 59 + + + xip_main0_stall_upstream + 60 + + + xip_main0_stall_downstream + 61 + + + xip_main0_access_contested + 62 + + + xip_main0_access + 63 + + + rom_stall_upstream + 64 + + + rom_stall_downstream + 65 + + + rom_access_contested + 66 + + + rom_access + 67 + + + + + + + PERFCTR1 + 0x00000014 + Bus fabric performance counter 1 + 0x00000000 + + + PERFCTR1 + 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 + [23:0] + read-write + oneToClear + + + + + PERFSEL1 + 0x00000018 + Bus fabric performance event select for PERFCTR1 + 0x0000001f + + + PERFSEL1 + 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. + [6:0] + read-write + + + siob_proc1_stall_upstream + 0 + + + siob_proc1_stall_downstream + 1 + + + siob_proc1_access_contested + 2 + + + siob_proc1_access + 3 + + + siob_proc0_stall_upstream + 4 + + + siob_proc0_stall_downstream + 5 + + + siob_proc0_access_contested + 6 + + + siob_proc0_access + 7 + + + apb_stall_upstream + 8 + + + apb_stall_downstream + 9 + + + apb_access_contested + 10 + + + apb_access + 11 + + + fastperi_stall_upstream + 12 + + + fastperi_stall_downstream + 13 + + + fastperi_access_contested + 14 + + + fastperi_access + 15 + + + sram9_stall_upstream + 16 + + + sram9_stall_downstream + 17 + + + sram9_access_contested + 18 + + + sram9_access + 19 + + + sram8_stall_upstream + 20 + + + sram8_stall_downstream + 21 + + + sram8_access_contested + 22 + + + sram8_access + 23 + + + sram7_stall_upstream + 24 + + + sram7_stall_downstream + 25 + + + sram7_access_contested + 26 + + + sram7_access + 27 + + + sram6_stall_upstream + 28 + + + sram6_stall_downstream + 29 + + + sram6_access_contested + 30 + + + sram6_access + 31 + + + sram5_stall_upstream + 32 + + + sram5_stall_downstream + 33 + + + sram5_access_contested + 34 + + + sram5_access + 35 + + + sram4_stall_upstream + 36 + + + sram4_stall_downstream + 37 + + + sram4_access_contested + 38 + + + sram4_access + 39 + + + sram3_stall_upstream + 40 + + + sram3_stall_downstream + 41 + + + sram3_access_contested + 42 + + + sram3_access + 43 + + + sram2_stall_upstream + 44 + + + sram2_stall_downstream + 45 + + + sram2_access_contested + 46 + + + sram2_access + 47 + + + sram1_stall_upstream + 48 + + + sram1_stall_downstream + 49 + + + sram1_access_contested + 50 + + + sram1_access + 51 + + + sram0_stall_upstream + 52 + + + sram0_stall_downstream + 53 + + + sram0_access_contested + 54 + + + sram0_access + 55 + + + xip_main1_stall_upstream + 56 + + + xip_main1_stall_downstream + 57 + + + xip_main1_access_contested + 58 + + + xip_main1_access + 59 + + + xip_main0_stall_upstream + 60 + + + xip_main0_stall_downstream + 61 + + + xip_main0_access_contested + 62 + + + xip_main0_access + 63 + + + rom_stall_upstream + 64 + + + rom_stall_downstream + 65 + + + rom_access_contested + 66 + + + rom_access + 67 + + + + + + + PERFCTR2 + 0x0000001c + Bus fabric performance counter 2 + 0x00000000 + + + PERFCTR2 + 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 + [23:0] + read-write + oneToClear + + + + + PERFSEL2 + 0x00000020 + Bus fabric performance event select for PERFCTR2 + 0x0000001f + + + PERFSEL2 + 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. + [6:0] + read-write + + + siob_proc1_stall_upstream + 0 + + + siob_proc1_stall_downstream + 1 + + + siob_proc1_access_contested + 2 + + + siob_proc1_access + 3 + + + siob_proc0_stall_upstream + 4 + + + siob_proc0_stall_downstream + 5 + + + siob_proc0_access_contested + 6 + + + siob_proc0_access + 7 + + + apb_stall_upstream + 8 + + + apb_stall_downstream + 9 + + + apb_access_contested + 10 + + + apb_access + 11 + + + fastperi_stall_upstream + 12 + + + fastperi_stall_downstream + 13 + + + fastperi_access_contested + 14 + + + fastperi_access + 15 + + + sram9_stall_upstream + 16 + + + sram9_stall_downstream + 17 + + + sram9_access_contested + 18 + + + sram9_access + 19 + + + sram8_stall_upstream + 20 + + + sram8_stall_downstream + 21 + + + sram8_access_contested + 22 + + + sram8_access + 23 + + + sram7_stall_upstream + 24 + + + sram7_stall_downstream + 25 + + + sram7_access_contested + 26 + + + sram7_access + 27 + + + sram6_stall_upstream + 28 + + + sram6_stall_downstream + 29 + + + sram6_access_contested + 30 + + + sram6_access + 31 + + + sram5_stall_upstream + 32 + + + sram5_stall_downstream + 33 + + + sram5_access_contested + 34 + + + sram5_access + 35 + + + sram4_stall_upstream + 36 + + + sram4_stall_downstream + 37 + + + sram4_access_contested + 38 + + + sram4_access + 39 + + + sram3_stall_upstream + 40 + + + sram3_stall_downstream + 41 + + + sram3_access_contested + 42 + + + sram3_access + 43 + + + sram2_stall_upstream + 44 + + + sram2_stall_downstream + 45 + + + sram2_access_contested + 46 + + + sram2_access + 47 + + + sram1_stall_upstream + 48 + + + sram1_stall_downstream + 49 + + + sram1_access_contested + 50 + + + sram1_access + 51 + + + sram0_stall_upstream + 52 + + + sram0_stall_downstream + 53 + + + sram0_access_contested + 54 + + + sram0_access + 55 + + + xip_main1_stall_upstream + 56 + + + xip_main1_stall_downstream + 57 + + + xip_main1_access_contested + 58 + + + xip_main1_access + 59 + + + xip_main0_stall_upstream + 60 + + + xip_main0_stall_downstream + 61 + + + xip_main0_access_contested + 62 + + + xip_main0_access + 63 + + + rom_stall_upstream + 64 + + + rom_stall_downstream + 65 + + + rom_access_contested + 66 + + + rom_access + 67 + + + + + + + PERFCTR3 + 0x00000024 + Bus fabric performance counter 3 + 0x00000000 + + + PERFCTR3 + 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 + [23:0] + read-write + oneToClear + + + + + PERFSEL3 + 0x00000028 + Bus fabric performance event select for PERFCTR3 + 0x0000001f + + + PERFSEL3 + 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. + [6:0] + read-write + + + siob_proc1_stall_upstream + 0 + + + siob_proc1_stall_downstream + 1 + + + siob_proc1_access_contested + 2 + + + siob_proc1_access + 3 + + + siob_proc0_stall_upstream + 4 + + + siob_proc0_stall_downstream + 5 + + + siob_proc0_access_contested + 6 + + + siob_proc0_access + 7 + + + apb_stall_upstream + 8 + + + apb_stall_downstream + 9 + + + apb_access_contested + 10 + + + apb_access + 11 + + + fastperi_stall_upstream + 12 + + + fastperi_stall_downstream + 13 + + + fastperi_access_contested + 14 + + + fastperi_access + 15 + + + sram9_stall_upstream + 16 + + + sram9_stall_downstream + 17 + + + sram9_access_contested + 18 + + + sram9_access + 19 + + + sram8_stall_upstream + 20 + + + sram8_stall_downstream + 21 + + + sram8_access_contested + 22 + + + sram8_access + 23 + + + sram7_stall_upstream + 24 + + + sram7_stall_downstream + 25 + + + sram7_access_contested + 26 + + + sram7_access + 27 + + + sram6_stall_upstream + 28 + + + sram6_stall_downstream + 29 + + + sram6_access_contested + 30 + + + sram6_access + 31 + + + sram5_stall_upstream + 32 + + + sram5_stall_downstream + 33 + + + sram5_access_contested + 34 + + + sram5_access + 35 + + + sram4_stall_upstream + 36 + + + sram4_stall_downstream + 37 + + + sram4_access_contested + 38 + + + sram4_access + 39 + + + sram3_stall_upstream + 40 + + + sram3_stall_downstream + 41 + + + sram3_access_contested + 42 + + + sram3_access + 43 + + + sram2_stall_upstream + 44 + + + sram2_stall_downstream + 45 + + + sram2_access_contested + 46 + + + sram2_access + 47 + + + sram1_stall_upstream + 48 + + + sram1_stall_downstream + 49 + + + sram1_access_contested + 50 + + + sram1_access + 51 + + + sram0_stall_upstream + 52 + + + sram0_stall_downstream + 53 + + + sram0_access_contested + 54 + + + sram0_access + 55 + + + xip_main1_stall_upstream + 56 + + + xip_main1_stall_downstream + 57 + + + xip_main1_access_contested + 58 + + + xip_main1_access + 59 + + + xip_main0_stall_upstream + 60 + + + xip_main0_stall_downstream + 61 + + + xip_main0_access_contested + 62 + + + xip_main0_access + 63 + + + rom_stall_upstream + 64 + + + rom_stall_downstream + 65 + + + rom_access_contested + 66 + + + rom_access + 67 + + + + + + + + + SIO + Single-cycle IO block + Provides core-local and inter-core hardware for the two processors, with single-cycle access. + 0xd0000000 + + 0 + 488 + registers + + + SIO_IRQ_FIFO + 25 + + + SIO_IRQ_BELL + 26 + + + SIO_IRQ_FIFO_NS + 27 + + + SIO_IRQ_BELL_NS + 28 + + + SIO_IRQ_MTIMECMP + 29 + + + + CPUID + 0x00000000 + Processor core identifier + 0x00000000 + + + CPUID + Value is 0 when read from processor core 0, and 1 when read from processor core 1. + [31:0] + read-only + + + + + GPIO_IN + 0x00000004 + Input value for GPIO0...31. + + In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) appear as zero. + 0x00000000 + + + GPIO_IN + [31:0] + read-only + + + + + GPIO_HI_IN + 0x00000008 + Input value on GPIO32...47, QSPI IOs and USB pins + + In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) appear as zero. + 0x00000000 + + + QSPI_SD + Input value on QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins + [31:28] + read-only + + + QSPI_CSN + Input value on QSPI CSn pin + [27:27] + read-only + + + QSPI_SCK + Input value on QSPI SCK pin + [26:26] + read-only + + + USB_DM + Input value on USB D- pin + [25:25] + read-only + + + USB_DP + Input value on USB D+ pin + [24:24] + read-only + + + GPIO + Input value on GPIO32...47 + [15:0] + read-only + + + + + GPIO_OUT + 0x00000010 + GPIO0...31 output value + 0x00000000 + + + GPIO_OUT + 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. + [31:0] + read-write + + + + + GPIO_HI_OUT + 0x00000014 + 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. + 0x00000000 + + + QSPI_SD + Output value for QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins + [31:28] + read-write + + + QSPI_CSN + Output value for QSPI CSn pin + [27:27] + read-write + + + QSPI_SCK + Output value for QSPI SCK pin + [26:26] + read-write + + + USB_DM + Output value for USB D- pin + [25:25] + read-write + + + USB_DP + Output value for USB D+ pin + [24:24] + read-write + + + GPIO + Output value for GPIO32...47 + [15:0] + read-write + + + + + GPIO_OUT_SET + 0x00000018 + GPIO0...31 output value set + 0x00000000 + + + GPIO_OUT_SET + Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata` + [31:0] + write-only + + + + + GPIO_HI_OUT_SET + 0x0000001c + 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` + 0x00000000 + + + QSPI_SD + [31:28] + write-only + + + QSPI_CSN + [27:27] + write-only + + + QSPI_SCK + [26:26] + write-only + + + USB_DM + [25:25] + write-only + + + USB_DP + [24:24] + write-only + + + GPIO + [15:0] + write-only + + + + + GPIO_OUT_CLR + 0x00000020 + GPIO0...31 output value clear + 0x00000000 + + + GPIO_OUT_CLR + Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= ~wdata` + [31:0] + write-only + + + + + GPIO_HI_OUT_CLR + 0x00000024 + 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` + 0x00000000 + + + QSPI_SD + [31:28] + write-only + + + QSPI_CSN + [27:27] + write-only + + + QSPI_SCK + [26:26] + write-only + + + USB_DM + [25:25] + write-only + + + USB_DP + [24:24] + write-only + + + GPIO + [15:0] + write-only + + + + + GPIO_OUT_XOR + 0x00000028 + GPIO0...31 output value XOR + 0x00000000 + + + GPIO_OUT_XOR + Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= wdata` + [31:0] + write-only + + + + + GPIO_HI_OUT_XOR + 0x0000002c + 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` + 0x00000000 + + + QSPI_SD + [31:28] + write-only + + + QSPI_CSN + [27:27] + write-only + + + QSPI_SCK + [26:26] + write-only + + + USB_DM + [25:25] + write-only + + + USB_DP + [24:24] + write-only + + + GPIO + [15:0] + write-only + + + + + GPIO_OE + 0x00000030 + GPIO0...31 output enable + 0x00000000 + + + GPIO_OE + 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. + [31:0] + read-write + + + + + GPIO_HI_OE + 0x00000034 + 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. + 0x00000000 + + + QSPI_SD + Output enable value for QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins + [31:28] + read-write + + + QSPI_CSN + Output enable value for QSPI CSn pin + [27:27] + read-write + + + QSPI_SCK + Output enable value for QSPI SCK pin + [26:26] + read-write + + + USB_DM + Output enable value for USB D- pin + [25:25] + read-write + + + USB_DP + Output enable value for USB D+ pin + [24:24] + read-write + + + GPIO + Output enable value for GPIO32...47 + [15:0] + read-write + + + + + GPIO_OE_SET + 0x00000038 + GPIO0...31 output enable set + 0x00000000 + + + GPIO_OE_SET + Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata` + [31:0] + write-only + + + + + GPIO_HI_OE_SET + 0x0000003c + 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` + 0x00000000 + + + QSPI_SD + [31:28] + write-only + + + QSPI_CSN + [27:27] + write-only + + + QSPI_SCK + [26:26] + write-only + + + USB_DM + [25:25] + write-only + + + USB_DP + [24:24] + write-only + + + GPIO + [15:0] + write-only + + + + + GPIO_OE_CLR + 0x00000040 + GPIO0...31 output enable clear + 0x00000000 + + + GPIO_OE_CLR + Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= ~wdata` + [31:0] + write-only + + + + + GPIO_HI_OE_CLR + 0x00000044 + 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` + 0x00000000 + + + QSPI_SD + [31:28] + write-only + + + QSPI_CSN + [27:27] + write-only + + + QSPI_SCK + [26:26] + write-only + + + USB_DM + [25:25] + write-only + + + USB_DP + [24:24] + write-only + + + GPIO + [15:0] + write-only + + + + + GPIO_OE_XOR + 0x00000048 + GPIO0...31 output enable XOR + 0x00000000 + + + GPIO_OE_XOR + Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= wdata` + [31:0] + write-only + + + + + GPIO_HI_OE_XOR + 0x0000004c + 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` + 0x00000000 + + + QSPI_SD + [31:28] + write-only + + + QSPI_CSN + [27:27] + write-only + + + QSPI_SCK + [26:26] + write-only + + + USB_DM + [25:25] + write-only + + + USB_DP + [24:24] + write-only + + + GPIO + [15:0] + write-only + + + + + FIFO_ST + 0x00000050 + 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. + 0x00000002 + + + ROE + Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO. + [3:3] + read-write + oneToClear + + + WOF + Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO. + [2:2] + read-write + oneToClear + + + RDY + Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data) + [1:1] + read-only + + + VLD + Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid) + [0:0] + read-only + + + + + FIFO_WR + 0x00000054 + Write access to this core's TX FIFO + 0x00000000 + + + FIFO_WR + [31:0] + write-only + + + + + FIFO_RD + 0x00000058 + Read access to this core's RX FIFO + 0x00000000 + + + FIFO_RD + [31:0] + read-only + modify + + + + + SPINLOCK_ST + 0x0000005c + Spinlock state + A bitmap containing the state of all 32 spinlocks (1=locked). + Mainly intended for debugging. + 0x00000000 + + + SPINLOCK_ST + [31:0] + read-only + + + + + INTERP0_ACCUM0 + 0x00000080 + Read/write access to accumulator 0 + 0x00000000 + + + INTERP0_ACCUM0 + [31:0] + read-write + + + + + INTERP0_ACCUM1 + 0x00000084 + Read/write access to accumulator 1 + 0x00000000 + + + INTERP0_ACCUM1 + [31:0] + read-write + + + + + INTERP0_BASE0 + 0x00000088 + Read/write access to BASE0 register. + 0x00000000 + + + INTERP0_BASE0 + [31:0] + read-write + + + + + INTERP0_BASE1 + 0x0000008c + Read/write access to BASE1 register. + 0x00000000 + + + INTERP0_BASE1 + [31:0] + read-write + + + + + INTERP0_BASE2 + 0x00000090 + Read/write access to BASE2 register. + 0x00000000 + + + INTERP0_BASE2 + [31:0] + read-write + + + + + INTERP0_POP_LANE0 + 0x00000094 + Read LANE0 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP0_POP_LANE0 + [31:0] + read-only + + + + + INTERP0_POP_LANE1 + 0x00000098 + Read LANE1 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP0_POP_LANE1 + [31:0] + read-only + + + + + INTERP0_POP_FULL + 0x0000009c + Read FULL result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP0_POP_FULL + [31:0] + read-only + + + + + INTERP0_PEEK_LANE0 + 0x000000a0 + Read LANE0 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP0_PEEK_LANE0 + [31:0] + read-only + + + + + INTERP0_PEEK_LANE1 + 0x000000a4 + Read LANE1 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP0_PEEK_LANE1 + [31:0] + read-only + + + + + INTERP0_PEEK_FULL + 0x000000a8 + Read FULL result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP0_PEEK_FULL + [31:0] + read-only + + + + + INTERP0_CTRL_LANE0 + 0x000000ac + Control register for lane 0 + 0x00000000 + + + OVERF + Set if either OVERF0 or OVERF1 is set. + [25:25] + read-only + + + OVERF1 + Indicates if any masked-off MSBs in ACCUM1 are set. + [24:24] + read-only + + + OVERF0 + Indicates if any masked-off MSBs in ACCUM0 are set. + [23:23] + read-only + + + BLEND + 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. + [21:21] + read-write + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised. + [4:0] + read-write + + + + + INTERP0_CTRL_LANE1 + 0x000000b0 + Control register for lane 1 + 0x00000000 + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised. + [4:0] + read-write + + + + + INTERP0_ACCUM0_ADD + 0x000000b4 + Values written here are atomically added to ACCUM0 + Reading yields lane 0's raw shift and mask value (BASE0 not added). + 0x00000000 + + + INTERP0_ACCUM0_ADD + [23:0] + read-write + + + + + INTERP0_ACCUM1_ADD + 0x000000b8 + Values written here are atomically added to ACCUM1 + Reading yields lane 1's raw shift and mask value (BASE1 not added). + 0x00000000 + + + INTERP0_ACCUM1_ADD + [23:0] + read-write + + + + + INTERP0_BASE_1AND0 + 0x000000bc + 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. + 0x00000000 + + + INTERP0_BASE_1AND0 + [31:0] + write-only + + + + + INTERP1_ACCUM0 + 0x000000c0 + Read/write access to accumulator 0 + 0x00000000 + + + INTERP1_ACCUM0 + [31:0] + read-write + + + + + INTERP1_ACCUM1 + 0x000000c4 + Read/write access to accumulator 1 + 0x00000000 + + + INTERP1_ACCUM1 + [31:0] + read-write + + + + + INTERP1_BASE0 + 0x000000c8 + Read/write access to BASE0 register. + 0x00000000 + + + INTERP1_BASE0 + [31:0] + read-write + + + + + INTERP1_BASE1 + 0x000000cc + Read/write access to BASE1 register. + 0x00000000 + + + INTERP1_BASE1 + [31:0] + read-write + + + + + INTERP1_BASE2 + 0x000000d0 + Read/write access to BASE2 register. + 0x00000000 + + + INTERP1_BASE2 + [31:0] + read-write + + + + + INTERP1_POP_LANE0 + 0x000000d4 + Read LANE0 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP1_POP_LANE0 + [31:0] + read-only + + + + + INTERP1_POP_LANE1 + 0x000000d8 + Read LANE1 result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP1_POP_LANE1 + [31:0] + read-only + + + + + INTERP1_POP_FULL + 0x000000dc + Read FULL result, and simultaneously write lane results to both accumulators (POP). + 0x00000000 + + + INTERP1_POP_FULL + [31:0] + read-only + + + + + INTERP1_PEEK_LANE0 + 0x000000e0 + Read LANE0 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP1_PEEK_LANE0 + [31:0] + read-only + + + + + INTERP1_PEEK_LANE1 + 0x000000e4 + Read LANE1 result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP1_PEEK_LANE1 + [31:0] + read-only + + + + + INTERP1_PEEK_FULL + 0x000000e8 + Read FULL result, without altering any internal state (PEEK). + 0x00000000 + + + INTERP1_PEEK_FULL + [31:0] + read-only + + + + + INTERP1_CTRL_LANE0 + 0x000000ec + Control register for lane 0 + 0x00000000 + + + OVERF + Set if either OVERF0 or OVERF1 is set. + [25:25] + read-only + + + OVERF1 + Indicates if any masked-off MSBs in ACCUM1 are set. + [24:24] + read-only + + + OVERF0 + Indicates if any masked-off MSBs in ACCUM0 are set. + [23:23] + read-only + + + CLAMP + 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 + [22:22] + read-write + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised. + [4:0] + read-write + + + + + INTERP1_CTRL_LANE1 + 0x000000f0 + Control register for lane 1 + 0x00000000 + + + FORCE_MSB + 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. + [20:19] + read-write + + + ADD_RAW + If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. + [18:18] + read-write + + + CROSS_RESULT + If 1, feed the opposite lane's result into this lane's accumulator on POP. + [17:17] + read-write + + + CROSS_INPUT + 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) + [16:16] + read-write + + + SIGNED + 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. + [15:15] + read-write + + + MASK_MSB + The most-significant bit allowed to pass by the mask (inclusive) + Setting MSB < LSB may cause chip to turn inside-out + [14:10] + read-write + + + MASK_LSB + The least-significant bit allowed to pass by the mask (inclusive) + [9:5] + read-write + + + SHIFT + Right-rotate applied to accumulator before masking. By appropriately configuring the masks, left and right shifts can be synthesised. + [4:0] + read-write + + + + + INTERP1_ACCUM0_ADD + 0x000000f4 + Values written here are atomically added to ACCUM0 + Reading yields lane 0's raw shift and mask value (BASE0 not added). + 0x00000000 + + + INTERP1_ACCUM0_ADD + [23:0] + read-write + + + + + INTERP1_ACCUM1_ADD + 0x000000f8 + Values written here are atomically added to ACCUM1 + Reading yields lane 1's raw shift and mask value (BASE1 not added). + 0x00000000 + + + INTERP1_ACCUM1_ADD + [23:0] + read-write + + + + + INTERP1_BASE_1AND0 + 0x000000fc + 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. + 0x00000000 + + + INTERP1_BASE_1AND0 + [31:0] + write-only + + + + + SPINLOCK0 + 0x00000100 + 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. + 0x00000000 + + + SPINLOCK0 + [31:0] + read-write + modify + + + + + SPINLOCK1 + 0x00000104 + 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. + 0x00000000 + + + SPINLOCK1 + [31:0] + read-write + modify + + + + + SPINLOCK2 + 0x00000108 + 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. + 0x00000000 + + + SPINLOCK2 + [31:0] + read-write + modify + + + + + SPINLOCK3 + 0x0000010c + 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. + 0x00000000 + + + SPINLOCK3 + [31:0] + read-write + modify + + + + + SPINLOCK4 + 0x00000110 + 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. + 0x00000000 + + + SPINLOCK4 + [31:0] + read-write + modify + + + + + SPINLOCK5 + 0x00000114 + 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. + 0x00000000 + + + SPINLOCK5 + [31:0] + read-write + modify + + + + + SPINLOCK6 + 0x00000118 + 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. + 0x00000000 + + + SPINLOCK6 + [31:0] + read-write + modify + + + + + SPINLOCK7 + 0x0000011c + 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. + 0x00000000 + + + SPINLOCK7 + [31:0] + read-write + modify + + + + + SPINLOCK8 + 0x00000120 + 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. + 0x00000000 + + + SPINLOCK8 + [31:0] + read-write + modify + + + + + SPINLOCK9 + 0x00000124 + 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. + 0x00000000 + + + SPINLOCK9 + [31:0] + read-write + modify + + + + + SPINLOCK10 + 0x00000128 + 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. + 0x00000000 + + + SPINLOCK10 + [31:0] + read-write + modify + + + + + SPINLOCK11 + 0x0000012c + 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. + 0x00000000 + + + SPINLOCK11 + [31:0] + read-write + modify + + + + + SPINLOCK12 + 0x00000130 + 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. + 0x00000000 + + + SPINLOCK12 + [31:0] + read-write + modify + + + + + SPINLOCK13 + 0x00000134 + 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. + 0x00000000 + + + SPINLOCK13 + [31:0] + read-write + modify + + + + + SPINLOCK14 + 0x00000138 + 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. + 0x00000000 + + + SPINLOCK14 + [31:0] + read-write + modify + + + + + SPINLOCK15 + 0x0000013c + 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. + 0x00000000 + + + SPINLOCK15 + [31:0] + read-write + modify + + + + + SPINLOCK16 + 0x00000140 + 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. + 0x00000000 + + + SPINLOCK16 + [31:0] + read-write + modify + + + + + SPINLOCK17 + 0x00000144 + 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. + 0x00000000 + + + SPINLOCK17 + [31:0] + read-write + modify + + + + + SPINLOCK18 + 0x00000148 + 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. + 0x00000000 + + + SPINLOCK18 + [31:0] + read-write + modify + + + + + SPINLOCK19 + 0x0000014c + 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. + 0x00000000 + + + SPINLOCK19 + [31:0] + read-write + modify + + + + + SPINLOCK20 + 0x00000150 + 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. + 0x00000000 + + + SPINLOCK20 + [31:0] + read-write + modify + + + + + SPINLOCK21 + 0x00000154 + 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. + 0x00000000 + + + SPINLOCK21 + [31:0] + read-write + modify + + + + + SPINLOCK22 + 0x00000158 + 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. + 0x00000000 + + + SPINLOCK22 + [31:0] + read-write + modify + + + + + SPINLOCK23 + 0x0000015c + 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. + 0x00000000 + + + SPINLOCK23 + [31:0] + read-write + modify + + + + + SPINLOCK24 + 0x00000160 + 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. + 0x00000000 + + + SPINLOCK24 + [31:0] + read-write + modify + + + + + SPINLOCK25 + 0x00000164 + 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. + 0x00000000 + + + SPINLOCK25 + [31:0] + read-write + modify + + + + + SPINLOCK26 + 0x00000168 + 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. + 0x00000000 + + + SPINLOCK26 + [31:0] + read-write + modify + + + + + SPINLOCK27 + 0x0000016c + 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. + 0x00000000 + + + SPINLOCK27 + [31:0] + read-write + modify + + + + + SPINLOCK28 + 0x00000170 + 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. + 0x00000000 + + + SPINLOCK28 + [31:0] + read-write + modify + + + + + SPINLOCK29 + 0x00000174 + 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. + 0x00000000 + + + SPINLOCK29 + [31:0] + read-write + modify + + + + + SPINLOCK30 + 0x00000178 + 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. + 0x00000000 + + + SPINLOCK30 + [31:0] + read-write + modify + + + + + SPINLOCK31 + 0x0000017c + 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. + 0x00000000 + + + SPINLOCK31 + [31:0] + read-write + modify + + + + + DOORBELL_OUT_SET + 0x00000180 + 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. + 0x00000000 + + + DOORBELL_OUT_SET + [7:0] + read-write + + + + + DOORBELL_OUT_CLR + 0x00000184 + 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. + 0x00000000 + + + DOORBELL_OUT_CLR + [7:0] + read-write + oneToClear + + + + + DOORBELL_IN_SET + 0x00000188 + Write 1s to trigger doorbell interrupts on this core. Read to get status of doorbells currently asserted on this core. + 0x00000000 + + + DOORBELL_IN_SET + [7:0] + read-write + + + + + DOORBELL_IN_CLR + 0x0000018c + 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. + 0x00000000 + + + DOORBELL_IN_CLR + [7:0] + read-write + oneToClear + + + + + PERI_NONSEC + 0x00000190 + 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. + 0x00000000 + + + TMDS + IF 1, detach TMDS encoder (of this core) from the Secure SIO, and attach to the Non-secure SIO. + [5:5] + read-write + + + INTERP1 + If 1, detach interpolator 1 (of this core) from the Secure SIO, and attach to the Non-secure SIO. + [1:1] + read-write + + + INTERP0 + If 1, detach interpolator 0 (of this core) from the Secure SIO, and attach to the Non-secure SIO. + [0:0] + read-write + + + + + RISCV_SOFTIRQ + 0x000001a0 + 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. + 0x00000000 + + + CORE1_CLR + Write 1 to atomically clear the core 1 software interrupt flag. Read to get the status of this flag. + [9:9] + read-write + + + CORE0_CLR + Write 1 to atomically clear the core 0 software interrupt flag. Read to get the status of this flag. + [8:8] + read-write + + + CORE1_SET + Write 1 to atomically set the core 1 software interrupt flag. Read to get the status of this flag. + [1:1] + read-write + + + CORE0_SET + Write 1 to atomically set the core 0 software interrupt flag. Read to get the status of this flag. + [0:0] + read-write + + + + + MTIME_CTRL + 0x000001a4 + 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. + 0x0000000d + + + DBGPAUSE_CORE1 + If 1, the timer pauses when core 1 is in the debug halt state. + [3:3] + read-write + + + DBGPAUSE_CORE0 + If 1, the timer pauses when core 0 is in the debug halt state. + [2:2] + read-write + + + FULLSPEED + 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. + [1:1] + read-write + + + EN + Timer enable bit. When 0, the timer will not increment automatically. + [0:0] + read-write + + + + + MTIME + 0x000001b0 + 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. + 0x00000000 + + + MTIME + [31:0] + read-write + + + + + MTIMEH + 0x000001b4 + 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. + 0x00000000 + + + MTIMEH + [31:0] + read-write + + + + + MTIMECMP + 0x000001b8 + 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. + 0xffffffff + + + MTIMECMP + [31:0] + read-write + + + + + MTIMECMPH + 0x000001bc + 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. + 0xffffffff + + + MTIMECMPH + [31:0] + read-write + + + + + TMDS_CTRL + 0x000001c0 + Control register for TMDS encoder. + 0x00000000 + + + CLEAR_BALANCE + Clear the running DC balance state of the TMDS encoders. This bit should be written once at the beginning of each scanline. + [28:28] + write-only + + + PIX2_NOSHIFT + 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. + [27:27] + read-write + + + PIX_SHIFT + 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.) + [26:24] + read-write + + + 0 + 0 + Do not shift the colour data register. + + + 1 + 1 + Shift the colour data register by 1 bit + + + 2 + 2 + Shift the colour data register by 2 bits + + + 4 + 3 + Shift the colour data register by 4 bits + + + 8 + 4 + Shift the colour data register by 8 bits + + + 16 + 5 + Shift the colour data register by 16 bits + + + + + INTERLEAVE + 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. + [23:23] + read-write + + + L2_NBITS + 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. + [20:18] + read-write + + + L1_NBITS + 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. + [17:15] + read-write + + + L0_NBITS + 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. + [14:12] + read-write + + + L2_ROT + 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. + [11:8] + read-write + + + L1_ROT + 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. + [7:4] + read-write + + + L0_ROT + 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. + [3:0] + read-write + + + + + TMDS_WDATA + 0x000001c4 + Write-only access to the TMDS colour data register. + 0x00000000 + + + TMDS_WDATA + [31:0] + write-only + + + + + TMDS_PEEK_SINGLE + 0x000001c8 + 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. + 0x00000000 + + + TMDS_PEEK_SINGLE + [31:0] + read-only + modify + + + + + TMDS_POP_SINGLE + 0x000001cc + 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. + 0x00000000 + + + TMDS_POP_SINGLE + [31:0] + read-only + modify + + + + + TMDS_PEEK_DOUBLE_L0 + 0x000001d0 + 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. + 0x00000000 + + + TMDS_PEEK_DOUBLE_L0 + [31:0] + read-only + modify + + + + + TMDS_POP_DOUBLE_L0 + 0x000001d4 + 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. + 0x00000000 + + + TMDS_POP_DOUBLE_L0 + [31:0] + read-only + modify + + + + + TMDS_PEEK_DOUBLE_L1 + 0x000001d8 + 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. + 0x00000000 + + + TMDS_PEEK_DOUBLE_L1 + [31:0] + read-only + modify + + + + + TMDS_POP_DOUBLE_L1 + 0x000001dc + 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. + 0x00000000 + + + TMDS_POP_DOUBLE_L1 + [31:0] + read-only + modify + + + + + TMDS_PEEK_DOUBLE_L2 + 0x000001e0 + 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. + 0x00000000 + + + TMDS_PEEK_DOUBLE_L2 + [31:0] + read-only + modify + + + + + TMDS_POP_DOUBLE_L2 + 0x000001e4 + 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. + 0x00000000 + + + TMDS_POP_DOUBLE_L2 + [31:0] + read-only + modify + + + + + + + SIO_NS + 0xd0020000 + + + BOOTRAM + Additional registers mapped adjacent to the bootram, for use by the bootrom. + 0x400e0000 + + 0 + 2092 + registers + + + + WRITE_ONCE0 + 0x00000800 + This registers always ORs writes into its current contents. Once a bit is set, it can only be cleared by a reset. + 0x00000000 + + + WRITE_ONCE0 + [31:0] + read-write + + + + + WRITE_ONCE1 + 0x00000804 + This registers always ORs writes into its current contents. Once a bit is set, it can only be cleared by a reset. + 0x00000000 + + + WRITE_ONCE1 + [31:0] + read-write + + + + + BOOTLOCK_STAT + 0x00000808 + Bootlock status register. 1=unclaimed, 0=claimed. These locks function identically to the SIO spinlocks, but are reserved for bootrom use. + 0x000000ff + + + BOOTLOCK_STAT + [7:0] + read-write + + + + + BOOTLOCK0 + 0x0000080c + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK0 + [31:0] + read-write + + + + + BOOTLOCK1 + 0x00000810 + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK1 + [31:0] + read-write + + + + + BOOTLOCK2 + 0x00000814 + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK2 + [31:0] + read-write + + + + + BOOTLOCK3 + 0x00000818 + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK3 + [31:0] + read-write + + + + + BOOTLOCK4 + 0x0000081c + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK4 + [31:0] + read-write + + + + + BOOTLOCK5 + 0x00000820 + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK5 + [31:0] + read-write + + + + + BOOTLOCK6 + 0x00000824 + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK6 + [31:0] + read-write + + + + + BOOTLOCK7 + 0x00000828 + Read to claim and check. Write to unclaim. The value returned on successful claim is 1 << n, and on failed claim is zero. + 0x00000000 + + + BOOTLOCK7 + [31:0] + read-write + + + + + + + CORESIGHT_TRACE + Coresight block - RP specific registers + 0x50700000 + + 0 + 8 + registers + + + + CTRL_STATUS + 0x00000000 + Control and status register + 0x00000001 + + + TRACE_CAPTURE_FIFO_OVERFLOW + 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. + [1:1] + read-write + + + TRACE_CAPTURE_FIFO_FLUSH + 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. + [0:0] + read-write + + + + + TRACE_CAPTURE_FIFO + 0x00000004 + FIFO for trace data captured from the TPIU + 0x00000000 + + + RDATA + 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. + [31:0] + read-only + modify + + + + + + + USB + USB FS/LS controller device registers + 0x50110000 + + 0 + 280 + registers + + + USBCTRL_IRQ + 14 + + + + ADDR_ENDP + 0x00000000 + Device address and endpoint control + 0x00000000 + + + ENDPOINT + Device endpoint to send data to. Only valid for HOST mode. + [19:16] + read-write + + + ADDRESS + 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. + [6:0] + read-write + + + + + ADDR_ENDP1 + 0x00000004 + Interrupt endpoint 1. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP2 + 0x00000008 + Interrupt endpoint 2. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP3 + 0x0000000c + Interrupt endpoint 3. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP4 + 0x00000010 + Interrupt endpoint 4. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP5 + 0x00000014 + Interrupt endpoint 5. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP6 + 0x00000018 + Interrupt endpoint 6. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP7 + 0x0000001c + Interrupt endpoint 7. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP8 + 0x00000020 + Interrupt endpoint 8. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP9 + 0x00000024 + Interrupt endpoint 9. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP10 + 0x00000028 + Interrupt endpoint 10. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP11 + 0x0000002c + Interrupt endpoint 11. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP12 + 0x00000030 + Interrupt endpoint 12. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP13 + 0x00000034 + Interrupt endpoint 13. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP14 + 0x00000038 + Interrupt endpoint 14. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + ADDR_ENDP15 + 0x0000003c + Interrupt endpoint 15. Only valid for HOST mode. + 0x00000000 + + + INTEP_PREAMBLE + Interrupt EP requires preamble (is a low speed device on a full speed hub) + [26:26] + read-write + + + INTEP_DIR + Direction of the interrupt endpoint. In=0, Out=1 + [25:25] + read-write + + + ENDPOINT + Endpoint number of the interrupt endpoint + [19:16] + read-write + + + ADDRESS + Device address + [6:0] + read-write + + + + + MAIN_CTRL + 0x00000040 + Main control register + 0x00000004 + + + SIM_TIMING + Reduced timings for simulation + [31:31] + read-write + + + PHY_ISO + Isolates USB phy after controller power-up + Remove isolation once software has configured the controller + Not isolated = 0, Isolated = 1 + [2:2] + read-write + + + HOST_NDEVICE + Device mode = 0, Host mode = 1 + [1:1] + read-write + + + CONTROLLER_EN + Enable controller + [0:0] + read-write + + + + + SOF_WR + 0x00000044 + 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. + 0x00000000 + + + COUNT + [10:0] + write-only + + + + + SOF_RD + 0x00000048 + 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. + 0x00000000 + + + COUNT + [10:0] + read-only + + + + + SIE_CTRL + 0x0000004c + SIE control register + 0x00008000 + + + EP0_INT_STALL + Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL + [31:31] + read-write + + + EP0_DOUBLE_BUF + Device: EP0 single buffered = 0, double buffered = 1 + [30:30] + read-write + + + EP0_INT_1BUF + Device: Set bit in BUFF_STATUS for every buffer completed on EP0 + [29:29] + read-write + + + EP0_INT_2BUF + Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0 + [28:28] + read-write + + + EP0_INT_NAK + Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK + [27:27] + read-write + + + DIRECT_EN + Direct bus drive enable + [26:26] + read-write + + + DIRECT_DP + Direct control of DP + [25:25] + read-write + + + DIRECT_DM + Direct control of DM + [24:24] + read-write + + + EP0_STOP_ON_SHORT_PACKET + Device: Stop EP0 on a short packet. + [19:19] + read-write + + + TRANSCEIVER_PD + Power down bus transceiver + [18:18] + read-write + + + RPU_OPT + Device: Pull-up strength (0=1K2, 1=2k3) + [17:17] + read-write + + + PULLUP_EN + Device: Enable pull up resistor + [16:16] + read-write + + + PULLDOWN_EN + Host: Enable pull down resistors + [15:15] + read-write + + + RESET_BUS + Host: Reset bus + [13:13] + write-only + + + RESUME + Device: Remote wakeup. Device can initiate its own resume after suspend. + [12:12] + write-only + + + VBUS_EN + Host: Enable VBUS + [11:11] + read-write + + + KEEP_ALIVE_EN + Host: Enable keep alive packet (for low speed bus) + [10:10] + read-write + + + SOF_EN + Host: Enable SOF generation (for full speed bus) + [9:9] + read-write + + + SOF_SYNC + Host: Delay packet(s) until after SOF + [8:8] + read-write + + + PREAMBLE_EN + Host: Preable enable for LS device on FS hub + [6:6] + read-write + + + STOP_TRANS + Host: Stop transaction + [4:4] + write-only + + + RECEIVE_DATA + Host: Receive transaction (IN to host) + [3:3] + read-write + + + SEND_DATA + Host: Send transaction (OUT from host) + [2:2] + read-write + + + SEND_SETUP + Host: Send Setup packet + [1:1] + read-write + + + START_TRANS + Host: Start transaction + [0:0] + write-only + + + + + SIE_STATUS + 0x00000050 + SIE status register + 0x00000000 + + + DATA_SEQ_ERROR + 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 + [31:31] + read-write + oneToClear + + + ACK_REC + ACK received. Raised by both host and device. + [30:30] + read-write + oneToClear + + + STALL_REC + Host: STALL received + [29:29] + read-write + oneToClear + + + NAK_REC + Host: NAK received + [28:28] + read-write + oneToClear + + + RX_TIMEOUT + 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. + [27:27] + read-write + oneToClear + + + RX_OVERFLOW + RX overflow is raised by the Serial RX engine if the incoming data is too fast. + [26:26] + read-write + oneToClear + + + BIT_STUFF_ERROR + Bit Stuff Error. Raised by the Serial RX engine. + [25:25] + read-write + oneToClear + + + CRC_ERROR + CRC Error. Raised by the Serial RX engine. + [24:24] + read-write + oneToClear + + + ENDPOINT_ERROR + An endpoint has encountered an error. Read the ep_rx_error and ep_tx_error registers to find out which endpoint had an error. + [23:23] + read-write + oneToClear + + + BUS_RESET + Device: bus reset received + [19:19] + read-write + oneToClear + + + TRANS_COMPLETE + 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 + [18:18] + read-write + oneToClear + + + SETUP_REC + Device: Setup packet received + [17:17] + read-write + oneToClear + + + CONNECTED + Device: connected + [16:16] + read-only + + + RX_SHORT_PACKET + 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. + [12:12] + read-write + oneToClear + + + RESUME + Host: Device has initiated a remote resume. Device: host has initiated a resume. + [11:11] + read-write + oneToClear + + + VBUS_OVER_CURR + VBUS over current detected + [10:10] + read-only + + + SPEED + Host: device speed. Disconnected = 00, LS = 01, FS = 10 + [9:8] + read-only + + + SUSPENDED + Bus in suspended state. Valid for device. Device will go into suspend if neither Keep Alive / SOF frames are enabled. + [4:4] + read-write + oneToClear + + + LINE_STATE + USB bus line state + [3:2] + read-only + + + VBUS_DETECTED + Device: VBUS Detected + [0:0] + read-only + + + + + INT_EP_CTRL + 0x00000054 + interrupt endpoint control register + 0x00000000 + + + INT_EP_ACTIVE + Host: Enable interrupt endpoint 1 -> 15 + [15:1] + read-write + + + + + BUFF_STATUS + 0x00000058 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + oneToClear + + + EP15_IN + [30:30] + read-write + oneToClear + + + EP14_OUT + [29:29] + read-write + oneToClear + + + EP14_IN + [28:28] + read-write + oneToClear + + + EP13_OUT + [27:27] + read-write + oneToClear + + + EP13_IN + [26:26] + read-write + oneToClear + + + EP12_OUT + [25:25] + read-write + oneToClear + + + EP12_IN + [24:24] + read-write + oneToClear + + + EP11_OUT + [23:23] + read-write + oneToClear + + + EP11_IN + [22:22] + read-write + oneToClear + + + EP10_OUT + [21:21] + read-write + oneToClear + + + EP10_IN + [20:20] + read-write + oneToClear + + + EP9_OUT + [19:19] + read-write + oneToClear + + + EP9_IN + [18:18] + read-write + oneToClear + + + EP8_OUT + [17:17] + read-write + oneToClear + + + EP8_IN + [16:16] + read-write + oneToClear + + + EP7_OUT + [15:15] + read-write + oneToClear + + + EP7_IN + [14:14] + read-write + oneToClear + + + EP6_OUT + [13:13] + read-write + oneToClear + + + EP6_IN + [12:12] + read-write + oneToClear + + + EP5_OUT + [11:11] + read-write + oneToClear + + + EP5_IN + [10:10] + read-write + oneToClear + + + EP4_OUT + [9:9] + read-write + oneToClear + + + EP4_IN + [8:8] + read-write + oneToClear + + + EP3_OUT + [7:7] + read-write + oneToClear + + + EP3_IN + [6:6] + read-write + oneToClear + + + EP2_OUT + [5:5] + read-write + oneToClear + + + EP2_IN + [4:4] + read-write + oneToClear + + + EP1_OUT + [3:3] + read-write + oneToClear + + + EP1_IN + [2:2] + read-write + oneToClear + + + EP0_OUT + [1:1] + read-write + oneToClear + + + EP0_IN + [0:0] + read-write + oneToClear + + + + + BUFF_CPU_SHOULD_HANDLE + 0x0000005c + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-only + + + EP15_IN + [30:30] + read-only + + + EP14_OUT + [29:29] + read-only + + + EP14_IN + [28:28] + read-only + + + EP13_OUT + [27:27] + read-only + + + EP13_IN + [26:26] + read-only + + + EP12_OUT + [25:25] + read-only + + + EP12_IN + [24:24] + read-only + + + EP11_OUT + [23:23] + read-only + + + EP11_IN + [22:22] + read-only + + + EP10_OUT + [21:21] + read-only + + + EP10_IN + [20:20] + read-only + + + EP9_OUT + [19:19] + read-only + + + EP9_IN + [18:18] + read-only + + + EP8_OUT + [17:17] + read-only + + + EP8_IN + [16:16] + read-only + + + EP7_OUT + [15:15] + read-only + + + EP7_IN + [14:14] + read-only + + + EP6_OUT + [13:13] + read-only + + + EP6_IN + [12:12] + read-only + + + EP5_OUT + [11:11] + read-only + + + EP5_IN + [10:10] + read-only + + + EP4_OUT + [9:9] + read-only + + + EP4_IN + [8:8] + read-only + + + EP3_OUT + [7:7] + read-only + + + EP3_IN + [6:6] + read-only + + + EP2_OUT + [5:5] + read-only + + + EP2_IN + [4:4] + read-only + + + EP1_OUT + [3:3] + read-only + + + EP1_IN + [2:2] + read-only + + + EP0_OUT + [1:1] + read-only + + + EP0_IN + [0:0] + read-only + + + + + EP_ABORT + 0x00000060 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + + + EP15_IN + [30:30] + read-write + + + EP14_OUT + [29:29] + read-write + + + EP14_IN + [28:28] + read-write + + + EP13_OUT + [27:27] + read-write + + + EP13_IN + [26:26] + read-write + + + EP12_OUT + [25:25] + read-write + + + EP12_IN + [24:24] + read-write + + + EP11_OUT + [23:23] + read-write + + + EP11_IN + [22:22] + read-write + + + EP10_OUT + [21:21] + read-write + + + EP10_IN + [20:20] + read-write + + + EP9_OUT + [19:19] + read-write + + + EP9_IN + [18:18] + read-write + + + EP8_OUT + [17:17] + read-write + + + EP8_IN + [16:16] + read-write + + + EP7_OUT + [15:15] + read-write + + + EP7_IN + [14:14] + read-write + + + EP6_OUT + [13:13] + read-write + + + EP6_IN + [12:12] + read-write + + + EP5_OUT + [11:11] + read-write + + + EP5_IN + [10:10] + read-write + + + EP4_OUT + [9:9] + read-write + + + EP4_IN + [8:8] + read-write + + + EP3_OUT + [7:7] + read-write + + + EP3_IN + [6:6] + read-write + + + EP2_OUT + [5:5] + read-write + + + EP2_IN + [4:4] + read-write + + + EP1_OUT + [3:3] + read-write + + + EP1_IN + [2:2] + read-write + + + EP0_OUT + [1:1] + read-write + + + EP0_IN + [0:0] + read-write + + + + + EP_ABORT_DONE + 0x00000064 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + oneToClear + + + EP15_IN + [30:30] + read-write + oneToClear + + + EP14_OUT + [29:29] + read-write + oneToClear + + + EP14_IN + [28:28] + read-write + oneToClear + + + EP13_OUT + [27:27] + read-write + oneToClear + + + EP13_IN + [26:26] + read-write + oneToClear + + + EP12_OUT + [25:25] + read-write + oneToClear + + + EP12_IN + [24:24] + read-write + oneToClear + + + EP11_OUT + [23:23] + read-write + oneToClear + + + EP11_IN + [22:22] + read-write + oneToClear + + + EP10_OUT + [21:21] + read-write + oneToClear + + + EP10_IN + [20:20] + read-write + oneToClear + + + EP9_OUT + [19:19] + read-write + oneToClear + + + EP9_IN + [18:18] + read-write + oneToClear + + + EP8_OUT + [17:17] + read-write + oneToClear + + + EP8_IN + [16:16] + read-write + oneToClear + + + EP7_OUT + [15:15] + read-write + oneToClear + + + EP7_IN + [14:14] + read-write + oneToClear + + + EP6_OUT + [13:13] + read-write + oneToClear + + + EP6_IN + [12:12] + read-write + oneToClear + + + EP5_OUT + [11:11] + read-write + oneToClear + + + EP5_IN + [10:10] + read-write + oneToClear + + + EP4_OUT + [9:9] + read-write + oneToClear + + + EP4_IN + [8:8] + read-write + oneToClear + + + EP3_OUT + [7:7] + read-write + oneToClear + + + EP3_IN + [6:6] + read-write + oneToClear + + + EP2_OUT + [5:5] + read-write + oneToClear + + + EP2_IN + [4:4] + read-write + oneToClear + + + EP1_OUT + [3:3] + read-write + oneToClear + + + EP1_IN + [2:2] + read-write + oneToClear + + + EP0_OUT + [1:1] + read-write + oneToClear + + + EP0_IN + [0:0] + read-write + oneToClear + + + + + EP_STALL_ARM + 0x00000068 + 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. + 0x00000000 + + + EP0_OUT + [1:1] + read-write + + + EP0_IN + [0:0] + read-write + + + + + NAK_POLL + 0x0000006c + Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK. + 0x00100010 + + + RETRY_COUNT_HI + Bits 9:6 of nak_retry count + [31:28] + read-only + + + EPX_STOPPED_ON_NAK + EPX polling has stopped because a nak was received + [27:27] + read-write + oneToClear + + + STOP_EPX_ON_NAK + Stop polling epx when a nak is received + [26:26] + read-write + + + DELAY_FS + NAK polling interval for a full speed device + [25:16] + read-write + + + RETRY_COUNT_LO + Bits 5:0 of nak_retry_count + [15:10] + read-only + + + DELAY_LS + NAK polling interval for a low speed device + [9:0] + read-write + + + + + EP_STATUS_STALL_NAK + 0x00000070 + 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. + 0x00000000 + + + EP15_OUT + [31:31] + read-write + oneToClear + + + EP15_IN + [30:30] + read-write + oneToClear + + + EP14_OUT + [29:29] + read-write + oneToClear + + + EP14_IN + [28:28] + read-write + oneToClear + + + EP13_OUT + [27:27] + read-write + oneToClear + + + EP13_IN + [26:26] + read-write + oneToClear + + + EP12_OUT + [25:25] + read-write + oneToClear + + + EP12_IN + [24:24] + read-write + oneToClear + + + EP11_OUT + [23:23] + read-write + oneToClear + + + EP11_IN + [22:22] + read-write + oneToClear + + + EP10_OUT + [21:21] + read-write + oneToClear + + + EP10_IN + [20:20] + read-write + oneToClear + + + EP9_OUT + [19:19] + read-write + oneToClear + + + EP9_IN + [18:18] + read-write + oneToClear + + + EP8_OUT + [17:17] + read-write + oneToClear + + + EP8_IN + [16:16] + read-write + oneToClear + + + EP7_OUT + [15:15] + read-write + oneToClear + + + EP7_IN + [14:14] + read-write + oneToClear + + + EP6_OUT + [13:13] + read-write + oneToClear + + + EP6_IN + [12:12] + read-write + oneToClear + + + EP5_OUT + [11:11] + read-write + oneToClear + + + EP5_IN + [10:10] + read-write + oneToClear + + + EP4_OUT + [9:9] + read-write + oneToClear + + + EP4_IN + [8:8] + read-write + oneToClear + + + EP3_OUT + [7:7] + read-write + oneToClear + + + EP3_IN + [6:6] + read-write + oneToClear + + + EP2_OUT + [5:5] + read-write + oneToClear + + + EP2_IN + [4:4] + read-write + oneToClear + + + EP1_OUT + [3:3] + read-write + oneToClear + + + EP1_IN + [2:2] + read-write + oneToClear + + + EP0_OUT + [1:1] + read-write + oneToClear + + + EP0_IN + [0:0] + read-write + oneToClear + + + + + USB_MUXING + 0x00000074 + Where to connect the USB controller. Should be to_phy by default. + 0x00000001 + + + SWAP_DPDM + 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. + [31:31] + read-write + + + USBPHY_AS_GPIO + Use the usb DP and DM pins as GPIO pins instead of connecting them to the USB controller. + [4:4] + read-write + + + SOFTCON + [3:3] + read-write + + + TO_DIGITAL_PAD + [2:2] + read-write + + + TO_EXTPHY + [1:1] + read-write + + + TO_PHY + [0:0] + read-write + + + + + USB_PWR + 0x00000078 + 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. + 0x00000000 + + + OVERCURR_DETECT_EN + [5:5] + read-write + + + OVERCURR_DETECT + [4:4] + read-write + + + VBUS_DETECT_OVERRIDE_EN + [3:3] + read-write + + + VBUS_DETECT + [2:2] + read-write + + + VBUS_EN_OVERRIDE_EN + [1:1] + read-write + + + VBUS_EN + [0:0] + read-write + + + + + USBPHY_DIRECT + 0x0000007c + This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit. + 0x00000000 + + + RX_DM_OVERRIDE + Override rx_dm value into controller + [25:25] + read-write + + + RX_DP_OVERRIDE + Override rx_dp value into controller + [24:24] + read-write + + + RX_DD_OVERRIDE + Override rx_dd value into controller + [23:23] + read-write + + + DM_OVV + DM over voltage + [22:22] + read-only + + + DP_OVV + DP over voltage + [21:21] + read-only + + + DM_OVCN + DM overcurrent + [20:20] + read-only + + + DP_OVCN + DP overcurrent + [19:19] + read-only + + + RX_DM + DPM pin state + [18:18] + read-only + + + RX_DP + DPP pin state + [17:17] + read-only + + + RX_DD + Differential RX + [16:16] + read-only + + + TX_DIFFMODE + TX_DIFFMODE=0: Single ended mode + TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored) + [15:15] + read-write + + + TX_FSSLEW + TX_FSSLEW=0: Low speed slew rate + TX_FSSLEW=1: Full speed slew rate + [14:14] + read-write + + + TX_PD + TX power down override (if override enable is set). 1 = powered down. + [13:13] + read-write + + + RX_PD + RX power down override (if override enable is set). 1 = powered down. + [12:12] + read-write + + + TX_DM + Output data. TX_DIFFMODE=1, Ignored + TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM + [11:11] + read-write + + + TX_DP + 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 + [10:10] + read-write + + + TX_DM_OE + Output enable. If TX_DIFFMODE=1, Ignored. + If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving + [9:9] + read-write + + + TX_DP_OE + 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 + [8:8] + read-write + + + DM_PULLDN_EN + DM pull down enable + [6:6] + read-write + + + DM_PULLUP_EN + DM pull up enable + [5:5] + read-write + + + DM_PULLUP_HISEL + Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 + [4:4] + read-write + + + DP_PULLDN_EN + DP pull down enable + [2:2] + read-write + + + DP_PULLUP_EN + DP pull up enable + [1:1] + read-write + + + DP_PULLUP_HISEL + Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 + [0:0] + read-write + + + + + USBPHY_DIRECT_OVERRIDE + 0x00000080 + Override enable for each control in usbphy_direct + 0x00000000 + + + RX_DM_OVERRIDE_EN + [18:18] + read-write + + + RX_DP_OVERRIDE_EN + [17:17] + read-write + + + RX_DD_OVERRIDE_EN + [16:16] + read-write + + + TX_DIFFMODE_OVERRIDE_EN + [15:15] + read-write + + + DM_PULLUP_OVERRIDE_EN + [12:12] + read-write + + + TX_FSSLEW_OVERRIDE_EN + [11:11] + read-write + + + TX_PD_OVERRIDE_EN + [10:10] + read-write + + + RX_PD_OVERRIDE_EN + [9:9] + read-write + + + TX_DM_OVERRIDE_EN + [8:8] + read-write + + + TX_DP_OVERRIDE_EN + [7:7] + read-write + + + TX_DM_OE_OVERRIDE_EN + [6:6] + read-write + + + TX_DP_OE_OVERRIDE_EN + [5:5] + read-write + + + DM_PULLDN_EN_OVERRIDE_EN + [4:4] + read-write + + + DP_PULLDN_EN_OVERRIDE_EN + [3:3] + read-write + + + DP_PULLUP_EN_OVERRIDE_EN + [2:2] + read-write + + + DM_PULLUP_HISEL_OVERRIDE_EN + [1:1] + read-write + + + DP_PULLUP_HISEL_OVERRIDE_EN + [0:0] + read-write + + + + + USBPHY_TRIM + 0x00000084 + Used to adjust trim values of USB phy pull down resistors. + 0x00001f1f + + + DM_PULLDN_TRIM + 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 + [12:8] + read-write + + + DP_PULLDN_TRIM + 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 + [4:0] + read-write + + + + + LINESTATE_TUNING + 0x00000088 + Used for debug only. + 0x000000f8 + + + SPARE_FIX + [11:8] + read-write + + + DEV_LS_WAKE_FIX + Device - exit suspend on any non-idle signalling, not qualified with a 1ms timer + [7:7] + read-write + + + DEV_RX_ERR_QUIESCE + Device - suppress repeated errors until the device FSM is next in the process of decoding an inbound packet. + [6:6] + read-write + + + SIE_RX_CHATTER_SE0_FIX + RX - when recovering from line chatter or bitstuff errors, treat SE0 as the end of chatter as well as + 8 consecutive idle bits. + [5:5] + read-write + + + SIE_RX_BITSTUFF_FIX + RX - when a bitstuff error is signalled by rx_dasm, unconditionally terminate RX decode to + avoid a hang during certain packet phases. + [4:4] + read-write + + + DEV_BUFF_CONTROL_DOUBLE_READ_FIX + 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. + [3:3] + read-write + + + MULTI_HUB_FIX + Host - increase inter-packet and turnaround timeouts to accommodate worst-case hub delays. + [2:2] + read-write + + + LINESTATE_DELAY + Device/Host - add an extra 1-bit debounce of linestate sampling. + [1:1] + read-write + + + RCV_DELAY + Device - register the received data to account for hub bit dribble before EOP. Only affects certain hubs. + [0:0] + read-write + + + + + INTR + 0x0000008c + Raw Interrupts + 0x00000000 + + + EPX_STOPPED_ON_NAK + Source: NAK_POLL.EPX_STOPPED_ON_NAK + [23:23] + read-only + + + DEV_SM_WATCHDOG_FIRED + Source: DEV_SM_WATCHDOG.FIRED + [22:22] + read-only + + + ENDPOINT_ERROR + Source: SIE_STATUS.ENDPOINT_ERROR + [21:21] + read-only + + + RX_SHORT_PACKET + Source: SIE_STATUS.RX_SHORT_PACKET + [20:20] + read-only + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-only + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-only + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-only + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-only + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + [15:15] + read-only + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-only + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-only + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-only + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECTED + [11:11] + read-only + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-only + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-only + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-only + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-only + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-only + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-only + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-only + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-only + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-only + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + [1:1] + read-only + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-only + + + + + INTE + 0x00000090 + Interrupt Enable + 0x00000000 + + + EPX_STOPPED_ON_NAK + Source: NAK_POLL.EPX_STOPPED_ON_NAK + [23:23] + read-write + + + DEV_SM_WATCHDOG_FIRED + Source: DEV_SM_WATCHDOG.FIRED + [22:22] + read-write + + + ENDPOINT_ERROR + Source: SIE_STATUS.ENDPOINT_ERROR + [21:21] + read-write + + + RX_SHORT_PACKET + Source: SIE_STATUS.RX_SHORT_PACKET + [20:20] + read-write + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-write + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-write + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-write + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-write + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + [15:15] + read-write + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-write + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-write + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-write + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECTED + [11:11] + read-write + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-write + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-write + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-write + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-write + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-write + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-write + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-write + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-write + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-write + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + [1:1] + read-write + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-write + + + + + INTF + 0x00000094 + Interrupt Force + 0x00000000 + + + EPX_STOPPED_ON_NAK + Source: NAK_POLL.EPX_STOPPED_ON_NAK + [23:23] + read-write + + + DEV_SM_WATCHDOG_FIRED + Source: DEV_SM_WATCHDOG.FIRED + [22:22] + read-write + + + ENDPOINT_ERROR + Source: SIE_STATUS.ENDPOINT_ERROR + [21:21] + read-write + + + RX_SHORT_PACKET + Source: SIE_STATUS.RX_SHORT_PACKET + [20:20] + read-write + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-write + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-write + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-write + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-write + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + [15:15] + read-write + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-write + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-write + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-write + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECTED + [11:11] + read-write + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-write + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-write + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-write + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-write + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-write + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-write + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-write + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-write + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-write + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + [1:1] + read-write + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-write + + + + + INTS + 0x00000098 + Interrupt status after masking & forcing + 0x00000000 + + + EPX_STOPPED_ON_NAK + Source: NAK_POLL.EPX_STOPPED_ON_NAK + [23:23] + read-only + + + DEV_SM_WATCHDOG_FIRED + Source: DEV_SM_WATCHDOG.FIRED + [22:22] + read-only + + + ENDPOINT_ERROR + Source: SIE_STATUS.ENDPOINT_ERROR + [21:21] + read-only + + + RX_SHORT_PACKET + Source: SIE_STATUS.RX_SHORT_PACKET + [20:20] + read-only + + + EP_STALL_NAK + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + [19:19] + read-only + + + ABORT_DONE + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + [18:18] + read-only + + + DEV_SOF + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + [17:17] + read-only + + + SETUP_REQ + Device. Source: SIE_STATUS.SETUP_REC + [16:16] + read-only + + + DEV_RESUME_FROM_HOST + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + [15:15] + read-only + + + DEV_SUSPEND + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + [14:14] + read-only + + + DEV_CONN_DIS + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + [13:13] + read-only + + + BUS_RESET + Source: SIE_STATUS.BUS_RESET + [12:12] + read-only + + + VBUS_DETECT + Source: SIE_STATUS.VBUS_DETECTED + [11:11] + read-only + + + STALL + Source: SIE_STATUS.STALL_REC + [10:10] + read-only + + + ERROR_CRC + Source: SIE_STATUS.CRC_ERROR + [9:9] + read-only + + + ERROR_BIT_STUFF + Source: SIE_STATUS.BIT_STUFF_ERROR + [8:8] + read-only + + + ERROR_RX_OVERFLOW + Source: SIE_STATUS.RX_OVERFLOW + [7:7] + read-only + + + ERROR_RX_TIMEOUT + Source: SIE_STATUS.RX_TIMEOUT + [6:6] + read-only + + + ERROR_DATA_SEQ + Source: SIE_STATUS.DATA_SEQ_ERROR + [5:5] + read-only + + + BUFF_STATUS + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + [4:4] + read-only + + + TRANS_COMPLETE + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + [3:3] + read-only + + + HOST_SOF + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + [2:2] + read-only + + + HOST_RESUME + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + [1:1] + read-only + + + HOST_CONN_DIS + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + [0:0] + read-only + + + + + SOF_TIMESTAMP_RAW + 0x00000100 + Device only. Raw value of free-running PHY clock counter @48MHz. Used to calculate time between SOF events. + 0x00000000 + + + SOF_TIMESTAMP_RAW + [20:0] + read-only + + + + + SOF_TIMESTAMP_LAST + 0x00000104 + Device only. Value of free-running PHY clock counter @48MHz when last SOF event occurred. + 0x00000000 + + + SOF_TIMESTAMP_LAST + [20:0] + read-only + + + + + SM_STATE + 0x00000108 + 0x00000000 + + + RX_DASM + [11:8] + read-only + + + BC_STATE + [7:5] + read-only + + + STATE + [4:0] + read-only + + + + + EP_TX_ERROR + 0x0000010c + TX error count for each endpoint. Write to each field to reset the counter to 0. + 0x00000000 + + + EP15 + [31:30] + read-write + oneToClear + + + EP14 + [29:28] + read-write + oneToClear + + + EP13 + [27:26] + read-write + oneToClear + + + EP12 + [25:24] + read-write + oneToClear + + + EP11 + [23:22] + read-write + oneToClear + + + EP10 + [21:20] + read-write + oneToClear + + + EP9 + [19:18] + read-write + oneToClear + + + EP8 + [17:16] + read-write + oneToClear + + + EP7 + [15:14] + read-write + oneToClear + + + EP6 + [13:12] + read-write + oneToClear + + + EP5 + [11:10] + read-write + oneToClear + + + EP4 + [9:8] + read-write + oneToClear + + + EP3 + [7:6] + read-write + oneToClear + + + EP2 + [5:4] + read-write + oneToClear + + + EP1 + [3:2] + read-write + oneToClear + + + EP0 + [1:0] + read-write + oneToClear + + + + + EP_RX_ERROR + 0x00000110 + RX error count for each endpoint. Write to each field to reset the counter to 0. + 0x00000000 + + + EP15_SEQ + [31:31] + read-write + oneToClear + + + EP15_TRANSACTION + [30:30] + read-write + oneToClear + + + EP14_SEQ + [29:29] + read-write + oneToClear + + + EP14_TRANSACTION + [28:28] + read-write + oneToClear + + + EP13_SEQ + [27:27] + read-write + oneToClear + + + EP13_TRANSACTION + [26:26] + read-write + oneToClear + + + EP12_SEQ + [25:25] + read-write + oneToClear + + + EP12_TRANSACTION + [24:24] + read-write + oneToClear + + + EP11_SEQ + [23:23] + read-write + oneToClear + + + EP11_TRANSACTION + [22:22] + read-write + oneToClear + + + EP10_SEQ + [21:21] + read-write + oneToClear + + + EP10_TRANSACTION + [20:20] + read-write + oneToClear + + + EP9_SEQ + [19:19] + read-write + oneToClear + + + EP9_TRANSACTION + [18:18] + read-write + oneToClear + + + EP8_SEQ + [17:17] + read-write + oneToClear + + + EP8_TRANSACTION + [16:16] + read-write + oneToClear + + + EP7_SEQ + [15:15] + read-write + oneToClear + + + EP7_TRANSACTION + [14:14] + read-write + oneToClear + + + EP6_SEQ + [13:13] + read-write + oneToClear + + + EP6_TRANSACTION + [12:12] + read-write + oneToClear + + + EP5_SEQ + [11:11] + read-write + oneToClear + + + EP5_TRANSACTION + [10:10] + read-write + oneToClear + + + EP4_SEQ + [9:9] + read-write + oneToClear + + + EP4_TRANSACTION + [8:8] + read-write + oneToClear + + + EP3_SEQ + [7:7] + read-write + oneToClear + + + EP3_TRANSACTION + [6:6] + read-write + oneToClear + + + EP2_SEQ + [5:5] + read-write + oneToClear + + + EP2_TRANSACTION + [4:4] + read-write + oneToClear + + + EP1_SEQ + [3:3] + read-write + oneToClear + + + EP1_TRANSACTION + [2:2] + read-write + oneToClear + + + EP0_SEQ + [1:1] + read-write + oneToClear + + + EP0_TRANSACTION + [0:0] + read-write + oneToClear + + + + + DEV_SM_WATCHDOG + 0x00000114 + 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. + 0x00000000 + + + FIRED + [20:20] + read-write + oneToClear + + + RESET + Set to 1 to forcibly reset the device state machine on watchdog expiry + [19:19] + read-write + + + ENABLE + [18:18] + read-write + + + LIMIT + [17:0] + read-write + + + + + + + TRNG + ARM TrustZone RNG register block + 0x400f0000 + + 0 + 492 + registers + + + TRNG_IRQ + 39 + + + + RNG_IMR + 0x00000100 + Interrupt masking. + 0x0000000f + + + RESERVED + RESERVED + [31:4] + read-only + + + VN_ERR_INT_MASK + 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt. + [3:3] + read-write + + + CRNGT_ERR_INT_MASK + 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt. + [2:2] + read-write + + + AUTOCORR_ERR_INT_MASK + 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt. + [1:1] + read-write + + + EHR_VALID_INT_MASK + 1'b1-mask interrupt, no interrupt will be generated. See RNG_ISR for an explanation on this interrupt. + [0:0] + read-write + + + + + RNG_ISR + 0x00000104 + RNG status register. If corresponding RNG_IMR bit is unmasked, an interrupt will be generated. + 0x00000000 + + + RESERVED + RESERVED + [31:4] + read-only + + + VN_ERR + 1'b1 indicates Von Neuman error. Error in von Neuman occurs if 32 consecutive collected bits are identical, ZERO or ONE. + [3:3] + read-only + + + CRNGT_ERR + 1'b1 indicates CRNGT in the RNG test failed. Failure occurs when two consecutive blocks of 16 collected bits are equal. + [2:2] + read-only + + + AUTOCORR_ERR + 1'b1 indicates Autocorrelation test failed four times in a row. When set, RNG cease from functioning until next reset. + [1:1] + read-only + + + EHR_VALID + 1'b1 indicates that 192 bits have been collected in the RNG, and are ready to be read. + [0:0] + read-only + + + + + RNG_ICR + 0x00000108 + Interrupt/status bit clear Register. + 0x00000000 + + + RESERVED + RESERVED + [31:4] + read-only + + + VN_ERR + Write 1'b1 - clear corresponding bit in RNG_ISR. + [3:3] + read-write + + + CRNGT_ERR + Write 1'b1 - clear corresponding bit in RNG_ISR. + [2:2] + read-write + + + AUTOCORR_ERR + Cannot be cleared by SW! Only RNG reset clears this bit. + [1:1] + read-write + + + EHR_VALID + Write 1'b1 - clear corresponding bit in RNG_ISR. + [0:0] + read-write + + + + + TRNG_CONFIG + 0x0000010c + Selecting the inverter-chain length. + 0x00000000 + + + RESERVED + RESERVED + [31:2] + read-only + + + RND_SRC_SEL + Selects the number of inverters (out of four possible selections) in the ring oscillator (the entropy source). + [1:0] + read-write + + + + + TRNG_VALID + 0x00000110 + 192 bit collection indication. + 0x00000000 + + + RESERVED + RESERVED + [31:1] + read-only + + + EHR_VALID + 1'b1 indicates that collection of bits in the RNG is completed, and data can be read from EHR_DATA register. + [0:0] + read-only + + + + + EHR_DATA0 + 0x00000114 + RNG collected bits. + 0x00000000 + + + EHR_DATA0 + Bits [31:0] of Entropy Holding Register (EHR) - RNG output register + [31:0] + read-only + + + + + EHR_DATA1 + 0x00000118 + RNG collected bits. + 0x00000000 + + + EHR_DATA1 + Bits [63:32] of Entropy Holding Register (EHR) - RNG output register + [31:0] + read-only + + + + + EHR_DATA2 + 0x0000011c + RNG collected bits. + 0x00000000 + + + EHR_DATA2 + Bits [95:64] of Entropy Holding Register (EHR) - RNG output register + [31:0] + read-only + + + + + EHR_DATA3 + 0x00000120 + RNG collected bits. + 0x00000000 + + + EHR_DATA3 + Bits [127:96] of Entropy Holding Register (EHR) - RNG output register + [31:0] + read-only + + + + + EHR_DATA4 + 0x00000124 + RNG collected bits. + 0x00000000 + + + EHR_DATA4 + Bits [159:128] of Entropy Holding Register (EHR) - RNG output register + [31:0] + read-only + + + + + EHR_DATA5 + 0x00000128 + RNG collected bits. + 0x00000000 + + + EHR_DATA5 + Bits [191:160] of Entropy Holding Register (EHR) - RNG output register + [31:0] + read-only + + + + + RND_SOURCE_ENABLE + 0x0000012c + Enable signal for the random source. + 0x00000000 + + + RESERVED + RESERVED + [31:1] + read-only + + + RND_SRC_EN + * 1'b1 - entropy source is enabled. *1'b0 - entropy source is disabled + [0:0] + read-write + + + + + SAMPLE_CNT1 + 0x00000130 + Counts clocks between sampling of random bit. + 0x0000ffff + + + SAMPLE_CNTR1 + 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 + [31:0] + read-write + + + + + AUTOCORR_STATISTIC + 0x00000134 + Statistic about Autocorrelation test activations. + 0x00000000 + + + RESERVED + RESERVED + [31:22] + read-only + + + AUTOCORR_FAILS + 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. + [21:14] + read-write + + + AUTOCORR_TRYS + 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. + [13:0] + read-write + + + + + TRNG_DEBUG_CONTROL + 0x00000138 + Debug register. + 0x00000000 + + + AUTO_CORRELATE_BYPASS + When set, the autocorrelation test in the TRNG module is bypassed. + [3:3] + read-write + + + TRNG_CRNGT_BYPASS + When set, the CRNGT test in the RNG is bypassed. + [2:2] + read-write + + + VNC_BYPASS + When set, the Von-Neuman balancer is bypassed (including the 32 consecutive bits test). + [1:1] + read-write + + + RESERVED + N/A + [0:0] + read-only + + + + + TRNG_SW_RESET + 0x00000140 + Generate internal SW reset within the RNG block. + 0x00000000 + + + RESERVED + RESERVED + [31:1] + read-only + + + TRNG_SW_RESET + Writing 1'b1 to this register causes an internal RNG reset. + [0:0] + read-write + + + + + RNG_DEBUG_EN_INPUT + 0x000001b4 + Enable the RNG debug mode + 0x00000000 + + + RESERVED + RESERVED + [31:1] + read-only + + + RNG_DEBUG_EN + * 1'b1 - debug mode is enabled. *1'b0 - debug mode is disabled + [0:0] + read-write + + + + + TRNG_BUSY + 0x000001b8 + RNG Busy indication. + 0x00000000 + + + RESERVED + RESERVED + [31:1] + read-only + + + TRNG_BUSY + Reflects rng_busy status. + [0:0] + read-only + + + + + RST_BITS_COUNTER + 0x000001bc + Reset the counter of collected bits in the RNG. + 0x00000000 + + + RESERVED + RESERVED + [31:1] + read-only + + + RST_BITS_COUNTER + 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. + [0:0] + read-write + + + + + RNG_VERSION + 0x000001c0 + Displays the version settings of the TRNG. + 0x00000000 + + + RESERVED + RESERVED + [31:8] + read-only + + + RNG_USE_5_SBOXES + * 1'b1 - 5 SBOX AES. *1'b0 - 20 SBOX AES + [7:7] + read-only + + + RESEEDING_EXISTS + * 1'b1 - Exists. *1'b0 - Does not exist + [6:6] + read-only + + + KAT_EXISTS + * 1'b1 - Exists. *1'b0 - Does not exist + [5:5] + read-only + + + PRNG_EXISTS + * 1'b1 - Exists. *1'b0 - Does not exist + [4:4] + read-only + + + TRNG_TESTS_BYPASS_EN + * 1'b1 - Exists. *1'b0 - Does not exist + [3:3] + read-only + + + AUTOCORR_EXISTS + * 1'b1 - Exists. *1'b0 - Does not exist + [2:2] + read-only + + + CRNGT_EXISTS + * 1'b1 - Exists. *1'b0 - Does not exist + [1:1] + read-only + + + EHR_WIDTH_192 + * 1'b1 - 192-bit EHR. *1'b0 - 128-bit EHR + [0:0] + read-only + + + + + RNG_BIST_CNTR_0 + 0x000001e0 + Collected BIST results. + 0x00000000 + + + RESERVED + RESERVED + [31:22] + read-only + + + ROSC_CNTR_VAL + Reflects the results of RNG BIST counter. + [21:0] + read-only + + + + + RNG_BIST_CNTR_1 + 0x000001e4 + Collected BIST results. + 0x00000000 + + + RESERVED + RESERVED + [31:22] + read-only + + + ROSC_CNTR_VAL + Reflects the results of RNG BIST counter. + [21:0] + read-only + + + + + RNG_BIST_CNTR_2 + 0x000001e8 + Collected BIST results. + 0x00000000 + + + RESERVED + RESERVED + [31:22] + read-only + + + ROSC_CNTR_VAL + Reflects the results of RNG BIST counter. + [21:0] + read-only + + + + + + + GLITCH_DETECTOR + Glitch detector controls + 0x40158000 + + 0 + 24 + registers + + + + ARM + 0x00000000 + 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. + 0x00005bad + + + ARM + [15:0] + read-write + + + no + 23469 + Do not force the glitch detectors to be armed + + + yes + 0 + Force the glitch detectors to be armed. (Any value other than ARM_NO counts as YES) + + + + + + + DISARM + 0x00000004 + 0x00000000 + + + DISARM + Forcibly disarm the glitch detectors, if they are armed by OTP. Ignored if ARM is YES. + + This register is Secure read/write only. + [15:0] + read-write + + + no + 0 + Do not disarm the glitch detectors. (Any value other than DISARM_YES counts as NO) + + + yes + 56495 + Disarm the glitch detectors + + + + + + + SENSITIVITY + 0x00000008 + Adjust the sensitivity of glitch detectors to values other than their OTP-provided defaults. + + This register is Secure read/write only. + 0x00000000 + + + DEFAULT + [31:24] + read-write + + + yes + 0 + Use the default sensitivity configured in OTP for all detectors. (Any value other than DEFAULT_NO counts as YES) + + + no + 222 + Do not use the default sensitivity configured in OTP. Instead use the value from this register. + + + + + DET3_INV + Must be the inverse of DET3, else the default value is used. + [15:14] + read-write + + + DET2_INV + Must be the inverse of DET2, else the default value is used. + [13:12] + read-write + + + DET1_INV + Must be the inverse of DET1, else the default value is used. + [11:10] + read-write + + + DET0_INV + Must be the inverse of DET0, else the default value is used. + [9:8] + read-write + + + DET3 + Set sensitivity for detector 3. Higher values are more sensitive. + [7:6] + read-write + + + DET2 + Set sensitivity for detector 2. Higher values are more sensitive. + [5:4] + read-write + + + DET1 + Set sensitivity for detector 1. Higher values are more sensitive. + [3:2] + read-write + + + DET0 + Set sensitivity for detector 0. Higher values are more sensitive. + [1:0] + read-write + + + + + LOCK + 0x0000000c + 0x00000000 + + + LOCK + Write any nonzero value to disable writes to ARM, DISARM, SENSITIVITY and LOCK. This register is Secure read/write only. + [7:0] + read-write + + + + + TRIG_STATUS + 0x00000010 + 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. + 0x00000000 + + + DET3 + [3:3] + read-write + oneToClear + + + DET2 + [2:2] + read-write + oneToClear + + + DET1 + [1:1] + read-write + oneToClear + + + DET0 + [0:0] + read-write + oneToClear + + + + + TRIG_FORCE + 0x00000014 + 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. + 0x00000000 + + + TRIG_FORCE + [3:0] + write-only + + + + + + + OTP + SNPS OTP control IF (SBPI and RPi wrapper control) + 0x40120000 + + 0 + 372 + registers + + + OTP_IRQ + 38 + + + + SW_LOCK0 + 0x00000000 + Software lock register for page 0. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK1 + 0x00000004 + Software lock register for page 1. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK2 + 0x00000008 + Software lock register for page 2. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK3 + 0x0000000c + Software lock register for page 3. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK4 + 0x00000010 + Software lock register for page 4. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK5 + 0x00000014 + Software lock register for page 5. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK6 + 0x00000018 + Software lock register for page 6. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK7 + 0x0000001c + Software lock register for page 7. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK8 + 0x00000020 + Software lock register for page 8. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK9 + 0x00000024 + Software lock register for page 9. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK10 + 0x00000028 + Software lock register for page 10. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK11 + 0x0000002c + Software lock register for page 11. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK12 + 0x00000030 + Software lock register for page 12. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK13 + 0x00000034 + Software lock register for page 13. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK14 + 0x00000038 + Software lock register for page 14. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK15 + 0x0000003c + Software lock register for page 15. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK16 + 0x00000040 + Software lock register for page 16. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK17 + 0x00000044 + Software lock register for page 17. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK18 + 0x00000048 + Software lock register for page 18. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK19 + 0x0000004c + Software lock register for page 19. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK20 + 0x00000050 + Software lock register for page 20. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK21 + 0x00000054 + Software lock register for page 21. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK22 + 0x00000058 + Software lock register for page 22. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK23 + 0x0000005c + Software lock register for page 23. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK24 + 0x00000060 + Software lock register for page 24. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK25 + 0x00000064 + Software lock register for page 25. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK26 + 0x00000068 + Software lock register for page 26. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK27 + 0x0000006c + Software lock register for page 27. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK28 + 0x00000070 + Software lock register for page 28. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK29 + 0x00000074 + Software lock register for page 29. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK30 + 0x00000078 + Software lock register for page 30. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK31 + 0x0000007c + Software lock register for page 31. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK32 + 0x00000080 + Software lock register for page 32. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK33 + 0x00000084 + Software lock register for page 33. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK34 + 0x00000088 + Software lock register for page 34. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK35 + 0x0000008c + Software lock register for page 35. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK36 + 0x00000090 + Software lock register for page 36. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK37 + 0x00000094 + Software lock register for page 37. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK38 + 0x00000098 + Software lock register for page 38. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK39 + 0x0000009c + Software lock register for page 39. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK40 + 0x000000a0 + Software lock register for page 40. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK41 + 0x000000a4 + Software lock register for page 41. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK42 + 0x000000a8 + Software lock register for page 42. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK43 + 0x000000ac + Software lock register for page 43. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK44 + 0x000000b0 + Software lock register for page 44. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK45 + 0x000000b4 + Software lock register for page 45. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK46 + 0x000000b8 + Software lock register for page 46. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK47 + 0x000000bc + Software lock register for page 47. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK48 + 0x000000c0 + Software lock register for page 48. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK49 + 0x000000c4 + Software lock register for page 49. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK50 + 0x000000c8 + Software lock register for page 50. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK51 + 0x000000cc + Software lock register for page 51. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK52 + 0x000000d0 + Software lock register for page 52. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK53 + 0x000000d4 + Software lock register for page 53. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK54 + 0x000000d8 + Software lock register for page 54. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK55 + 0x000000dc + Software lock register for page 55. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK56 + 0x000000e0 + Software lock register for page 56. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK57 + 0x000000e4 + Software lock register for page 57. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK58 + 0x000000e8 + Software lock register for page 58. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK59 + 0x000000ec + Software lock register for page 59. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK60 + 0x000000f0 + Software lock register for page 60. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK61 + 0x000000f4 + Software lock register for page 61. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK62 + 0x000000f8 + Software lock register for page 62. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SW_LOCK63 + 0x000000fc + Software lock register for page 63. + + Locks are initialised from the OTP lock pages at reset. This register can be written to further advance the lock state of each page (until next reset), and read to check the current lock state of a page. + 0x00000000 + + + NSEC + Non-secure lock status. Writes are OR'd with the current value. + [3:2] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + SEC + Secure lock status. Writes are OR'd with the current value. This field is read-only to Non-secure code. + [1:0] + read-write + + + read_write + 0 + + + read_only + 1 + + + inaccessible + 3 + + + + + + + SBPI_INSTR + 0x00000100 + Dispatch instructions to the SBPI interface, used for programming the OTP fuses. + 0x00000000 + + + EXEC + Execute instruction + [30:30] + write-only + + + IS_WR + Payload type is write + [29:29] + read-write + + + HAS_PAYLOAD + Instruction has payload (data to be written or to be read) + [28:28] + read-write + + + PAYLOAD_SIZE_M1 + Instruction payload size in bytes minus 1 + [27:24] + read-write + + + TARGET + Instruction target, it can be PMC (0x3a) or DAP (0x02) + [23:16] + read-write + + + CMD + [15:8] + read-write + + + SHORT_WDATA + wdata to be used only when payload_size_m1=0 + [7:0] + read-write + + + + + SBPI_WDATA_0 + 0x00000104 + SBPI write payload bytes 3..0 + 0x00000000 + + + SBPI_WDATA_0 + [31:0] + read-write + + + + + SBPI_WDATA_1 + 0x00000108 + SBPI write payload bytes 7..4 + 0x00000000 + + + SBPI_WDATA_1 + [31:0] + read-write + + + + + SBPI_WDATA_2 + 0x0000010c + SBPI write payload bytes 11..8 + 0x00000000 + + + SBPI_WDATA_2 + [31:0] + read-write + + + + + SBPI_WDATA_3 + 0x00000110 + SBPI write payload bytes 15..12 + 0x00000000 + + + SBPI_WDATA_3 + [31:0] + read-write + + + + + SBPI_RDATA_0 + 0x00000114 + Read payload bytes 3..0. Once read, the data in the register will automatically clear to 0. + 0x00000000 + + + SBPI_RDATA_0 + [31:0] + read-only + modify + + + + + SBPI_RDATA_1 + 0x00000118 + Read payload bytes 7..4. Once read, the data in the register will automatically clear to 0. + 0x00000000 + + + SBPI_RDATA_1 + [31:0] + read-only + modify + + + + + SBPI_RDATA_2 + 0x0000011c + Read payload bytes 11..8. Once read, the data in the register will automatically clear to 0. + 0x00000000 + + + SBPI_RDATA_2 + [31:0] + read-only + modify + + + + + SBPI_RDATA_3 + 0x00000120 + Read payload bytes 15..12. Once read, the data in the register will automatically clear to 0. + 0x00000000 + + + SBPI_RDATA_3 + [31:0] + read-only + modify + + + + + SBPI_STATUS + 0x00000124 + 0x00000000 + + + MISO + SBPI MISO (master in - slave out): response from SBPI + [23:16] + read-only + + + FLAG + SBPI flag + [12:12] + read-only + + + INSTR_MISS + Last instruction missed (dropped), as the previous has not finished running + [8:8] + read-write + oneToClear + + + INSTR_DONE + Last instruction done + [4:4] + read-write + oneToClear + + + RDATA_VLD + Read command has returned data + [0:0] + read-write + oneToClear + + + + + USR + 0x00000128 + Controls for APB data read interface (USER interface) + 0x00000001 + + + PD + Power-down; 1 disables current reference. Must be 0 to read data from the OTP. + [4:4] + read-write + + + DCTRL + 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. + [0:0] + read-write + + + + + DBG + 0x0000012c + Debug for OTP power-on state machine + 0x00000000 + + + CUSTOMER_RMA_FLAG + The chip is in RMA mode + [12:12] + read-only + + + PSM_STATE + Monitor the PSM FSM's state + [7:4] + read-only + + + ROSC_UP + Ring oscillator is up and running + [3:3] + read-only + + + ROSC_UP_SEEN + Ring oscillator was seen up and running + [2:2] + read-write + oneToClear + + + BOOT_DONE + PSM boot done status flag + [1:1] + read-only + + + PSM_DONE + PSM done status flag + [0:0] + read-only + + + + + BIST + 0x00000134 + During BIST, count address locations that have at least one leaky bit + 0x0fff0000 + + + CNT_FAIL + Flag if the count of address locations with at least one leaky bit exceeds cnt_max + [30:30] + read-only + + + CNT_CLR + Clear counter before use + [29:29] + write-only + + + CNT_ENA + Enable the counter before the BIST function is initiated + [28:28] + read-write + + + CNT_MAX + The cnt_fail flag will be set if the number of leaky locations exceeds this number + [27:16] + read-write + + + CNT + 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. + [12:0] + read-only + + + + + CRT_KEY_W0 + 0x00000138 + Word 0 (bits 31..0) of the key. Write only, read returns 0x0 + 0x00000000 + + + CRT_KEY_W0 + [31:0] + write-only + + + + + CRT_KEY_W1 + 0x0000013c + Word 1 (bits 63..32) of the key. Write only, read returns 0x0 + 0x00000000 + + + CRT_KEY_W1 + [31:0] + write-only + + + + + CRT_KEY_W2 + 0x00000140 + Word 2 (bits 95..64) of the key. Write only, read returns 0x0 + 0x00000000 + + + CRT_KEY_W2 + [31:0] + write-only + + + + + CRT_KEY_W3 + 0x00000144 + Word 3 (bits 127..96) of the key. Write only, read returns 0x0 + 0x00000000 + + + CRT_KEY_W3 + [31:0] + write-only + + + + + CRITICAL + 0x00000148 + Quickly check values of critical flags read during boot up + 0x00000000 + + + RISCV_DISABLE + [17:17] + read-only + + + ARM_DISABLE + [16:16] + read-only + + + GLITCH_DETECTOR_SENS + [6:5] + read-only + + + GLITCH_DETECTOR_ENABLE + [4:4] + read-only + + + DEFAULT_ARCHSEL + [3:3] + read-only + + + DEBUG_DISABLE + [2:2] + read-only + + + SECURE_DEBUG_DISABLE + [1:1] + read-only + + + SECURE_BOOT_ENABLE + [0:0] + read-only + + + + + KEY_VALID + 0x0000014c + Which keys were valid (enrolled) at boot time + 0x00000000 + + + KEY_VALID + [7:0] + read-only + + + + + DEBUGEN + 0x00000150 + 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. + 0x00000000 + + + MISC + 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. + [8:8] + read-write + + + PROC1_SECURE + 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. + [3:3] + read-write + + + PROC1 + 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. + [2:2] + read-write + + + PROC0_SECURE + 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). + [1:1] + read-write + + + PROC0 + 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). + [0:0] + read-write + + + + + DEBUGEN_LOCK + 0x00000154 + Write 1s to lock corresponding bits in DEBUGEN. This register is reset by the processor cold reset. + 0x00000000 + + + MISC + Write 1 to lock the MISC bit of DEBUGEN. Can't be cleared once set. + [8:8] + read-write + + + PROC1_SECURE + Write 1 to lock the PROC1_SECURE bit of DEBUGEN. Can't be cleared once set. + [3:3] + read-write + + + PROC1 + Write 1 to lock the PROC1 bit of DEBUGEN. Can't be cleared once set. + [2:2] + read-write + + + PROC0_SECURE + Write 1 to lock the PROC0_SECURE bit of DEBUGEN. Can't be cleared once set. + [1:1] + read-write + + + PROC0 + Write 1 to lock the PROC0 bit of DEBUGEN. Can't be cleared once set. + [0:0] + read-write + + + + + ARCHSEL + 0x00000158 + 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. + 0x00000000 + + + CORE1 + Select architecture for core 1. + [1:1] + read-write + + + arm + 0 + Switch core 1 to Arm (Cortex-M33) + + + riscv + 1 + Switch core 1 to RISC-V (Hazard3) + + + + + CORE0 + Select architecture for core 0. + [0:0] + read-write + + + arm + 0 + Switch core 0 to Arm (Cortex-M33) + + + riscv + 1 + Switch core 0 to RISC-V (Hazard3) + + + + + + + ARCHSEL_STATUS + 0x0000015c + 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. + 0x00000000 + + + CORE1 + Current architecture for core 0. Updated on processor warm reset. + [1:1] + read-only + + + arm + 0 + Core 1 is currently Arm (Cortex-M33) + + + riscv + 1 + Core 1 is currently RISC-V (Hazard3) + + + + + CORE0 + Current architecture for core 0. Updated on processor warm reset. + [0:0] + read-only + + + arm + 0 + Core 0 is currently Arm (Cortex-M33) + + + riscv + 1 + Core 0 is currently RISC-V (Hazard3) + + + + + + + BOOTDIS + 0x00000160 + 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. + 0x00000000 + + + NEXT + 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. + [1:1] + read-write + + + NOW + 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. + [0:0] + read-write + oneToClear + + + + + INTR + 0x00000164 + Raw Interrupts + 0x00000000 + + + APB_RD_NSEC_FAIL + [4:4] + read-write + oneToClear + + + APB_RD_SEC_FAIL + [3:3] + read-write + oneToClear + + + APB_DCTRL_FAIL + [2:2] + read-write + oneToClear + + + SBPI_WR_FAIL + [1:1] + read-write + oneToClear + + + SBPI_FLAG_N + [0:0] + read-only + + + + + INTE + 0x00000168 + Interrupt Enable + 0x00000000 + + + APB_RD_NSEC_FAIL + [4:4] + read-write + + + APB_RD_SEC_FAIL + [3:3] + read-write + + + APB_DCTRL_FAIL + [2:2] + read-write + + + SBPI_WR_FAIL + [1:1] + read-write + + + SBPI_FLAG_N + [0:0] + read-write + + + + + INTF + 0x0000016c + Interrupt Force + 0x00000000 + + + APB_RD_NSEC_FAIL + [4:4] + read-write + + + APB_RD_SEC_FAIL + [3:3] + read-write + + + APB_DCTRL_FAIL + [2:2] + read-write + + + SBPI_WR_FAIL + [1:1] + read-write + + + SBPI_FLAG_N + [0:0] + read-write + + + + + INTS + 0x00000170 + Interrupt status after masking & forcing + 0x00000000 + + + APB_RD_NSEC_FAIL + [4:4] + read-only + + + APB_RD_SEC_FAIL + [3:3] + read-only + + + APB_DCTRL_FAIL + [2:2] + read-only + + + SBPI_WR_FAIL + [1:1] + read-only + + + SBPI_FLAG_N + [0:0] + read-only + + + + + + + OTP_DATA + Predefined OTP data layout for RP2350 + 0x40130000 + + 0 + 7920 + registers + + + + CHIPID0 + 0x0000 + 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. + 16 + 0x0000 + + + CHIPID0 + [15:0] + read-only + + + + + CHIPID1 + 0x0002 + Bits 31:16 of public device ID (ECC) + 16 + 0x0000 + + + CHIPID1 + [15:0] + read-only + + + + + CHIPID2 + 0x0004 + Bits 47:32 of public device ID (ECC) + 16 + 0x0000 + + + CHIPID2 + [15:0] + read-only + + + + + CHIPID3 + 0x0006 + Bits 63:48 of public device ID (ECC) + 16 + 0x0000 + + + CHIPID3 + [15:0] + read-only + + + + + RANDID0 + 0x0008 + 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. + 16 + 0x0000 + + + RANDID0 + [15:0] + read-only + + + + + RANDID1 + 0x000a + Bits 31:16 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID1 + [15:0] + read-only + + + + + RANDID2 + 0x000c + Bits 47:32 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID2 + [15:0] + read-only + + + + + RANDID3 + 0x000e + Bits 63:48 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID3 + [15:0] + read-only + + + + + RANDID4 + 0x0010 + Bits 79:64 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID4 + [15:0] + read-only + + + + + RANDID5 + 0x0012 + Bits 95:80 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID5 + [15:0] + read-only + + + + + RANDID6 + 0x0014 + Bits 111:96 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID6 + [15:0] + read-only + + + + + RANDID7 + 0x0016 + Bits 127:112 of private per-device random number (ECC) + 16 + 0x0000 + + + RANDID7 + [15:0] + read-only + + + + + ROSC_CALIB + 0x0020 + 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. + 16 + 0x0000 + + + ROSC_CALIB + [15:0] + read-only + + + + + LPOSC_CALIB + 0x0022 + 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. + 16 + 0x0000 + + + LPOSC_CALIB + [15:0] + read-only + + + + + NUM_GPIOS + 0x0030 + The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC) + 16 + 0x0000 + + + NUM_GPIOS + [7:0] + read-only + + + + + INFO_CRC0 + 0x006c + 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) + 16 + 0x0000 + + + INFO_CRC0 + [15:0] + read-only + + + + + INFO_CRC1 + 0x006e + Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC) + 16 + 0x0000 + + + INFO_CRC1 + [15:0] + read-only + + + + + FLASH_DEVINFO + 0x00a8 + Stores information about external flash device(s). (ECC) + + Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set. + 16 + 0x0000 + + + CS1_SIZE + 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. + [15:12] + read-only + + + NONE + 0 + + + 8K + 1 + + + 16K + 2 + + + 32K + 3 + + + 64k + 4 + + + 128K + 5 + + + 256K + 6 + + + 512K + 7 + + + 1M + 8 + + + 2M + 9 + + + 4M + 10 + + + 8M + 11 + + + 16M + 12 + + + + + CS0_SIZE + 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. + [11:8] + read-only + + + NONE + 0 + + + 8K + 1 + + + 16K + 2 + + + 32K + 3 + + + 64k + 4 + + + 128K + 5 + + + 256K + 6 + + + 512K + 7 + + + 1M + 8 + + + 2M + 9 + + + 4M + 10 + + + 8M + 11 + + + 16M + 12 + + + + + D8H_ERASE_SUPPORTED + 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. + [7:7] + read-only + + + CS1_GPIO + 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). + [5:0] + read-only + + + + + FLASH_PARTITION_SLOT_SIZE + 0x00aa + 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) + 16 + 0x0000 + + + FLASH_PARTITION_SLOT_SIZE + [15:0] + read-only + + + + + BOOTSEL_LED_CFG + 0x00ac + Pin configuration for LED status, used by USB bootloader. (ECC) + Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set. + 16 + 0x0000 + + + ACTIVELOW + LED is active-low. (Default: active-high.) + [8:8] + read-only + + + PIN + GPIO index to use for bootloader activity LED. + [5:0] + read-only + + + + + BOOTSEL_PLL_CFG + 0x00ae + 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. + 16 + 0x0000 + + + REFDIV + 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) + [15:15] + read-only + + + POSTDIV2 + PLL post-divide 2 divisor, in the range 1..7 inclusive. + [14:12] + read-only + + + POSTDIV1 + PLL post-divide 1 divisor, in the range 1..7 inclusive. + [11:9] + read-only + + + FBDIV + PLL feedback divisor, in the range 16..320 inclusive. + [8:0] + read-only + + + + + BOOTSEL_XOSC_CFG + 0x00b0 + 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. + 16 + 0x0000 + + + RANGE + Value of the XOSC_CTRL_FREQ_RANGE register. + [15:14] + read-only + + + 1_15MHZ + 0 + + + 10_30MHZ + 1 + + + 25_60MHZ + 2 + + + 40_100MHZ + 3 + + + + + STARTUP + Value of the XOSC_STARTUP register + [13:0] + read-only + + + + + USB_WHITE_LABEL_ADDR + 0x00b8 + 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): + 16 + 0x0000 + + + USB_WHITE_LABEL_ADDR + [15:0] + read-only + + + INDEX_USB_DEVICE_VID_VALUE + 0 + + + INDEX_USB_DEVICE_PID_VALUE + 1 + + + INDEX_USB_DEVICE_BCD_DEVICE_VALUE + 2 + + + INDEX_USB_DEVICE_LANG_ID_VALUE + 3 + + + INDEX_USB_DEVICE_MANUFACTURER_STRDEF + 4 + + + INDEX_USB_DEVICE_PRODUCT_STRDEF + 5 + + + INDEX_USB_DEVICE_SERIAL_NUMBER_STRDEF + 6 + + + INDEX_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES + 7 + + + INDEX_VOLUME_LABEL_STRDEF + 8 + + + INDEX_SCSI_INQUIRY_VENDOR_STRDEF + 9 + + + INDEX_SCSI_INQUIRY_PRODUCT_STRDEF + 10 + + + INDEX_SCSI_INQUIRY_VERSION_STRDEF + 11 + + + INDEX_INDEX_HTM_REDIRECT_URL_STRDEF + 12 + + + INDEX_INDEX_HTM_REDIRECT_NAME_STRDEF + 13 + + + INDEX_INFO_UF2_TXT_MODEL_STRDEF + 14 + + + INDEX_INFO_UF2_TXT_BOARD_ID_STRDEF + 15 + + + + + + + OTPBOOT_SRC + 0x00bc + 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. + 16 + 0x0000 + + + OTPBOOT_SRC + [15:0] + read-only + + + + + OTPBOOT_LEN + 0x00be + 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). + 16 + 0x0000 + + + OTPBOOT_LEN + [15:0] + read-only + + + + + OTPBOOT_DST0 + 0x00c0 + 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. + 16 + 0x0000 + + + OTPBOOT_DST0 + [15:0] + read-only + + + + + OTPBOOT_DST1 + 0x00c2 + 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. + 16 + 0x0000 + + + OTPBOOT_DST1 + [15:0] + read-only + + + + + BOOTKEY0_0 + 0x0100 + Bits 15:0 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_0 + [15:0] + read-only + + + + + BOOTKEY0_1 + 0x0102 + Bits 31:16 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_1 + [15:0] + read-only + + + + + BOOTKEY0_2 + 0x0104 + Bits 47:32 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_2 + [15:0] + read-only + + + + + BOOTKEY0_3 + 0x0106 + Bits 63:48 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_3 + [15:0] + read-only + + + + + BOOTKEY0_4 + 0x0108 + Bits 79:64 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_4 + [15:0] + read-only + + + + + BOOTKEY0_5 + 0x010a + Bits 95:80 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_5 + [15:0] + read-only + + + + + BOOTKEY0_6 + 0x010c + Bits 111:96 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_6 + [15:0] + read-only + + + + + BOOTKEY0_7 + 0x010e + Bits 127:112 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_7 + [15:0] + read-only + + + + + BOOTKEY0_8 + 0x0110 + Bits 143:128 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_8 + [15:0] + read-only + + + + + BOOTKEY0_9 + 0x0112 + Bits 159:144 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_9 + [15:0] + read-only + + + + + BOOTKEY0_10 + 0x0114 + Bits 175:160 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_10 + [15:0] + read-only + + + + + BOOTKEY0_11 + 0x0116 + Bits 191:176 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_11 + [15:0] + read-only + + + + + BOOTKEY0_12 + 0x0118 + Bits 207:192 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_12 + [15:0] + read-only + + + + + BOOTKEY0_13 + 0x011a + Bits 223:208 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_13 + [15:0] + read-only + + + + + BOOTKEY0_14 + 0x011c + Bits 239:224 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_14 + [15:0] + read-only + + + + + BOOTKEY0_15 + 0x011e + Bits 255:240 of SHA-256 hash of boot key 0 (ECC) + 16 + 0x0000 + + + BOOTKEY0_15 + [15:0] + read-only + + + + + BOOTKEY1_0 + 0x0120 + Bits 15:0 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_0 + [15:0] + read-only + + + + + BOOTKEY1_1 + 0x0122 + Bits 31:16 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_1 + [15:0] + read-only + + + + + BOOTKEY1_2 + 0x0124 + Bits 47:32 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_2 + [15:0] + read-only + + + + + BOOTKEY1_3 + 0x0126 + Bits 63:48 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_3 + [15:0] + read-only + + + + + BOOTKEY1_4 + 0x0128 + Bits 79:64 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_4 + [15:0] + read-only + + + + + BOOTKEY1_5 + 0x012a + Bits 95:80 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_5 + [15:0] + read-only + + + + + BOOTKEY1_6 + 0x012c + Bits 111:96 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_6 + [15:0] + read-only + + + + + BOOTKEY1_7 + 0x012e + Bits 127:112 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_7 + [15:0] + read-only + + + + + BOOTKEY1_8 + 0x0130 + Bits 143:128 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_8 + [15:0] + read-only + + + + + BOOTKEY1_9 + 0x0132 + Bits 159:144 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_9 + [15:0] + read-only + + + + + BOOTKEY1_10 + 0x0134 + Bits 175:160 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_10 + [15:0] + read-only + + + + + BOOTKEY1_11 + 0x0136 + Bits 191:176 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_11 + [15:0] + read-only + + + + + BOOTKEY1_12 + 0x0138 + Bits 207:192 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_12 + [15:0] + read-only + + + + + BOOTKEY1_13 + 0x013a + Bits 223:208 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_13 + [15:0] + read-only + + + + + BOOTKEY1_14 + 0x013c + Bits 239:224 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_14 + [15:0] + read-only + + + + + BOOTKEY1_15 + 0x013e + Bits 255:240 of SHA-256 hash of boot key 1 (ECC) + 16 + 0x0000 + + + BOOTKEY1_15 + [15:0] + read-only + + + + + BOOTKEY2_0 + 0x0140 + Bits 15:0 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_0 + [15:0] + read-only + + + + + BOOTKEY2_1 + 0x0142 + Bits 31:16 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_1 + [15:0] + read-only + + + + + BOOTKEY2_2 + 0x0144 + Bits 47:32 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_2 + [15:0] + read-only + + + + + BOOTKEY2_3 + 0x0146 + Bits 63:48 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_3 + [15:0] + read-only + + + + + BOOTKEY2_4 + 0x0148 + Bits 79:64 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_4 + [15:0] + read-only + + + + + BOOTKEY2_5 + 0x014a + Bits 95:80 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_5 + [15:0] + read-only + + + + + BOOTKEY2_6 + 0x014c + Bits 111:96 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_6 + [15:0] + read-only + + + + + BOOTKEY2_7 + 0x014e + Bits 127:112 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_7 + [15:0] + read-only + + + + + BOOTKEY2_8 + 0x0150 + Bits 143:128 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_8 + [15:0] + read-only + + + + + BOOTKEY2_9 + 0x0152 + Bits 159:144 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_9 + [15:0] + read-only + + + + + BOOTKEY2_10 + 0x0154 + Bits 175:160 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_10 + [15:0] + read-only + + + + + BOOTKEY2_11 + 0x0156 + Bits 191:176 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_11 + [15:0] + read-only + + + + + BOOTKEY2_12 + 0x0158 + Bits 207:192 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_12 + [15:0] + read-only + + + + + BOOTKEY2_13 + 0x015a + Bits 223:208 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_13 + [15:0] + read-only + + + + + BOOTKEY2_14 + 0x015c + Bits 239:224 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_14 + [15:0] + read-only + + + + + BOOTKEY2_15 + 0x015e + Bits 255:240 of SHA-256 hash of boot key 2 (ECC) + 16 + 0x0000 + + + BOOTKEY2_15 + [15:0] + read-only + + + + + BOOTKEY3_0 + 0x0160 + Bits 15:0 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_0 + [15:0] + read-only + + + + + BOOTKEY3_1 + 0x0162 + Bits 31:16 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_1 + [15:0] + read-only + + + + + BOOTKEY3_2 + 0x0164 + Bits 47:32 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_2 + [15:0] + read-only + + + + + BOOTKEY3_3 + 0x0166 + Bits 63:48 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_3 + [15:0] + read-only + + + + + BOOTKEY3_4 + 0x0168 + Bits 79:64 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_4 + [15:0] + read-only + + + + + BOOTKEY3_5 + 0x016a + Bits 95:80 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_5 + [15:0] + read-only + + + + + BOOTKEY3_6 + 0x016c + Bits 111:96 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_6 + [15:0] + read-only + + + + + BOOTKEY3_7 + 0x016e + Bits 127:112 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_7 + [15:0] + read-only + + + + + BOOTKEY3_8 + 0x0170 + Bits 143:128 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_8 + [15:0] + read-only + + + + + BOOTKEY3_9 + 0x0172 + Bits 159:144 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_9 + [15:0] + read-only + + + + + BOOTKEY3_10 + 0x0174 + Bits 175:160 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_10 + [15:0] + read-only + + + + + BOOTKEY3_11 + 0x0176 + Bits 191:176 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_11 + [15:0] + read-only + + + + + BOOTKEY3_12 + 0x0178 + Bits 207:192 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_12 + [15:0] + read-only + + + + + BOOTKEY3_13 + 0x017a + Bits 223:208 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_13 + [15:0] + read-only + + + + + BOOTKEY3_14 + 0x017c + Bits 239:224 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_14 + [15:0] + read-only + + + + + BOOTKEY3_15 + 0x017e + Bits 255:240 of SHA-256 hash of boot key 3 (ECC) + 16 + 0x0000 + + + BOOTKEY3_15 + [15:0] + read-only + + + + + KEY1_0 + 0x1e90 + Bits 15:0 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_0 + [15:0] + read-only + + + + + KEY1_1 + 0x1e92 + Bits 31:16 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_1 + [15:0] + read-only + + + + + KEY1_2 + 0x1e94 + Bits 47:32 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_2 + [15:0] + read-only + + + + + KEY1_3 + 0x1e96 + Bits 63:48 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_3 + [15:0] + read-only + + + + + KEY1_4 + 0x1e98 + Bits 79:64 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_4 + [15:0] + read-only + + + + + KEY1_5 + 0x1e9a + Bits 95:80 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_5 + [15:0] + read-only + + + + + KEY1_6 + 0x1e9c + Bits 111:96 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_6 + [15:0] + read-only + + + + + KEY1_7 + 0x1e9e + Bits 127:112 of OTP access key 1 (ECC) + 16 + 0x0000 + + + KEY1_7 + [15:0] + read-only + + + + + KEY2_0 + 0x1ea0 + Bits 15:0 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_0 + [15:0] + read-only + + + + + KEY2_1 + 0x1ea2 + Bits 31:16 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_1 + [15:0] + read-only + + + + + KEY2_2 + 0x1ea4 + Bits 47:32 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_2 + [15:0] + read-only + + + + + KEY2_3 + 0x1ea6 + Bits 63:48 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_3 + [15:0] + read-only + + + + + KEY2_4 + 0x1ea8 + Bits 79:64 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_4 + [15:0] + read-only + + + + + KEY2_5 + 0x1eaa + Bits 95:80 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_5 + [15:0] + read-only + + + + + KEY2_6 + 0x1eac + Bits 111:96 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_6 + [15:0] + read-only + + + + + KEY2_7 + 0x1eae + Bits 127:112 of OTP access key 2 (ECC) + 16 + 0x0000 + + + KEY2_7 + [15:0] + read-only + + + + + KEY3_0 + 0x1eb0 + Bits 15:0 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_0 + [15:0] + read-only + + + + + KEY3_1 + 0x1eb2 + Bits 31:16 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_1 + [15:0] + read-only + + + + + KEY3_2 + 0x1eb4 + Bits 47:32 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_2 + [15:0] + read-only + + + + + KEY3_3 + 0x1eb6 + Bits 63:48 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_3 + [15:0] + read-only + + + + + KEY3_4 + 0x1eb8 + Bits 79:64 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_4 + [15:0] + read-only + + + + + KEY3_5 + 0x1eba + Bits 95:80 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_5 + [15:0] + read-only + + + + + KEY3_6 + 0x1ebc + Bits 111:96 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_6 + [15:0] + read-only + + + + + KEY3_7 + 0x1ebe + Bits 127:112 of OTP access key 3 (ECC) + 16 + 0x0000 + + + KEY3_7 + [15:0] + read-only + + + + + KEY4_0 + 0x1ec0 + Bits 15:0 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_0 + [15:0] + read-only + + + + + KEY4_1 + 0x1ec2 + Bits 31:16 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_1 + [15:0] + read-only + + + + + KEY4_2 + 0x1ec4 + Bits 47:32 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_2 + [15:0] + read-only + + + + + KEY4_3 + 0x1ec6 + Bits 63:48 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_3 + [15:0] + read-only + + + + + KEY4_4 + 0x1ec8 + Bits 79:64 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_4 + [15:0] + read-only + + + + + KEY4_5 + 0x1eca + Bits 95:80 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_5 + [15:0] + read-only + + + + + KEY4_6 + 0x1ecc + Bits 111:96 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_6 + [15:0] + read-only + + + + + KEY4_7 + 0x1ece + Bits 127:112 of OTP access key 4 (ECC) + 16 + 0x0000 + + + KEY4_7 + [15:0] + read-only + + + + + KEY5_0 + 0x1ed0 + Bits 15:0 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_0 + [15:0] + read-only + + + + + KEY5_1 + 0x1ed2 + Bits 31:16 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_1 + [15:0] + read-only + + + + + KEY5_2 + 0x1ed4 + Bits 47:32 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_2 + [15:0] + read-only + + + + + KEY5_3 + 0x1ed6 + Bits 63:48 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_3 + [15:0] + read-only + + + + + KEY5_4 + 0x1ed8 + Bits 79:64 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_4 + [15:0] + read-only + + + + + KEY5_5 + 0x1eda + Bits 95:80 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_5 + [15:0] + read-only + + + + + KEY5_6 + 0x1edc + Bits 111:96 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_6 + [15:0] + read-only + + + + + KEY5_7 + 0x1ede + Bits 127:112 of OTP access key 5 (ECC) + 16 + 0x0000 + + + KEY5_7 + [15:0] + read-only + + + + + KEY6_0 + 0x1ee0 + Bits 15:0 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_0 + [15:0] + read-only + + + + + KEY6_1 + 0x1ee2 + Bits 31:16 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_1 + [15:0] + read-only + + + + + KEY6_2 + 0x1ee4 + Bits 47:32 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_2 + [15:0] + read-only + + + + + KEY6_3 + 0x1ee6 + Bits 63:48 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_3 + [15:0] + read-only + + + + + KEY6_4 + 0x1ee8 + Bits 79:64 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_4 + [15:0] + read-only + + + + + KEY6_5 + 0x1eea + Bits 95:80 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_5 + [15:0] + read-only + + + + + KEY6_6 + 0x1eec + Bits 111:96 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_6 + [15:0] + read-only + + + + + KEY6_7 + 0x1eee + Bits 127:112 of OTP access key 6 (ECC) + 16 + 0x0000 + + + KEY6_7 + [15:0] + read-only + + + + + + + OTP_DATA_RAW + Predefined OTP data layout for RP2350 + 0x40134000 + + 0 + 16383 + registers + + + + CHIPID0 + 0x000000 + 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. + 24 + 0x000000 + + + CHIPID0 + [23:0] + read-only + + + + + CHIPID1 + 0x000004 + Bits 31:16 of public device ID (ECC) + 24 + 0x000000 + + + CHIPID1 + [23:0] + read-only + + + + + CHIPID2 + 0x000008 + Bits 47:32 of public device ID (ECC) + 24 + 0x000000 + + + CHIPID2 + [23:0] + read-only + + + + + CHIPID3 + 0x00000c + Bits 63:48 of public device ID (ECC) + 24 + 0x000000 + + + CHIPID3 + [23:0] + read-only + + + + + RANDID0 + 0x000010 + 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. + 24 + 0x000000 + + + RANDID0 + [23:0] + read-only + + + + + RANDID1 + 0x000014 + Bits 31:16 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID1 + [23:0] + read-only + + + + + RANDID2 + 0x000018 + Bits 47:32 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID2 + [23:0] + read-only + + + + + RANDID3 + 0x00001c + Bits 63:48 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID3 + [23:0] + read-only + + + + + RANDID4 + 0x000020 + Bits 79:64 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID4 + [23:0] + read-only + + + + + RANDID5 + 0x000024 + Bits 95:80 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID5 + [23:0] + read-only + + + + + RANDID6 + 0x000028 + Bits 111:96 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID6 + [23:0] + read-only + + + + + RANDID7 + 0x00002c + Bits 127:112 of private per-device random number (ECC) + 24 + 0x000000 + + + RANDID7 + [23:0] + read-only + + + + + ROSC_CALIB + 0x000040 + 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. + 24 + 0x000000 + + + ROSC_CALIB + [23:0] + read-only + + + + + LPOSC_CALIB + 0x000044 + 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. + 24 + 0x000000 + + + LPOSC_CALIB + [23:0] + read-only + + + + + NUM_GPIOS + 0x000060 + The number of main user GPIOs (bank 0). Should read 48 in the QFN80 package, and 30 in the QFN60 package. (ECC) + 24 + 0x000000 + + + NUM_GPIOS + [23:0] + read-only + + + + + INFO_CRC0 + 0x0000d8 + 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) + 24 + 0x000000 + + + INFO_CRC0 + [23:0] + read-only + + + + + INFO_CRC1 + 0x0000dc + Upper 16 bits of CRC32 of OTP addresses 0x00 through 0x6b (ECC) + 24 + 0x000000 + + + INFO_CRC1 + [23:0] + read-only + + + + + CRIT0 + 0x0000e0 + Page 0 critical boot flags (RBIT-8) + 24 + 0x000000 + + + RISCV_DISABLE + Permanently disable RISC-V processors (Hazard3) + [1:1] + read-only + + + ARM_DISABLE + Permanently disable ARM processors (Cortex-M33) + [0:0] + read-only + + + + + CRIT0_R1 + 0x0000e4 + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R1 + [23:0] + read-only + + + + + CRIT0_R2 + 0x0000e8 + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R2 + [23:0] + read-only + + + + + CRIT0_R3 + 0x0000ec + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R3 + [23:0] + read-only + + + + + CRIT0_R4 + 0x0000f0 + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R4 + [23:0] + read-only + + + + + CRIT0_R5 + 0x0000f4 + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R5 + [23:0] + read-only + + + + + CRIT0_R6 + 0x0000f8 + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R6 + [23:0] + read-only + + + + + CRIT0_R7 + 0x0000fc + Redundant copy of CRIT0 + 24 + 0x000000 + + + CRIT0_R7 + [23:0] + read-only + + + + + CRIT1 + 0x000100 + Page 1 critical boot flags (RBIT-8) + 24 + 0x000000 + + + GLITCH_DETECTOR_SENS + Increase the sensitivity of the glitch detectors from their default. + [6:5] + read-only + + + GLITCH_DETECTOR_ENABLE + Arm the glitch detectors to reset the system if an abnormal clock/power event is observed. + [4:4] + read-only + + + BOOT_ARCH + Set the default boot architecture, 0=ARM 1=RISC-V. Ignored if ARM_DISABLE, RISCV_DISABLE or SECURE_BOOT_ENABLE is set. + [3:3] + read-only + + + DEBUG_DISABLE + Disable all debug access + [2:2] + read-only + + + SECURE_DEBUG_DISABLE + Disable Secure debug access + [1:1] + read-only + + + SECURE_BOOT_ENABLE + Enable boot signature enforcement, and permanently disable the RISC-V cores. + [0:0] + read-only + + + + + CRIT1_R1 + 0x000104 + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R1 + [23:0] + read-only + + + + + CRIT1_R2 + 0x000108 + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R2 + [23:0] + read-only + + + + + CRIT1_R3 + 0x00010c + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R3 + [23:0] + read-only + + + + + CRIT1_R4 + 0x000110 + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R4 + [23:0] + read-only + + + + + CRIT1_R5 + 0x000114 + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R5 + [23:0] + read-only + + + + + CRIT1_R6 + 0x000118 + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R6 + [23:0] + read-only + + + + + CRIT1_R7 + 0x00011c + Redundant copy of CRIT1 + 24 + 0x000000 + + + CRIT1_R7 + [23:0] + read-only + + + + + BOOT_FLAGS0 + 0x000120 + 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) + 24 + 0x000000 + + + DISABLE_SRAM_WINDOW_BOOT + [21:21] + read-only + + + DISABLE_XIP_ACCESS_ON_SRAM_ENTRY + 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. + [20:20] + read-only + + + DISABLE_BOOTSEL_UART_BOOT + [19:19] + read-only + + + DISABLE_BOOTSEL_USB_PICOBOOT_IFC + [18:18] + read-only + + + DISABLE_BOOTSEL_USB_MSD_IFC + [17:17] + read-only + + + DISABLE_WATCHDOG_SCRATCH + [16:16] + read-only + + + DISABLE_POWER_SCRATCH + [15:15] + read-only + + + ENABLE_OTP_BOOT + 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. + [14:14] + read-only + + + DISABLE_OTP_BOOT + Takes precedence over ENABLE_OTP_BOOT. + [13:13] + read-only + + + DISABLE_FLASH_BOOT + [12:12] + read-only + + + ROLLBACK_REQUIRED + Require binaries to have a rollback version. Set automatically the first time a binary with a rollback version is booted. + [11:11] + read-only + + + HASHED_PARTITION_TABLE + Require a partition table to be hashed (if not signed) + [10:10] + read-only + + + SECURE_PARTITION_TABLE + Require a partition table to be signed + [9:9] + read-only + + + DISABLE_AUTO_SWITCH_ARCH + 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 + [8:8] + read-only + + + SINGLE_FLASH_BINARY + Restrict flash boot path to use of a single binary at the start of flash + [7:7] + read-only + + + OVERRIDE_FLASH_PARTITION_SLOT_SIZE + 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 + [6:6] + read-only + + + FLASH_DEVINFO_ENABLE + Mark FLASH_DEVINFO as containing valid, ECC'd data which describes external flash devices. + [5:5] + read-only + + + FAST_SIGCHECK_ROSC_DIV + Enable quartering of ROSC divisor during signature check, to reduce secure boot time + [4:4] + read-only + + + FLASH_IO_VOLTAGE_1V8 + 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) + [3:3] + read-only + + + ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG + 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. + [2:2] + read-only + + + ENABLE_BOOTSEL_LED + Enable bootloader activity LED. If set, bootsel_led_cfg is assumed to be valid + [1:1] + read-only + + + DISABLE_BOOTSEL_EXEC2 + [0:0] + read-only + + + + + BOOT_FLAGS0_R1 + 0x000124 + Redundant copy of BOOT_FLAGS0 + 24 + 0x000000 + + + BOOT_FLAGS0_R1 + [23:0] + read-only + + + + + BOOT_FLAGS0_R2 + 0x000128 + Redundant copy of BOOT_FLAGS0 + 24 + 0x000000 + + + BOOT_FLAGS0_R2 + [23:0] + read-only + + + + + BOOT_FLAGS1 + 0x00012c + 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) + 24 + 0x000000 + + + DOUBLE_TAP + Enable entering BOOTSEL mode via double-tap of the RUN/RSTn pin. Adds a significant delay to boot time, as configured by DOUBLE_TAP_DELAY. + + This functions by waiting at startup (i.e. following a reset) to see if a second reset is applied soon afterward. The second reset is detected by the bootrom with help of the POWMAN_CHIP_RESET_DOUBLE_TAP flag, which is not reset by the external reset pin, and the bootrom enters BOOTSEL mode (NSBOOT) to await further instruction over USB or UART. + [19:19] + read-only + + + DOUBLE_TAP_DELAY + Adjust how long to wait for a second reset when double tap BOOTSEL mode is enabled via DOUBLE_TAP. The minimum is 50 milliseconds, and each unit of this field adds an additional 50 milliseconds. + + For example, settings this field to its maximum value of 7 will cause the chip to wait for 400 milliseconds at boot to check for a second reset which requests entry to BOOTSEL mode. + + 200 milliseconds (DOUBLE_TAP_DELAY=3) is a good intermediate value. + [18:16] + read-only + + + KEY_INVALID + Mark a boot key as invalid, or prevent it from ever becoming valid. The bootrom will ignore any boot key marked as invalid during secure boot signature checks. + + Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. + + When provisioning boot keys, it's recommended to mark any boot key slots you don't intend to use as KEY_INVALID, so that spurious keys can not be installed at a later time. + [11:8] + read-only + + + KEY_VALID + Mark each of the possible boot keys as valid. The bootrom will check signatures against all valid boot keys, and ignore invalid boot keys. + + Each bit in this field corresponds to one of the four 256-bit boot key hashes that may be stored in page 2 of the OTP. + + A KEY_VALID bit is ignored if the corresponding KEY_INVALID bit is set. Boot keys are considered valid only when KEY_VALID is set and KEY_INVALID is clear. + + Do not mark a boot key as KEY_VALID if it does not contain a valid SHA-256 hash of your secp256k1 public key. Verify keys after programming, before setting the KEY_VALID bits -- a boot key with uncorrectable ECC faults will render your device unbootable if secure boot is enabled. + + Do not enable secure boot without first installing a valid key. This will render your device unbootable. + [3:0] + read-only + + + + + BOOT_FLAGS1_R1 + 0x000130 + Redundant copy of BOOT_FLAGS1 + 24 + 0x000000 + + + BOOT_FLAGS1_R1 + [23:0] + read-only + + + + + BOOT_FLAGS1_R2 + 0x000134 + Redundant copy of BOOT_FLAGS1 + 24 + 0x000000 + + + BOOT_FLAGS1_R2 + [23:0] + read-only + + + + + DEFAULT_BOOT_VERSION0 + 0x000138 + Default boot version thermometer counter, bits 23:0 (RBIT-3) + 24 + 0x000000 + + + DEFAULT_BOOT_VERSION0 + [23:0] + read-only + + + + + DEFAULT_BOOT_VERSION0_R1 + 0x00013c + Redundant copy of DEFAULT_BOOT_VERSION0 + 24 + 0x000000 + + + DEFAULT_BOOT_VERSION0_R1 + [23:0] + read-only + + + + + DEFAULT_BOOT_VERSION0_R2 + 0x000140 + Redundant copy of DEFAULT_BOOT_VERSION0 + 24 + 0x000000 + + + DEFAULT_BOOT_VERSION0_R2 + [23:0] + read-only + + + + + DEFAULT_BOOT_VERSION1 + 0x000144 + Default boot version thermometer counter, bits 47:24 (RBIT-3) + 24 + 0x000000 + + + DEFAULT_BOOT_VERSION1 + [23:0] + read-only + + + + + DEFAULT_BOOT_VERSION1_R1 + 0x000148 + Redundant copy of DEFAULT_BOOT_VERSION1 + 24 + 0x000000 + + + DEFAULT_BOOT_VERSION1_R1 + [23:0] + read-only + + + + + DEFAULT_BOOT_VERSION1_R2 + 0x00014c + Redundant copy of DEFAULT_BOOT_VERSION1 + 24 + 0x000000 + + + DEFAULT_BOOT_VERSION1_R2 + [23:0] + read-only + + + + + FLASH_DEVINFO + 0x000150 + Stores information about external flash device(s). (ECC) + + Assumed to be valid if BOOT_FLAGS0_FLASH_DEVINFO_ENABLE is set. + 24 + 0x000000 + + + CS1_SIZE + 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. + [23:12] + read-only + + + NONE + 0 + + + 8K + 1 + + + 16K + 2 + + + 32K + 3 + + + 64k + 4 + + + 128K + 5 + + + 256K + 6 + + + 512K + 7 + + + 1M + 8 + + + 2M + 9 + + + 4M + 10 + + + 8M + 11 + + + 16M + 12 + + + + + CS0_SIZE + 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. + [11:8] + read-only + + + NONE + 0 + + + 8K + 1 + + + 16K + 2 + + + 32K + 3 + + + 64k + 4 + + + 128K + 5 + + + 256K + 6 + + + 512K + 7 + + + 1M + 8 + + + 2M + 9 + + + 4M + 10 + + + 8M + 11 + + + 16M + 12 + + + + + D8H_ERASE_SUPPORTED + 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. + [7:7] + read-only + + + CS1_GPIO + 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). + [5:0] + read-only + + + + + FLASH_PARTITION_SLOT_SIZE + 0x000154 + 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) + 24 + 0x000000 + + + FLASH_PARTITION_SLOT_SIZE + [23:0] + read-only + + + + + BOOTSEL_LED_CFG + 0x000158 + Pin configuration for LED status, used by USB bootloader. (ECC) + Must be valid if BOOT_FLAGS0_ENABLE_BOOTSEL_LED is set. + 24 + 0x000000 + + + ACTIVELOW + LED is active-low. (Default: active-high.) + [23:8] + read-only + + + PIN + GPIO index to use for bootloader activity LED. + [5:0] + read-only + + + + + BOOTSEL_PLL_CFG + 0x00015c + 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. + 24 + 0x000000 + + + REFDIV + 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) + [23:15] + read-only + + + POSTDIV2 + PLL post-divide 2 divisor, in the range 1..7 inclusive. + [14:12] + read-only + + + POSTDIV1 + PLL post-divide 1 divisor, in the range 1..7 inclusive. + [11:9] + read-only + + + FBDIV + PLL feedback divisor, in the range 16..320 inclusive. + [8:0] + read-only + + + + + BOOTSEL_XOSC_CFG + 0x000160 + 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. + 24 + 0x000000 + + + RANGE + Value of the XOSC_CTRL_FREQ_RANGE register. + [23:14] + read-only + + + 1_15MHZ + 0 + + + 10_30MHZ + 1 + + + 25_60MHZ + 2 + + + 40_100MHZ + 3 + + + + + STARTUP + Value of the XOSC_STARTUP register + [13:0] + read-only + + + + + USB_BOOT_FLAGS + 0x000164 + USB boot specific feature flags (RBIT-3) + 24 + 0x000000 + + + DP_DM_SWAP + Swap DM/DP during USB boot, to support board layouts with mirrored USB routing (deliberate or accidental). + [23:23] + read-only + + + WHITE_LABEL_ADDR_VALID + valid flag for INFO_UF2_TXT_BOARD_ID_STRDEF entry of the USB_WHITE_LABEL struct (index 15) + [22:22] + read-only + + + WL_INFO_UF2_TXT_BOARD_ID_STRDEF_VALID + valid flag for the USB_WHITE_LABEL_ADDR field + [15:15] + read-only + + + WL_INFO_UF2_TXT_MODEL_STRDEF_VALID + valid flag for INFO_UF2_TXT_MODEL_STRDEF entry of the USB_WHITE_LABEL struct (index 14) + [14:14] + read-only + + + WL_INDEX_HTM_REDIRECT_NAME_STRDEF_VALID + valid flag for INDEX_HTM_REDIRECT_NAME_STRDEF entry of the USB_WHITE_LABEL struct (index 13) + [13:13] + read-only + + + WL_INDEX_HTM_REDIRECT_URL_STRDEF_VALID + valid flag for INDEX_HTM_REDIRECT_URL_STRDEF entry of the USB_WHITE_LABEL struct (index 12) + [12:12] + read-only + + + WL_SCSI_INQUIRY_VERSION_STRDEF_VALID + valid flag for SCSI_INQUIRY_VERSION_STRDEF entry of the USB_WHITE_LABEL struct (index 11) + [11:11] + read-only + + + WL_SCSI_INQUIRY_PRODUCT_STRDEF_VALID + valid flag for SCSI_INQUIRY_PRODUCT_STRDEF entry of the USB_WHITE_LABEL struct (index 10) + [10:10] + read-only + + + WL_SCSI_INQUIRY_VENDOR_STRDEF_VALID + valid flag for SCSI_INQUIRY_VENDOR_STRDEF entry of the USB_WHITE_LABEL struct (index 9) + [9:9] + read-only + + + WL_VOLUME_LABEL_STRDEF_VALID + valid flag for VOLUME_LABEL_STRDEF entry of the USB_WHITE_LABEL struct (index 8) + [8:8] + read-only + + + WL_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES_VALID + valid flag for USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES entry of the USB_WHITE_LABEL struct (index 7) + [7:7] + read-only + + + WL_USB_DEVICE_SERIAL_NUMBER_STRDEF_VALID + valid flag for USB_DEVICE_SERIAL_NUMBER_STRDEF entry of the USB_WHITE_LABEL struct (index 6) + [6:6] + read-only + + + WL_USB_DEVICE_PRODUCT_STRDEF_VALID + valid flag for USB_DEVICE_PRODUCT_STRDEF entry of the USB_WHITE_LABEL struct (index 5) + [5:5] + read-only + + + WL_USB_DEVICE_MANUFACTURER_STRDEF_VALID + valid flag for USB_DEVICE_MANUFACTURER_STRDEF entry of the USB_WHITE_LABEL struct (index 4) + [4:4] + read-only + + + WL_USB_DEVICE_LANG_ID_VALUE_VALID + valid flag for USB_DEVICE_LANG_ID_VALUE entry of the USB_WHITE_LABEL struct (index 3) + [3:3] + read-only + + + WL_USB_DEVICE_SERIAL_NUMBER_VALUE_VALID + valid flag for USB_DEVICE_BCD_DEVICEVALUE entry of the USB_WHITE_LABEL struct (index 2) + [2:2] + read-only + + + WL_USB_DEVICE_PID_VALUE_VALID + valid flag for USB_DEVICE_PID_VALUE entry of the USB_WHITE_LABEL struct (index 1) + [1:1] + read-only + + + WL_USB_DEVICE_VID_VALUE_VALID + valid flag for USB_DEVICE_VID_VALUE entry of the USB_WHITE_LABEL struct (index 0) + [0:0] + read-only + + + + + USB_BOOT_FLAGS_R1 + 0x000168 + Redundant copy of USB_BOOT_FLAGS + 24 + 0x000000 + + + USB_BOOT_FLAGS_R1 + [23:0] + read-only + + + + + USB_BOOT_FLAGS_R2 + 0x00016c + Redundant copy of USB_BOOT_FLAGS + 24 + 0x000000 + + + USB_BOOT_FLAGS_R2 + [23:0] + read-only + + + + + USB_WHITE_LABEL_ADDR + 0x000170 + 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): + 24 + 0x000000 + + + USB_WHITE_LABEL_ADDR + [23:0] + read-only + + + INDEX_USB_DEVICE_VID_VALUE + 0 + + + INDEX_USB_DEVICE_PID_VALUE + 1 + + + INDEX_USB_DEVICE_BCD_DEVICE_VALUE + 2 + + + INDEX_USB_DEVICE_LANG_ID_VALUE + 3 + + + INDEX_USB_DEVICE_MANUFACTURER_STRDEF + 4 + + + INDEX_USB_DEVICE_PRODUCT_STRDEF + 5 + + + INDEX_USB_DEVICE_SERIAL_NUMBER_STRDEF + 6 + + + INDEX_USB_CONFIG_ATTRIBUTES_MAX_POWER_VALUES + 7 + + + INDEX_VOLUME_LABEL_STRDEF + 8 + + + INDEX_SCSI_INQUIRY_VENDOR_STRDEF + 9 + + + INDEX_SCSI_INQUIRY_PRODUCT_STRDEF + 10 + + + INDEX_SCSI_INQUIRY_VERSION_STRDEF + 11 + + + INDEX_INDEX_HTM_REDIRECT_URL_STRDEF + 12 + + + INDEX_INDEX_HTM_REDIRECT_NAME_STRDEF + 13 + + + INDEX_INFO_UF2_TXT_MODEL_STRDEF + 14 + + + INDEX_INFO_UF2_TXT_BOARD_ID_STRDEF + 15 + + + + + + + OTPBOOT_SRC + 0x000178 + 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. + 24 + 0x000000 + + + OTPBOOT_SRC + [23:0] + read-only + + + + + OTPBOOT_LEN + 0x00017c + 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). + 24 + 0x000000 + + + OTPBOOT_LEN + [23:0] + read-only + + + + + OTPBOOT_DST0 + 0x000180 + 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. + 24 + 0x000000 + + + OTPBOOT_DST0 + [23:0] + read-only + + + + + OTPBOOT_DST1 + 0x000184 + 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. + 24 + 0x000000 + + + OTPBOOT_DST1 + [23:0] + read-only + + + + + BOOTKEY0_0 + 0x000200 + Bits 15:0 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_0 + [23:0] + read-only + + + + + BOOTKEY0_1 + 0x000204 + Bits 31:16 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_1 + [23:0] + read-only + + + + + BOOTKEY0_2 + 0x000208 + Bits 47:32 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_2 + [23:0] + read-only + + + + + BOOTKEY0_3 + 0x00020c + Bits 63:48 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_3 + [23:0] + read-only + + + + + BOOTKEY0_4 + 0x000210 + Bits 79:64 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_4 + [23:0] + read-only + + + + + BOOTKEY0_5 + 0x000214 + Bits 95:80 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_5 + [23:0] + read-only + + + + + BOOTKEY0_6 + 0x000218 + Bits 111:96 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_6 + [23:0] + read-only + + + + + BOOTKEY0_7 + 0x00021c + Bits 127:112 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_7 + [23:0] + read-only + + + + + BOOTKEY0_8 + 0x000220 + Bits 143:128 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_8 + [23:0] + read-only + + + + + BOOTKEY0_9 + 0x000224 + Bits 159:144 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_9 + [23:0] + read-only + + + + + BOOTKEY0_10 + 0x000228 + Bits 175:160 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_10 + [23:0] + read-only + + + + + BOOTKEY0_11 + 0x00022c + Bits 191:176 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_11 + [23:0] + read-only + + + + + BOOTKEY0_12 + 0x000230 + Bits 207:192 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_12 + [23:0] + read-only + + + + + BOOTKEY0_13 + 0x000234 + Bits 223:208 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_13 + [23:0] + read-only + + + + + BOOTKEY0_14 + 0x000238 + Bits 239:224 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_14 + [23:0] + read-only + + + + + BOOTKEY0_15 + 0x00023c + Bits 255:240 of SHA-256 hash of boot key 0 (ECC) + 24 + 0x000000 + + + BOOTKEY0_15 + [23:0] + read-only + + + + + BOOTKEY1_0 + 0x000240 + Bits 15:0 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_0 + [23:0] + read-only + + + + + BOOTKEY1_1 + 0x000244 + Bits 31:16 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_1 + [23:0] + read-only + + + + + BOOTKEY1_2 + 0x000248 + Bits 47:32 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_2 + [23:0] + read-only + + + + + BOOTKEY1_3 + 0x00024c + Bits 63:48 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_3 + [23:0] + read-only + + + + + BOOTKEY1_4 + 0x000250 + Bits 79:64 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_4 + [23:0] + read-only + + + + + BOOTKEY1_5 + 0x000254 + Bits 95:80 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_5 + [23:0] + read-only + + + + + BOOTKEY1_6 + 0x000258 + Bits 111:96 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_6 + [23:0] + read-only + + + + + BOOTKEY1_7 + 0x00025c + Bits 127:112 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_7 + [23:0] + read-only + + + + + BOOTKEY1_8 + 0x000260 + Bits 143:128 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_8 + [23:0] + read-only + + + + + BOOTKEY1_9 + 0x000264 + Bits 159:144 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_9 + [23:0] + read-only + + + + + BOOTKEY1_10 + 0x000268 + Bits 175:160 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_10 + [23:0] + read-only + + + + + BOOTKEY1_11 + 0x00026c + Bits 191:176 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_11 + [23:0] + read-only + + + + + BOOTKEY1_12 + 0x000270 + Bits 207:192 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_12 + [23:0] + read-only + + + + + BOOTKEY1_13 + 0x000274 + Bits 223:208 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_13 + [23:0] + read-only + + + + + BOOTKEY1_14 + 0x000278 + Bits 239:224 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_14 + [23:0] + read-only + + + + + BOOTKEY1_15 + 0x00027c + Bits 255:240 of SHA-256 hash of boot key 1 (ECC) + 24 + 0x000000 + + + BOOTKEY1_15 + [23:0] + read-only + + + + + BOOTKEY2_0 + 0x000280 + Bits 15:0 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_0 + [23:0] + read-only + + + + + BOOTKEY2_1 + 0x000284 + Bits 31:16 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_1 + [23:0] + read-only + + + + + BOOTKEY2_2 + 0x000288 + Bits 47:32 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_2 + [23:0] + read-only + + + + + BOOTKEY2_3 + 0x00028c + Bits 63:48 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_3 + [23:0] + read-only + + + + + BOOTKEY2_4 + 0x000290 + Bits 79:64 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_4 + [23:0] + read-only + + + + + BOOTKEY2_5 + 0x000294 + Bits 95:80 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_5 + [23:0] + read-only + + + + + BOOTKEY2_6 + 0x000298 + Bits 111:96 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_6 + [23:0] + read-only + + + + + BOOTKEY2_7 + 0x00029c + Bits 127:112 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_7 + [23:0] + read-only + + + + + BOOTKEY2_8 + 0x0002a0 + Bits 143:128 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_8 + [23:0] + read-only + + + + + BOOTKEY2_9 + 0x0002a4 + Bits 159:144 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_9 + [23:0] + read-only + + + + + BOOTKEY2_10 + 0x0002a8 + Bits 175:160 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_10 + [23:0] + read-only + + + + + BOOTKEY2_11 + 0x0002ac + Bits 191:176 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_11 + [23:0] + read-only + + + + + BOOTKEY2_12 + 0x0002b0 + Bits 207:192 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_12 + [23:0] + read-only + + + + + BOOTKEY2_13 + 0x0002b4 + Bits 223:208 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_13 + [23:0] + read-only + + + + + BOOTKEY2_14 + 0x0002b8 + Bits 239:224 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_14 + [23:0] + read-only + + + + + BOOTKEY2_15 + 0x0002bc + Bits 255:240 of SHA-256 hash of boot key 2 (ECC) + 24 + 0x000000 + + + BOOTKEY2_15 + [23:0] + read-only + + + + + BOOTKEY3_0 + 0x0002c0 + Bits 15:0 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_0 + [23:0] + read-only + + + + + BOOTKEY3_1 + 0x0002c4 + Bits 31:16 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_1 + [23:0] + read-only + + + + + BOOTKEY3_2 + 0x0002c8 + Bits 47:32 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_2 + [23:0] + read-only + + + + + BOOTKEY3_3 + 0x0002cc + Bits 63:48 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_3 + [23:0] + read-only + + + + + BOOTKEY3_4 + 0x0002d0 + Bits 79:64 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_4 + [23:0] + read-only + + + + + BOOTKEY3_5 + 0x0002d4 + Bits 95:80 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_5 + [23:0] + read-only + + + + + BOOTKEY3_6 + 0x0002d8 + Bits 111:96 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_6 + [23:0] + read-only + + + + + BOOTKEY3_7 + 0x0002dc + Bits 127:112 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_7 + [23:0] + read-only + + + + + BOOTKEY3_8 + 0x0002e0 + Bits 143:128 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_8 + [23:0] + read-only + + + + + BOOTKEY3_9 + 0x0002e4 + Bits 159:144 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_9 + [23:0] + read-only + + + + + BOOTKEY3_10 + 0x0002e8 + Bits 175:160 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_10 + [23:0] + read-only + + + + + BOOTKEY3_11 + 0x0002ec + Bits 191:176 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_11 + [23:0] + read-only + + + + + BOOTKEY3_12 + 0x0002f0 + Bits 207:192 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_12 + [23:0] + read-only + + + + + BOOTKEY3_13 + 0x0002f4 + Bits 223:208 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_13 + [23:0] + read-only + + + + + BOOTKEY3_14 + 0x0002f8 + Bits 239:224 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_14 + [23:0] + read-only + + + + + BOOTKEY3_15 + 0x0002fc + Bits 255:240 of SHA-256 hash of boot key 3 (ECC) + 24 + 0x000000 + + + BOOTKEY3_15 + [23:0] + read-only + + + + + KEY1_0 + 0x003d20 + Bits 15:0 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_0 + [23:0] + read-only + + + + + KEY1_1 + 0x003d24 + Bits 31:16 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_1 + [23:0] + read-only + + + + + KEY1_2 + 0x003d28 + Bits 47:32 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_2 + [23:0] + read-only + + + + + KEY1_3 + 0x003d2c + Bits 63:48 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_3 + [23:0] + read-only + + + + + KEY1_4 + 0x003d30 + Bits 79:64 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_4 + [23:0] + read-only + + + + + KEY1_5 + 0x003d34 + Bits 95:80 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_5 + [23:0] + read-only + + + + + KEY1_6 + 0x003d38 + Bits 111:96 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_6 + [23:0] + read-only + + + + + KEY1_7 + 0x003d3c + Bits 127:112 of OTP access key 1 (ECC) + 24 + 0x000000 + + + KEY1_7 + [23:0] + read-only + + + + + KEY2_0 + 0x003d40 + Bits 15:0 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_0 + [23:0] + read-only + + + + + KEY2_1 + 0x003d44 + Bits 31:16 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_1 + [23:0] + read-only + + + + + KEY2_2 + 0x003d48 + Bits 47:32 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_2 + [23:0] + read-only + + + + + KEY2_3 + 0x003d4c + Bits 63:48 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_3 + [23:0] + read-only + + + + + KEY2_4 + 0x003d50 + Bits 79:64 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_4 + [23:0] + read-only + + + + + KEY2_5 + 0x003d54 + Bits 95:80 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_5 + [23:0] + read-only + + + + + KEY2_6 + 0x003d58 + Bits 111:96 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_6 + [23:0] + read-only + + + + + KEY2_7 + 0x003d5c + Bits 127:112 of OTP access key 2 (ECC) + 24 + 0x000000 + + + KEY2_7 + [23:0] + read-only + + + + + KEY3_0 + 0x003d60 + Bits 15:0 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_0 + [23:0] + read-only + + + + + KEY3_1 + 0x003d64 + Bits 31:16 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_1 + [23:0] + read-only + + + + + KEY3_2 + 0x003d68 + Bits 47:32 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_2 + [23:0] + read-only + + + + + KEY3_3 + 0x003d6c + Bits 63:48 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_3 + [23:0] + read-only + + + + + KEY3_4 + 0x003d70 + Bits 79:64 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_4 + [23:0] + read-only + + + + + KEY3_5 + 0x003d74 + Bits 95:80 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_5 + [23:0] + read-only + + + + + KEY3_6 + 0x003d78 + Bits 111:96 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_6 + [23:0] + read-only + + + + + KEY3_7 + 0x003d7c + Bits 127:112 of OTP access key 3 (ECC) + 24 + 0x000000 + + + KEY3_7 + [23:0] + read-only + + + + + KEY4_0 + 0x003d80 + Bits 15:0 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_0 + [23:0] + read-only + + + + + KEY4_1 + 0x003d84 + Bits 31:16 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_1 + [23:0] + read-only + + + + + KEY4_2 + 0x003d88 + Bits 47:32 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_2 + [23:0] + read-only + + + + + KEY4_3 + 0x003d8c + Bits 63:48 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_3 + [23:0] + read-only + + + + + KEY4_4 + 0x003d90 + Bits 79:64 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_4 + [23:0] + read-only + + + + + KEY4_5 + 0x003d94 + Bits 95:80 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_5 + [23:0] + read-only + + + + + KEY4_6 + 0x003d98 + Bits 111:96 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_6 + [23:0] + read-only + + + + + KEY4_7 + 0x003d9c + Bits 127:112 of OTP access key 4 (ECC) + 24 + 0x000000 + + + KEY4_7 + [23:0] + read-only + + + + + KEY5_0 + 0x003da0 + Bits 15:0 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_0 + [23:0] + read-only + + + + + KEY5_1 + 0x003da4 + Bits 31:16 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_1 + [23:0] + read-only + + + + + KEY5_2 + 0x003da8 + Bits 47:32 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_2 + [23:0] + read-only + + + + + KEY5_3 + 0x003dac + Bits 63:48 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_3 + [23:0] + read-only + + + + + KEY5_4 + 0x003db0 + Bits 79:64 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_4 + [23:0] + read-only + + + + + KEY5_5 + 0x003db4 + Bits 95:80 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_5 + [23:0] + read-only + + + + + KEY5_6 + 0x003db8 + Bits 111:96 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_6 + [23:0] + read-only + + + + + KEY5_7 + 0x003dbc + Bits 127:112 of OTP access key 5 (ECC) + 24 + 0x000000 + + + KEY5_7 + [23:0] + read-only + + + + + KEY6_0 + 0x003dc0 + Bits 15:0 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_0 + [23:0] + read-only + + + + + KEY6_1 + 0x003dc4 + Bits 31:16 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_1 + [23:0] + read-only + + + + + KEY6_2 + 0x003dc8 + Bits 47:32 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_2 + [23:0] + read-only + + + + + KEY6_3 + 0x003dcc + Bits 63:48 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_3 + [23:0] + read-only + + + + + KEY6_4 + 0x003dd0 + Bits 79:64 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_4 + [23:0] + read-only + + + + + KEY6_5 + 0x003dd4 + Bits 95:80 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_5 + [23:0] + read-only + + + + + KEY6_6 + 0x003dd8 + Bits 111:96 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_6 + [23:0] + read-only + + + + + KEY6_7 + 0x003ddc + Bits 127:112 of OTP access key 6 (ECC) + 24 + 0x000000 + + + KEY6_7 + [23:0] + read-only + + + + + KEY1_VALID + 0x003de4 + Valid flag for key 1. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages. + 24 + 0x000000 + + + VALID_R2 + Redundant copy of VALID, with 3-way majority vote + [16:16] + read-only + + + VALID_R1 + Redundant copy of VALID, with 3-way majority vote + [8:8] + read-only + + + VALID + [0:0] + read-only + + + + + KEY2_VALID + 0x003de8 + Valid flag for key 2. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages. + 24 + 0x000000 + + + VALID_R2 + Redundant copy of VALID, with 3-way majority vote + [16:16] + read-only + + + VALID_R1 + Redundant copy of VALID, with 3-way majority vote + [8:8] + read-only + + + VALID + [0:0] + read-only + + + + + KEY3_VALID + 0x003dec + Valid flag for key 3. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages. + 24 + 0x000000 + + + VALID_R2 + Redundant copy of VALID, with 3-way majority vote + [16:16] + read-only + + + VALID_R1 + Redundant copy of VALID, with 3-way majority vote + [8:8] + read-only + + + VALID + [0:0] + read-only + + + + + KEY4_VALID + 0x003df0 + Valid flag for key 4. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages. + 24 + 0x000000 + + + VALID_R2 + Redundant copy of VALID, with 3-way majority vote + [16:16] + read-only + + + VALID_R1 + Redundant copy of VALID, with 3-way majority vote + [8:8] + read-only + + + VALID + [0:0] + read-only + + + + + KEY5_VALID + 0x003df4 + Valid flag for key 5. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages. + 24 + 0x000000 + + + VALID_R2 + Redundant copy of VALID, with 3-way majority vote + [16:16] + read-only + + + VALID_R1 + Redundant copy of VALID, with 3-way majority vote + [8:8] + read-only + + + VALID + [0:0] + read-only + + + + + KEY6_VALID + 0x003df8 + Valid flag for key 6. Once the valid flag is set, the key can no longer be read or written, and becomes a valid fixed key for protecting OTP pages. + 24 + 0x000000 + + + VALID_R2 + Redundant copy of VALID, with 3-way majority vote + [16:16] + read-only + + + VALID_R1 + Redundant copy of VALID, with 3-way majority vote + [8:8] + read-only + + + VALID + [0:0] + read-only + + + + + PAGE0_LOCK0 + 0x003e00 + Lock configuration LSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE0_LOCK1 + 0x003e04 + Lock configuration MSBs for page 0 (rows 0x0 through 0x3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE1_LOCK0 + 0x003e08 + Lock configuration LSBs for page 1 (rows 0x40 through 0x7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE1_LOCK1 + 0x003e0c + Lock configuration MSBs for page 1 (rows 0x40 through 0x7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE2_LOCK0 + 0x003e10 + Lock configuration LSBs for page 2 (rows 0x80 through 0xbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE2_LOCK1 + 0x003e14 + Lock configuration MSBs for page 2 (rows 0x80 through 0xbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE3_LOCK0 + 0x003e18 + Lock configuration LSBs for page 3 (rows 0xc0 through 0xff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE3_LOCK1 + 0x003e1c + Lock configuration MSBs for page 3 (rows 0xc0 through 0xff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE4_LOCK0 + 0x003e20 + Lock configuration LSBs for page 4 (rows 0x100 through 0x13f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE4_LOCK1 + 0x003e24 + Lock configuration MSBs for page 4 (rows 0x100 through 0x13f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE5_LOCK0 + 0x003e28 + Lock configuration LSBs for page 5 (rows 0x140 through 0x17f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE5_LOCK1 + 0x003e2c + Lock configuration MSBs for page 5 (rows 0x140 through 0x17f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE6_LOCK0 + 0x003e30 + Lock configuration LSBs for page 6 (rows 0x180 through 0x1bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE6_LOCK1 + 0x003e34 + Lock configuration MSBs for page 6 (rows 0x180 through 0x1bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE7_LOCK0 + 0x003e38 + Lock configuration LSBs for page 7 (rows 0x1c0 through 0x1ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE7_LOCK1 + 0x003e3c + Lock configuration MSBs for page 7 (rows 0x1c0 through 0x1ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE8_LOCK0 + 0x003e40 + Lock configuration LSBs for page 8 (rows 0x200 through 0x23f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE8_LOCK1 + 0x003e44 + Lock configuration MSBs for page 8 (rows 0x200 through 0x23f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE9_LOCK0 + 0x003e48 + Lock configuration LSBs for page 9 (rows 0x240 through 0x27f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE9_LOCK1 + 0x003e4c + Lock configuration MSBs for page 9 (rows 0x240 through 0x27f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE10_LOCK0 + 0x003e50 + Lock configuration LSBs for page 10 (rows 0x280 through 0x2bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE10_LOCK1 + 0x003e54 + Lock configuration MSBs for page 10 (rows 0x280 through 0x2bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE11_LOCK0 + 0x003e58 + Lock configuration LSBs for page 11 (rows 0x2c0 through 0x2ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE11_LOCK1 + 0x003e5c + Lock configuration MSBs for page 11 (rows 0x2c0 through 0x2ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE12_LOCK0 + 0x003e60 + Lock configuration LSBs for page 12 (rows 0x300 through 0x33f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE12_LOCK1 + 0x003e64 + Lock configuration MSBs for page 12 (rows 0x300 through 0x33f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE13_LOCK0 + 0x003e68 + Lock configuration LSBs for page 13 (rows 0x340 through 0x37f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE13_LOCK1 + 0x003e6c + Lock configuration MSBs for page 13 (rows 0x340 through 0x37f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE14_LOCK0 + 0x003e70 + Lock configuration LSBs for page 14 (rows 0x380 through 0x3bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE14_LOCK1 + 0x003e74 + Lock configuration MSBs for page 14 (rows 0x380 through 0x3bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE15_LOCK0 + 0x003e78 + Lock configuration LSBs for page 15 (rows 0x3c0 through 0x3ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE15_LOCK1 + 0x003e7c + Lock configuration MSBs for page 15 (rows 0x3c0 through 0x3ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE16_LOCK0 + 0x003e80 + Lock configuration LSBs for page 16 (rows 0x400 through 0x43f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE16_LOCK1 + 0x003e84 + Lock configuration MSBs for page 16 (rows 0x400 through 0x43f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE17_LOCK0 + 0x003e88 + Lock configuration LSBs for page 17 (rows 0x440 through 0x47f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE17_LOCK1 + 0x003e8c + Lock configuration MSBs for page 17 (rows 0x440 through 0x47f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE18_LOCK0 + 0x003e90 + Lock configuration LSBs for page 18 (rows 0x480 through 0x4bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE18_LOCK1 + 0x003e94 + Lock configuration MSBs for page 18 (rows 0x480 through 0x4bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE19_LOCK0 + 0x003e98 + Lock configuration LSBs for page 19 (rows 0x4c0 through 0x4ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE19_LOCK1 + 0x003e9c + Lock configuration MSBs for page 19 (rows 0x4c0 through 0x4ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE20_LOCK0 + 0x003ea0 + Lock configuration LSBs for page 20 (rows 0x500 through 0x53f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE20_LOCK1 + 0x003ea4 + Lock configuration MSBs for page 20 (rows 0x500 through 0x53f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE21_LOCK0 + 0x003ea8 + Lock configuration LSBs for page 21 (rows 0x540 through 0x57f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE21_LOCK1 + 0x003eac + Lock configuration MSBs for page 21 (rows 0x540 through 0x57f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE22_LOCK0 + 0x003eb0 + Lock configuration LSBs for page 22 (rows 0x580 through 0x5bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE22_LOCK1 + 0x003eb4 + Lock configuration MSBs for page 22 (rows 0x580 through 0x5bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE23_LOCK0 + 0x003eb8 + Lock configuration LSBs for page 23 (rows 0x5c0 through 0x5ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE23_LOCK1 + 0x003ebc + Lock configuration MSBs for page 23 (rows 0x5c0 through 0x5ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE24_LOCK0 + 0x003ec0 + Lock configuration LSBs for page 24 (rows 0x600 through 0x63f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE24_LOCK1 + 0x003ec4 + Lock configuration MSBs for page 24 (rows 0x600 through 0x63f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE25_LOCK0 + 0x003ec8 + Lock configuration LSBs for page 25 (rows 0x640 through 0x67f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE25_LOCK1 + 0x003ecc + Lock configuration MSBs for page 25 (rows 0x640 through 0x67f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE26_LOCK0 + 0x003ed0 + Lock configuration LSBs for page 26 (rows 0x680 through 0x6bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE26_LOCK1 + 0x003ed4 + Lock configuration MSBs for page 26 (rows 0x680 through 0x6bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE27_LOCK0 + 0x003ed8 + Lock configuration LSBs for page 27 (rows 0x6c0 through 0x6ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE27_LOCK1 + 0x003edc + Lock configuration MSBs for page 27 (rows 0x6c0 through 0x6ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE28_LOCK0 + 0x003ee0 + Lock configuration LSBs for page 28 (rows 0x700 through 0x73f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE28_LOCK1 + 0x003ee4 + Lock configuration MSBs for page 28 (rows 0x700 through 0x73f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE29_LOCK0 + 0x003ee8 + Lock configuration LSBs for page 29 (rows 0x740 through 0x77f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE29_LOCK1 + 0x003eec + Lock configuration MSBs for page 29 (rows 0x740 through 0x77f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE30_LOCK0 + 0x003ef0 + Lock configuration LSBs for page 30 (rows 0x780 through 0x7bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE30_LOCK1 + 0x003ef4 + Lock configuration MSBs for page 30 (rows 0x780 through 0x7bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE31_LOCK0 + 0x003ef8 + Lock configuration LSBs for page 31 (rows 0x7c0 through 0x7ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE31_LOCK1 + 0x003efc + Lock configuration MSBs for page 31 (rows 0x7c0 through 0x7ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE32_LOCK0 + 0x003f00 + Lock configuration LSBs for page 32 (rows 0x800 through 0x83f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE32_LOCK1 + 0x003f04 + Lock configuration MSBs for page 32 (rows 0x800 through 0x83f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE33_LOCK0 + 0x003f08 + Lock configuration LSBs for page 33 (rows 0x840 through 0x87f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE33_LOCK1 + 0x003f0c + Lock configuration MSBs for page 33 (rows 0x840 through 0x87f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE34_LOCK0 + 0x003f10 + Lock configuration LSBs for page 34 (rows 0x880 through 0x8bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE34_LOCK1 + 0x003f14 + Lock configuration MSBs for page 34 (rows 0x880 through 0x8bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE35_LOCK0 + 0x003f18 + Lock configuration LSBs for page 35 (rows 0x8c0 through 0x8ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE35_LOCK1 + 0x003f1c + Lock configuration MSBs for page 35 (rows 0x8c0 through 0x8ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE36_LOCK0 + 0x003f20 + Lock configuration LSBs for page 36 (rows 0x900 through 0x93f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE36_LOCK1 + 0x003f24 + Lock configuration MSBs for page 36 (rows 0x900 through 0x93f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE37_LOCK0 + 0x003f28 + Lock configuration LSBs for page 37 (rows 0x940 through 0x97f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE37_LOCK1 + 0x003f2c + Lock configuration MSBs for page 37 (rows 0x940 through 0x97f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE38_LOCK0 + 0x003f30 + Lock configuration LSBs for page 38 (rows 0x980 through 0x9bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE38_LOCK1 + 0x003f34 + Lock configuration MSBs for page 38 (rows 0x980 through 0x9bf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE39_LOCK0 + 0x003f38 + Lock configuration LSBs for page 39 (rows 0x9c0 through 0x9ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE39_LOCK1 + 0x003f3c + Lock configuration MSBs for page 39 (rows 0x9c0 through 0x9ff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE40_LOCK0 + 0x003f40 + Lock configuration LSBs for page 40 (rows 0xa00 through 0xa3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE40_LOCK1 + 0x003f44 + Lock configuration MSBs for page 40 (rows 0xa00 through 0xa3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE41_LOCK0 + 0x003f48 + Lock configuration LSBs for page 41 (rows 0xa40 through 0xa7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE41_LOCK1 + 0x003f4c + Lock configuration MSBs for page 41 (rows 0xa40 through 0xa7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE42_LOCK0 + 0x003f50 + Lock configuration LSBs for page 42 (rows 0xa80 through 0xabf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE42_LOCK1 + 0x003f54 + Lock configuration MSBs for page 42 (rows 0xa80 through 0xabf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE43_LOCK0 + 0x003f58 + Lock configuration LSBs for page 43 (rows 0xac0 through 0xaff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE43_LOCK1 + 0x003f5c + Lock configuration MSBs for page 43 (rows 0xac0 through 0xaff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE44_LOCK0 + 0x003f60 + Lock configuration LSBs for page 44 (rows 0xb00 through 0xb3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE44_LOCK1 + 0x003f64 + Lock configuration MSBs for page 44 (rows 0xb00 through 0xb3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE45_LOCK0 + 0x003f68 + Lock configuration LSBs for page 45 (rows 0xb40 through 0xb7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE45_LOCK1 + 0x003f6c + Lock configuration MSBs for page 45 (rows 0xb40 through 0xb7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE46_LOCK0 + 0x003f70 + Lock configuration LSBs for page 46 (rows 0xb80 through 0xbbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE46_LOCK1 + 0x003f74 + Lock configuration MSBs for page 46 (rows 0xb80 through 0xbbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE47_LOCK0 + 0x003f78 + Lock configuration LSBs for page 47 (rows 0xbc0 through 0xbff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE47_LOCK1 + 0x003f7c + Lock configuration MSBs for page 47 (rows 0xbc0 through 0xbff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE48_LOCK0 + 0x003f80 + Lock configuration LSBs for page 48 (rows 0xc00 through 0xc3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE48_LOCK1 + 0x003f84 + Lock configuration MSBs for page 48 (rows 0xc00 through 0xc3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE49_LOCK0 + 0x003f88 + Lock configuration LSBs for page 49 (rows 0xc40 through 0xc7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE49_LOCK1 + 0x003f8c + Lock configuration MSBs for page 49 (rows 0xc40 through 0xc7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE50_LOCK0 + 0x003f90 + Lock configuration LSBs for page 50 (rows 0xc80 through 0xcbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE50_LOCK1 + 0x003f94 + Lock configuration MSBs for page 50 (rows 0xc80 through 0xcbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE51_LOCK0 + 0x003f98 + Lock configuration LSBs for page 51 (rows 0xcc0 through 0xcff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE51_LOCK1 + 0x003f9c + Lock configuration MSBs for page 51 (rows 0xcc0 through 0xcff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE52_LOCK0 + 0x003fa0 + Lock configuration LSBs for page 52 (rows 0xd00 through 0xd3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE52_LOCK1 + 0x003fa4 + Lock configuration MSBs for page 52 (rows 0xd00 through 0xd3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE53_LOCK0 + 0x003fa8 + Lock configuration LSBs for page 53 (rows 0xd40 through 0xd7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE53_LOCK1 + 0x003fac + Lock configuration MSBs for page 53 (rows 0xd40 through 0xd7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE54_LOCK0 + 0x003fb0 + Lock configuration LSBs for page 54 (rows 0xd80 through 0xdbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE54_LOCK1 + 0x003fb4 + Lock configuration MSBs for page 54 (rows 0xd80 through 0xdbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE55_LOCK0 + 0x003fb8 + Lock configuration LSBs for page 55 (rows 0xdc0 through 0xdff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE55_LOCK1 + 0x003fbc + Lock configuration MSBs for page 55 (rows 0xdc0 through 0xdff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE56_LOCK0 + 0x003fc0 + Lock configuration LSBs for page 56 (rows 0xe00 through 0xe3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE56_LOCK1 + 0x003fc4 + Lock configuration MSBs for page 56 (rows 0xe00 through 0xe3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE57_LOCK0 + 0x003fc8 + Lock configuration LSBs for page 57 (rows 0xe40 through 0xe7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE57_LOCK1 + 0x003fcc + Lock configuration MSBs for page 57 (rows 0xe40 through 0xe7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE58_LOCK0 + 0x003fd0 + Lock configuration LSBs for page 58 (rows 0xe80 through 0xebf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE58_LOCK1 + 0x003fd4 + Lock configuration MSBs for page 58 (rows 0xe80 through 0xebf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE59_LOCK0 + 0x003fd8 + Lock configuration LSBs for page 59 (rows 0xec0 through 0xeff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE59_LOCK1 + 0x003fdc + Lock configuration MSBs for page 59 (rows 0xec0 through 0xeff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE60_LOCK0 + 0x003fe0 + Lock configuration LSBs for page 60 (rows 0xf00 through 0xf3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE60_LOCK1 + 0x003fe4 + Lock configuration MSBs for page 60 (rows 0xf00 through 0xf3f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE61_LOCK0 + 0x003fe8 + Lock configuration LSBs for page 61 (rows 0xf40 through 0xf7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE61_LOCK1 + 0x003fec + Lock configuration MSBs for page 61 (rows 0xf40 through 0xf7f). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE62_LOCK0 + 0x003ff0 + Lock configuration LSBs for page 62 (rows 0xf80 through 0xfbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE62_LOCK1 + 0x003ff4 + Lock configuration MSBs for page 62 (rows 0xf80 through 0xfbf). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + PAGE63_LOCK0 + 0x003ff8 + Lock configuration LSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + RMA + Decommission for RMA of a suspected faulty device. This re-enables the factory test JTAG interface, and makes pages 3 through 61 of the OTP permanently inaccessible. + [7:7] + read-only + + + NO_KEY_STATE + State when at least one key is registered for this page and no matching key has been entered. + [6:6] + read-only + + + read_only + 0 + + + inaccessible + 1 + + + + + KEY_R + Index 1-6 of a hardware key which must be entered to grant read access, or 0 if no such key is required. + [5:3] + read-only + + + KEY_W + Index 1-6 of a hardware key which must be entered to grant write access, or 0 if no such key is required. + [2:0] + read-only + + + + + PAGE63_LOCK1 + 0x003ffc + Lock configuration MSBs for page 63 (rows 0xfc0 through 0xfff). Locks are stored with 3-way majority vote encoding, so that bits can be set independently. + + This OTP location is always readable, and is write-protected by its own permissions. + 24 + 0x000000 + + + R2 + Redundant copy of bits 7:0 + [23:16] + read-only + + + R1 + Redundant copy of bits 7:0 + [15:8] + read-only + + + LOCK_BL + Dummy lock bits reserved for bootloaders (including the RP2350 USB bootloader) to store their own OTP access permissions. No hardware effect, and no corresponding SW_LOCKx registers. + [5:4] + read-only + + + read_write + 0 + Bootloader permits user reads and writes to this page + + + read_only + 1 + Bootloader permits user reads of this page + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE + + + inaccessible + 3 + Bootloader does not permit user access to this page + + + + + LOCK_NS + Lock state for Non-secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + + Note that READ_WRITE and READ_ONLY are equivalent in hardware, as the SBPI programming interface is not accessible to Non-secure software. However, Secure software may check these bits to apply write permissions to a Non-secure OTP programming API. + [3:2] + read-only + + + read_write + 0 + Page can be read by Non-secure software, and Secure software may permit Non-secure writes. + + + read_only + 1 + Page can be read by Non-secure software + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Non-secure software. + + + + + LOCK_S + Lock state for Secure accesses to this page. Thermometer-coded, so lock state can be advanced permanently from any state to any less-permissive state by programming OTP. Software can also advance the lock state temporarily (until next OTP reset) using the SW_LOCKx registers. + [1:0] + read-only + + + read_write + 0 + Page is fully accessible by Secure software. + + + read_only + 1 + Page can be read by Secure software, but can not be written. + + + reserved + 2 + Do not use. Behaves the same as INACCESSIBLE. + + + inaccessible + 3 + Page can not be accessed by Secure software. + + + + + + + + + TBMAN + For managing simulation testbenches + 0x40160000 + + 0 + 4 + registers + + + + PLATFORM + 0x00000000 + Indicates the type of platform in use + 0x00000001 + + + HDLSIM + Indicates the platform is a simulation + [2:2] + read-only + + + FPGA + Indicates the platform is an FPGA + [1:1] + read-only + + + ASIC + Indicates the platform is an ASIC + [0:0] + read-only + + + + + + + USB_DPRAM + DPRAM layout for USB device. + 0x50100000 + + 0 + 256 + registers + + + + SETUP_PACKET_LOW + 0x00000000 + Bytes 0-3 of the SETUP packet from the host. + 0x00000000 + + + WVALUE + [31:16] + read-write + + + BREQUEST + [15:8] + read-write + + + BMREQUESTTYPE + [7:0] + read-write + + + + + SETUP_PACKET_HIGH + 0x00000004 + Bytes 4-7 of the setup packet from the host. + 0x00000000 + + + WLENGTH + [31:16] + read-write + + + WINDEX + [15:0] + read-write + + + + + EP1_IN_CONTROL + 0x00000008 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP1_OUT_CONTROL + 0x0000000c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP2_IN_CONTROL + 0x00000010 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP2_OUT_CONTROL + 0x00000014 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP3_IN_CONTROL + 0x00000018 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP3_OUT_CONTROL + 0x0000001c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP4_IN_CONTROL + 0x00000020 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP4_OUT_CONTROL + 0x00000024 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP5_IN_CONTROL + 0x00000028 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP5_OUT_CONTROL + 0x0000002c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP6_IN_CONTROL + 0x00000030 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP6_OUT_CONTROL + 0x00000034 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP7_IN_CONTROL + 0x00000038 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP7_OUT_CONTROL + 0x0000003c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP8_IN_CONTROL + 0x00000040 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP8_OUT_CONTROL + 0x00000044 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP9_IN_CONTROL + 0x00000048 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP9_OUT_CONTROL + 0x0000004c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP10_IN_CONTROL + 0x00000050 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP10_OUT_CONTROL + 0x00000054 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP11_IN_CONTROL + 0x00000058 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP11_OUT_CONTROL + 0x0000005c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP12_IN_CONTROL + 0x00000060 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP12_OUT_CONTROL + 0x00000064 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP13_IN_CONTROL + 0x00000068 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP13_OUT_CONTROL + 0x0000006c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP14_IN_CONTROL + 0x00000070 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP14_OUT_CONTROL + 0x00000074 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP15_IN_CONTROL + 0x00000078 + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP15_OUT_CONTROL + 0x0000007c + 0x00000000 + + + ENABLE + Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. + [31:31] + read-write + + + DOUBLE_BUFFERED + This endpoint is double buffered. + [30:30] + read-write + + + INTERRUPT_PER_BUFF + Trigger an interrupt each time a buffer is done. + [29:29] + read-write + + + INTERRUPT_PER_DOUBLE_BUFF + Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. + [28:28] + read-write + + + ENDPOINT_TYPE + [27:26] + read-write + + + Control + 0 + + + Isochronous + 1 + + + Bulk + 2 + + + Interrupt + 3 + + + + + INTERRUPT_ON_STALL + Trigger an interrupt if a STALL is sent. Intended for debug only. + [17:17] + read-write + + + INTERRUPT_ON_NAK + Trigger an interrupt if a NAK is sent. Intended for debug only. + [16:16] + read-write + + + BUFFER_ADDRESS + 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. + [15:0] + read-write + + + + + EP0_IN_BUFFER_CONTROL + 0x00000080 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP0_OUT_BUFFER_CONTROL + 0x00000084 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP1_IN_BUFFER_CONTROL + 0x00000088 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP1_OUT_BUFFER_CONTROL + 0x0000008c + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP2_IN_BUFFER_CONTROL + 0x00000090 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP2_OUT_BUFFER_CONTROL + 0x00000094 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP3_IN_BUFFER_CONTROL + 0x00000098 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP3_OUT_BUFFER_CONTROL + 0x0000009c + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP4_IN_BUFFER_CONTROL + 0x000000a0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP4_OUT_BUFFER_CONTROL + 0x000000a4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP5_IN_BUFFER_CONTROL + 0x000000a8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP5_OUT_BUFFER_CONTROL + 0x000000ac + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP6_IN_BUFFER_CONTROL + 0x000000b0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP6_OUT_BUFFER_CONTROL + 0x000000b4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP7_IN_BUFFER_CONTROL + 0x000000b8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP7_OUT_BUFFER_CONTROL + 0x000000bc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP8_IN_BUFFER_CONTROL + 0x000000c0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP8_OUT_BUFFER_CONTROL + 0x000000c4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP9_IN_BUFFER_CONTROL + 0x000000c8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP9_OUT_BUFFER_CONTROL + 0x000000cc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP10_IN_BUFFER_CONTROL + 0x000000d0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP10_OUT_BUFFER_CONTROL + 0x000000d4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP11_IN_BUFFER_CONTROL + 0x000000d8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP11_OUT_BUFFER_CONTROL + 0x000000dc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP12_IN_BUFFER_CONTROL + 0x000000e0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP12_OUT_BUFFER_CONTROL + 0x000000e4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP13_IN_BUFFER_CONTROL + 0x000000e8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP13_OUT_BUFFER_CONTROL + 0x000000ec + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP14_IN_BUFFER_CONTROL + 0x000000f0 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP14_OUT_BUFFER_CONTROL + 0x000000f4 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP15_IN_BUFFER_CONTROL + 0x000000f8 + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + EP15_OUT_BUFFER_CONTROL + 0x000000fc + Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1. + Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. + 0x00000000 + + + FULL_1 + Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [31:31] + read-write + + + LAST_1 + Buffer 1 is the last buffer of the transfer. + [30:30] + read-write + + + PID_1 + The data pid of buffer 1. + [29:29] + read-write + + + DOUBLE_BUFFER_ISO_OFFSET + The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint. + For a non Isochronous endpoint the offset is always 64 bytes. + [28:27] + read-write + + + 128 + 0 + + + 256 + 1 + + + 512 + 2 + + + 1024 + 3 + + + + + AVAILABLE_1 + Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [26:26] + read-write + + + LENGTH_1 + The length of the data in buffer 1. + [25:16] + read-write + + + FULL_0 + Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. + [15:15] + read-write + + + LAST_0 + Buffer 0 is the last buffer of the transfer. + [14:14] + read-write + + + PID_0 + The data pid of buffer 0. + [13:13] + read-write + + + RESET + Reset the buffer selector to buffer 0. + [12:12] + read-write + + + STALL + Reply with a stall (valid for both buffers). + [11:11] + read-write + + + AVAILABLE_0 + Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. + [10:10] + read-write + + + LENGTH_0 + The length of the data in buffer 1. + [9:0] + read-write + + + + + + + SWI_IRQ + Virtual Peripheral to access unused NVIC software interrupts + 0 + + + SWI_IRQ_0 + 47 + + + SWI_IRQ_1 + 48 + + + SWI_IRQ_2 + 49 + + + SWI_IRQ_3 + 50 + + + SWI_IRQ_4 + 51 + + + SWI_IRQ_5 + 52 + + + + diff --git a/svd/rp2040.svd b/svd/rp2040.svd deleted file mode 100644 index 22f8ba8e..00000000 --- a/svd/rp2040.svd +++ /dev/null @@ -1,46417 +0,0 @@ - - - - 8 - Raspberry Pi - RP2040 - - Copyright (c) 2020 Raspberry Pi (Trading) Ltd. \n - \n - SPDX-License-Identifier: BSD-3-Clause - - 0.1 - 32 - - CM0PLUS - r0p1 - little - true - false - 2 - 1 - false - 26 - - - - - 0 - 0x0020 - registers - - 0x14000000 - QSPI flash execute-in-place block - - XIP_IRQ - 6 - - XIP_CTRL - - - 0x0000 - Cache control - - - read-write - [3:3] - When 1, the cache memories are powered down. They retain state,\n - but can not be accessed. This reduces static power dissipation.\n - Writing 1 to this bit forces CTRL_EN to 0, i.e. the cache cannot\n - be enabled when powered down.\n - Cache-as-SRAM accesses will produce a bus error response when\n - the cache is powered down. - POWER_DOWN - - - read-write - [1:1] - When 1, writes to any alias other than 0x0 (caching, allocating)\n - will produce a bus fault. When 0, these writes are silently ignored.\n - In either case, writes to the 0x0 alias will deallocate on tag match,\n - as usual. - ERR_BADWRITE - - - read-write - [0:0] - When 1, enable the cache. When the cache is disabled, all XIP accesses\n - will go straight to the flash, without querying the cache. When enabled,\n - cacheable XIP accesses will query the cache, and the flash will\n - not be accessed if the tag matches and the valid bit is set.\n\n - If the cache is enabled, cache-as-SRAM accesses have no effect on the\n - cache data RAM, and will produce a bus error response. - EN - - - CTRL - 0x00000003 - - - 0x0004 - Cache Flush control - - - read-write - [0:0] - Write 1 to flush the cache. This clears the tag memory, but\n - the data memory retains its contents. (This means cache-as-SRAM\n - contents is not affected by flush or reset.)\n - Reading will hold the bus (stall the processor) until the flush\n - completes. Alternatively STAT can be polled until completion. - clear - FLUSH - - - FLUSH - 0x00000000 - - - 0x0008 - Cache Status - - - read-only - [2:2] - When 1, indicates the XIP streaming FIFO is completely full.\n - The streaming FIFO is 2 entries deep, so the full and empty\n - flag allow its level to be ascertained. - FIFO_FULL - - - read-only - [1:1] - When 1, indicates the XIP streaming FIFO is completely empty. - FIFO_EMPTY - - - read-only - [0:0] - Reads as 0 while a cache flush is in progress, and 1 otherwise.\n - The cache is flushed whenever the XIP block is reset, and also\n - when requested via the FLUSH register. - FLUSH_READY - - - STAT - 0x00000002 - - - read-write - 0x000c - Cache Hit counter\n - A 32 bit saturating counter that increments upon each cache hit,\n - i.e. when an XIP access is serviced directly from cached data.\n - Write any value to clear. - oneToClear - CTR_HIT - 0x00000000 - - - read-write - 0x0010 - Cache Access counter\n - A 32 bit saturating counter that increments upon each XIP access,\n - whether the cache is hit or not. This includes noncacheable accesses.\n - Write any value to clear. - oneToClear - CTR_ACC - 0x00000000 - - - 0x0014 - FIFO stream address - - - read-write - [31:2] - The address of the next word to be streamed from flash to the streaming FIFO.\n - Increments automatically after each flash access.\n - Write the initial access address here before starting a streaming read. - STREAM_ADDR - - - STREAM_ADDR - 0x00000000 - - - 0x0018 - FIFO stream control - - - read-write - [21:0] - Write a nonzero value to start a streaming read. This will then\n - progress in the background, using flash idle cycles to transfer\n - a linear data block from flash to the streaming FIFO.\n - Decrements automatically (1 at a time) as the stream\n - progresses, and halts on reaching 0.\n - Write 0 to halt an in-progress stream, and discard any in-flight\n - read, so that a new stream can immediately be started (after\n - draining the FIFO and reinitialising STREAM_ADDR) - STREAM_CTR - - - STREAM_CTR - 0x00000000 - - - read-only - 0x001c - FIFO stream data\n - Streamed data is buffered here, for retrieval by the system DMA.\n - This FIFO can also be accessed via the XIP_AUX slave, to avoid exposing\n - the DMA to bus stalls caused by other XIP traffic. - STREAM_FIFO - 0x00000000 - - - 32 - 1 - - - - 0 - 0x0100 - registers - - 0x18000000 - DW_apb_ssi has the following features:\n - * APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation.\n - * APB3 and APB4 protocol support.\n - * Scalable APB data bus width – Supports APB data bus widths of 8, 16, and 32 bits.\n - * Serial-master or serial-slave operation – Enables serial communication with serial-master or serial-slave peripheral devices.\n - * Programmable Dual/Quad/Octal SPI support in Master Mode.\n - * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation.\n - * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes.\n - * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes.\n - * DMA Controller Interface – Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests.\n - * Independent masking of interrupts – Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently.\n - * Multi-master contention detection – Informs the processor of multiple serial-master accesses on the serial bus.\n - * Bypass of meta-stability flip-flops for synchronous clocks – When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains.\n - * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates.\n - * Programmable features:\n - - Serial interface operation – Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire.\n - - Clock bit-rate – Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation.\n - - Data Item size (4 to 32 bits) – Item size of each data transfer under the control of the programmer.\n - * Configured features:\n - - FIFO depth – 16 words deep. The FIFO width is fixed at 32 bits.\n - - 1 slave select output.\n - - Hardware slave-select – Dedicated hardware slave-select line.\n - - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller.\n - - Interrupt polarity – active high interrupt lines.\n - - Serial clock polarity – low serial-clock polarity directly after reset.\n - - Serial clock phase – capture on first edge of serial-clock directly after reset. - XIP_SSI - - - 0x0000 - Control register 0 - - - read-write - [24:24] - Slave select toggle enable - SSTE - - - read-write - [22:21] - SPI frame format - - - Standard 1-bit SPI frame format; 1 bit per SCK, full-duplex - STD - 0 - - - Dual-SPI frame format; two bits per SCK, half-duplex - DUAL - 1 - - - Quad-SPI frame format; four bits per SCK, half-duplex - QUAD - 2 - - - SPI_FRF - - - read-write - [20:16] - Data frame size in 32b transfer mode\n - Value of n -> n+1 clocks per frame. - DFS_32 - - - read-write - [15:12] - Control frame size\n - Value of n -> n+1 clocks per frame. - CFS - - - read-write - [11:11] - Shift register loop (test mode) - SRL - - - read-write - [10:10] - Slave output enable - SLV_OE - - - read-write - [9:8] - Transfer mode - - - Both transmit and receive - TX_AND_RX - 0 - - - Transmit only (not for FRF == 0, standard SPI mode) - TX_ONLY - 1 - - - Receive only (not for FRF == 0, standard SPI mode) - RX_ONLY - 2 - - - EEPROM read mode (TX then RX; RX starts after control data TX'd) - EEPROM_READ - 3 - - - TMOD - - - read-write - [7:7] - Serial clock polarity - SCPOL - - - read-write - [6:6] - Serial clock phase - SCPH - - - read-write - [5:4] - Frame format - FRF - - - read-write - [3:0] - Data frame size - DFS - - - CTRLR0 - 0x00000000 - - - 0x0004 - Master Control register 1 - - - read-write - [15:0] - Number of data frames - NDF - - - CTRLR1 - 0x00000000 - - - 0x0008 - SSI Enable - - - read-write - [0:0] - SSI enable - SSI_EN - - - SSIENR - 0x00000000 - - - 0x000c - Microwire Control - - - read-write - [2:2] - Microwire handshaking - MHS - - - read-write - [1:1] - Microwire control - MDD - - - read-write - [0:0] - Microwire transfer mode - MWMOD - - - MWCR - 0x00000000 - - - 0x0010 - Slave enable - - - read-write - [0:0] - For each bit:\n - 0 -> slave not selected\n - 1 -> slave selected - SER - - - SER - 0x00000000 - - - 0x0014 - Baud rate - - - read-write - [15:0] - SSI clock divider - SCKDV - - - BAUDR - 0x00000000 - - - 0x0018 - TX FIFO threshold level - - - read-write - [7:0] - Transmit FIFO threshold - TFT - - - TXFTLR - 0x00000000 - - - 0x001c - RX FIFO threshold level - - - read-write - [7:0] - Receive FIFO threshold - RFT - - - RXFTLR - 0x00000000 - - - 0x0020 - TX FIFO level - - - read-only - [7:0] - Transmit FIFO level - TFTFL - - - TXFLR - 0x00000000 - - - 0x0024 - RX FIFO level - - - read-only - [7:0] - Receive FIFO level - RXTFL - - - RXFLR - 0x00000000 - - - 0x0028 - Status register - - - read-only - [6:6] - Data collision error - DCOL - - - read-only - [5:5] - Transmission error - TXE - - - read-only - [4:4] - Receive FIFO full - RFF - - - read-only - [3:3] - Receive FIFO not empty - RFNE - - - read-only - [2:2] - Transmit FIFO empty - TFE - - - read-only - [1:1] - Transmit FIFO not full - TFNF - - - read-only - [0:0] - SSI busy flag - BUSY - - - SR - 0x00000000 - - - 0x002c - Interrupt mask - - - read-write - [5:5] - Multi-master contention interrupt mask - MSTIM - - - read-write - [4:4] - Receive FIFO full interrupt mask - RXFIM - - - read-write - [3:3] - Receive FIFO overflow interrupt mask - RXOIM - - - read-write - [2:2] - Receive FIFO underflow interrupt mask - RXUIM - - - read-write - [1:1] - Transmit FIFO overflow interrupt mask - TXOIM - - - read-write - [0:0] - Transmit FIFO empty interrupt mask - TXEIM - - - IMR - 0x00000000 - - - 0x0030 - Interrupt status - - - read-only - [5:5] - Multi-master contention interrupt status - MSTIS - - - read-only - [4:4] - Receive FIFO full interrupt status - RXFIS - - - read-only - [3:3] - Receive FIFO overflow interrupt status - RXOIS - - - read-only - [2:2] - Receive FIFO underflow interrupt status - RXUIS - - - read-only - [1:1] - Transmit FIFO overflow interrupt status - TXOIS - - - read-only - [0:0] - Transmit FIFO empty interrupt status - TXEIS - - - ISR - 0x00000000 - - - 0x0034 - Raw interrupt status - - - read-only - [5:5] - Multi-master contention raw interrupt status - MSTIR - - - read-only - [4:4] - Receive FIFO full raw interrupt status - RXFIR - - - read-only - [3:3] - Receive FIFO overflow raw interrupt status - RXOIR - - - read-only - [2:2] - Receive FIFO underflow raw interrupt status - RXUIR - - - read-only - [1:1] - Transmit FIFO overflow raw interrupt status - TXOIR - - - read-only - [0:0] - Transmit FIFO empty raw interrupt status - TXEIR - - - RISR - 0x00000000 - - - 0x0038 - TX FIFO overflow interrupt clear - - - read-only - [0:0] - Clear-on-read transmit FIFO overflow interrupt - TXOICR - - - TXOICR - 0x00000000 - - - 0x003c - RX FIFO overflow interrupt clear - - - read-only - [0:0] - Clear-on-read receive FIFO overflow interrupt - RXOICR - - - RXOICR - 0x00000000 - - - 0x0040 - RX FIFO underflow interrupt clear - - - read-only - [0:0] - Clear-on-read receive FIFO underflow interrupt - RXUICR - - - RXUICR - 0x00000000 - - - 0x0044 - Multi-master interrupt clear - - - read-only - [0:0] - Clear-on-read multi-master contention interrupt - MSTICR - - - MSTICR - 0x00000000 - - - 0x0048 - Interrupt clear - - - read-only - [0:0] - Clear-on-read all active interrupts - ICR - - - ICR - 0x00000000 - - - 0x004c - DMA control - - - read-write - [1:1] - Transmit DMA enable - TDMAE - - - read-write - [0:0] - Receive DMA enable - RDMAE - - - DMACR - 0x00000000 - - - 0x0050 - DMA TX data level - - - read-write - [7:0] - Transmit data watermark level - DMATDL - - - DMATDLR - 0x00000000 - - - 0x0054 - DMA RX data level - - - read-write - [7:0] - Receive data watermark level (DMARDLR+1) - DMARDL - - - DMARDLR - 0x00000000 - - - 0x0058 - Identification register - - - read-only - [31:0] - Peripheral dentification code - IDCODE - - - IDR - 0x51535049 - - - 0x005c - Version ID - - - read-only - [31:0] - SNPS component version (format X.YY) - SSI_COMP_VERSION - - - SSI_VERSION_ID - 0x3430312a - - - 0x0060 - Data Register 0 (of 36) - - - read-write - [31:0] - First data register of 36 - DR - - - DR0 - 0x00000000 - - - 0x00f0 - RX sample delay - - - read-write - [7:0] - RXD sample delay (in SCLK cycles) - RSD - - - RX_SAMPLE_DLY - 0x00000000 - - - 0x00f4 - SPI control - - - read-write - [31:24] - SPI Command to send in XIP mode (INST_L = 8-bit) or to append to Address (INST_L = 0-bit) - XIP_CMD - - - read-write - [18:18] - Read data strobe enable - SPI_RXDS_EN - - - read-write - [17:17] - Instruction DDR transfer enable - INST_DDR_EN - - - read-write - [16:16] - SPI DDR transfer enable - SPI_DDR_EN - - - read-write - [15:11] - Wait cycles between control frame transmit and data reception (in SCLK cycles) - WAIT_CYCLES - - - read-write - [9:8] - Instruction length (0/4/8/16b) - - - No instruction - NONE - 0 - - - 4-bit instruction - 4B - 1 - - - 8-bit instruction - 8B - 2 - - - 16-bit instruction - 16B - 3 - - - INST_L - - - read-write - [5:2] - Address length (0b-60b in 4b increments) - ADDR_L - - - read-write - [1:0] - Address and instruction transfer format - - - Command and address both in standard SPI frame format - 1C1A - 0 - - - Command in standard SPI format, address in format specified by FRF - 1C2A - 1 - - - Command and address both in format specified by FRF (e.g. Dual-SPI) - 2C2A - 2 - - - TRANS_TYPE - - - SPI_CTRLR0 - 0x03000000 - - - 0x00f8 - TX drive edge - - - read-write - [7:0] - TXD drive edge - TDE - - - TXD_DRIVE_EDGE - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40000000 - SYSINFO - - - 0x0000 - JEDEC JEP-106 compliant chip identifier. - - - read-only - [31:28] - REVISION - - - read-only - [27:12] - PART - - - read-only - [11:0] - MANUFACTURER - - - CHIP_ID - 0x00000000 - - - 0x0004 - Platform register. Allows software to know what environment it is running in. - - - read-only - [1:1] - ASIC - - - read-only - [0:0] - FPGA - - - PLATFORM - 0x00000000 - - - read-only - 0x0040 - Git hash of the chip source. Used to identify chip version. - GITREF_RP2040 - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40004000 - Register block for various chip control signals - SYSCFG - - - read-write - 0x0000 - Processor core 0 NMI source mask\n - Set a bit high to enable NMI from that IRQ - PROC0_NMI_MASK - 0x00000000 - - - read-write - 0x0004 - Processor core 1 NMI source mask\n - Set a bit high to enable NMI from that IRQ - PROC1_NMI_MASK - 0x00000000 - - - 0x0008 - Configuration for processors - - - read-write - [31:28] - Configure proc1 DAP instance ID.\n - Recommend that this is NOT changed until you require debug access in multi-chip environment\n - WARNING: do not set to 15 as this is reserved for RescueDP - PROC1_DAP_INSTID - - - read-write - [27:24] - Configure proc0 DAP instance ID.\n - Recommend that this is NOT changed until you require debug access in multi-chip environment\n - WARNING: do not set to 15 as this is reserved for RescueDP - PROC0_DAP_INSTID - - - read-only - [1:1] - Indication that proc1 has halted - PROC1_HALTED - - - read-only - [0:0] - Indication that proc0 has halted - PROC0_HALTED - - - PROC_CONFIG - 0x10000000 - - - 0x000c - For each bit, if 1, bypass the input synchronizer between that GPIO\n - and the GPIO input register in the SIO. The input synchronizers should\n - generally be unbypassed, to avoid injecting metastabilities into processors.\n - If you're feeling brave, you can bypass to save two cycles of input\n - latency. This register applies to GPIO 0...29. - - - read-write - [29:0] - PROC_IN_SYNC_BYPASS - - - PROC_IN_SYNC_BYPASS - 0x00000000 - - - 0x0010 - For each bit, if 1, bypass the input synchronizer between that GPIO\n - and the GPIO input register in the SIO. The input synchronizers should\n - generally be unbypassed, to avoid injecting metastabilities into processors.\n - If you're feeling brave, you can bypass to save two cycles of input\n - latency. This register applies to GPIO 30...35 (the QSPI IOs). - - - read-write - [5:0] - PROC_IN_SYNC_BYPASS_HI - - - PROC_IN_SYNC_BYPASS_HI - 0x00000000 - - - 0x0014 - Directly control the SWD debug port of either processor - - - read-write - [7:7] - Attach processor 1 debug port to syscfg controls, and disconnect it from external SWD pads. - PROC1_ATTACH - - - read-write - [6:6] - Directly drive processor 1 SWCLK, if PROC1_ATTACH is set - PROC1_SWCLK - - - read-write - [5:5] - Directly drive processor 1 SWDIO input, if PROC1_ATTACH is set - PROC1_SWDI - - - read-only - [4:4] - Observe the value of processor 1 SWDIO output. - PROC1_SWDO - - - read-write - [3:3] - Attach processor 0 debug port to syscfg controls, and disconnect it from external SWD pads. - PROC0_ATTACH - - - read-write - [2:2] - Directly drive processor 0 SWCLK, if PROC0_ATTACH is set - PROC0_SWCLK - - - read-write - [1:1] - Directly drive processor 0 SWDIO input, if PROC0_ATTACH is set - PROC0_SWDI - - - read-only - [0:0] - Observe the value of processor 0 SWDIO output. - PROC0_SWDO - - - DBGFORCE - 0x00000066 - - - 0x0018 - Control power downs to memories. Set high to power down memories.\n - Use with extreme caution - - - read-write - [7:7] - ROM - - - read-write - [6:6] - USB - - - read-write - [5:5] - SRAM5 - - - read-write - [4:4] - SRAM4 - - - read-write - [3:3] - SRAM3 - - - read-write - [2:2] - SRAM2 - - - read-write - [1:1] - SRAM1 - - - read-write - [0:0] - SRAM0 - - - MEMPOWERDOWN - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40008000 - - CLOCKS_IRQ - 17 - - CLOCKS - - - 0x0000 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [12:12] - Enables duty cycle correction for odd divisors - DC50 - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [8:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_sys - 0 - - - clksrc_gpin0 - 1 - - - clksrc_gpin1 - 2 - - - clksrc_pll_usb - 3 - - - rosc_clksrc - 4 - - - xosc_clksrc - 5 - - - clk_sys - 6 - - - clk_usb - 7 - - - clk_adc - 8 - - - clk_rtc - 9 - - - clk_ref - 10 - - - AUXSRC - - - CLK_GPOUT0_CTRL - 0x00000000 - - - 0x0004 - Clock divisor, can be changed on-the-fly - - - read-write - [31:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - read-write - [7:0] - Fractional component of the divisor - FRAC - - - CLK_GPOUT0_DIV - 0x00000100 - - - read-only - 0x0008 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_GPOUT0_SELECTED - 0x00000001 - - - 0x000c - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [12:12] - Enables duty cycle correction for odd divisors - DC50 - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [8:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_sys - 0 - - - clksrc_gpin0 - 1 - - - clksrc_gpin1 - 2 - - - clksrc_pll_usb - 3 - - - rosc_clksrc - 4 - - - xosc_clksrc - 5 - - - clk_sys - 6 - - - clk_usb - 7 - - - clk_adc - 8 - - - clk_rtc - 9 - - - clk_ref - 10 - - - AUXSRC - - - CLK_GPOUT1_CTRL - 0x00000000 - - - 0x0010 - Clock divisor, can be changed on-the-fly - - - read-write - [31:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - read-write - [7:0] - Fractional component of the divisor - FRAC - - - CLK_GPOUT1_DIV - 0x00000100 - - - read-only - 0x0014 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_GPOUT1_SELECTED - 0x00000001 - - - 0x0018 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [12:12] - Enables duty cycle correction for odd divisors - DC50 - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [8:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_sys - 0 - - - clksrc_gpin0 - 1 - - - clksrc_gpin1 - 2 - - - clksrc_pll_usb - 3 - - - rosc_clksrc_ph - 4 - - - xosc_clksrc - 5 - - - clk_sys - 6 - - - clk_usb - 7 - - - clk_adc - 8 - - - clk_rtc - 9 - - - clk_ref - 10 - - - AUXSRC - - - CLK_GPOUT2_CTRL - 0x00000000 - - - 0x001c - Clock divisor, can be changed on-the-fly - - - read-write - [31:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - read-write - [7:0] - Fractional component of the divisor - FRAC - - - CLK_GPOUT2_DIV - 0x00000100 - - - read-only - 0x0020 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_GPOUT2_SELECTED - 0x00000001 - - - 0x0024 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [12:12] - Enables duty cycle correction for odd divisors - DC50 - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [8:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_sys - 0 - - - clksrc_gpin0 - 1 - - - clksrc_gpin1 - 2 - - - clksrc_pll_usb - 3 - - - rosc_clksrc_ph - 4 - - - xosc_clksrc - 5 - - - clk_sys - 6 - - - clk_usb - 7 - - - clk_adc - 8 - - - clk_rtc - 9 - - - clk_ref - 10 - - - AUXSRC - - - CLK_GPOUT3_CTRL - 0x00000000 - - - 0x0028 - Clock divisor, can be changed on-the-fly - - - read-write - [31:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - read-write - [7:0] - Fractional component of the divisor - FRAC - - - CLK_GPOUT3_DIV - 0x00000100 - - - read-only - 0x002c - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_GPOUT3_SELECTED - 0x00000001 - - - 0x0030 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [6:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_usb - 0 - - - clksrc_gpin0 - 1 - - - clksrc_gpin1 - 2 - - - AUXSRC - - - read-write - [1:0] - Selects the clock source glitchlessly, can be changed on-the-fly - - - rosc_clksrc_ph - 0 - - - clksrc_clk_ref_aux - 1 - - - xosc_clksrc - 2 - - - SRC - - - CLK_REF_CTRL - 0x00000000 - - - 0x0034 - Clock divisor, can be changed on-the-fly - - - read-write - [9:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - CLK_REF_DIV - 0x00000100 - - - read-only - 0x0038 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s. - CLK_REF_SELECTED - 0x00000001 - - - 0x003c - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [7:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_sys - 0 - - - clksrc_pll_usb - 1 - - - rosc_clksrc - 2 - - - xosc_clksrc - 3 - - - clksrc_gpin0 - 4 - - - clksrc_gpin1 - 5 - - - AUXSRC - - - read-write - [0:0] - Selects the clock source glitchlessly, can be changed on-the-fly - - - clk_ref - 0 - - - clksrc_clk_sys_aux - 1 - - - SRC - - - CLK_SYS_CTRL - 0x00000000 - - - 0x0040 - Clock divisor, can be changed on-the-fly - - - read-write - [31:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - read-write - [7:0] - Fractional component of the divisor - FRAC - - - CLK_SYS_DIV - 0x00000100 - - - read-only - 0x0044 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - The glitchless multiplexer does not switch instantaneously (to avoid glitches), so software should poll this register to wait for the switch to complete. This register contains one decoded bit for each of the clock sources enumerated in the CTRL SRC field. At most one of these bits will be set at any time, indicating that clock is currently present at the output of the glitchless mux. Whilst switching is in progress, this register may briefly show all-0s. - CLK_SYS_SELECTED - 0x00000001 - - - 0x0048 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [7:5] - Selects the auxiliary clock source, will glitch when switching - - - clk_sys - 0 - - - clksrc_pll_sys - 1 - - - clksrc_pll_usb - 2 - - - rosc_clksrc_ph - 3 - - - xosc_clksrc - 4 - - - clksrc_gpin0 - 5 - - - clksrc_gpin1 - 6 - - - AUXSRC - - - CLK_PERI_CTRL - 0x00000000 - - - read-only - 0x0050 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_PERI_SELECTED - 0x00000001 - - - 0x0054 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [7:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_usb - 0 - - - clksrc_pll_sys - 1 - - - rosc_clksrc_ph - 2 - - - xosc_clksrc - 3 - - - clksrc_gpin0 - 4 - - - clksrc_gpin1 - 5 - - - AUXSRC - - - CLK_USB_CTRL - 0x00000000 - - - 0x0058 - Clock divisor, can be changed on-the-fly - - - read-write - [9:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - CLK_USB_DIV - 0x00000100 - - - read-only - 0x005c - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_USB_SELECTED - 0x00000001 - - - 0x0060 - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [7:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_usb - 0 - - - clksrc_pll_sys - 1 - - - rosc_clksrc_ph - 2 - - - xosc_clksrc - 3 - - - clksrc_gpin0 - 4 - - - clksrc_gpin1 - 5 - - - AUXSRC - - - CLK_ADC_CTRL - 0x00000000 - - - 0x0064 - Clock divisor, can be changed on-the-fly - - - read-write - [9:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - CLK_ADC_DIV - 0x00000100 - - - read-only - 0x0068 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_ADC_SELECTED - 0x00000001 - - - 0x006c - Clock control, can be changed on-the-fly (except for auxsrc) - - - read-write - [20:20] - An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n - This can be done at any time - NUDGE - - - read-write - [17:16] - This delays the enable signal by up to 3 cycles of the input clock\n - This must be set before the clock is enabled to have any effect - PHASE - - - read-write - [11:11] - Starts and stops the clock generator cleanly - ENABLE - - - read-write - [10:10] - Asynchronously kills the clock generator - KILL - - - read-write - [7:5] - Selects the auxiliary clock source, will glitch when switching - - - clksrc_pll_usb - 0 - - - clksrc_pll_sys - 1 - - - rosc_clksrc_ph - 2 - - - xosc_clksrc - 3 - - - clksrc_gpin0 - 4 - - - clksrc_gpin1 - 5 - - - AUXSRC - - - CLK_RTC_CTRL - 0x00000000 - - - 0x0070 - Clock divisor, can be changed on-the-fly - - - read-write - [31:8] - Integer component of the divisor, 0 -> divide by 2^16 - INT - - - read-write - [7:0] - Fractional component of the divisor - FRAC - - - CLK_RTC_DIV - 0x00000100 - - - read-only - 0x0074 - Indicates which SRC is currently selected by the glitchless mux (one-hot).\n - This slice does not have a glitchless mux (only the AUX_SRC field is present, not SRC) so this register is hardwired to 0x1. - CLK_RTC_SELECTED - 0x00000001 - - - 0x0078 - - - read-write - [16:16] - For clearing the resus after the fault that triggered it has been corrected - CLEAR - - - read-write - [12:12] - Force a resus, for test purposes only - FRCE - - - read-write - [8:8] - Enable resus - ENABLE - - - read-write - [7:0] - This is expressed as a number of clk_ref cycles\n - and must be >= 2x clk_ref_freq/min_clk_tst_freq - TIMEOUT - - - CLK_SYS_RESUS_CTRL - 0x000000ff - - - 0x007c - - - read-only - [0:0] - Clock has been resuscitated, correct the error then send ctrl_clear=1 - RESUSSED - - - CLK_SYS_RESUS_STATUS - 0x00000000 - - - 0x0080 - Reference clock frequency in kHz - - - read-write - [19:0] - FC0_REF_KHZ - - - FC0_REF_KHZ - 0x00000000 - - - 0x0084 - Minimum pass frequency in kHz. This is optional. Set to 0 if you are not using the pass/fail flags - - - read-write - [24:0] - FC0_MIN_KHZ - - - FC0_MIN_KHZ - 0x00000000 - - - 0x0088 - Maximum pass frequency in kHz. This is optional. Set to 0x1ffffff if you are not using the pass/fail flags - - - read-write - [24:0] - FC0_MAX_KHZ - - - FC0_MAX_KHZ - 0x01ffffff - - - 0x008c - Delays the start of frequency counting to allow the mux to settle\n - Delay is measured in multiples of the reference clock period - - - read-write - [2:0] - FC0_DELAY - - - FC0_DELAY - 0x00000001 - - - 0x0090 - The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval\n - The default gives a test interval of 250us - - - read-write - [3:0] - FC0_INTERVAL - - - FC0_INTERVAL - 0x00000008 - - - 0x0094 - Clock sent to frequency counter, set to 0 when not required\n - Writing to this register initiates the frequency count - - - read-write - [7:0] - - - NULL - 0 - - - pll_sys_clksrc_primary - 1 - - - pll_usb_clksrc_primary - 2 - - - rosc_clksrc - 3 - - - rosc_clksrc_ph - 4 - - - xosc_clksrc - 5 - - - clksrc_gpin0 - 6 - - - clksrc_gpin1 - 7 - - - clk_ref - 8 - - - clk_sys - 9 - - - clk_peri - 10 - - - clk_usb - 11 - - - clk_adc - 12 - - - clk_rtc - 13 - - - FC0_SRC - - - FC0_SRC - 0x00000000 - - - 0x0098 - Frequency counter status - - - read-only - [28:28] - Test clock stopped during test - DIED - - - read-only - [24:24] - Test clock faster than expected, only valid when status_done=1 - FAST - - - read-only - [20:20] - Test clock slower than expected, only valid when status_done=1 - SLOW - - - read-only - [16:16] - Test failed - FAIL - - - read-only - [12:12] - Waiting for test clock to start - WAITING - - - read-only - [8:8] - Test running - RUNNING - - - read-only - [4:4] - Test complete - DONE - - - read-only - [0:0] - Test passed - PASS - - - FC0_STATUS - 0x00000000 - - - 0x009c - Result of frequency measurement, only valid when status_done=1 - - - read-only - [29:5] - KHZ - - - read-only - [4:0] - FRAC - - - FC0_RESULT - 0x00000000 - - - 0x00a0 - enable clock in wake mode - - - read-write - [31:31] - clk_sys_sram3 - - - read-write - [30:30] - clk_sys_sram2 - - - read-write - [29:29] - clk_sys_sram1 - - - read-write - [28:28] - clk_sys_sram0 - - - read-write - [27:27] - clk_sys_spi1 - - - read-write - [26:26] - clk_peri_spi1 - - - read-write - [25:25] - clk_sys_spi0 - - - read-write - [24:24] - clk_peri_spi0 - - - read-write - [23:23] - clk_sys_sio - - - read-write - [22:22] - clk_sys_rtc - - - read-write - [21:21] - clk_rtc_rtc - - - read-write - [20:20] - clk_sys_rosc - - - read-write - [19:19] - clk_sys_rom - - - read-write - [18:18] - clk_sys_resets - - - read-write - [17:17] - clk_sys_pwm - - - read-write - [16:16] - clk_sys_psm - - - read-write - [15:15] - clk_sys_pll_usb - - - read-write - [14:14] - clk_sys_pll_sys - - - read-write - [13:13] - clk_sys_pio1 - - - read-write - [12:12] - clk_sys_pio0 - - - read-write - [11:11] - clk_sys_pads - - - read-write - [10:10] - clk_sys_vreg_and_chip_reset - - - read-write - [9:9] - clk_sys_jtag - - - read-write - [8:8] - clk_sys_io - - - read-write - [7:7] - clk_sys_i2c1 - - - read-write - [6:6] - clk_sys_i2c0 - - - read-write - [5:5] - clk_sys_dma - - - read-write - [4:4] - clk_sys_busfabric - - - read-write - [3:3] - clk_sys_busctrl - - - read-write - [2:2] - clk_sys_adc - - - read-write - [1:1] - clk_adc_adc - - - read-write - [0:0] - clk_sys_clocks - - - WAKE_EN0 - 0xffffffff - - - 0x00a4 - enable clock in wake mode - - - read-write - [14:14] - clk_sys_xosc - - - read-write - [13:13] - clk_sys_xip - - - read-write - [12:12] - clk_sys_watchdog - - - read-write - [11:11] - clk_usb_usbctrl - - - read-write - [10:10] - clk_sys_usbctrl - - - read-write - [9:9] - clk_sys_uart1 - - - read-write - [8:8] - clk_peri_uart1 - - - read-write - [7:7] - clk_sys_uart0 - - - read-write - [6:6] - clk_peri_uart0 - - - read-write - [5:5] - clk_sys_timer - - - read-write - [4:4] - clk_sys_tbman - - - read-write - [3:3] - clk_sys_sysinfo - - - read-write - [2:2] - clk_sys_syscfg - - - read-write - [1:1] - clk_sys_sram5 - - - read-write - [0:0] - clk_sys_sram4 - - - WAKE_EN1 - 0x00007fff - - - 0x00a8 - enable clock in sleep mode - - - read-write - [31:31] - clk_sys_sram3 - - - read-write - [30:30] - clk_sys_sram2 - - - read-write - [29:29] - clk_sys_sram1 - - - read-write - [28:28] - clk_sys_sram0 - - - read-write - [27:27] - clk_sys_spi1 - - - read-write - [26:26] - clk_peri_spi1 - - - read-write - [25:25] - clk_sys_spi0 - - - read-write - [24:24] - clk_peri_spi0 - - - read-write - [23:23] - clk_sys_sio - - - read-write - [22:22] - clk_sys_rtc - - - read-write - [21:21] - clk_rtc_rtc - - - read-write - [20:20] - clk_sys_rosc - - - read-write - [19:19] - clk_sys_rom - - - read-write - [18:18] - clk_sys_resets - - - read-write - [17:17] - clk_sys_pwm - - - read-write - [16:16] - clk_sys_psm - - - read-write - [15:15] - clk_sys_pll_usb - - - read-write - [14:14] - clk_sys_pll_sys - - - read-write - [13:13] - clk_sys_pio1 - - - read-write - [12:12] - clk_sys_pio0 - - - read-write - [11:11] - clk_sys_pads - - - read-write - [10:10] - clk_sys_vreg_and_chip_reset - - - read-write - [9:9] - clk_sys_jtag - - - read-write - [8:8] - clk_sys_io - - - read-write - [7:7] - clk_sys_i2c1 - - - read-write - [6:6] - clk_sys_i2c0 - - - read-write - [5:5] - clk_sys_dma - - - read-write - [4:4] - clk_sys_busfabric - - - read-write - [3:3] - clk_sys_busctrl - - - read-write - [2:2] - clk_sys_adc - - - read-write - [1:1] - clk_adc_adc - - - read-write - [0:0] - clk_sys_clocks - - - SLEEP_EN0 - 0xffffffff - - - 0x00ac - enable clock in sleep mode - - - read-write - [14:14] - clk_sys_xosc - - - read-write - [13:13] - clk_sys_xip - - - read-write - [12:12] - clk_sys_watchdog - - - read-write - [11:11] - clk_usb_usbctrl - - - read-write - [10:10] - clk_sys_usbctrl - - - read-write - [9:9] - clk_sys_uart1 - - - read-write - [8:8] - clk_peri_uart1 - - - read-write - [7:7] - clk_sys_uart0 - - - read-write - [6:6] - clk_peri_uart0 - - - read-write - [5:5] - clk_sys_timer - - - read-write - [4:4] - clk_sys_tbman - - - read-write - [3:3] - clk_sys_sysinfo - - - read-write - [2:2] - clk_sys_syscfg - - - read-write - [1:1] - clk_sys_sram5 - - - read-write - [0:0] - clk_sys_sram4 - - - SLEEP_EN1 - 0x00007fff - - - 0x00b0 - indicates the state of the clock enable - - - read-only - [31:31] - clk_sys_sram3 - - - read-only - [30:30] - clk_sys_sram2 - - - read-only - [29:29] - clk_sys_sram1 - - - read-only - [28:28] - clk_sys_sram0 - - - read-only - [27:27] - clk_sys_spi1 - - - read-only - [26:26] - clk_peri_spi1 - - - read-only - [25:25] - clk_sys_spi0 - - - read-only - [24:24] - clk_peri_spi0 - - - read-only - [23:23] - clk_sys_sio - - - read-only - [22:22] - clk_sys_rtc - - - read-only - [21:21] - clk_rtc_rtc - - - read-only - [20:20] - clk_sys_rosc - - - read-only - [19:19] - clk_sys_rom - - - read-only - [18:18] - clk_sys_resets - - - read-only - [17:17] - clk_sys_pwm - - - read-only - [16:16] - clk_sys_psm - - - read-only - [15:15] - clk_sys_pll_usb - - - read-only - [14:14] - clk_sys_pll_sys - - - read-only - [13:13] - clk_sys_pio1 - - - read-only - [12:12] - clk_sys_pio0 - - - read-only - [11:11] - clk_sys_pads - - - read-only - [10:10] - clk_sys_vreg_and_chip_reset - - - read-only - [9:9] - clk_sys_jtag - - - read-only - [8:8] - clk_sys_io - - - read-only - [7:7] - clk_sys_i2c1 - - - read-only - [6:6] - clk_sys_i2c0 - - - read-only - [5:5] - clk_sys_dma - - - read-only - [4:4] - clk_sys_busfabric - - - read-only - [3:3] - clk_sys_busctrl - - - read-only - [2:2] - clk_sys_adc - - - read-only - [1:1] - clk_adc_adc - - - read-only - [0:0] - clk_sys_clocks - - - ENABLED0 - 0x00000000 - - - 0x00b4 - indicates the state of the clock enable - - - read-only - [14:14] - clk_sys_xosc - - - read-only - [13:13] - clk_sys_xip - - - read-only - [12:12] - clk_sys_watchdog - - - read-only - [11:11] - clk_usb_usbctrl - - - read-only - [10:10] - clk_sys_usbctrl - - - read-only - [9:9] - clk_sys_uart1 - - - read-only - [8:8] - clk_peri_uart1 - - - read-only - [7:7] - clk_sys_uart0 - - - read-only - [6:6] - clk_peri_uart0 - - - read-only - [5:5] - clk_sys_timer - - - read-only - [4:4] - clk_sys_tbman - - - read-only - [3:3] - clk_sys_sysinfo - - - read-only - [2:2] - clk_sys_syscfg - - - read-only - [1:1] - clk_sys_sram5 - - - read-only - [0:0] - clk_sys_sram4 - - - ENABLED1 - 0x00000000 - - - 0x00b8 - Raw Interrupts - - - read-only - [0:0] - CLK_SYS_RESUS - - - INTR - 0x00000000 - - - 0x00bc - Interrupt Enable - - - read-write - [0:0] - CLK_SYS_RESUS - - - INTE - 0x00000000 - - - 0x00c0 - Interrupt Force - - - read-write - [0:0] - CLK_SYS_RESUS - - - INTF - 0x00000000 - - - 0x00c4 - Interrupt status after masking & forcing - - - read-only - [0:0] - CLK_SYS_RESUS - - - INTS - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x4000c000 - RESETS - - - 0x0000 - Reset control. If a bit is set it means the peripheral is in reset. 0 means the peripheral's reset is deasserted. - - - read-write - [24:24] - usbctrl - - - read-write - [23:23] - uart1 - - - read-write - [22:22] - uart0 - - - read-write - [21:21] - timer - - - read-write - [20:20] - tbman - - - read-write - [19:19] - sysinfo - - - read-write - [18:18] - syscfg - - - read-write - [17:17] - spi1 - - - read-write - [16:16] - spi0 - - - read-write - [15:15] - rtc - - - read-write - [14:14] - pwm - - - read-write - [13:13] - pll_usb - - - read-write - [12:12] - pll_sys - - - read-write - [11:11] - pio1 - - - read-write - [10:10] - pio0 - - - read-write - [9:9] - pads_qspi - - - read-write - [8:8] - pads_bank0 - - - read-write - [7:7] - jtag - - - read-write - [6:6] - io_qspi - - - read-write - [5:5] - io_bank0 - - - read-write - [4:4] - i2c1 - - - read-write - [3:3] - i2c0 - - - read-write - [2:2] - dma - - - read-write - [1:1] - busctrl - - - read-write - [0:0] - adc - - - RESET - 0x01ffffff - - - 0x0004 - Watchdog select. If a bit is set then the watchdog will reset this peripheral when the watchdog fires. - - - read-write - [24:24] - usbctrl - - - read-write - [23:23] - uart1 - - - read-write - [22:22] - uart0 - - - read-write - [21:21] - timer - - - read-write - [20:20] - tbman - - - read-write - [19:19] - sysinfo - - - read-write - [18:18] - syscfg - - - read-write - [17:17] - spi1 - - - read-write - [16:16] - spi0 - - - read-write - [15:15] - rtc - - - read-write - [14:14] - pwm - - - read-write - [13:13] - pll_usb - - - read-write - [12:12] - pll_sys - - - read-write - [11:11] - pio1 - - - read-write - [10:10] - pio0 - - - read-write - [9:9] - pads_qspi - - - read-write - [8:8] - pads_bank0 - - - read-write - [7:7] - jtag - - - read-write - [6:6] - io_qspi - - - read-write - [5:5] - io_bank0 - - - read-write - [4:4] - i2c1 - - - read-write - [3:3] - i2c0 - - - read-write - [2:2] - dma - - - read-write - [1:1] - busctrl - - - read-write - [0:0] - adc - - - WDSEL - 0x00000000 - - - 0x0008 - Reset done. If a bit is set then a reset done signal has been returned by the peripheral. This indicates that the peripheral's registers are ready to be accessed. - - - read-only - [24:24] - usbctrl - - - read-only - [23:23] - uart1 - - - read-only - [22:22] - uart0 - - - read-only - [21:21] - timer - - - read-only - [20:20] - tbman - - - read-only - [19:19] - sysinfo - - - read-only - [18:18] - syscfg - - - read-only - [17:17] - spi1 - - - read-only - [16:16] - spi0 - - - read-only - [15:15] - rtc - - - read-only - [14:14] - pwm - - - read-only - [13:13] - pll_usb - - - read-only - [12:12] - pll_sys - - - read-only - [11:11] - pio1 - - - read-only - [10:10] - pio0 - - - read-only - [9:9] - pads_qspi - - - read-only - [8:8] - pads_bank0 - - - read-only - [7:7] - jtag - - - read-only - [6:6] - io_qspi - - - read-only - [5:5] - io_bank0 - - - read-only - [4:4] - i2c1 - - - read-only - [3:3] - i2c0 - - - read-only - [2:2] - dma - - - read-only - [1:1] - busctrl - - - read-only - [0:0] - adc - - - RESET_DONE - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40010000 - PSM - - - 0x0000 - Force block out of reset (i.e. power it on) - - - read-write - [16:16] - proc1 - - - read-write - [15:15] - proc0 - - - read-write - [14:14] - sio - - - read-write - [13:13] - vreg_and_chip_reset - - - read-write - [12:12] - xip - - - read-write - [11:11] - sram5 - - - read-write - [10:10] - sram4 - - - read-write - [9:9] - sram3 - - - read-write - [8:8] - sram2 - - - read-write - [7:7] - sram1 - - - read-write - [6:6] - sram0 - - - read-write - [5:5] - rom - - - read-write - [4:4] - busfabric - - - read-write - [3:3] - resets - - - read-write - [2:2] - clocks - - - read-write - [1:1] - xosc - - - read-write - [0:0] - rosc - - - FRCE_ON - 0x00000000 - - - 0x0004 - Force into reset (i.e. power it off) - - - read-write - [16:16] - proc1 - - - read-write - [15:15] - proc0 - - - read-write - [14:14] - sio - - - read-write - [13:13] - vreg_and_chip_reset - - - read-write - [12:12] - xip - - - read-write - [11:11] - sram5 - - - read-write - [10:10] - sram4 - - - read-write - [9:9] - sram3 - - - read-write - [8:8] - sram2 - - - read-write - [7:7] - sram1 - - - read-write - [6:6] - sram0 - - - read-write - [5:5] - rom - - - read-write - [4:4] - busfabric - - - read-write - [3:3] - resets - - - read-write - [2:2] - clocks - - - read-write - [1:1] - xosc - - - read-write - [0:0] - rosc - - - FRCE_OFF - 0x00000000 - - - 0x0008 - Set to 1 if this peripheral should be reset when the watchdog fires. - - - read-write - [16:16] - proc1 - - - read-write - [15:15] - proc0 - - - read-write - [14:14] - sio - - - read-write - [13:13] - vreg_and_chip_reset - - - read-write - [12:12] - xip - - - read-write - [11:11] - sram5 - - - read-write - [10:10] - sram4 - - - read-write - [9:9] - sram3 - - - read-write - [8:8] - sram2 - - - read-write - [7:7] - sram1 - - - read-write - [6:6] - sram0 - - - read-write - [5:5] - rom - - - read-write - [4:4] - busfabric - - - read-write - [3:3] - resets - - - read-write - [2:2] - clocks - - - read-write - [1:1] - xosc - - - read-write - [0:0] - rosc - - - WDSEL - 0x00000000 - - - 0x000c - Indicates the peripheral's registers are ready to access. - - - read-only - [16:16] - proc1 - - - read-only - [15:15] - proc0 - - - read-only - [14:14] - sio - - - read-only - [13:13] - vreg_and_chip_reset - - - read-only - [12:12] - xip - - - read-only - [11:11] - sram5 - - - read-only - [10:10] - sram4 - - - read-only - [9:9] - sram3 - - - read-only - [8:8] - sram2 - - - read-only - [7:7] - sram1 - - - read-only - [6:6] - sram0 - - - read-only - [5:5] - rom - - - read-only - [4:4] - busfabric - - - read-only - [3:3] - resets - - - read-only - [2:2] - clocks - - - read-only - [1:1] - xosc - - - read-only - [0:0] - rosc - - - DONE - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40014000 - - IO_IRQ_BANK0 - 13 - - IO_BANK0 - - - 0x0000 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO0_STATUS - 0x00000000 - - - 0x0004 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - jtag_tck - 0 - - - spi0_rx - 1 - - - uart0_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_0 - 4 - - - sio_0 - 5 - - - pio0_0 - 6 - - - pio1_0 - 7 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO0_CTRL - 0x0000001f - - - 0x0008 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO1_STATUS - 0x00000000 - - - 0x000c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - jtag_tms - 0 - - - spi0_ss_n - 1 - - - uart0_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_0 - 4 - - - sio_1 - 5 - - - pio0_1 - 6 - - - pio1_1 - 7 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO1_CTRL - 0x0000001f - - - 0x0010 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO2_STATUS - 0x00000000 - - - 0x0014 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - jtag_tdi - 0 - - - spi0_sclk - 1 - - - uart0_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_1 - 4 - - - sio_2 - 5 - - - pio0_2 - 6 - - - pio1_2 - 7 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO2_CTRL - 0x0000001f - - - 0x0018 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO3_STATUS - 0x00000000 - - - 0x001c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - jtag_tdo - 0 - - - spi0_tx - 1 - - - uart0_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_1 - 4 - - - sio_3 - 5 - - - pio0_3 - 6 - - - pio1_3 - 7 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO3_CTRL - 0x0000001f - - - 0x0020 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO4_STATUS - 0x00000000 - - - 0x0024 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_rx - 1 - - - uart1_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_2 - 4 - - - sio_4 - 5 - - - pio0_4 - 6 - - - pio1_4 - 7 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO4_CTRL - 0x0000001f - - - 0x0028 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO5_STATUS - 0x00000000 - - - 0x002c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_ss_n - 1 - - - uart1_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_2 - 4 - - - sio_5 - 5 - - - pio0_5 - 6 - - - pio1_5 - 7 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO5_CTRL - 0x0000001f - - - 0x0030 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO6_STATUS - 0x00000000 - - - 0x0034 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_sclk - 1 - - - uart1_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_3 - 4 - - - sio_6 - 5 - - - pio0_6 - 6 - - - pio1_6 - 7 - - - usb_muxing_extphy_softcon - 8 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO6_CTRL - 0x0000001f - - - 0x0038 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO7_STATUS - 0x00000000 - - - 0x003c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_tx - 1 - - - uart1_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_3 - 4 - - - sio_7 - 5 - - - pio0_7 - 6 - - - pio1_7 - 7 - - - usb_muxing_extphy_oe_n - 8 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO7_CTRL - 0x0000001f - - - 0x0040 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO8_STATUS - 0x00000000 - - - 0x0044 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_rx - 1 - - - uart1_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_4 - 4 - - - sio_8 - 5 - - - pio0_8 - 6 - - - pio1_8 - 7 - - - usb_muxing_extphy_rcv - 8 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO8_CTRL - 0x0000001f - - - 0x0048 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO9_STATUS - 0x00000000 - - - 0x004c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_ss_n - 1 - - - uart1_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_4 - 4 - - - sio_9 - 5 - - - pio0_9 - 6 - - - pio1_9 - 7 - - - usb_muxing_extphy_vp - 8 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO9_CTRL - 0x0000001f - - - 0x0050 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO10_STATUS - 0x00000000 - - - 0x0054 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_sclk - 1 - - - uart1_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_5 - 4 - - - sio_10 - 5 - - - pio0_10 - 6 - - - pio1_10 - 7 - - - usb_muxing_extphy_vm - 8 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO10_CTRL - 0x0000001f - - - 0x0058 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO11_STATUS - 0x00000000 - - - 0x005c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_tx - 1 - - - uart1_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_5 - 4 - - - sio_11 - 5 - - - pio0_11 - 6 - - - pio1_11 - 7 - - - usb_muxing_extphy_suspnd - 8 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO11_CTRL - 0x0000001f - - - 0x0060 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO12_STATUS - 0x00000000 - - - 0x0064 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_rx - 1 - - - uart0_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_6 - 4 - - - sio_12 - 5 - - - pio0_12 - 6 - - - pio1_12 - 7 - - - usb_muxing_extphy_speed - 8 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO12_CTRL - 0x0000001f - - - 0x0068 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO13_STATUS - 0x00000000 - - - 0x006c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_ss_n - 1 - - - uart0_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_6 - 4 - - - sio_13 - 5 - - - pio0_13 - 6 - - - pio1_13 - 7 - - - usb_muxing_extphy_vpo - 8 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO13_CTRL - 0x0000001f - - - 0x0070 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO14_STATUS - 0x00000000 - - - 0x0074 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_sclk - 1 - - - uart0_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_7 - 4 - - - sio_14 - 5 - - - pio0_14 - 6 - - - pio1_14 - 7 - - - usb_muxing_extphy_vmo - 8 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO14_CTRL - 0x0000001f - - - 0x0078 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO15_STATUS - 0x00000000 - - - 0x007c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_tx - 1 - - - uart0_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_7 - 4 - - - sio_15 - 5 - - - pio0_15 - 6 - - - pio1_15 - 7 - - - usb_muxing_digital_dp - 8 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO15_CTRL - 0x0000001f - - - 0x0080 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO16_STATUS - 0x00000000 - - - 0x0084 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_rx - 1 - - - uart0_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_0 - 4 - - - sio_16 - 5 - - - pio0_16 - 6 - - - pio1_16 - 7 - - - usb_muxing_digital_dm - 8 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO16_CTRL - 0x0000001f - - - 0x0088 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO17_STATUS - 0x00000000 - - - 0x008c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_ss_n - 1 - - - uart0_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_0 - 4 - - - sio_17 - 5 - - - pio0_17 - 6 - - - pio1_17 - 7 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO17_CTRL - 0x0000001f - - - 0x0090 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO18_STATUS - 0x00000000 - - - 0x0094 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_sclk - 1 - - - uart0_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_1 - 4 - - - sio_18 - 5 - - - pio0_18 - 6 - - - pio1_18 - 7 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO18_CTRL - 0x0000001f - - - 0x0098 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO19_STATUS - 0x00000000 - - - 0x009c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_tx - 1 - - - uart0_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_1 - 4 - - - sio_19 - 5 - - - pio0_19 - 6 - - - pio1_19 - 7 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO19_CTRL - 0x0000001f - - - 0x00a0 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO20_STATUS - 0x00000000 - - - 0x00a4 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_rx - 1 - - - uart1_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_2 - 4 - - - sio_20 - 5 - - - pio0_20 - 6 - - - pio1_20 - 7 - - - clocks_gpin_0 - 8 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO20_CTRL - 0x0000001f - - - 0x00a8 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO21_STATUS - 0x00000000 - - - 0x00ac - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_ss_n - 1 - - - uart1_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_2 - 4 - - - sio_21 - 5 - - - pio0_21 - 6 - - - pio1_21 - 7 - - - clocks_gpout_0 - 8 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO21_CTRL - 0x0000001f - - - 0x00b0 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO22_STATUS - 0x00000000 - - - 0x00b4 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_sclk - 1 - - - uart1_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_3 - 4 - - - sio_22 - 5 - - - pio0_22 - 6 - - - pio1_22 - 7 - - - clocks_gpin_1 - 8 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO22_CTRL - 0x0000001f - - - 0x00b8 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO23_STATUS - 0x00000000 - - - 0x00bc - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi0_tx - 1 - - - uart1_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_3 - 4 - - - sio_23 - 5 - - - pio0_23 - 6 - - - pio1_23 - 7 - - - clocks_gpout_1 - 8 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO23_CTRL - 0x0000001f - - - 0x00c0 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO24_STATUS - 0x00000000 - - - 0x00c4 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_rx - 1 - - - uart1_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_4 - 4 - - - sio_24 - 5 - - - pio0_24 - 6 - - - pio1_24 - 7 - - - clocks_gpout_2 - 8 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO24_CTRL - 0x0000001f - - - 0x00c8 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO25_STATUS - 0x00000000 - - - 0x00cc - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_ss_n - 1 - - - uart1_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_4 - 4 - - - sio_25 - 5 - - - pio0_25 - 6 - - - pio1_25 - 7 - - - clocks_gpout_3 - 8 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO25_CTRL - 0x0000001f - - - 0x00d0 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO26_STATUS - 0x00000000 - - - 0x00d4 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_sclk - 1 - - - uart1_cts - 2 - - - i2c1_sda - 3 - - - pwm_a_5 - 4 - - - sio_26 - 5 - - - pio0_26 - 6 - - - pio1_26 - 7 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO26_CTRL - 0x0000001f - - - 0x00d8 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO27_STATUS - 0x00000000 - - - 0x00dc - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_tx - 1 - - - uart1_rts - 2 - - - i2c1_scl - 3 - - - pwm_b_5 - 4 - - - sio_27 - 5 - - - pio0_27 - 6 - - - pio1_27 - 7 - - - usb_muxing_overcurr_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO27_CTRL - 0x0000001f - - - 0x00e0 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO28_STATUS - 0x00000000 - - - 0x00e4 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_rx - 1 - - - uart0_tx - 2 - - - i2c0_sda - 3 - - - pwm_a_6 - 4 - - - sio_28 - 5 - - - pio0_28 - 6 - - - pio1_28 - 7 - - - usb_muxing_vbus_detect - 9 - - - null - 31 - - - FUNCSEL - - - GPIO28_CTRL - 0x0000001f - - - 0x00e8 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO29_STATUS - 0x00000000 - - - 0x00ec - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - spi1_ss_n - 1 - - - uart0_rx - 2 - - - i2c0_scl - 3 - - - pwm_b_6 - 4 - - - sio_29 - 5 - - - pio0_29 - 6 - - - pio1_29 - 7 - - - usb_muxing_vbus_en - 9 - - - null - 31 - - - FUNCSEL - - - GPIO29_CTRL - 0x0000001f - - - 0x00f0 - Raw Interrupts - - - read-write - [31:31] - oneToClear - GPIO7_EDGE_HIGH - - - read-write - [30:30] - oneToClear - GPIO7_EDGE_LOW - - - read-only - [29:29] - GPIO7_LEVEL_HIGH - - - read-only - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - oneToClear - GPIO6_EDGE_HIGH - - - read-write - [26:26] - oneToClear - GPIO6_EDGE_LOW - - - read-only - [25:25] - GPIO6_LEVEL_HIGH - - - read-only - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - oneToClear - GPIO5_EDGE_HIGH - - - read-write - [22:22] - oneToClear - GPIO5_EDGE_LOW - - - read-only - [21:21] - GPIO5_LEVEL_HIGH - - - read-only - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - oneToClear - GPIO4_EDGE_HIGH - - - read-write - [18:18] - oneToClear - GPIO4_EDGE_LOW - - - read-only - [17:17] - GPIO4_LEVEL_HIGH - - - read-only - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - oneToClear - GPIO3_EDGE_HIGH - - - read-write - [14:14] - oneToClear - GPIO3_EDGE_LOW - - - read-only - [13:13] - GPIO3_LEVEL_HIGH - - - read-only - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - oneToClear - GPIO2_EDGE_HIGH - - - read-write - [10:10] - oneToClear - GPIO2_EDGE_LOW - - - read-only - [9:9] - GPIO2_LEVEL_HIGH - - - read-only - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - oneToClear - GPIO1_EDGE_HIGH - - - read-write - [6:6] - oneToClear - GPIO1_EDGE_LOW - - - read-only - [5:5] - GPIO1_LEVEL_HIGH - - - read-only - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - oneToClear - GPIO0_EDGE_HIGH - - - read-write - [2:2] - oneToClear - GPIO0_EDGE_LOW - - - read-only - [1:1] - GPIO0_LEVEL_HIGH - - - read-only - [0:0] - GPIO0_LEVEL_LOW - - - INTR0 - 0x00000000 - - - 0x00f4 - Raw Interrupts - - - read-write - [31:31] - oneToClear - GPIO15_EDGE_HIGH - - - read-write - [30:30] - oneToClear - GPIO15_EDGE_LOW - - - read-only - [29:29] - GPIO15_LEVEL_HIGH - - - read-only - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - oneToClear - GPIO14_EDGE_HIGH - - - read-write - [26:26] - oneToClear - GPIO14_EDGE_LOW - - - read-only - [25:25] - GPIO14_LEVEL_HIGH - - - read-only - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - oneToClear - GPIO13_EDGE_HIGH - - - read-write - [22:22] - oneToClear - GPIO13_EDGE_LOW - - - read-only - [21:21] - GPIO13_LEVEL_HIGH - - - read-only - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - oneToClear - GPIO12_EDGE_HIGH - - - read-write - [18:18] - oneToClear - GPIO12_EDGE_LOW - - - read-only - [17:17] - GPIO12_LEVEL_HIGH - - - read-only - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - oneToClear - GPIO11_EDGE_HIGH - - - read-write - [14:14] - oneToClear - GPIO11_EDGE_LOW - - - read-only - [13:13] - GPIO11_LEVEL_HIGH - - - read-only - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - oneToClear - GPIO10_EDGE_HIGH - - - read-write - [10:10] - oneToClear - GPIO10_EDGE_LOW - - - read-only - [9:9] - GPIO10_LEVEL_HIGH - - - read-only - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - oneToClear - GPIO9_EDGE_HIGH - - - read-write - [6:6] - oneToClear - GPIO9_EDGE_LOW - - - read-only - [5:5] - GPIO9_LEVEL_HIGH - - - read-only - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - oneToClear - GPIO8_EDGE_HIGH - - - read-write - [2:2] - oneToClear - GPIO8_EDGE_LOW - - - read-only - [1:1] - GPIO8_LEVEL_HIGH - - - read-only - [0:0] - GPIO8_LEVEL_LOW - - - INTR1 - 0x00000000 - - - 0x00f8 - Raw Interrupts - - - read-write - [31:31] - oneToClear - GPIO23_EDGE_HIGH - - - read-write - [30:30] - oneToClear - GPIO23_EDGE_LOW - - - read-only - [29:29] - GPIO23_LEVEL_HIGH - - - read-only - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - oneToClear - GPIO22_EDGE_HIGH - - - read-write - [26:26] - oneToClear - GPIO22_EDGE_LOW - - - read-only - [25:25] - GPIO22_LEVEL_HIGH - - - read-only - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - oneToClear - GPIO21_EDGE_HIGH - - - read-write - [22:22] - oneToClear - GPIO21_EDGE_LOW - - - read-only - [21:21] - GPIO21_LEVEL_HIGH - - - read-only - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - oneToClear - GPIO20_EDGE_HIGH - - - read-write - [18:18] - oneToClear - GPIO20_EDGE_LOW - - - read-only - [17:17] - GPIO20_LEVEL_HIGH - - - read-only - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - oneToClear - GPIO19_EDGE_HIGH - - - read-write - [14:14] - oneToClear - GPIO19_EDGE_LOW - - - read-only - [13:13] - GPIO19_LEVEL_HIGH - - - read-only - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - oneToClear - GPIO18_EDGE_HIGH - - - read-write - [10:10] - oneToClear - GPIO18_EDGE_LOW - - - read-only - [9:9] - GPIO18_LEVEL_HIGH - - - read-only - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - oneToClear - GPIO17_EDGE_HIGH - - - read-write - [6:6] - oneToClear - GPIO17_EDGE_LOW - - - read-only - [5:5] - GPIO17_LEVEL_HIGH - - - read-only - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - oneToClear - GPIO16_EDGE_HIGH - - - read-write - [2:2] - oneToClear - GPIO16_EDGE_LOW - - - read-only - [1:1] - GPIO16_LEVEL_HIGH - - - read-only - [0:0] - GPIO16_LEVEL_LOW - - - INTR2 - 0x00000000 - - - 0x00fc - Raw Interrupts - - - read-write - [23:23] - oneToClear - GPIO29_EDGE_HIGH - - - read-write - [22:22] - oneToClear - GPIO29_EDGE_LOW - - - read-only - [21:21] - GPIO29_LEVEL_HIGH - - - read-only - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - oneToClear - GPIO28_EDGE_HIGH - - - read-write - [18:18] - oneToClear - GPIO28_EDGE_LOW - - - read-only - [17:17] - GPIO28_LEVEL_HIGH - - - read-only - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - oneToClear - GPIO27_EDGE_HIGH - - - read-write - [14:14] - oneToClear - GPIO27_EDGE_LOW - - - read-only - [13:13] - GPIO27_LEVEL_HIGH - - - read-only - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - oneToClear - GPIO26_EDGE_HIGH - - - read-write - [10:10] - oneToClear - GPIO26_EDGE_LOW - - - read-only - [9:9] - GPIO26_LEVEL_HIGH - - - read-only - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - oneToClear - GPIO25_EDGE_HIGH - - - read-write - [6:6] - oneToClear - GPIO25_EDGE_LOW - - - read-only - [5:5] - GPIO25_LEVEL_HIGH - - - read-only - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - oneToClear - GPIO24_EDGE_HIGH - - - read-write - [2:2] - oneToClear - GPIO24_EDGE_LOW - - - read-only - [1:1] - GPIO24_LEVEL_HIGH - - - read-only - [0:0] - GPIO24_LEVEL_LOW - - - INTR3 - 0x00000000 - - - 0x0100 - Interrupt Enable for proc0 - - - read-write - [31:31] - GPIO7_EDGE_HIGH - - - read-write - [30:30] - GPIO7_EDGE_LOW - - - read-write - [29:29] - GPIO7_LEVEL_HIGH - - - read-write - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - GPIO6_EDGE_HIGH - - - read-write - [26:26] - GPIO6_EDGE_LOW - - - read-write - [25:25] - GPIO6_LEVEL_HIGH - - - read-write - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - GPIO5_EDGE_HIGH - - - read-write - [22:22] - GPIO5_EDGE_LOW - - - read-write - [21:21] - GPIO5_LEVEL_HIGH - - - read-write - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - GPIO4_EDGE_HIGH - - - read-write - [18:18] - GPIO4_EDGE_LOW - - - read-write - [17:17] - GPIO4_LEVEL_HIGH - - - read-write - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - GPIO3_EDGE_HIGH - - - read-write - [14:14] - GPIO3_EDGE_LOW - - - read-write - [13:13] - GPIO3_LEVEL_HIGH - - - read-write - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - GPIO2_EDGE_HIGH - - - read-write - [10:10] - GPIO2_EDGE_LOW - - - read-write - [9:9] - GPIO2_LEVEL_HIGH - - - read-write - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - GPIO1_EDGE_HIGH - - - read-write - [6:6] - GPIO1_EDGE_LOW - - - read-write - [5:5] - GPIO1_LEVEL_HIGH - - - read-write - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - GPIO0_EDGE_HIGH - - - read-write - [2:2] - GPIO0_EDGE_LOW - - - read-write - [1:1] - GPIO0_LEVEL_HIGH - - - read-write - [0:0] - GPIO0_LEVEL_LOW - - - PROC0_INTE0 - 0x00000000 - - - 0x0104 - Interrupt Enable for proc0 - - - read-write - [31:31] - GPIO15_EDGE_HIGH - - - read-write - [30:30] - GPIO15_EDGE_LOW - - - read-write - [29:29] - GPIO15_LEVEL_HIGH - - - read-write - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - GPIO14_EDGE_HIGH - - - read-write - [26:26] - GPIO14_EDGE_LOW - - - read-write - [25:25] - GPIO14_LEVEL_HIGH - - - read-write - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - GPIO13_EDGE_HIGH - - - read-write - [22:22] - GPIO13_EDGE_LOW - - - read-write - [21:21] - GPIO13_LEVEL_HIGH - - - read-write - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - GPIO12_EDGE_HIGH - - - read-write - [18:18] - GPIO12_EDGE_LOW - - - read-write - [17:17] - GPIO12_LEVEL_HIGH - - - read-write - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - GPIO11_EDGE_HIGH - - - read-write - [14:14] - GPIO11_EDGE_LOW - - - read-write - [13:13] - GPIO11_LEVEL_HIGH - - - read-write - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - GPIO10_EDGE_HIGH - - - read-write - [10:10] - GPIO10_EDGE_LOW - - - read-write - [9:9] - GPIO10_LEVEL_HIGH - - - read-write - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - GPIO9_EDGE_HIGH - - - read-write - [6:6] - GPIO9_EDGE_LOW - - - read-write - [5:5] - GPIO9_LEVEL_HIGH - - - read-write - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - GPIO8_EDGE_HIGH - - - read-write - [2:2] - GPIO8_EDGE_LOW - - - read-write - [1:1] - GPIO8_LEVEL_HIGH - - - read-write - [0:0] - GPIO8_LEVEL_LOW - - - PROC0_INTE1 - 0x00000000 - - - 0x0108 - Interrupt Enable for proc0 - - - read-write - [31:31] - GPIO23_EDGE_HIGH - - - read-write - [30:30] - GPIO23_EDGE_LOW - - - read-write - [29:29] - GPIO23_LEVEL_HIGH - - - read-write - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - GPIO22_EDGE_HIGH - - - read-write - [26:26] - GPIO22_EDGE_LOW - - - read-write - [25:25] - GPIO22_LEVEL_HIGH - - - read-write - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - GPIO21_EDGE_HIGH - - - read-write - [22:22] - GPIO21_EDGE_LOW - - - read-write - [21:21] - GPIO21_LEVEL_HIGH - - - read-write - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - GPIO20_EDGE_HIGH - - - read-write - [18:18] - GPIO20_EDGE_LOW - - - read-write - [17:17] - GPIO20_LEVEL_HIGH - - - read-write - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - GPIO19_EDGE_HIGH - - - read-write - [14:14] - GPIO19_EDGE_LOW - - - read-write - [13:13] - GPIO19_LEVEL_HIGH - - - read-write - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - GPIO18_EDGE_HIGH - - - read-write - [10:10] - GPIO18_EDGE_LOW - - - read-write - [9:9] - GPIO18_LEVEL_HIGH - - - read-write - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - GPIO17_EDGE_HIGH - - - read-write - [6:6] - GPIO17_EDGE_LOW - - - read-write - [5:5] - GPIO17_LEVEL_HIGH - - - read-write - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - GPIO16_EDGE_HIGH - - - read-write - [2:2] - GPIO16_EDGE_LOW - - - read-write - [1:1] - GPIO16_LEVEL_HIGH - - - read-write - [0:0] - GPIO16_LEVEL_LOW - - - PROC0_INTE2 - 0x00000000 - - - 0x010c - Interrupt Enable for proc0 - - - read-write - [23:23] - GPIO29_EDGE_HIGH - - - read-write - [22:22] - GPIO29_EDGE_LOW - - - read-write - [21:21] - GPIO29_LEVEL_HIGH - - - read-write - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - GPIO28_EDGE_HIGH - - - read-write - [18:18] - GPIO28_EDGE_LOW - - - read-write - [17:17] - GPIO28_LEVEL_HIGH - - - read-write - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - GPIO27_EDGE_HIGH - - - read-write - [14:14] - GPIO27_EDGE_LOW - - - read-write - [13:13] - GPIO27_LEVEL_HIGH - - - read-write - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - GPIO26_EDGE_HIGH - - - read-write - [10:10] - GPIO26_EDGE_LOW - - - read-write - [9:9] - GPIO26_LEVEL_HIGH - - - read-write - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - GPIO25_EDGE_HIGH - - - read-write - [6:6] - GPIO25_EDGE_LOW - - - read-write - [5:5] - GPIO25_LEVEL_HIGH - - - read-write - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - GPIO24_EDGE_HIGH - - - read-write - [2:2] - GPIO24_EDGE_LOW - - - read-write - [1:1] - GPIO24_LEVEL_HIGH - - - read-write - [0:0] - GPIO24_LEVEL_LOW - - - PROC0_INTE3 - 0x00000000 - - - 0x0110 - Interrupt Force for proc0 - - - read-write - [31:31] - GPIO7_EDGE_HIGH - - - read-write - [30:30] - GPIO7_EDGE_LOW - - - read-write - [29:29] - GPIO7_LEVEL_HIGH - - - read-write - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - GPIO6_EDGE_HIGH - - - read-write - [26:26] - GPIO6_EDGE_LOW - - - read-write - [25:25] - GPIO6_LEVEL_HIGH - - - read-write - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - GPIO5_EDGE_HIGH - - - read-write - [22:22] - GPIO5_EDGE_LOW - - - read-write - [21:21] - GPIO5_LEVEL_HIGH - - - read-write - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - GPIO4_EDGE_HIGH - - - read-write - [18:18] - GPIO4_EDGE_LOW - - - read-write - [17:17] - GPIO4_LEVEL_HIGH - - - read-write - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - GPIO3_EDGE_HIGH - - - read-write - [14:14] - GPIO3_EDGE_LOW - - - read-write - [13:13] - GPIO3_LEVEL_HIGH - - - read-write - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - GPIO2_EDGE_HIGH - - - read-write - [10:10] - GPIO2_EDGE_LOW - - - read-write - [9:9] - GPIO2_LEVEL_HIGH - - - read-write - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - GPIO1_EDGE_HIGH - - - read-write - [6:6] - GPIO1_EDGE_LOW - - - read-write - [5:5] - GPIO1_LEVEL_HIGH - - - read-write - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - GPIO0_EDGE_HIGH - - - read-write - [2:2] - GPIO0_EDGE_LOW - - - read-write - [1:1] - GPIO0_LEVEL_HIGH - - - read-write - [0:0] - GPIO0_LEVEL_LOW - - - PROC0_INTF0 - 0x00000000 - - - 0x0114 - Interrupt Force for proc0 - - - read-write - [31:31] - GPIO15_EDGE_HIGH - - - read-write - [30:30] - GPIO15_EDGE_LOW - - - read-write - [29:29] - GPIO15_LEVEL_HIGH - - - read-write - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - GPIO14_EDGE_HIGH - - - read-write - [26:26] - GPIO14_EDGE_LOW - - - read-write - [25:25] - GPIO14_LEVEL_HIGH - - - read-write - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - GPIO13_EDGE_HIGH - - - read-write - [22:22] - GPIO13_EDGE_LOW - - - read-write - [21:21] - GPIO13_LEVEL_HIGH - - - read-write - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - GPIO12_EDGE_HIGH - - - read-write - [18:18] - GPIO12_EDGE_LOW - - - read-write - [17:17] - GPIO12_LEVEL_HIGH - - - read-write - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - GPIO11_EDGE_HIGH - - - read-write - [14:14] - GPIO11_EDGE_LOW - - - read-write - [13:13] - GPIO11_LEVEL_HIGH - - - read-write - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - GPIO10_EDGE_HIGH - - - read-write - [10:10] - GPIO10_EDGE_LOW - - - read-write - [9:9] - GPIO10_LEVEL_HIGH - - - read-write - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - GPIO9_EDGE_HIGH - - - read-write - [6:6] - GPIO9_EDGE_LOW - - - read-write - [5:5] - GPIO9_LEVEL_HIGH - - - read-write - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - GPIO8_EDGE_HIGH - - - read-write - [2:2] - GPIO8_EDGE_LOW - - - read-write - [1:1] - GPIO8_LEVEL_HIGH - - - read-write - [0:0] - GPIO8_LEVEL_LOW - - - PROC0_INTF1 - 0x00000000 - - - 0x0118 - Interrupt Force for proc0 - - - read-write - [31:31] - GPIO23_EDGE_HIGH - - - read-write - [30:30] - GPIO23_EDGE_LOW - - - read-write - [29:29] - GPIO23_LEVEL_HIGH - - - read-write - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - GPIO22_EDGE_HIGH - - - read-write - [26:26] - GPIO22_EDGE_LOW - - - read-write - [25:25] - GPIO22_LEVEL_HIGH - - - read-write - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - GPIO21_EDGE_HIGH - - - read-write - [22:22] - GPIO21_EDGE_LOW - - - read-write - [21:21] - GPIO21_LEVEL_HIGH - - - read-write - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - GPIO20_EDGE_HIGH - - - read-write - [18:18] - GPIO20_EDGE_LOW - - - read-write - [17:17] - GPIO20_LEVEL_HIGH - - - read-write - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - GPIO19_EDGE_HIGH - - - read-write - [14:14] - GPIO19_EDGE_LOW - - - read-write - [13:13] - GPIO19_LEVEL_HIGH - - - read-write - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - GPIO18_EDGE_HIGH - - - read-write - [10:10] - GPIO18_EDGE_LOW - - - read-write - [9:9] - GPIO18_LEVEL_HIGH - - - read-write - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - GPIO17_EDGE_HIGH - - - read-write - [6:6] - GPIO17_EDGE_LOW - - - read-write - [5:5] - GPIO17_LEVEL_HIGH - - - read-write - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - GPIO16_EDGE_HIGH - - - read-write - [2:2] - GPIO16_EDGE_LOW - - - read-write - [1:1] - GPIO16_LEVEL_HIGH - - - read-write - [0:0] - GPIO16_LEVEL_LOW - - - PROC0_INTF2 - 0x00000000 - - - 0x011c - Interrupt Force for proc0 - - - read-write - [23:23] - GPIO29_EDGE_HIGH - - - read-write - [22:22] - GPIO29_EDGE_LOW - - - read-write - [21:21] - GPIO29_LEVEL_HIGH - - - read-write - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - GPIO28_EDGE_HIGH - - - read-write - [18:18] - GPIO28_EDGE_LOW - - - read-write - [17:17] - GPIO28_LEVEL_HIGH - - - read-write - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - GPIO27_EDGE_HIGH - - - read-write - [14:14] - GPIO27_EDGE_LOW - - - read-write - [13:13] - GPIO27_LEVEL_HIGH - - - read-write - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - GPIO26_EDGE_HIGH - - - read-write - [10:10] - GPIO26_EDGE_LOW - - - read-write - [9:9] - GPIO26_LEVEL_HIGH - - - read-write - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - GPIO25_EDGE_HIGH - - - read-write - [6:6] - GPIO25_EDGE_LOW - - - read-write - [5:5] - GPIO25_LEVEL_HIGH - - - read-write - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - GPIO24_EDGE_HIGH - - - read-write - [2:2] - GPIO24_EDGE_LOW - - - read-write - [1:1] - GPIO24_LEVEL_HIGH - - - read-write - [0:0] - GPIO24_LEVEL_LOW - - - PROC0_INTF3 - 0x00000000 - - - 0x0120 - Interrupt status after masking & forcing for proc0 - - - read-only - [31:31] - GPIO7_EDGE_HIGH - - - read-only - [30:30] - GPIO7_EDGE_LOW - - - read-only - [29:29] - GPIO7_LEVEL_HIGH - - - read-only - [28:28] - GPIO7_LEVEL_LOW - - - read-only - [27:27] - GPIO6_EDGE_HIGH - - - read-only - [26:26] - GPIO6_EDGE_LOW - - - read-only - [25:25] - GPIO6_LEVEL_HIGH - - - read-only - [24:24] - GPIO6_LEVEL_LOW - - - read-only - [23:23] - GPIO5_EDGE_HIGH - - - read-only - [22:22] - GPIO5_EDGE_LOW - - - read-only - [21:21] - GPIO5_LEVEL_HIGH - - - read-only - [20:20] - GPIO5_LEVEL_LOW - - - read-only - [19:19] - GPIO4_EDGE_HIGH - - - read-only - [18:18] - GPIO4_EDGE_LOW - - - read-only - [17:17] - GPIO4_LEVEL_HIGH - - - read-only - [16:16] - GPIO4_LEVEL_LOW - - - read-only - [15:15] - GPIO3_EDGE_HIGH - - - read-only - [14:14] - GPIO3_EDGE_LOW - - - read-only - [13:13] - GPIO3_LEVEL_HIGH - - - read-only - [12:12] - GPIO3_LEVEL_LOW - - - read-only - [11:11] - GPIO2_EDGE_HIGH - - - read-only - [10:10] - GPIO2_EDGE_LOW - - - read-only - [9:9] - GPIO2_LEVEL_HIGH - - - read-only - [8:8] - GPIO2_LEVEL_LOW - - - read-only - [7:7] - GPIO1_EDGE_HIGH - - - read-only - [6:6] - GPIO1_EDGE_LOW - - - read-only - [5:5] - GPIO1_LEVEL_HIGH - - - read-only - [4:4] - GPIO1_LEVEL_LOW - - - read-only - [3:3] - GPIO0_EDGE_HIGH - - - read-only - [2:2] - GPIO0_EDGE_LOW - - - read-only - [1:1] - GPIO0_LEVEL_HIGH - - - read-only - [0:0] - GPIO0_LEVEL_LOW - - - PROC0_INTS0 - 0x00000000 - - - 0x0124 - Interrupt status after masking & forcing for proc0 - - - read-only - [31:31] - GPIO15_EDGE_HIGH - - - read-only - [30:30] - GPIO15_EDGE_LOW - - - read-only - [29:29] - GPIO15_LEVEL_HIGH - - - read-only - [28:28] - GPIO15_LEVEL_LOW - - - read-only - [27:27] - GPIO14_EDGE_HIGH - - - read-only - [26:26] - GPIO14_EDGE_LOW - - - read-only - [25:25] - GPIO14_LEVEL_HIGH - - - read-only - [24:24] - GPIO14_LEVEL_LOW - - - read-only - [23:23] - GPIO13_EDGE_HIGH - - - read-only - [22:22] - GPIO13_EDGE_LOW - - - read-only - [21:21] - GPIO13_LEVEL_HIGH - - - read-only - [20:20] - GPIO13_LEVEL_LOW - - - read-only - [19:19] - GPIO12_EDGE_HIGH - - - read-only - [18:18] - GPIO12_EDGE_LOW - - - read-only - [17:17] - GPIO12_LEVEL_HIGH - - - read-only - [16:16] - GPIO12_LEVEL_LOW - - - read-only - [15:15] - GPIO11_EDGE_HIGH - - - read-only - [14:14] - GPIO11_EDGE_LOW - - - read-only - [13:13] - GPIO11_LEVEL_HIGH - - - read-only - [12:12] - GPIO11_LEVEL_LOW - - - read-only - [11:11] - GPIO10_EDGE_HIGH - - - read-only - [10:10] - GPIO10_EDGE_LOW - - - read-only - [9:9] - GPIO10_LEVEL_HIGH - - - read-only - [8:8] - GPIO10_LEVEL_LOW - - - read-only - [7:7] - GPIO9_EDGE_HIGH - - - read-only - [6:6] - GPIO9_EDGE_LOW - - - read-only - [5:5] - GPIO9_LEVEL_HIGH - - - read-only - [4:4] - GPIO9_LEVEL_LOW - - - read-only - [3:3] - GPIO8_EDGE_HIGH - - - read-only - [2:2] - GPIO8_EDGE_LOW - - - read-only - [1:1] - GPIO8_LEVEL_HIGH - - - read-only - [0:0] - GPIO8_LEVEL_LOW - - - PROC0_INTS1 - 0x00000000 - - - 0x0128 - Interrupt status after masking & forcing for proc0 - - - read-only - [31:31] - GPIO23_EDGE_HIGH - - - read-only - [30:30] - GPIO23_EDGE_LOW - - - read-only - [29:29] - GPIO23_LEVEL_HIGH - - - read-only - [28:28] - GPIO23_LEVEL_LOW - - - read-only - [27:27] - GPIO22_EDGE_HIGH - - - read-only - [26:26] - GPIO22_EDGE_LOW - - - read-only - [25:25] - GPIO22_LEVEL_HIGH - - - read-only - [24:24] - GPIO22_LEVEL_LOW - - - read-only - [23:23] - GPIO21_EDGE_HIGH - - - read-only - [22:22] - GPIO21_EDGE_LOW - - - read-only - [21:21] - GPIO21_LEVEL_HIGH - - - read-only - [20:20] - GPIO21_LEVEL_LOW - - - read-only - [19:19] - GPIO20_EDGE_HIGH - - - read-only - [18:18] - GPIO20_EDGE_LOW - - - read-only - [17:17] - GPIO20_LEVEL_HIGH - - - read-only - [16:16] - GPIO20_LEVEL_LOW - - - read-only - [15:15] - GPIO19_EDGE_HIGH - - - read-only - [14:14] - GPIO19_EDGE_LOW - - - read-only - [13:13] - GPIO19_LEVEL_HIGH - - - read-only - [12:12] - GPIO19_LEVEL_LOW - - - read-only - [11:11] - GPIO18_EDGE_HIGH - - - read-only - [10:10] - GPIO18_EDGE_LOW - - - read-only - [9:9] - GPIO18_LEVEL_HIGH - - - read-only - [8:8] - GPIO18_LEVEL_LOW - - - read-only - [7:7] - GPIO17_EDGE_HIGH - - - read-only - [6:6] - GPIO17_EDGE_LOW - - - read-only - [5:5] - GPIO17_LEVEL_HIGH - - - read-only - [4:4] - GPIO17_LEVEL_LOW - - - read-only - [3:3] - GPIO16_EDGE_HIGH - - - read-only - [2:2] - GPIO16_EDGE_LOW - - - read-only - [1:1] - GPIO16_LEVEL_HIGH - - - read-only - [0:0] - GPIO16_LEVEL_LOW - - - PROC0_INTS2 - 0x00000000 - - - 0x012c - Interrupt status after masking & forcing for proc0 - - - read-only - [23:23] - GPIO29_EDGE_HIGH - - - read-only - [22:22] - GPIO29_EDGE_LOW - - - read-only - [21:21] - GPIO29_LEVEL_HIGH - - - read-only - [20:20] - GPIO29_LEVEL_LOW - - - read-only - [19:19] - GPIO28_EDGE_HIGH - - - read-only - [18:18] - GPIO28_EDGE_LOW - - - read-only - [17:17] - GPIO28_LEVEL_HIGH - - - read-only - [16:16] - GPIO28_LEVEL_LOW - - - read-only - [15:15] - GPIO27_EDGE_HIGH - - - read-only - [14:14] - GPIO27_EDGE_LOW - - - read-only - [13:13] - GPIO27_LEVEL_HIGH - - - read-only - [12:12] - GPIO27_LEVEL_LOW - - - read-only - [11:11] - GPIO26_EDGE_HIGH - - - read-only - [10:10] - GPIO26_EDGE_LOW - - - read-only - [9:9] - GPIO26_LEVEL_HIGH - - - read-only - [8:8] - GPIO26_LEVEL_LOW - - - read-only - [7:7] - GPIO25_EDGE_HIGH - - - read-only - [6:6] - GPIO25_EDGE_LOW - - - read-only - [5:5] - GPIO25_LEVEL_HIGH - - - read-only - [4:4] - GPIO25_LEVEL_LOW - - - read-only - [3:3] - GPIO24_EDGE_HIGH - - - read-only - [2:2] - GPIO24_EDGE_LOW - - - read-only - [1:1] - GPIO24_LEVEL_HIGH - - - read-only - [0:0] - GPIO24_LEVEL_LOW - - - PROC0_INTS3 - 0x00000000 - - - 0x0130 - Interrupt Enable for proc1 - - - read-write - [31:31] - GPIO7_EDGE_HIGH - - - read-write - [30:30] - GPIO7_EDGE_LOW - - - read-write - [29:29] - GPIO7_LEVEL_HIGH - - - read-write - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - GPIO6_EDGE_HIGH - - - read-write - [26:26] - GPIO6_EDGE_LOW - - - read-write - [25:25] - GPIO6_LEVEL_HIGH - - - read-write - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - GPIO5_EDGE_HIGH - - - read-write - [22:22] - GPIO5_EDGE_LOW - - - read-write - [21:21] - GPIO5_LEVEL_HIGH - - - read-write - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - GPIO4_EDGE_HIGH - - - read-write - [18:18] - GPIO4_EDGE_LOW - - - read-write - [17:17] - GPIO4_LEVEL_HIGH - - - read-write - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - GPIO3_EDGE_HIGH - - - read-write - [14:14] - GPIO3_EDGE_LOW - - - read-write - [13:13] - GPIO3_LEVEL_HIGH - - - read-write - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - GPIO2_EDGE_HIGH - - - read-write - [10:10] - GPIO2_EDGE_LOW - - - read-write - [9:9] - GPIO2_LEVEL_HIGH - - - read-write - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - GPIO1_EDGE_HIGH - - - read-write - [6:6] - GPIO1_EDGE_LOW - - - read-write - [5:5] - GPIO1_LEVEL_HIGH - - - read-write - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - GPIO0_EDGE_HIGH - - - read-write - [2:2] - GPIO0_EDGE_LOW - - - read-write - [1:1] - GPIO0_LEVEL_HIGH - - - read-write - [0:0] - GPIO0_LEVEL_LOW - - - PROC1_INTE0 - 0x00000000 - - - 0x0134 - Interrupt Enable for proc1 - - - read-write - [31:31] - GPIO15_EDGE_HIGH - - - read-write - [30:30] - GPIO15_EDGE_LOW - - - read-write - [29:29] - GPIO15_LEVEL_HIGH - - - read-write - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - GPIO14_EDGE_HIGH - - - read-write - [26:26] - GPIO14_EDGE_LOW - - - read-write - [25:25] - GPIO14_LEVEL_HIGH - - - read-write - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - GPIO13_EDGE_HIGH - - - read-write - [22:22] - GPIO13_EDGE_LOW - - - read-write - [21:21] - GPIO13_LEVEL_HIGH - - - read-write - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - GPIO12_EDGE_HIGH - - - read-write - [18:18] - GPIO12_EDGE_LOW - - - read-write - [17:17] - GPIO12_LEVEL_HIGH - - - read-write - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - GPIO11_EDGE_HIGH - - - read-write - [14:14] - GPIO11_EDGE_LOW - - - read-write - [13:13] - GPIO11_LEVEL_HIGH - - - read-write - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - GPIO10_EDGE_HIGH - - - read-write - [10:10] - GPIO10_EDGE_LOW - - - read-write - [9:9] - GPIO10_LEVEL_HIGH - - - read-write - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - GPIO9_EDGE_HIGH - - - read-write - [6:6] - GPIO9_EDGE_LOW - - - read-write - [5:5] - GPIO9_LEVEL_HIGH - - - read-write - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - GPIO8_EDGE_HIGH - - - read-write - [2:2] - GPIO8_EDGE_LOW - - - read-write - [1:1] - GPIO8_LEVEL_HIGH - - - read-write - [0:0] - GPIO8_LEVEL_LOW - - - PROC1_INTE1 - 0x00000000 - - - 0x0138 - Interrupt Enable for proc1 - - - read-write - [31:31] - GPIO23_EDGE_HIGH - - - read-write - [30:30] - GPIO23_EDGE_LOW - - - read-write - [29:29] - GPIO23_LEVEL_HIGH - - - read-write - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - GPIO22_EDGE_HIGH - - - read-write - [26:26] - GPIO22_EDGE_LOW - - - read-write - [25:25] - GPIO22_LEVEL_HIGH - - - read-write - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - GPIO21_EDGE_HIGH - - - read-write - [22:22] - GPIO21_EDGE_LOW - - - read-write - [21:21] - GPIO21_LEVEL_HIGH - - - read-write - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - GPIO20_EDGE_HIGH - - - read-write - [18:18] - GPIO20_EDGE_LOW - - - read-write - [17:17] - GPIO20_LEVEL_HIGH - - - read-write - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - GPIO19_EDGE_HIGH - - - read-write - [14:14] - GPIO19_EDGE_LOW - - - read-write - [13:13] - GPIO19_LEVEL_HIGH - - - read-write - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - GPIO18_EDGE_HIGH - - - read-write - [10:10] - GPIO18_EDGE_LOW - - - read-write - [9:9] - GPIO18_LEVEL_HIGH - - - read-write - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - GPIO17_EDGE_HIGH - - - read-write - [6:6] - GPIO17_EDGE_LOW - - - read-write - [5:5] - GPIO17_LEVEL_HIGH - - - read-write - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - GPIO16_EDGE_HIGH - - - read-write - [2:2] - GPIO16_EDGE_LOW - - - read-write - [1:1] - GPIO16_LEVEL_HIGH - - - read-write - [0:0] - GPIO16_LEVEL_LOW - - - PROC1_INTE2 - 0x00000000 - - - 0x013c - Interrupt Enable for proc1 - - - read-write - [23:23] - GPIO29_EDGE_HIGH - - - read-write - [22:22] - GPIO29_EDGE_LOW - - - read-write - [21:21] - GPIO29_LEVEL_HIGH - - - read-write - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - GPIO28_EDGE_HIGH - - - read-write - [18:18] - GPIO28_EDGE_LOW - - - read-write - [17:17] - GPIO28_LEVEL_HIGH - - - read-write - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - GPIO27_EDGE_HIGH - - - read-write - [14:14] - GPIO27_EDGE_LOW - - - read-write - [13:13] - GPIO27_LEVEL_HIGH - - - read-write - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - GPIO26_EDGE_HIGH - - - read-write - [10:10] - GPIO26_EDGE_LOW - - - read-write - [9:9] - GPIO26_LEVEL_HIGH - - - read-write - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - GPIO25_EDGE_HIGH - - - read-write - [6:6] - GPIO25_EDGE_LOW - - - read-write - [5:5] - GPIO25_LEVEL_HIGH - - - read-write - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - GPIO24_EDGE_HIGH - - - read-write - [2:2] - GPIO24_EDGE_LOW - - - read-write - [1:1] - GPIO24_LEVEL_HIGH - - - read-write - [0:0] - GPIO24_LEVEL_LOW - - - PROC1_INTE3 - 0x00000000 - - - 0x0140 - Interrupt Force for proc1 - - - read-write - [31:31] - GPIO7_EDGE_HIGH - - - read-write - [30:30] - GPIO7_EDGE_LOW - - - read-write - [29:29] - GPIO7_LEVEL_HIGH - - - read-write - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - GPIO6_EDGE_HIGH - - - read-write - [26:26] - GPIO6_EDGE_LOW - - - read-write - [25:25] - GPIO6_LEVEL_HIGH - - - read-write - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - GPIO5_EDGE_HIGH - - - read-write - [22:22] - GPIO5_EDGE_LOW - - - read-write - [21:21] - GPIO5_LEVEL_HIGH - - - read-write - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - GPIO4_EDGE_HIGH - - - read-write - [18:18] - GPIO4_EDGE_LOW - - - read-write - [17:17] - GPIO4_LEVEL_HIGH - - - read-write - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - GPIO3_EDGE_HIGH - - - read-write - [14:14] - GPIO3_EDGE_LOW - - - read-write - [13:13] - GPIO3_LEVEL_HIGH - - - read-write - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - GPIO2_EDGE_HIGH - - - read-write - [10:10] - GPIO2_EDGE_LOW - - - read-write - [9:9] - GPIO2_LEVEL_HIGH - - - read-write - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - GPIO1_EDGE_HIGH - - - read-write - [6:6] - GPIO1_EDGE_LOW - - - read-write - [5:5] - GPIO1_LEVEL_HIGH - - - read-write - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - GPIO0_EDGE_HIGH - - - read-write - [2:2] - GPIO0_EDGE_LOW - - - read-write - [1:1] - GPIO0_LEVEL_HIGH - - - read-write - [0:0] - GPIO0_LEVEL_LOW - - - PROC1_INTF0 - 0x00000000 - - - 0x0144 - Interrupt Force for proc1 - - - read-write - [31:31] - GPIO15_EDGE_HIGH - - - read-write - [30:30] - GPIO15_EDGE_LOW - - - read-write - [29:29] - GPIO15_LEVEL_HIGH - - - read-write - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - GPIO14_EDGE_HIGH - - - read-write - [26:26] - GPIO14_EDGE_LOW - - - read-write - [25:25] - GPIO14_LEVEL_HIGH - - - read-write - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - GPIO13_EDGE_HIGH - - - read-write - [22:22] - GPIO13_EDGE_LOW - - - read-write - [21:21] - GPIO13_LEVEL_HIGH - - - read-write - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - GPIO12_EDGE_HIGH - - - read-write - [18:18] - GPIO12_EDGE_LOW - - - read-write - [17:17] - GPIO12_LEVEL_HIGH - - - read-write - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - GPIO11_EDGE_HIGH - - - read-write - [14:14] - GPIO11_EDGE_LOW - - - read-write - [13:13] - GPIO11_LEVEL_HIGH - - - read-write - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - GPIO10_EDGE_HIGH - - - read-write - [10:10] - GPIO10_EDGE_LOW - - - read-write - [9:9] - GPIO10_LEVEL_HIGH - - - read-write - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - GPIO9_EDGE_HIGH - - - read-write - [6:6] - GPIO9_EDGE_LOW - - - read-write - [5:5] - GPIO9_LEVEL_HIGH - - - read-write - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - GPIO8_EDGE_HIGH - - - read-write - [2:2] - GPIO8_EDGE_LOW - - - read-write - [1:1] - GPIO8_LEVEL_HIGH - - - read-write - [0:0] - GPIO8_LEVEL_LOW - - - PROC1_INTF1 - 0x00000000 - - - 0x0148 - Interrupt Force for proc1 - - - read-write - [31:31] - GPIO23_EDGE_HIGH - - - read-write - [30:30] - GPIO23_EDGE_LOW - - - read-write - [29:29] - GPIO23_LEVEL_HIGH - - - read-write - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - GPIO22_EDGE_HIGH - - - read-write - [26:26] - GPIO22_EDGE_LOW - - - read-write - [25:25] - GPIO22_LEVEL_HIGH - - - read-write - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - GPIO21_EDGE_HIGH - - - read-write - [22:22] - GPIO21_EDGE_LOW - - - read-write - [21:21] - GPIO21_LEVEL_HIGH - - - read-write - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - GPIO20_EDGE_HIGH - - - read-write - [18:18] - GPIO20_EDGE_LOW - - - read-write - [17:17] - GPIO20_LEVEL_HIGH - - - read-write - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - GPIO19_EDGE_HIGH - - - read-write - [14:14] - GPIO19_EDGE_LOW - - - read-write - [13:13] - GPIO19_LEVEL_HIGH - - - read-write - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - GPIO18_EDGE_HIGH - - - read-write - [10:10] - GPIO18_EDGE_LOW - - - read-write - [9:9] - GPIO18_LEVEL_HIGH - - - read-write - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - GPIO17_EDGE_HIGH - - - read-write - [6:6] - GPIO17_EDGE_LOW - - - read-write - [5:5] - GPIO17_LEVEL_HIGH - - - read-write - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - GPIO16_EDGE_HIGH - - - read-write - [2:2] - GPIO16_EDGE_LOW - - - read-write - [1:1] - GPIO16_LEVEL_HIGH - - - read-write - [0:0] - GPIO16_LEVEL_LOW - - - PROC1_INTF2 - 0x00000000 - - - 0x014c - Interrupt Force for proc1 - - - read-write - [23:23] - GPIO29_EDGE_HIGH - - - read-write - [22:22] - GPIO29_EDGE_LOW - - - read-write - [21:21] - GPIO29_LEVEL_HIGH - - - read-write - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - GPIO28_EDGE_HIGH - - - read-write - [18:18] - GPIO28_EDGE_LOW - - - read-write - [17:17] - GPIO28_LEVEL_HIGH - - - read-write - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - GPIO27_EDGE_HIGH - - - read-write - [14:14] - GPIO27_EDGE_LOW - - - read-write - [13:13] - GPIO27_LEVEL_HIGH - - - read-write - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - GPIO26_EDGE_HIGH - - - read-write - [10:10] - GPIO26_EDGE_LOW - - - read-write - [9:9] - GPIO26_LEVEL_HIGH - - - read-write - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - GPIO25_EDGE_HIGH - - - read-write - [6:6] - GPIO25_EDGE_LOW - - - read-write - [5:5] - GPIO25_LEVEL_HIGH - - - read-write - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - GPIO24_EDGE_HIGH - - - read-write - [2:2] - GPIO24_EDGE_LOW - - - read-write - [1:1] - GPIO24_LEVEL_HIGH - - - read-write - [0:0] - GPIO24_LEVEL_LOW - - - PROC1_INTF3 - 0x00000000 - - - 0x0150 - Interrupt status after masking & forcing for proc1 - - - read-only - [31:31] - GPIO7_EDGE_HIGH - - - read-only - [30:30] - GPIO7_EDGE_LOW - - - read-only - [29:29] - GPIO7_LEVEL_HIGH - - - read-only - [28:28] - GPIO7_LEVEL_LOW - - - read-only - [27:27] - GPIO6_EDGE_HIGH - - - read-only - [26:26] - GPIO6_EDGE_LOW - - - read-only - [25:25] - GPIO6_LEVEL_HIGH - - - read-only - [24:24] - GPIO6_LEVEL_LOW - - - read-only - [23:23] - GPIO5_EDGE_HIGH - - - read-only - [22:22] - GPIO5_EDGE_LOW - - - read-only - [21:21] - GPIO5_LEVEL_HIGH - - - read-only - [20:20] - GPIO5_LEVEL_LOW - - - read-only - [19:19] - GPIO4_EDGE_HIGH - - - read-only - [18:18] - GPIO4_EDGE_LOW - - - read-only - [17:17] - GPIO4_LEVEL_HIGH - - - read-only - [16:16] - GPIO4_LEVEL_LOW - - - read-only - [15:15] - GPIO3_EDGE_HIGH - - - read-only - [14:14] - GPIO3_EDGE_LOW - - - read-only - [13:13] - GPIO3_LEVEL_HIGH - - - read-only - [12:12] - GPIO3_LEVEL_LOW - - - read-only - [11:11] - GPIO2_EDGE_HIGH - - - read-only - [10:10] - GPIO2_EDGE_LOW - - - read-only - [9:9] - GPIO2_LEVEL_HIGH - - - read-only - [8:8] - GPIO2_LEVEL_LOW - - - read-only - [7:7] - GPIO1_EDGE_HIGH - - - read-only - [6:6] - GPIO1_EDGE_LOW - - - read-only - [5:5] - GPIO1_LEVEL_HIGH - - - read-only - [4:4] - GPIO1_LEVEL_LOW - - - read-only - [3:3] - GPIO0_EDGE_HIGH - - - read-only - [2:2] - GPIO0_EDGE_LOW - - - read-only - [1:1] - GPIO0_LEVEL_HIGH - - - read-only - [0:0] - GPIO0_LEVEL_LOW - - - PROC1_INTS0 - 0x00000000 - - - 0x0154 - Interrupt status after masking & forcing for proc1 - - - read-only - [31:31] - GPIO15_EDGE_HIGH - - - read-only - [30:30] - GPIO15_EDGE_LOW - - - read-only - [29:29] - GPIO15_LEVEL_HIGH - - - read-only - [28:28] - GPIO15_LEVEL_LOW - - - read-only - [27:27] - GPIO14_EDGE_HIGH - - - read-only - [26:26] - GPIO14_EDGE_LOW - - - read-only - [25:25] - GPIO14_LEVEL_HIGH - - - read-only - [24:24] - GPIO14_LEVEL_LOW - - - read-only - [23:23] - GPIO13_EDGE_HIGH - - - read-only - [22:22] - GPIO13_EDGE_LOW - - - read-only - [21:21] - GPIO13_LEVEL_HIGH - - - read-only - [20:20] - GPIO13_LEVEL_LOW - - - read-only - [19:19] - GPIO12_EDGE_HIGH - - - read-only - [18:18] - GPIO12_EDGE_LOW - - - read-only - [17:17] - GPIO12_LEVEL_HIGH - - - read-only - [16:16] - GPIO12_LEVEL_LOW - - - read-only - [15:15] - GPIO11_EDGE_HIGH - - - read-only - [14:14] - GPIO11_EDGE_LOW - - - read-only - [13:13] - GPIO11_LEVEL_HIGH - - - read-only - [12:12] - GPIO11_LEVEL_LOW - - - read-only - [11:11] - GPIO10_EDGE_HIGH - - - read-only - [10:10] - GPIO10_EDGE_LOW - - - read-only - [9:9] - GPIO10_LEVEL_HIGH - - - read-only - [8:8] - GPIO10_LEVEL_LOW - - - read-only - [7:7] - GPIO9_EDGE_HIGH - - - read-only - [6:6] - GPIO9_EDGE_LOW - - - read-only - [5:5] - GPIO9_LEVEL_HIGH - - - read-only - [4:4] - GPIO9_LEVEL_LOW - - - read-only - [3:3] - GPIO8_EDGE_HIGH - - - read-only - [2:2] - GPIO8_EDGE_LOW - - - read-only - [1:1] - GPIO8_LEVEL_HIGH - - - read-only - [0:0] - GPIO8_LEVEL_LOW - - - PROC1_INTS1 - 0x00000000 - - - 0x0158 - Interrupt status after masking & forcing for proc1 - - - read-only - [31:31] - GPIO23_EDGE_HIGH - - - read-only - [30:30] - GPIO23_EDGE_LOW - - - read-only - [29:29] - GPIO23_LEVEL_HIGH - - - read-only - [28:28] - GPIO23_LEVEL_LOW - - - read-only - [27:27] - GPIO22_EDGE_HIGH - - - read-only - [26:26] - GPIO22_EDGE_LOW - - - read-only - [25:25] - GPIO22_LEVEL_HIGH - - - read-only - [24:24] - GPIO22_LEVEL_LOW - - - read-only - [23:23] - GPIO21_EDGE_HIGH - - - read-only - [22:22] - GPIO21_EDGE_LOW - - - read-only - [21:21] - GPIO21_LEVEL_HIGH - - - read-only - [20:20] - GPIO21_LEVEL_LOW - - - read-only - [19:19] - GPIO20_EDGE_HIGH - - - read-only - [18:18] - GPIO20_EDGE_LOW - - - read-only - [17:17] - GPIO20_LEVEL_HIGH - - - read-only - [16:16] - GPIO20_LEVEL_LOW - - - read-only - [15:15] - GPIO19_EDGE_HIGH - - - read-only - [14:14] - GPIO19_EDGE_LOW - - - read-only - [13:13] - GPIO19_LEVEL_HIGH - - - read-only - [12:12] - GPIO19_LEVEL_LOW - - - read-only - [11:11] - GPIO18_EDGE_HIGH - - - read-only - [10:10] - GPIO18_EDGE_LOW - - - read-only - [9:9] - GPIO18_LEVEL_HIGH - - - read-only - [8:8] - GPIO18_LEVEL_LOW - - - read-only - [7:7] - GPIO17_EDGE_HIGH - - - read-only - [6:6] - GPIO17_EDGE_LOW - - - read-only - [5:5] - GPIO17_LEVEL_HIGH - - - read-only - [4:4] - GPIO17_LEVEL_LOW - - - read-only - [3:3] - GPIO16_EDGE_HIGH - - - read-only - [2:2] - GPIO16_EDGE_LOW - - - read-only - [1:1] - GPIO16_LEVEL_HIGH - - - read-only - [0:0] - GPIO16_LEVEL_LOW - - - PROC1_INTS2 - 0x00000000 - - - 0x015c - Interrupt status after masking & forcing for proc1 - - - read-only - [23:23] - GPIO29_EDGE_HIGH - - - read-only - [22:22] - GPIO29_EDGE_LOW - - - read-only - [21:21] - GPIO29_LEVEL_HIGH - - - read-only - [20:20] - GPIO29_LEVEL_LOW - - - read-only - [19:19] - GPIO28_EDGE_HIGH - - - read-only - [18:18] - GPIO28_EDGE_LOW - - - read-only - [17:17] - GPIO28_LEVEL_HIGH - - - read-only - [16:16] - GPIO28_LEVEL_LOW - - - read-only - [15:15] - GPIO27_EDGE_HIGH - - - read-only - [14:14] - GPIO27_EDGE_LOW - - - read-only - [13:13] - GPIO27_LEVEL_HIGH - - - read-only - [12:12] - GPIO27_LEVEL_LOW - - - read-only - [11:11] - GPIO26_EDGE_HIGH - - - read-only - [10:10] - GPIO26_EDGE_LOW - - - read-only - [9:9] - GPIO26_LEVEL_HIGH - - - read-only - [8:8] - GPIO26_LEVEL_LOW - - - read-only - [7:7] - GPIO25_EDGE_HIGH - - - read-only - [6:6] - GPIO25_EDGE_LOW - - - read-only - [5:5] - GPIO25_LEVEL_HIGH - - - read-only - [4:4] - GPIO25_LEVEL_LOW - - - read-only - [3:3] - GPIO24_EDGE_HIGH - - - read-only - [2:2] - GPIO24_EDGE_LOW - - - read-only - [1:1] - GPIO24_LEVEL_HIGH - - - read-only - [0:0] - GPIO24_LEVEL_LOW - - - PROC1_INTS3 - 0x00000000 - - - 0x0160 - Interrupt Enable for dormant_wake - - - read-write - [31:31] - GPIO7_EDGE_HIGH - - - read-write - [30:30] - GPIO7_EDGE_LOW - - - read-write - [29:29] - GPIO7_LEVEL_HIGH - - - read-write - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - GPIO6_EDGE_HIGH - - - read-write - [26:26] - GPIO6_EDGE_LOW - - - read-write - [25:25] - GPIO6_LEVEL_HIGH - - - read-write - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - GPIO5_EDGE_HIGH - - - read-write - [22:22] - GPIO5_EDGE_LOW - - - read-write - [21:21] - GPIO5_LEVEL_HIGH - - - read-write - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - GPIO4_EDGE_HIGH - - - read-write - [18:18] - GPIO4_EDGE_LOW - - - read-write - [17:17] - GPIO4_LEVEL_HIGH - - - read-write - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - GPIO3_EDGE_HIGH - - - read-write - [14:14] - GPIO3_EDGE_LOW - - - read-write - [13:13] - GPIO3_LEVEL_HIGH - - - read-write - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - GPIO2_EDGE_HIGH - - - read-write - [10:10] - GPIO2_EDGE_LOW - - - read-write - [9:9] - GPIO2_LEVEL_HIGH - - - read-write - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - GPIO1_EDGE_HIGH - - - read-write - [6:6] - GPIO1_EDGE_LOW - - - read-write - [5:5] - GPIO1_LEVEL_HIGH - - - read-write - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - GPIO0_EDGE_HIGH - - - read-write - [2:2] - GPIO0_EDGE_LOW - - - read-write - [1:1] - GPIO0_LEVEL_HIGH - - - read-write - [0:0] - GPIO0_LEVEL_LOW - - - DORMANT_WAKE_INTE0 - 0x00000000 - - - 0x0164 - Interrupt Enable for dormant_wake - - - read-write - [31:31] - GPIO15_EDGE_HIGH - - - read-write - [30:30] - GPIO15_EDGE_LOW - - - read-write - [29:29] - GPIO15_LEVEL_HIGH - - - read-write - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - GPIO14_EDGE_HIGH - - - read-write - [26:26] - GPIO14_EDGE_LOW - - - read-write - [25:25] - GPIO14_LEVEL_HIGH - - - read-write - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - GPIO13_EDGE_HIGH - - - read-write - [22:22] - GPIO13_EDGE_LOW - - - read-write - [21:21] - GPIO13_LEVEL_HIGH - - - read-write - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - GPIO12_EDGE_HIGH - - - read-write - [18:18] - GPIO12_EDGE_LOW - - - read-write - [17:17] - GPIO12_LEVEL_HIGH - - - read-write - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - GPIO11_EDGE_HIGH - - - read-write - [14:14] - GPIO11_EDGE_LOW - - - read-write - [13:13] - GPIO11_LEVEL_HIGH - - - read-write - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - GPIO10_EDGE_HIGH - - - read-write - [10:10] - GPIO10_EDGE_LOW - - - read-write - [9:9] - GPIO10_LEVEL_HIGH - - - read-write - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - GPIO9_EDGE_HIGH - - - read-write - [6:6] - GPIO9_EDGE_LOW - - - read-write - [5:5] - GPIO9_LEVEL_HIGH - - - read-write - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - GPIO8_EDGE_HIGH - - - read-write - [2:2] - GPIO8_EDGE_LOW - - - read-write - [1:1] - GPIO8_LEVEL_HIGH - - - read-write - [0:0] - GPIO8_LEVEL_LOW - - - DORMANT_WAKE_INTE1 - 0x00000000 - - - 0x0168 - Interrupt Enable for dormant_wake - - - read-write - [31:31] - GPIO23_EDGE_HIGH - - - read-write - [30:30] - GPIO23_EDGE_LOW - - - read-write - [29:29] - GPIO23_LEVEL_HIGH - - - read-write - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - GPIO22_EDGE_HIGH - - - read-write - [26:26] - GPIO22_EDGE_LOW - - - read-write - [25:25] - GPIO22_LEVEL_HIGH - - - read-write - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - GPIO21_EDGE_HIGH - - - read-write - [22:22] - GPIO21_EDGE_LOW - - - read-write - [21:21] - GPIO21_LEVEL_HIGH - - - read-write - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - GPIO20_EDGE_HIGH - - - read-write - [18:18] - GPIO20_EDGE_LOW - - - read-write - [17:17] - GPIO20_LEVEL_HIGH - - - read-write - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - GPIO19_EDGE_HIGH - - - read-write - [14:14] - GPIO19_EDGE_LOW - - - read-write - [13:13] - GPIO19_LEVEL_HIGH - - - read-write - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - GPIO18_EDGE_HIGH - - - read-write - [10:10] - GPIO18_EDGE_LOW - - - read-write - [9:9] - GPIO18_LEVEL_HIGH - - - read-write - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - GPIO17_EDGE_HIGH - - - read-write - [6:6] - GPIO17_EDGE_LOW - - - read-write - [5:5] - GPIO17_LEVEL_HIGH - - - read-write - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - GPIO16_EDGE_HIGH - - - read-write - [2:2] - GPIO16_EDGE_LOW - - - read-write - [1:1] - GPIO16_LEVEL_HIGH - - - read-write - [0:0] - GPIO16_LEVEL_LOW - - - DORMANT_WAKE_INTE2 - 0x00000000 - - - 0x016c - Interrupt Enable for dormant_wake - - - read-write - [23:23] - GPIO29_EDGE_HIGH - - - read-write - [22:22] - GPIO29_EDGE_LOW - - - read-write - [21:21] - GPIO29_LEVEL_HIGH - - - read-write - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - GPIO28_EDGE_HIGH - - - read-write - [18:18] - GPIO28_EDGE_LOW - - - read-write - [17:17] - GPIO28_LEVEL_HIGH - - - read-write - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - GPIO27_EDGE_HIGH - - - read-write - [14:14] - GPIO27_EDGE_LOW - - - read-write - [13:13] - GPIO27_LEVEL_HIGH - - - read-write - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - GPIO26_EDGE_HIGH - - - read-write - [10:10] - GPIO26_EDGE_LOW - - - read-write - [9:9] - GPIO26_LEVEL_HIGH - - - read-write - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - GPIO25_EDGE_HIGH - - - read-write - [6:6] - GPIO25_EDGE_LOW - - - read-write - [5:5] - GPIO25_LEVEL_HIGH - - - read-write - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - GPIO24_EDGE_HIGH - - - read-write - [2:2] - GPIO24_EDGE_LOW - - - read-write - [1:1] - GPIO24_LEVEL_HIGH - - - read-write - [0:0] - GPIO24_LEVEL_LOW - - - DORMANT_WAKE_INTE3 - 0x00000000 - - - 0x0170 - Interrupt Force for dormant_wake - - - read-write - [31:31] - GPIO7_EDGE_HIGH - - - read-write - [30:30] - GPIO7_EDGE_LOW - - - read-write - [29:29] - GPIO7_LEVEL_HIGH - - - read-write - [28:28] - GPIO7_LEVEL_LOW - - - read-write - [27:27] - GPIO6_EDGE_HIGH - - - read-write - [26:26] - GPIO6_EDGE_LOW - - - read-write - [25:25] - GPIO6_LEVEL_HIGH - - - read-write - [24:24] - GPIO6_LEVEL_LOW - - - read-write - [23:23] - GPIO5_EDGE_HIGH - - - read-write - [22:22] - GPIO5_EDGE_LOW - - - read-write - [21:21] - GPIO5_LEVEL_HIGH - - - read-write - [20:20] - GPIO5_LEVEL_LOW - - - read-write - [19:19] - GPIO4_EDGE_HIGH - - - read-write - [18:18] - GPIO4_EDGE_LOW - - - read-write - [17:17] - GPIO4_LEVEL_HIGH - - - read-write - [16:16] - GPIO4_LEVEL_LOW - - - read-write - [15:15] - GPIO3_EDGE_HIGH - - - read-write - [14:14] - GPIO3_EDGE_LOW - - - read-write - [13:13] - GPIO3_LEVEL_HIGH - - - read-write - [12:12] - GPIO3_LEVEL_LOW - - - read-write - [11:11] - GPIO2_EDGE_HIGH - - - read-write - [10:10] - GPIO2_EDGE_LOW - - - read-write - [9:9] - GPIO2_LEVEL_HIGH - - - read-write - [8:8] - GPIO2_LEVEL_LOW - - - read-write - [7:7] - GPIO1_EDGE_HIGH - - - read-write - [6:6] - GPIO1_EDGE_LOW - - - read-write - [5:5] - GPIO1_LEVEL_HIGH - - - read-write - [4:4] - GPIO1_LEVEL_LOW - - - read-write - [3:3] - GPIO0_EDGE_HIGH - - - read-write - [2:2] - GPIO0_EDGE_LOW - - - read-write - [1:1] - GPIO0_LEVEL_HIGH - - - read-write - [0:0] - GPIO0_LEVEL_LOW - - - DORMANT_WAKE_INTF0 - 0x00000000 - - - 0x0174 - Interrupt Force for dormant_wake - - - read-write - [31:31] - GPIO15_EDGE_HIGH - - - read-write - [30:30] - GPIO15_EDGE_LOW - - - read-write - [29:29] - GPIO15_LEVEL_HIGH - - - read-write - [28:28] - GPIO15_LEVEL_LOW - - - read-write - [27:27] - GPIO14_EDGE_HIGH - - - read-write - [26:26] - GPIO14_EDGE_LOW - - - read-write - [25:25] - GPIO14_LEVEL_HIGH - - - read-write - [24:24] - GPIO14_LEVEL_LOW - - - read-write - [23:23] - GPIO13_EDGE_HIGH - - - read-write - [22:22] - GPIO13_EDGE_LOW - - - read-write - [21:21] - GPIO13_LEVEL_HIGH - - - read-write - [20:20] - GPIO13_LEVEL_LOW - - - read-write - [19:19] - GPIO12_EDGE_HIGH - - - read-write - [18:18] - GPIO12_EDGE_LOW - - - read-write - [17:17] - GPIO12_LEVEL_HIGH - - - read-write - [16:16] - GPIO12_LEVEL_LOW - - - read-write - [15:15] - GPIO11_EDGE_HIGH - - - read-write - [14:14] - GPIO11_EDGE_LOW - - - read-write - [13:13] - GPIO11_LEVEL_HIGH - - - read-write - [12:12] - GPIO11_LEVEL_LOW - - - read-write - [11:11] - GPIO10_EDGE_HIGH - - - read-write - [10:10] - GPIO10_EDGE_LOW - - - read-write - [9:9] - GPIO10_LEVEL_HIGH - - - read-write - [8:8] - GPIO10_LEVEL_LOW - - - read-write - [7:7] - GPIO9_EDGE_HIGH - - - read-write - [6:6] - GPIO9_EDGE_LOW - - - read-write - [5:5] - GPIO9_LEVEL_HIGH - - - read-write - [4:4] - GPIO9_LEVEL_LOW - - - read-write - [3:3] - GPIO8_EDGE_HIGH - - - read-write - [2:2] - GPIO8_EDGE_LOW - - - read-write - [1:1] - GPIO8_LEVEL_HIGH - - - read-write - [0:0] - GPIO8_LEVEL_LOW - - - DORMANT_WAKE_INTF1 - 0x00000000 - - - 0x0178 - Interrupt Force for dormant_wake - - - read-write - [31:31] - GPIO23_EDGE_HIGH - - - read-write - [30:30] - GPIO23_EDGE_LOW - - - read-write - [29:29] - GPIO23_LEVEL_HIGH - - - read-write - [28:28] - GPIO23_LEVEL_LOW - - - read-write - [27:27] - GPIO22_EDGE_HIGH - - - read-write - [26:26] - GPIO22_EDGE_LOW - - - read-write - [25:25] - GPIO22_LEVEL_HIGH - - - read-write - [24:24] - GPIO22_LEVEL_LOW - - - read-write - [23:23] - GPIO21_EDGE_HIGH - - - read-write - [22:22] - GPIO21_EDGE_LOW - - - read-write - [21:21] - GPIO21_LEVEL_HIGH - - - read-write - [20:20] - GPIO21_LEVEL_LOW - - - read-write - [19:19] - GPIO20_EDGE_HIGH - - - read-write - [18:18] - GPIO20_EDGE_LOW - - - read-write - [17:17] - GPIO20_LEVEL_HIGH - - - read-write - [16:16] - GPIO20_LEVEL_LOW - - - read-write - [15:15] - GPIO19_EDGE_HIGH - - - read-write - [14:14] - GPIO19_EDGE_LOW - - - read-write - [13:13] - GPIO19_LEVEL_HIGH - - - read-write - [12:12] - GPIO19_LEVEL_LOW - - - read-write - [11:11] - GPIO18_EDGE_HIGH - - - read-write - [10:10] - GPIO18_EDGE_LOW - - - read-write - [9:9] - GPIO18_LEVEL_HIGH - - - read-write - [8:8] - GPIO18_LEVEL_LOW - - - read-write - [7:7] - GPIO17_EDGE_HIGH - - - read-write - [6:6] - GPIO17_EDGE_LOW - - - read-write - [5:5] - GPIO17_LEVEL_HIGH - - - read-write - [4:4] - GPIO17_LEVEL_LOW - - - read-write - [3:3] - GPIO16_EDGE_HIGH - - - read-write - [2:2] - GPIO16_EDGE_LOW - - - read-write - [1:1] - GPIO16_LEVEL_HIGH - - - read-write - [0:0] - GPIO16_LEVEL_LOW - - - DORMANT_WAKE_INTF2 - 0x00000000 - - - 0x017c - Interrupt Force for dormant_wake - - - read-write - [23:23] - GPIO29_EDGE_HIGH - - - read-write - [22:22] - GPIO29_EDGE_LOW - - - read-write - [21:21] - GPIO29_LEVEL_HIGH - - - read-write - [20:20] - GPIO29_LEVEL_LOW - - - read-write - [19:19] - GPIO28_EDGE_HIGH - - - read-write - [18:18] - GPIO28_EDGE_LOW - - - read-write - [17:17] - GPIO28_LEVEL_HIGH - - - read-write - [16:16] - GPIO28_LEVEL_LOW - - - read-write - [15:15] - GPIO27_EDGE_HIGH - - - read-write - [14:14] - GPIO27_EDGE_LOW - - - read-write - [13:13] - GPIO27_LEVEL_HIGH - - - read-write - [12:12] - GPIO27_LEVEL_LOW - - - read-write - [11:11] - GPIO26_EDGE_HIGH - - - read-write - [10:10] - GPIO26_EDGE_LOW - - - read-write - [9:9] - GPIO26_LEVEL_HIGH - - - read-write - [8:8] - GPIO26_LEVEL_LOW - - - read-write - [7:7] - GPIO25_EDGE_HIGH - - - read-write - [6:6] - GPIO25_EDGE_LOW - - - read-write - [5:5] - GPIO25_LEVEL_HIGH - - - read-write - [4:4] - GPIO25_LEVEL_LOW - - - read-write - [3:3] - GPIO24_EDGE_HIGH - - - read-write - [2:2] - GPIO24_EDGE_LOW - - - read-write - [1:1] - GPIO24_LEVEL_HIGH - - - read-write - [0:0] - GPIO24_LEVEL_LOW - - - DORMANT_WAKE_INTF3 - 0x00000000 - - - 0x0180 - Interrupt status after masking & forcing for dormant_wake - - - read-only - [31:31] - GPIO7_EDGE_HIGH - - - read-only - [30:30] - GPIO7_EDGE_LOW - - - read-only - [29:29] - GPIO7_LEVEL_HIGH - - - read-only - [28:28] - GPIO7_LEVEL_LOW - - - read-only - [27:27] - GPIO6_EDGE_HIGH - - - read-only - [26:26] - GPIO6_EDGE_LOW - - - read-only - [25:25] - GPIO6_LEVEL_HIGH - - - read-only - [24:24] - GPIO6_LEVEL_LOW - - - read-only - [23:23] - GPIO5_EDGE_HIGH - - - read-only - [22:22] - GPIO5_EDGE_LOW - - - read-only - [21:21] - GPIO5_LEVEL_HIGH - - - read-only - [20:20] - GPIO5_LEVEL_LOW - - - read-only - [19:19] - GPIO4_EDGE_HIGH - - - read-only - [18:18] - GPIO4_EDGE_LOW - - - read-only - [17:17] - GPIO4_LEVEL_HIGH - - - read-only - [16:16] - GPIO4_LEVEL_LOW - - - read-only - [15:15] - GPIO3_EDGE_HIGH - - - read-only - [14:14] - GPIO3_EDGE_LOW - - - read-only - [13:13] - GPIO3_LEVEL_HIGH - - - read-only - [12:12] - GPIO3_LEVEL_LOW - - - read-only - [11:11] - GPIO2_EDGE_HIGH - - - read-only - [10:10] - GPIO2_EDGE_LOW - - - read-only - [9:9] - GPIO2_LEVEL_HIGH - - - read-only - [8:8] - GPIO2_LEVEL_LOW - - - read-only - [7:7] - GPIO1_EDGE_HIGH - - - read-only - [6:6] - GPIO1_EDGE_LOW - - - read-only - [5:5] - GPIO1_LEVEL_HIGH - - - read-only - [4:4] - GPIO1_LEVEL_LOW - - - read-only - [3:3] - GPIO0_EDGE_HIGH - - - read-only - [2:2] - GPIO0_EDGE_LOW - - - read-only - [1:1] - GPIO0_LEVEL_HIGH - - - read-only - [0:0] - GPIO0_LEVEL_LOW - - - DORMANT_WAKE_INTS0 - 0x00000000 - - - 0x0184 - Interrupt status after masking & forcing for dormant_wake - - - read-only - [31:31] - GPIO15_EDGE_HIGH - - - read-only - [30:30] - GPIO15_EDGE_LOW - - - read-only - [29:29] - GPIO15_LEVEL_HIGH - - - read-only - [28:28] - GPIO15_LEVEL_LOW - - - read-only - [27:27] - GPIO14_EDGE_HIGH - - - read-only - [26:26] - GPIO14_EDGE_LOW - - - read-only - [25:25] - GPIO14_LEVEL_HIGH - - - read-only - [24:24] - GPIO14_LEVEL_LOW - - - read-only - [23:23] - GPIO13_EDGE_HIGH - - - read-only - [22:22] - GPIO13_EDGE_LOW - - - read-only - [21:21] - GPIO13_LEVEL_HIGH - - - read-only - [20:20] - GPIO13_LEVEL_LOW - - - read-only - [19:19] - GPIO12_EDGE_HIGH - - - read-only - [18:18] - GPIO12_EDGE_LOW - - - read-only - [17:17] - GPIO12_LEVEL_HIGH - - - read-only - [16:16] - GPIO12_LEVEL_LOW - - - read-only - [15:15] - GPIO11_EDGE_HIGH - - - read-only - [14:14] - GPIO11_EDGE_LOW - - - read-only - [13:13] - GPIO11_LEVEL_HIGH - - - read-only - [12:12] - GPIO11_LEVEL_LOW - - - read-only - [11:11] - GPIO10_EDGE_HIGH - - - read-only - [10:10] - GPIO10_EDGE_LOW - - - read-only - [9:9] - GPIO10_LEVEL_HIGH - - - read-only - [8:8] - GPIO10_LEVEL_LOW - - - read-only - [7:7] - GPIO9_EDGE_HIGH - - - read-only - [6:6] - GPIO9_EDGE_LOW - - - read-only - [5:5] - GPIO9_LEVEL_HIGH - - - read-only - [4:4] - GPIO9_LEVEL_LOW - - - read-only - [3:3] - GPIO8_EDGE_HIGH - - - read-only - [2:2] - GPIO8_EDGE_LOW - - - read-only - [1:1] - GPIO8_LEVEL_HIGH - - - read-only - [0:0] - GPIO8_LEVEL_LOW - - - DORMANT_WAKE_INTS1 - 0x00000000 - - - 0x0188 - Interrupt status after masking & forcing for dormant_wake - - - read-only - [31:31] - GPIO23_EDGE_HIGH - - - read-only - [30:30] - GPIO23_EDGE_LOW - - - read-only - [29:29] - GPIO23_LEVEL_HIGH - - - read-only - [28:28] - GPIO23_LEVEL_LOW - - - read-only - [27:27] - GPIO22_EDGE_HIGH - - - read-only - [26:26] - GPIO22_EDGE_LOW - - - read-only - [25:25] - GPIO22_LEVEL_HIGH - - - read-only - [24:24] - GPIO22_LEVEL_LOW - - - read-only - [23:23] - GPIO21_EDGE_HIGH - - - read-only - [22:22] - GPIO21_EDGE_LOW - - - read-only - [21:21] - GPIO21_LEVEL_HIGH - - - read-only - [20:20] - GPIO21_LEVEL_LOW - - - read-only - [19:19] - GPIO20_EDGE_HIGH - - - read-only - [18:18] - GPIO20_EDGE_LOW - - - read-only - [17:17] - GPIO20_LEVEL_HIGH - - - read-only - [16:16] - GPIO20_LEVEL_LOW - - - read-only - [15:15] - GPIO19_EDGE_HIGH - - - read-only - [14:14] - GPIO19_EDGE_LOW - - - read-only - [13:13] - GPIO19_LEVEL_HIGH - - - read-only - [12:12] - GPIO19_LEVEL_LOW - - - read-only - [11:11] - GPIO18_EDGE_HIGH - - - read-only - [10:10] - GPIO18_EDGE_LOW - - - read-only - [9:9] - GPIO18_LEVEL_HIGH - - - read-only - [8:8] - GPIO18_LEVEL_LOW - - - read-only - [7:7] - GPIO17_EDGE_HIGH - - - read-only - [6:6] - GPIO17_EDGE_LOW - - - read-only - [5:5] - GPIO17_LEVEL_HIGH - - - read-only - [4:4] - GPIO17_LEVEL_LOW - - - read-only - [3:3] - GPIO16_EDGE_HIGH - - - read-only - [2:2] - GPIO16_EDGE_LOW - - - read-only - [1:1] - GPIO16_LEVEL_HIGH - - - read-only - [0:0] - GPIO16_LEVEL_LOW - - - DORMANT_WAKE_INTS2 - 0x00000000 - - - 0x018c - Interrupt status after masking & forcing for dormant_wake - - - read-only - [23:23] - GPIO29_EDGE_HIGH - - - read-only - [22:22] - GPIO29_EDGE_LOW - - - read-only - [21:21] - GPIO29_LEVEL_HIGH - - - read-only - [20:20] - GPIO29_LEVEL_LOW - - - read-only - [19:19] - GPIO28_EDGE_HIGH - - - read-only - [18:18] - GPIO28_EDGE_LOW - - - read-only - [17:17] - GPIO28_LEVEL_HIGH - - - read-only - [16:16] - GPIO28_LEVEL_LOW - - - read-only - [15:15] - GPIO27_EDGE_HIGH - - - read-only - [14:14] - GPIO27_EDGE_LOW - - - read-only - [13:13] - GPIO27_LEVEL_HIGH - - - read-only - [12:12] - GPIO27_LEVEL_LOW - - - read-only - [11:11] - GPIO26_EDGE_HIGH - - - read-only - [10:10] - GPIO26_EDGE_LOW - - - read-only - [9:9] - GPIO26_LEVEL_HIGH - - - read-only - [8:8] - GPIO26_LEVEL_LOW - - - read-only - [7:7] - GPIO25_EDGE_HIGH - - - read-only - [6:6] - GPIO25_EDGE_LOW - - - read-only - [5:5] - GPIO25_LEVEL_HIGH - - - read-only - [4:4] - GPIO25_LEVEL_LOW - - - read-only - [3:3] - GPIO24_EDGE_HIGH - - - read-only - [2:2] - GPIO24_EDGE_LOW - - - read-only - [1:1] - GPIO24_LEVEL_HIGH - - - read-only - [0:0] - GPIO24_LEVEL_LOW - - - DORMANT_WAKE_INTS3 - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40018000 - - IO_IRQ_QSPI - 14 - - IO_QSPI - - - 0x0000 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO_QSPI_SCLK_STATUS - 0x00000000 - - - 0x0004 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - xip_sclk - 0 - - - sio_30 - 5 - - - null - 31 - - - FUNCSEL - - - GPIO_QSPI_SCLK_CTRL - 0x0000001f - - - 0x0008 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO_QSPI_SS_STATUS - 0x00000000 - - - 0x000c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - xip_ss_n - 0 - - - sio_31 - 5 - - - null - 31 - - - FUNCSEL - - - GPIO_QSPI_SS_CTRL - 0x0000001f - - - 0x0010 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO_QSPI_SD0_STATUS - 0x00000000 - - - 0x0014 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - xip_sd0 - 0 - - - sio_32 - 5 - - - null - 31 - - - FUNCSEL - - - GPIO_QSPI_SD0_CTRL - 0x0000001f - - - 0x0018 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO_QSPI_SD1_STATUS - 0x00000000 - - - 0x001c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - xip_sd1 - 0 - - - sio_33 - 5 - - - null - 31 - - - FUNCSEL - - - GPIO_QSPI_SD1_CTRL - 0x0000001f - - - 0x0020 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO_QSPI_SD2_STATUS - 0x00000000 - - - 0x0024 - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - xip_sd2 - 0 - - - sio_34 - 5 - - - null - 31 - - - FUNCSEL - - - GPIO_QSPI_SD2_CTRL - 0x0000001f - - - 0x0028 - GPIO status - - - read-only - [26:26] - interrupt to processors, after override is applied - IRQTOPROC - - - read-only - [24:24] - interrupt from pad before override is applied - IRQFROMPAD - - - read-only - [19:19] - input signal to peripheral, after override is applied - INTOPERI - - - read-only - [17:17] - input signal from pad, before override is applied - INFROMPAD - - - read-only - [13:13] - output enable to pad after register override is applied - OETOPAD - - - read-only - [12:12] - output enable from selected peripheral, before register override is applied - OEFROMPERI - - - read-only - [9:9] - output signal to pad after register override is applied - OUTTOPAD - - - read-only - [8:8] - output signal from selected peripheral, before register override is applied - OUTFROMPERI - - - GPIO_QSPI_SD3_STATUS - 0x00000000 - - - 0x002c - GPIO control including function select and overrides. - - - read-write - [29:28] - - - don't invert the interrupt - NORMAL - 0 - - - invert the interrupt - INVERT - 1 - - - drive interrupt low - LOW - 2 - - - drive interrupt high - HIGH - 3 - - - IRQOVER - - - read-write - [17:16] - - - don't invert the peri input - NORMAL - 0 - - - invert the peri input - INVERT - 1 - - - drive peri input low - LOW - 2 - - - drive peri input high - HIGH - 3 - - - INOVER - - - read-write - [13:12] - - - drive output enable from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output enable from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - disable output - DISABLE - 2 - - - enable output - ENABLE - 3 - - - OEOVER - - - read-write - [9:8] - - - drive output from peripheral signal selected by funcsel - NORMAL - 0 - - - drive output from inverse of peripheral signal selected by funcsel - INVERT - 1 - - - drive output low - LOW - 2 - - - drive output high - HIGH - 3 - - - OUTOVER - - - read-write - [4:0] - 0-31 -> selects pin function according to the gpio table\n - 31 == NULL - - - xip_sd3 - 0 - - - sio_35 - 5 - - - null - 31 - - - FUNCSEL - - - GPIO_QSPI_SD3_CTRL - 0x0000001f - - - 0x0030 - Raw Interrupts - - - read-write - [23:23] - oneToClear - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - oneToClear - GPIO_QSPI_SD3_EDGE_LOW - - - read-only - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-only - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - oneToClear - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - oneToClear - GPIO_QSPI_SD2_EDGE_LOW - - - read-only - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-only - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - oneToClear - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - oneToClear - GPIO_QSPI_SD1_EDGE_LOW - - - read-only - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-only - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - oneToClear - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - oneToClear - GPIO_QSPI_SD0_EDGE_LOW - - - read-only - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-only - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - oneToClear - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - oneToClear - GPIO_QSPI_SS_EDGE_LOW - - - read-only - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-only - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - oneToClear - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - oneToClear - GPIO_QSPI_SCLK_EDGE_LOW - - - read-only - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-only - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - INTR - 0x00000000 - - - 0x0034 - Interrupt Enable for proc0 - - - read-write - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-write - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-write - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-write - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-write - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-write - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-write - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-write - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-write - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-write - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-write - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-write - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-write - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - PROC0_INTE - 0x00000000 - - - 0x0038 - Interrupt Force for proc0 - - - read-write - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-write - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-write - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-write - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-write - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-write - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-write - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-write - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-write - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-write - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-write - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-write - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-write - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - PROC0_INTF - 0x00000000 - - - 0x003c - Interrupt status after masking & forcing for proc0 - - - read-only - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-only - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-only - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-only - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-only - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-only - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-only - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-only - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-only - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-only - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-only - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-only - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-only - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-only - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-only - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-only - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-only - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-only - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-only - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-only - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-only - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-only - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-only - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-only - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - PROC0_INTS - 0x00000000 - - - 0x0040 - Interrupt Enable for proc1 - - - read-write - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-write - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-write - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-write - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-write - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-write - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-write - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-write - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-write - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-write - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-write - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-write - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-write - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - PROC1_INTE - 0x00000000 - - - 0x0044 - Interrupt Force for proc1 - - - read-write - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-write - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-write - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-write - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-write - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-write - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-write - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-write - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-write - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-write - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-write - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-write - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-write - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - PROC1_INTF - 0x00000000 - - - 0x0048 - Interrupt status after masking & forcing for proc1 - - - read-only - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-only - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-only - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-only - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-only - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-only - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-only - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-only - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-only - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-only - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-only - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-only - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-only - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-only - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-only - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-only - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-only - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-only - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-only - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-only - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-only - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-only - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-only - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-only - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - PROC1_INTS - 0x00000000 - - - 0x004c - Interrupt Enable for dormant_wake - - - read-write - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-write - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-write - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-write - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-write - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-write - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-write - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-write - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-write - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-write - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-write - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-write - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-write - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - DORMANT_WAKE_INTE - 0x00000000 - - - 0x0050 - Interrupt Force for dormant_wake - - - read-write - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-write - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-write - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-write - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-write - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-write - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-write - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-write - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-write - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-write - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-write - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-write - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-write - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-write - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-write - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-write - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-write - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-write - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-write - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-write - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-write - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-write - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-write - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-write - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - DORMANT_WAKE_INTF - 0x00000000 - - - 0x0054 - Interrupt status after masking & forcing for dormant_wake - - - read-only - [23:23] - GPIO_QSPI_SD3_EDGE_HIGH - - - read-only - [22:22] - GPIO_QSPI_SD3_EDGE_LOW - - - read-only - [21:21] - GPIO_QSPI_SD3_LEVEL_HIGH - - - read-only - [20:20] - GPIO_QSPI_SD3_LEVEL_LOW - - - read-only - [19:19] - GPIO_QSPI_SD2_EDGE_HIGH - - - read-only - [18:18] - GPIO_QSPI_SD2_EDGE_LOW - - - read-only - [17:17] - GPIO_QSPI_SD2_LEVEL_HIGH - - - read-only - [16:16] - GPIO_QSPI_SD2_LEVEL_LOW - - - read-only - [15:15] - GPIO_QSPI_SD1_EDGE_HIGH - - - read-only - [14:14] - GPIO_QSPI_SD1_EDGE_LOW - - - read-only - [13:13] - GPIO_QSPI_SD1_LEVEL_HIGH - - - read-only - [12:12] - GPIO_QSPI_SD1_LEVEL_LOW - - - read-only - [11:11] - GPIO_QSPI_SD0_EDGE_HIGH - - - read-only - [10:10] - GPIO_QSPI_SD0_EDGE_LOW - - - read-only - [9:9] - GPIO_QSPI_SD0_LEVEL_HIGH - - - read-only - [8:8] - GPIO_QSPI_SD0_LEVEL_LOW - - - read-only - [7:7] - GPIO_QSPI_SS_EDGE_HIGH - - - read-only - [6:6] - GPIO_QSPI_SS_EDGE_LOW - - - read-only - [5:5] - GPIO_QSPI_SS_LEVEL_HIGH - - - read-only - [4:4] - GPIO_QSPI_SS_LEVEL_LOW - - - read-only - [3:3] - GPIO_QSPI_SCLK_EDGE_HIGH - - - read-only - [2:2] - GPIO_QSPI_SCLK_EDGE_LOW - - - read-only - [1:1] - GPIO_QSPI_SCLK_LEVEL_HIGH - - - read-only - [0:0] - GPIO_QSPI_SCLK_LEVEL_LOW - - - DORMANT_WAKE_INTS - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x4001c000 - PADS_BANK0 - - - 0x0000 - Voltage select. Per bank control - - - read-write - [0:0] - - - Set voltage to 3.3V (DVDD >= 2V5) - 3v3 - 0 - - - Set voltage to 1.8V (DVDD <= 1V8) - 1v8 - 1 - - - VOLTAGE_SELECT - - - VOLTAGE_SELECT - 0x00000000 - - - 0x0004 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO0 - 0x00000056 - - - 0x0008 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO1 - 0x00000056 - - - 0x000c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO2 - 0x00000056 - - - 0x0010 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO3 - 0x00000056 - - - 0x0014 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO4 - 0x00000056 - - - 0x0018 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO5 - 0x00000056 - - - 0x001c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO6 - 0x00000056 - - - 0x0020 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO7 - 0x00000056 - - - 0x0024 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO8 - 0x00000056 - - - 0x0028 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO9 - 0x00000056 - - - 0x002c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO10 - 0x00000056 - - - 0x0030 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO11 - 0x00000056 - - - 0x0034 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO12 - 0x00000056 - - - 0x0038 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO13 - 0x00000056 - - - 0x003c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO14 - 0x00000056 - - - 0x0040 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO15 - 0x00000056 - - - 0x0044 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO16 - 0x00000056 - - - 0x0048 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO17 - 0x00000056 - - - 0x004c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO18 - 0x00000056 - - - 0x0050 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO19 - 0x00000056 - - - 0x0054 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO20 - 0x00000056 - - - 0x0058 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO21 - 0x00000056 - - - 0x005c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO22 - 0x00000056 - - - 0x0060 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO23 - 0x00000056 - - - 0x0064 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO24 - 0x00000056 - - - 0x0068 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO25 - 0x00000056 - - - 0x006c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO26 - 0x00000056 - - - 0x0070 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO27 - 0x00000056 - - - 0x0074 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO28 - 0x00000056 - - - 0x0078 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO29 - 0x00000056 - - - 0x007c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - SWCLK - 0x000000da - - - 0x0080 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - SWD - 0x0000005a - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40020000 - PADS_QSPI - - - 0x0000 - Voltage select. Per bank control - - - read-write - [0:0] - - - Set voltage to 3.3V (DVDD >= 2V5) - 3v3 - 0 - - - Set voltage to 1.8V (DVDD <= 1V8) - 1v8 - 1 - - - VOLTAGE_SELECT - - - VOLTAGE_SELECT - 0x00000000 - - - 0x0004 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO_QSPI_SCLK - 0x00000056 - - - 0x0008 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO_QSPI_SD0 - 0x00000052 - - - 0x000c - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO_QSPI_SD1 - 0x00000052 - - - 0x0010 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO_QSPI_SD2 - 0x00000052 - - - 0x0014 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO_QSPI_SD3 - 0x00000052 - - - 0x0018 - Pad control register - - - read-write - [7:7] - Output disable. Has priority over output enable from peripherals - OD - - - read-write - [6:6] - Input enable - IE - - - read-write - [5:4] - Drive strength. - - - 2mA - 0 - - - 4mA - 1 - - - 8mA - 2 - - - 12mA - 3 - - - DRIVE - - - read-write - [3:3] - Pull up enable - PUE - - - read-write - [2:2] - Pull down enable - PDE - - - read-write - [1:1] - Enable schmitt trigger - SCHMITT - - - read-write - [0:0] - Slew rate control. 1 = Fast, 0 = Slow - SLEWFAST - - - GPIO_QSPI_SS - 0x0000005a - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40024000 - Controls the crystal oscillator - XOSC - - - 0x0000 - Crystal Oscillator Control - - - read-write - [23:12] - On power-up this field is initialised to DISABLE and the chip runs from the ROSC.\n - 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.\n - The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator. - - - DISABLE - 3358 - - - ENABLE - 4011 - - - ENABLE - - - read-write - [11:0] - Frequency range. This resets to 0xAA0 and cannot be changed. - - - 1_15MHZ - 2720 - - - RESERVED_1 - 2721 - - - RESERVED_2 - 2722 - - - RESERVED_3 - 2723 - - - FREQ_RANGE - - - CTRL - 0x00000000 - - - 0x0004 - Crystal Oscillator Status - - - read-only - [31:31] - Oscillator is running and stable - STABLE - - - read-write - [24:24] - An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT - oneToClear - BADWRITE - - - read-only - [12:12] - Oscillator is enabled but not necessarily running and stable, resets to 0 - ENABLED - - - read-only - [1:0] - The current frequency range setting, always reads 0 - - - 1_15MHZ - 0 - - - RESERVED_1 - 1 - - - RESERVED_2 - 2 - - - RESERVED_3 - 3 - - - FREQ_RANGE - - - STATUS - 0x00000000 - - - read-write - 0x0008 - Crystal Oscillator pause control\n - This is used to save power by pausing the XOSC\n - On power-up this field is initialised to WAKE\n - An invalid write will also select WAKE\n - WARNING: stop the PLLs before selecting dormant mode\n - WARNING: setup the irq before selecting dormant mode - DORMANT - 0x00000000 - - - 0x000c - Controls the startup delay - - - read-write - [20:20] - Multiplies the startup_delay by 4. This is of little value to the user given that the delay can be programmed directly. - X4 - - - read-write - [13:0] - in multiples of 256*xtal_period. The reset value of 0xc4 corresponds to approx 50 000 cycles. - DELAY - - - STARTUP - 0x000000c4 - - - 0x001c - A down counter running at the xosc frequency which counts to zero and stops.\n - To start the counter write a non-zero value.\n - Can be used for short software pauses when setting up time sensitive hardware. - - - read-write - [7:0] - COUNT - - - COUNT - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40028000 - PLL_SYS - - - 0x0000 - Control and Status\n - GENERAL CONSTRAINTS:\n - Reference clock frequency min=5MHz, max=800MHz\n - Feedback divider min=16, max=320\n - VCO frequency min=750MHz, max=1600MHz - - - read-only - [31:31] - PLL is locked - LOCK - - - read-write - [8:8] - 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. - BYPASS - - - read-write - [5:0] - Divides the PLL input reference clock.\n - Behaviour is undefined for div=0.\n - PLL output will be unpredictable during refdiv changes, wait for lock=1 before using it. - REFDIV - - - CS - 0x00000001 - - - 0x0004 - Controls the PLL power modes. - - - read-write - [5:5] - PLL VCO powerdown\n - To save power set high when PLL output not required or bypass=1. - VCOPD - - - read-write - [3:3] - PLL post divider powerdown\n - To save power set high when PLL output not required or bypass=1. - POSTDIVPD - - - read-write - [2:2] - PLL DSM powerdown\n - Nothing is achieved by setting this low. - DSMPD - - - read-write - [0:0] - PLL powerdown\n - To save power set high when PLL output not required. - PD - - - PWR - 0x0000002d - - - 0x0008 - Feedback divisor\n - (note: this PLL does not support fractional division) - - - read-write - [11:0] - see ctrl reg description for constraints - FBDIV_INT - - - FBDIV_INT - 0x00000000 - - - 0x000c - Controls the PLL post dividers for the primary output\n - (note: this PLL does not have a secondary output)\n - the primary output is driven from VCO divided by postdiv1*postdiv2 - - - read-write - [18:16] - divide by 1-7 - POSTDIV1 - - - read-write - [14:12] - divide by 1-7 - POSTDIV2 - - - PRIM - 0x00077000 - - - 32 - 1 - - - 0x4002c000 - PLL_USB - - - - 0 - 0x1000 - registers - - 0x40030000 - Register block for busfabric control signals and performance counters - BUSCTRL - - - 0x0000 - Set the priority of each master for bus arbitration. - - - read-write - [12:12] - 0 - low priority, 1 - high priority - DMA_W - - - read-write - [8:8] - 0 - low priority, 1 - high priority - DMA_R - - - read-write - [4:4] - 0 - low priority, 1 - high priority - PROC1 - - - read-write - [0:0] - 0 - low priority, 1 - high priority - PROC0 - - - BUS_PRIORITY - 0x00000000 - - - 0x0004 - Bus priority acknowledge - - - read-only - [0:0] - Goes to 1 once all arbiters have registered the new global priority levels.\n - Arbiters update their local priority when servicing a new nonsequential access.\n - In normal circumstances this will happen almost immediately. - BUS_PRIORITY_ACK - - - BUS_PRIORITY_ACK - 0x00000000 - - - 0x0008 - Bus fabric performance counter 0 - - - read-write - [23:0] - Busfabric saturating performance counter 0\n - Count some event signal from the busfabric arbiters.\n - Write any value to clear. Select an event to count using PERFSEL0 - oneToClear - PERFCTR0 - - - PERFCTR0 - 0x00000000 - - - 0x000c - Bus fabric performance event select for PERFCTR0 - - - read-write - [4:0] - Select an event for PERFCTR0. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. - - - apb_contested - 0 - - - apb - 1 - - - fastperi_contested - 2 - - - fastperi - 3 - - - sram5_contested - 4 - - - sram5 - 5 - - - sram4_contested - 6 - - - sram4 - 7 - - - sram3_contested - 8 - - - sram3 - 9 - - - sram2_contested - 10 - - - sram2 - 11 - - - sram1_contested - 12 - - - sram1 - 13 - - - sram0_contested - 14 - - - sram0 - 15 - - - xip_main_contested - 16 - - - xip_main - 17 - - - rom_contested - 18 - - - rom - 19 - - - PERFSEL0 - - - PERFSEL0 - 0x0000001f - - - 0x0010 - Bus fabric performance counter 1 - - - read-write - [23:0] - Busfabric saturating performance counter 1\n - Count some event signal from the busfabric arbiters.\n - Write any value to clear. Select an event to count using PERFSEL1 - oneToClear - PERFCTR1 - - - PERFCTR1 - 0x00000000 - - - 0x0014 - Bus fabric performance event select for PERFCTR1 - - - read-write - [4:0] - Select an event for PERFCTR1. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. - - - apb_contested - 0 - - - apb - 1 - - - fastperi_contested - 2 - - - fastperi - 3 - - - sram5_contested - 4 - - - sram5 - 5 - - - sram4_contested - 6 - - - sram4 - 7 - - - sram3_contested - 8 - - - sram3 - 9 - - - sram2_contested - 10 - - - sram2 - 11 - - - sram1_contested - 12 - - - sram1 - 13 - - - sram0_contested - 14 - - - sram0 - 15 - - - xip_main_contested - 16 - - - xip_main - 17 - - - rom_contested - 18 - - - rom - 19 - - - PERFSEL1 - - - PERFSEL1 - 0x0000001f - - - 0x0018 - Bus fabric performance counter 2 - - - read-write - [23:0] - Busfabric saturating performance counter 2\n - Count some event signal from the busfabric arbiters.\n - Write any value to clear. Select an event to count using PERFSEL2 - oneToClear - PERFCTR2 - - - PERFCTR2 - 0x00000000 - - - 0x001c - Bus fabric performance event select for PERFCTR2 - - - read-write - [4:0] - Select an event for PERFCTR2. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. - - - apb_contested - 0 - - - apb - 1 - - - fastperi_contested - 2 - - - fastperi - 3 - - - sram5_contested - 4 - - - sram5 - 5 - - - sram4_contested - 6 - - - sram4 - 7 - - - sram3_contested - 8 - - - sram3 - 9 - - - sram2_contested - 10 - - - sram2 - 11 - - - sram1_contested - 12 - - - sram1 - 13 - - - sram0_contested - 14 - - - sram0 - 15 - - - xip_main_contested - 16 - - - xip_main - 17 - - - rom_contested - 18 - - - rom - 19 - - - PERFSEL2 - - - PERFSEL2 - 0x0000001f - - - 0x0020 - Bus fabric performance counter 3 - - - read-write - [23:0] - Busfabric saturating performance counter 3\n - Count some event signal from the busfabric arbiters.\n - Write any value to clear. Select an event to count using PERFSEL3 - oneToClear - PERFCTR3 - - - PERFCTR3 - 0x00000000 - - - 0x0024 - Bus fabric performance event select for PERFCTR3 - - - read-write - [4:0] - Select an event for PERFCTR3. Count either contested accesses, or all accesses, on a downstream port of the main crossbar. - - - apb_contested - 0 - - - apb - 1 - - - fastperi_contested - 2 - - - fastperi - 3 - - - sram5_contested - 4 - - - sram5 - 5 - - - sram4_contested - 6 - - - sram4 - 7 - - - sram3_contested - 8 - - - sram3 - 9 - - - sram2_contested - 10 - - - sram2 - 11 - - - sram1_contested - 12 - - - sram1 - 13 - - - sram0_contested - 14 - - - sram0 - 15 - - - xip_main_contested - 16 - - - xip_main - 17 - - - rom_contested - 18 - - - rom - 19 - - - PERFSEL3 - - - PERFSEL3 - 0x0000001f - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40034000 - - UART0_IRQ - 20 - - UART0 - - - 0x0000 - Data Register, UARTDR - - - read-only - [11:11] - 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. - OE - - - read-only - [10:10] - 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. - BE - - - read-only - [9:9] - 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. - PE - - - read-only - [8:8] - 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. - FE - - - read-write - [7:0] - Receive (read) data character. Transmit (write) data character. - DATA - - - UARTDR - 0x00000000 - - - 0x0004 - Receive Status Register/Error Clear Register, UARTRSR/UARTECR - - - read-write - [3:3] - 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. - oneToClear - OE - - - read-write - [2:2] - 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. - oneToClear - BE - - - read-write - [1:1] - 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. - oneToClear - PE - - - read-write - [0:0] - 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. - oneToClear - FE - - - UARTRSR - 0x00000000 - - - 0x0018 - Flag Register, UARTFR - - - read-only - [8:8] - 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. - RI - - - read-only - [7:7] - 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. - TXFE - - - read-only - [6:6] - 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. - RXFF - - - read-only - [5:5] - 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. - TXFF - - - read-only - [4:4] - 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. - RXFE - - - read-only - [3:3] - 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. - BUSY - - - read-only - [2:2] - 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. - DCD - - - read-only - [1:1] - 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. - DSR - - - read-only - [0:0] - 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. - CTS - - - UARTFR - 0x00000090 - - - 0x0020 - IrDA Low-Power Counter Register, UARTILPR - - - read-write - [7:0] - 8-bit low-power divisor value. These bits are cleared to 0 at reset. - ILPDVSR - - - UARTILPR - 0x00000000 - - - 0x0024 - Integer Baud Rate Register, UARTIBRD - - - read-write - [15:0] - The integer baud rate divisor. These bits are cleared to 0 on reset. - BAUD_DIVINT - - - UARTIBRD - 0x00000000 - - - 0x0028 - Fractional Baud Rate Register, UARTFBRD - - - read-write - [5:0] - The fractional baud rate divisor. These bits are cleared to 0 on reset. - BAUD_DIVFRAC - - - UARTFBRD - 0x00000000 - - - 0x002c - Line Control Register, UARTLCR_H - - - read-write - [7:7] - 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. - SPS - - - read-write - [6:5] - 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. - WLEN - - - read-write - [4:4] - 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). - FEN - - - read-write - [3:3] - 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. - STP2 - - - read-write - [2:2] - 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. - EPS - - - read-write - [1:1] - Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled. - PEN - - - read-write - [0:0] - 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. - BRK - - - UARTLCR_H - 0x00000000 - - - 0x0030 - Control Register, UARTCR - - - read-write - [15:15] - 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. - CTSEN - - - read-write - [14:14] - 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. - RTSEN - - - read-write - [13:13] - 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). - OUT2 - - - read-write - [12:12] - 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). - OUT1 - - - read-write - [11:11] - 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. - RTS - - - read-write - [10:10] - 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. - DTR - - - read-write - [9:9] - 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. - RXE - - - read-write - [8:8] - 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. - TXE - - - read-write - [7:7] - 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. - LBE - - - read-write - [2:2] - 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. - SIRLP - - - read-write - [1:1] - 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. - SIREN - - - read-write - [0:0] - 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. - UARTEN - - - UARTCR - 0x00000300 - - - 0x0034 - Interrupt FIFO Level Select Register, UARTIFLS - - - read-write - [5:3] - 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. - RXIFLSEL - - - read-write - [2:0] - 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. - TXIFLSEL - - - UARTIFLS - 0x00000012 - - - 0x0038 - Interrupt Mask Set/Clear Register, UARTIMSC - - - read-write - [10:10] - 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. - OEIM - - - read-write - [9:9] - 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. - BEIM - - - read-write - [8:8] - 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. - PEIM - - - read-write - [7:7] - 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. - FEIM - - - read-write - [6:6] - 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. - RTIM - - - read-write - [5:5] - 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. - TXIM - - - read-write - [4:4] - 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. - RXIM - - - read-write - [3:3] - 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. - DSRMIM - - - read-write - [2:2] - 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. - DCDMIM - - - read-write - [1:1] - 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. - CTSMIM - - - read-write - [0:0] - 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. - RIMIM - - - UARTIMSC - 0x00000000 - - - 0x003c - Raw Interrupt Status Register, UARTRIS - - - read-only - [10:10] - Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt. - OERIS - - - read-only - [9:9] - Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt. - BERIS - - - read-only - [8:8] - Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt. - PERIS - - - read-only - [7:7] - Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt. - FERIS - - - read-only - [6:6] - Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a - RTRIS - - - read-only - [5:5] - Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt. - TXRIS - - - read-only - [4:4] - Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt. - RXRIS - - - read-only - [3:3] - nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt. - DSRRMIS - - - read-only - [2:2] - nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt. - DCDRMIS - - - read-only - [1:1] - nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt. - CTSRMIS - - - read-only - [0:0] - nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt. - RIRMIS - - - UARTRIS - 0x00000000 - - - 0x0040 - Masked Interrupt Status Register, UARTMIS - - - read-only - [10:10] - Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt. - OEMIS - - - read-only - [9:9] - Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt. - BEMIS - - - read-only - [8:8] - Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt. - PEMIS - - - read-only - [7:7] - Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt. - FEMIS - - - read-only - [6:6] - Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt. - RTMIS - - - read-only - [5:5] - Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt. - TXMIS - - - read-only - [4:4] - Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt. - RXMIS - - - read-only - [3:3] - nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt. - DSRMMIS - - - read-only - [2:2] - nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt. - DCDMMIS - - - read-only - [1:1] - nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt. - CTSMMIS - - - read-only - [0:0] - nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt. - RIMMIS - - - UARTMIS - 0x00000000 - - - 0x0044 - Interrupt Clear Register, UARTICR - - - read-write - [10:10] - Overrun error interrupt clear. Clears the UARTOEINTR interrupt. - oneToClear - OEIC - - - read-write - [9:9] - Break error interrupt clear. Clears the UARTBEINTR interrupt. - oneToClear - BEIC - - - read-write - [8:8] - Parity error interrupt clear. Clears the UARTPEINTR interrupt. - oneToClear - PEIC - - - read-write - [7:7] - Framing error interrupt clear. Clears the UARTFEINTR interrupt. - oneToClear - FEIC - - - read-write - [6:6] - Receive timeout interrupt clear. Clears the UARTRTINTR interrupt. - oneToClear - RTIC - - - read-write - [5:5] - Transmit interrupt clear. Clears the UARTTXINTR interrupt. - oneToClear - TXIC - - - read-write - [4:4] - Receive interrupt clear. Clears the UARTRXINTR interrupt. - oneToClear - RXIC - - - read-write - [3:3] - nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt. - oneToClear - DSRMIC - - - read-write - [2:2] - nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt. - oneToClear - DCDMIC - - - read-write - [1:1] - nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt. - oneToClear - CTSMIC - - - read-write - [0:0] - nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt. - oneToClear - RIMIC - - - UARTICR - 0x00000000 - - - 0x0048 - DMA Control Register, UARTDMACR - - - read-write - [2:2] - 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. - DMAONERR - - - read-write - [1:1] - Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. - TXDMAE - - - read-write - [0:0] - Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled. - RXDMAE - - - UARTDMACR - 0x00000000 - - - 0x0fe0 - UARTPeriphID0 Register - - - read-only - [7:0] - These bits read back as 0x11 - PARTNUMBER0 - - - UARTPERIPHID0 - 0x00000011 - - - 0x0fe4 - UARTPeriphID1 Register - - - read-only - [7:4] - These bits read back as 0x1 - DESIGNER0 - - - read-only - [3:0] - These bits read back as 0x0 - PARTNUMBER1 - - - UARTPERIPHID1 - 0x00000010 - - - 0x0fe8 - UARTPeriphID2 Register - - - read-only - [7:4] - This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3 - REVISION - - - read-only - [3:0] - These bits read back as 0x4 - DESIGNER1 - - - UARTPERIPHID2 - 0x00000034 - - - 0x0fec - UARTPeriphID3 Register - - - read-only - [7:0] - These bits read back as 0x00 - CONFIGURATION - - - UARTPERIPHID3 - 0x00000000 - - - 0x0ff0 - UARTPCellID0 Register - - - read-only - [7:0] - These bits read back as 0x0D - UARTPCELLID0 - - - UARTPCELLID0 - 0x0000000d - - - 0x0ff4 - UARTPCellID1 Register - - - read-only - [7:0] - These bits read back as 0xF0 - UARTPCELLID1 - - - UARTPCELLID1 - 0x000000f0 - - - 0x0ff8 - UARTPCellID2 Register - - - read-only - [7:0] - These bits read back as 0x05 - UARTPCELLID2 - - - UARTPCELLID2 - 0x00000005 - - - 0x0ffc - UARTPCellID3 Register - - - read-only - [7:0] - These bits read back as 0xB1 - UARTPCELLID3 - - - UARTPCELLID3 - 0x000000b1 - - - 32 - 1 - - - 0x40038000 - - UART1_IRQ - 21 - - UART1 - - - - 0 - 0x1000 - registers - - 0x4003c000 - - SPI0_IRQ - 18 - - SPI0 - - - 0x0000 - Control register 0, SSPCR0 on page 3-4 - - - read-write - [15:8] - 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. - SCR - - - read-write - [7:7] - SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. - SPH - - - read-write - [6:6] - SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. - SPO - - - read-write - [5:4] - Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation. - FRF - - - read-write - [3:0] - 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. - DSS - - - SSPCR0 - 0x00000000 - - - 0x0004 - Control register 1, SSPCR1 on page 3-5 - - - read-write - [3:3] - 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. - SOD - - - read-write - [2:2] - 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. - MS - - - read-write - [1:1] - Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled. - SSE - - - read-write - [0:0] - Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally. - LBM - - - SSPCR1 - 0x00000000 - - - 0x0008 - Data register, SSPDR on page 3-6 - - - read-write - [15:0] - 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. - DATA - - - SSPDR - 0x00000000 - - - 0x000c - Status register, SSPSR on page 3-7 - - - read-only - [4:4] - 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. - BSY - - - read-only - [3:3] - Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full. - RFF - - - read-only - [2:2] - Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty. - RNE - - - read-only - [1:1] - Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full. - TNF - - - read-only - [0:0] - Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty. - TFE - - - SSPSR - 0x00000003 - - - 0x0010 - Clock prescale register, SSPCPSR on page 3-8 - - - read-write - [7:0] - 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. - CPSDVSR - - - SSPCPSR - 0x00000000 - - - 0x0014 - Interrupt mask set or clear register, SSPIMSC on page 3-9 - - - read-write - [3:3] - 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. - TXIM - - - read-write - [2:2] - 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. - RXIM - - - read-write - [1:1] - 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. - RTIM - - - read-write - [0:0] - 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. - RORIM - - - SSPIMSC - 0x00000000 - - - 0x0018 - Raw interrupt status register, SSPRIS on page 3-10 - - - read-only - [3:3] - Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt - TXRIS - - - read-only - [2:2] - Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt - RXRIS - - - read-only - [1:1] - Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt - RTRIS - - - read-only - [0:0] - Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt - RORRIS - - - SSPRIS - 0x00000008 - - - 0x001c - Masked interrupt status register, SSPMIS on page 3-11 - - - read-only - [3:3] - Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt - TXMIS - - - read-only - [2:2] - Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt - RXMIS - - - read-only - [1:1] - Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt - RTMIS - - - read-only - [0:0] - Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt - RORMIS - - - SSPMIS - 0x00000000 - - - 0x0020 - Interrupt clear register, SSPICR on page 3-11 - - - read-write - [1:1] - Clears the SSPRTINTR interrupt - oneToClear - RTIC - - - read-write - [0:0] - Clears the SSPRORINTR interrupt - oneToClear - RORIC - - - SSPICR - 0x00000000 - - - 0x0024 - DMA control register, SSPDMACR on page 3-12 - - - read-write - [1:1] - Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. - TXDMAE - - - read-write - [0:0] - Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled. - RXDMAE - - - SSPDMACR - 0x00000000 - - - 0x0fe0 - Peripheral identification registers, SSPPeriphID0-3 on page 3-13 - - - read-only - [7:0] - These bits read back as 0x22 - PARTNUMBER0 - - - SSPPERIPHID0 - 0x00000022 - - - 0x0fe4 - Peripheral identification registers, SSPPeriphID0-3 on page 3-13 - - - read-only - [7:4] - These bits read back as 0x1 - DESIGNER0 - - - read-only - [3:0] - These bits read back as 0x0 - PARTNUMBER1 - - - SSPPERIPHID1 - 0x00000010 - - - 0x0fe8 - Peripheral identification registers, SSPPeriphID0-3 on page 3-13 - - - read-only - [7:4] - These bits return the peripheral revision - REVISION - - - read-only - [3:0] - These bits read back as 0x4 - DESIGNER1 - - - SSPPERIPHID2 - 0x00000034 - - - 0x0fec - Peripheral identification registers, SSPPeriphID0-3 on page 3-13 - - - read-only - [7:0] - These bits read back as 0x00 - CONFIGURATION - - - SSPPERIPHID3 - 0x00000000 - - - 0x0ff0 - PrimeCell identification registers, SSPPCellID0-3 on page 3-16 - - - read-only - [7:0] - These bits read back as 0x0D - SSPPCELLID0 - - - SSPPCELLID0 - 0x0000000d - - - 0x0ff4 - PrimeCell identification registers, SSPPCellID0-3 on page 3-16 - - - read-only - [7:0] - These bits read back as 0xF0 - SSPPCELLID1 - - - SSPPCELLID1 - 0x000000f0 - - - 0x0ff8 - PrimeCell identification registers, SSPPCellID0-3 on page 3-16 - - - read-only - [7:0] - These bits read back as 0x05 - SSPPCELLID2 - - - SSPPCELLID2 - 0x00000005 - - - 0x0ffc - PrimeCell identification registers, SSPPCellID0-3 on page 3-16 - - - read-only - [7:0] - These bits read back as 0xB1 - SSPPCELLID3 - - - SSPPCELLID3 - 0x000000b1 - - - 32 - 1 - - - 0x40040000 - - SPI1_IRQ - 19 - - SPI1 - - - - 0 - 0x0100 - registers - - 0x40044000 - DW_apb_i2c address block\n\n - 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):\n\n - IC_ULTRA_FAST_MODE ................ 0x0\n - IC_UFM_TBUF_CNT_DEFAULT ........... 0x8\n - IC_UFM_SCL_LOW_COUNT .............. 0x0008\n - IC_UFM_SCL_HIGH_COUNT ............. 0x0006\n - IC_TX_TL .......................... 0x0\n - IC_TX_CMD_BLOCK ................... 0x1\n - IC_HAS_DMA ........................ 0x1\n - IC_HAS_ASYNC_FIFO ................. 0x0\n - IC_SMBUS_ARP ...................... 0x0\n - IC_FIRST_DATA_BYTE_STATUS ......... 0x1\n - IC_INTR_IO ........................ 0x1\n - IC_MASTER_MODE .................... 0x1\n - IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1\n - IC_INTR_POL ....................... 0x1\n - IC_OPTIONAL_SAR ................... 0x0\n - IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055\n - IC_DEFAULT_SLAVE_ADDR ............. 0x055\n - IC_DEFAULT_HS_SPKLEN .............. 0x1\n - IC_FS_SCL_HIGH_COUNT .............. 0x0006\n - IC_HS_SCL_LOW_COUNT ............... 0x0008\n - IC_DEVICE_ID_VALUE ................ 0x0\n - IC_10BITADDR_MASTER ............... 0x0\n - IC_CLK_FREQ_OPTIMIZATION .......... 0x0\n - IC_DEFAULT_FS_SPKLEN .............. 0x7\n - IC_ADD_ENCODED_PARAMS ............. 0x0\n - IC_DEFAULT_SDA_HOLD ............... 0x000001\n - IC_DEFAULT_SDA_SETUP .............. 0x64\n - IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0\n - IC_CLOCK_PERIOD ................... 100\n - IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1\n - IC_RESTART_EN ..................... 0x1\n - IC_TX_CMD_BLOCK_DEFAULT ........... 0x0\n - IC_BUS_CLEAR_FEATURE .............. 0x0\n - IC_CAP_LOADING .................... 100\n - IC_FS_SCL_LOW_COUNT ............... 0x000d\n - APB_DATA_WIDTH .................... 32\n - IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff\n - IC_SLV_DATA_NACK_ONLY ............. 0x1\n - IC_10BITADDR_SLAVE ................ 0x0\n - IC_CLK_TYPE ....................... 0x0\n - IC_SMBUS_UDID_MSB ................. 0x0\n - IC_SMBUS_SUSPEND_ALERT ............ 0x0\n - IC_HS_SCL_HIGH_COUNT .............. 0x0006\n - IC_SLV_RESTART_DET_EN ............. 0x1\n - IC_SMBUS .......................... 0x0\n - IC_OPTIONAL_SAR_DEFAULT ........... 0x0\n - IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0\n - IC_USE_COUNTS ..................... 0x0\n - IC_RX_BUFFER_DEPTH ................ 16\n - IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff\n - IC_RX_FULL_HLD_BUS_EN ............. 0x1\n - IC_SLAVE_DISABLE .................. 0x1\n - IC_RX_TL .......................... 0x0\n - IC_DEVICE_ID ...................... 0x0\n - IC_HC_COUNT_VALUES ................ 0x0\n - I2C_DYNAMIC_TAR_UPDATE ............ 0\n - IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff\n - IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff\n - IC_HS_MASTER_CODE ................. 0x1\n - IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff\n - IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff\n - IC_SS_SCL_HIGH_COUNT .............. 0x0028\n - IC_SS_SCL_LOW_COUNT ............... 0x002f\n - IC_MAX_SPEED_MODE ................. 0x2\n - IC_STAT_FOR_CLK_STRETCH ........... 0x0\n - IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0\n - IC_DEFAULT_UFM_SPKLEN ............. 0x1\n - IC_TX_BUFFER_DEPTH ................ 16 - - I2C0_IRQ - 23 - - I2C0 - - - 0x0000 - 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.\n\n - 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. - - - read-only - [10:10] - Master issues the STOP_DET interrupt irrespective of whether master is active or not - STOP_DET_IF_MASTER_ACTIVE - - - read-write - [9:9] - 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.\n\n - Reset value: 0x0. - - - Overflow when RX_FIFO is full - DISABLED - 0 - - - Hold bus when RX_FIFO is full - ENABLED - 1 - - - RX_FIFO_FULL_HLD_CTRL - - - read-write - [8:8] - This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0. - - - Default behaviour of TX_EMPTY interrupt - DISABLED - 0 - - - Controlled generation of TX_EMPTY interrupt - ENABLED - 1 - - - TX_EMPTY_CTRL - - - read-write - [7:7] - 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\n\n - 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). - - - slave issues STOP_DET intr always - DISABLED - 0 - - - slave issues STOP_DET intr only if addressed - ENABLED - 1 - - - STOP_DET_IFADDRESSED - - - read-write - [6:6] - 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.\n\n - 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.\n\n - NOTE: Software should ensure that if this bit is written with 0, then bit 0 should also be written with a 0. - - - Slave mode is enabled - SLAVE_ENABLED - 0 - - - Slave mode is disabled - SLAVE_DISABLED - 1 - - - IC_SLAVE_DISABLE - - - read-write - [5:5] - 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.\n\n - Reset value: ENABLED - - - Master restart disabled - DISABLED - 0 - - - Master restart enabled - ENABLED - 1 - - - IC_RESTART_EN - - - read-write - [4:4] - 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 - - - Master 7Bit addressing mode - ADDR_7BITS - 0 - - - Master 10Bit addressing mode - ADDR_10BITS - 1 - - - IC_10BITADDR_MASTER - - - read-write - [3:3] - 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. - - - Slave 7Bit addressing - ADDR_7BITS - 0 - - - Slave 10Bit addressing - ADDR_10BITS - 1 - - - IC_10BITADDR_SLAVE - - - read-write - [2:1] - 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.\n\n - 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.\n\n - 1: standard mode (100 kbit/s)\n\n - 2: fast mode (<=400 kbit/s) or fast mode plus (<=1000Kbit/s)\n\n - 3: high speed mode (3.4 Mbit/s)\n\n - Note: This field is not applicable when IC_ULTRA_FAST_MODE=1 - - - Standard Speed mode of operation - STANDARD - 1 - - - Fast or Fast Plus mode of operation - FAST - 2 - - - High Speed mode of operation - HIGH - 3 - - - SPEED - - - read-write - [0:0] - This bit controls whether the DW_apb_i2c master is enabled.\n\n - NOTE: Software should ensure that if this bit is written with '1' then bit 6 should also be written with a '1'. - - - Master mode is disabled - DISABLED - 0 - - - Master mode is enabled - ENABLED - 1 - - - MASTER_MODE - - - IC_CON - 0x00000065 - - - 0x0004 - I2C Target Address Register\n\n - 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.\n\n - 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. - - - read-write - [11:11] - 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 - - - Disables programming of GENERAL_CALL or START_BYTE transmission - DISABLED - 0 - - - Enables programming of GENERAL_CALL or START_BYTE transmission - ENABLED - 1 - - - SPECIAL - - - read-write - [10:10] - 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 - - - GENERAL_CALL byte transmission - GENERAL_CALL - 0 - - - START byte transmission - START_BYTE - 1 - - - GC_OR_START - - - read-write - [9:0] - 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.\n\n - 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. - IC_TAR - - - IC_TAR - 0x00000055 - - - 0x0008 - I2C Slave Address Register - - - read-write - [9:0] - 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.\n\n - 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.\n\n - 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. - IC_SAR - - - IC_SAR - 0x00000055 - - - 0x0010 - 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.\n\n - The size of the register changes as follows:\n\n - 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. - - - read-only - [11:11] - Indicates the first data byte received after the address phase for receive transfer in Master receiver or Slave receiver mode.\n\n - Reset value : 0x0\n\n - NOTE: In case of APB_DATA_WIDTH=8,\n\n - 1. The user has to perform two APB Reads to IC_DATA_CMD in order to get status on 11 bit.\n\n - 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).\n\n - 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. - - - Sequential data byte received - INACTIVE - 0 - - - Non sequential data byte received - ACTIVE - 1 - - - FIRST_DATA_BYTE - - - read-write - [10:10] - This bit controls whether a RESTART is issued before the byte is sent or received.\n\n - 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.\n\n - 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.\n\n - Reset value: 0x0 - - - Don't Issue RESTART before this command - DISABLE - 0 - - - Issue RESTART before this command - ENABLE - 1 - - - clear - RESTART - - - read-write - [9:9] - This bit controls whether a STOP is issued after the byte is sent or received.\n\n - - 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 - - - Don't Issue STOP after this command - DISABLE - 0 - - - Issue STOP after this command - ENABLE - 1 - - - clear - STOP - - - read-write - [8:8] - 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.\n\n - 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.\n\n - 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.\n\n - Reset value: 0x0 - - - Master Write Command - WRITE - 0 - - - Master Read Command - READ - 1 - - - clear - CMD - - - read-write - [7:0] - 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.\n\n - Reset value: 0x0 - DAT - - - IC_DATA_CMD - 0x00000000 - - - 0x0014 - Standard Speed I2C Clock SCL High Count Register - - - read-write - [15:0] - 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'.\n\n - 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.\n\n - 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.\n\n - 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. - IC_SS_SCL_HCNT - - - IC_SS_SCL_HCNT - 0x00000028 - - - 0x0018 - Standard Speed I2C Clock SCL Low Count Register - - - read-write - [15:0] - 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'\n\n - 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.\n\n - 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. - IC_SS_SCL_LCNT - - - IC_SS_SCL_LCNT - 0x0000002f - - - 0x001c - Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register - - - read-write - [15:0] - 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'.\n\n - 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.\n\n - 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. - IC_FS_SCL_HCNT - - - IC_FS_SCL_HCNT - 0x00000006 - - - 0x0020 - Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register - - - read-write - [15:0] - 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'.\n\n - This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard.\n\n - 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.\n\n - 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. - IC_FS_SCL_LCNT - - - IC_FS_SCL_LCNT - 0x0000000d - - - 0x002c - I2C Interrupt Status Register\n\n - 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. - - - read-only - [12:12] - See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit.\n\n - Reset value: 0x0 - - - R_RESTART_DET interrupt is inactive - INACTIVE - 0 - - - R_RESTART_DET interrupt is active - ACTIVE - 1 - - - R_RESTART_DET - - - read-only - [11:11] - See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit.\n\n - Reset value: 0x0 - - - R_GEN_CALL interrupt is inactive - INACTIVE - 0 - - - R_GEN_CALL interrupt is active - ACTIVE - 1 - - - R_GEN_CALL - - - read-only - [10:10] - See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit.\n\n - Reset value: 0x0 - - - R_START_DET interrupt is inactive - INACTIVE - 0 - - - R_START_DET interrupt is active - ACTIVE - 1 - - - R_START_DET - - - read-only - [9:9] - See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit.\n\n - Reset value: 0x0 - - - R_STOP_DET interrupt is inactive - INACTIVE - 0 - - - R_STOP_DET interrupt is active - ACTIVE - 1 - - - R_STOP_DET - - - read-only - [8:8] - See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit.\n\n - Reset value: 0x0 - - - R_ACTIVITY interrupt is inactive - INACTIVE - 0 - - - R_ACTIVITY interrupt is active - ACTIVE - 1 - - - R_ACTIVITY - - - read-only - [7:7] - See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit.\n\n - Reset value: 0x0 - - - R_RX_DONE interrupt is inactive - INACTIVE - 0 - - - R_RX_DONE interrupt is active - ACTIVE - 1 - - - R_RX_DONE - - - read-only - [6:6] - See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit.\n\n - Reset value: 0x0 - - - R_TX_ABRT interrupt is inactive - INACTIVE - 0 - - - R_TX_ABRT interrupt is active - ACTIVE - 1 - - - R_TX_ABRT - - - read-only - [5:5] - See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit.\n\n - Reset value: 0x0 - - - R_RD_REQ interrupt is inactive - INACTIVE - 0 - - - R_RD_REQ interrupt is active - ACTIVE - 1 - - - R_RD_REQ - - - read-only - [4:4] - See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit.\n\n - Reset value: 0x0 - - - R_TX_EMPTY interrupt is inactive - INACTIVE - 0 - - - R_TX_EMPTY interrupt is active - ACTIVE - 1 - - - R_TX_EMPTY - - - read-only - [3:3] - See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit.\n\n - Reset value: 0x0 - - - R_TX_OVER interrupt is inactive - INACTIVE - 0 - - - R_TX_OVER interrupt is active - ACTIVE - 1 - - - R_TX_OVER - - - read-only - [2:2] - See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit.\n\n - Reset value: 0x0 - - - R_RX_FULL interrupt is inactive - INACTIVE - 0 - - - R_RX_FULL interrupt is active - ACTIVE - 1 - - - R_RX_FULL - - - read-only - [1:1] - See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit.\n\n - Reset value: 0x0 - - - R_RX_OVER interrupt is inactive - INACTIVE - 0 - - - R_RX_OVER interrupt is active - ACTIVE - 1 - - - R_RX_OVER - - - read-only - [0:0] - See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit.\n\n - Reset value: 0x0 - - - RX_UNDER interrupt is inactive - INACTIVE - 0 - - - RX_UNDER interrupt is active - ACTIVE - 1 - - - R_RX_UNDER - - - IC_INTR_STAT - 0x00000000 - - - 0x0030 - I2C Interrupt Mask Register.\n\n - 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. - - - read-write - [12:12] - This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x0 - - - RESTART_DET interrupt is masked - ENABLED - 0 - - - RESTART_DET interrupt is unmasked - DISABLED - 1 - - - M_RESTART_DET - - - read-write - [11:11] - This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - GEN_CALL interrupt is masked - ENABLED - 0 - - - GEN_CALL interrupt is unmasked - DISABLED - 1 - - - M_GEN_CALL - - - read-write - [10:10] - This bit masks the R_START_DET interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x0 - - - START_DET interrupt is masked - ENABLED - 0 - - - START_DET interrupt is unmasked - DISABLED - 1 - - - M_START_DET - - - read-write - [9:9] - This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x0 - - - STOP_DET interrupt is masked - ENABLED - 0 - - - STOP_DET interrupt is unmasked - DISABLED - 1 - - - M_STOP_DET - - - read-write - [8:8] - This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x0 - - - ACTIVITY interrupt is masked - ENABLED - 0 - - - ACTIVITY interrupt is unmasked - DISABLED - 1 - - - M_ACTIVITY - - - read-write - [7:7] - This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - RX_DONE interrupt is masked - ENABLED - 0 - - - RX_DONE interrupt is unmasked - DISABLED - 1 - - - M_RX_DONE - - - read-write - [6:6] - This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - TX_ABORT interrupt is masked - ENABLED - 0 - - - TX_ABORT interrupt is unmasked - DISABLED - 1 - - - M_TX_ABRT - - - read-write - [5:5] - This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - RD_REQ interrupt is masked - ENABLED - 0 - - - RD_REQ interrupt is unmasked - DISABLED - 1 - - - M_RD_REQ - - - read-write - [4:4] - This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - TX_EMPTY interrupt is masked - ENABLED - 0 - - - TX_EMPTY interrupt is unmasked - DISABLED - 1 - - - M_TX_EMPTY - - - read-write - [3:3] - This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - TX_OVER interrupt is masked - ENABLED - 0 - - - TX_OVER interrupt is unmasked - DISABLED - 1 - - - M_TX_OVER - - - read-write - [2:2] - This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - RX_FULL interrupt is masked - ENABLED - 0 - - - RX_FULL interrupt is unmasked - DISABLED - 1 - - - M_RX_FULL - - - read-write - [1:1] - This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - RX_OVER interrupt is masked - ENABLED - 0 - - - RX_OVER interrupt is unmasked - DISABLED - 1 - - - M_RX_OVER - - - read-write - [0:0] - This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register.\n\n - Reset value: 0x1 - - - RX_UNDER interrupt is masked - ENABLED - 0 - - - RX_UNDER interrupt is unmasked - DISABLED - 1 - - - M_RX_UNDER - - - IC_INTR_MASK - 0x000008ff - - - 0x0034 - I2C Raw Interrupt Status Register\n\n - Unlike the IC_INTR_STAT register, these bits are not masked so they always show the true status of the DW_apb_i2c. - - - read-only - [12:12] - 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.\n\n - 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.\n\n - Reset value: 0x0 - - - RESTART_DET interrupt is inactive - INACTIVE - 0 - - - RESTART_DET interrupt is active - ACTIVE - 1 - - - RESTART_DET - - - read-only - [11:11] - 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.\n\n - Reset value: 0x0 - - - GEN_CALL interrupt is inactive - INACTIVE - 0 - - - GEN_CALL interrupt is active - ACTIVE - 1 - - - GEN_CALL - - - read-only - [10:10] - 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.\n\n - Reset value: 0x0 - - - START_DET interrupt is inactive - INACTIVE - 0 - - - START_DET interrupt is active - ACTIVE - 1 - - - START_DET - - - read-only - [9:9] - Indicates whether a STOP condition has occurred on the I2C interface regardless of whether DW_apb_i2c is operating in slave or master mode.\n\n - 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 - - - STOP_DET interrupt is inactive - INACTIVE - 0 - - - STOP_DET interrupt is active - ACTIVE - 1 - - - STOP_DET - - - read-only - [8:8] - 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.\n\n - Reset value: 0x0 - - - RAW_INTR_ACTIVITY interrupt is inactive - INACTIVE - 0 - - - RAW_INTR_ACTIVITY interrupt is active - ACTIVE - 1 - - - ACTIVITY - - - read-only - [7:7] - 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.\n\n - Reset value: 0x0 - - - RX_DONE interrupt is inactive - INACTIVE - 0 - - - RX_DONE interrupt is active - ACTIVE - 1 - - - RX_DONE - - - read-only - [6:6] - 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.\n\n - 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.\n\n - Reset value: 0x0 - - - TX_ABRT interrupt is inactive - INACTIVE - 0 - - - TX_ABRT interrupt is active - ACTIVE - 1 - - - TX_ABRT - - - read-only - [5:5] - 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.\n\n - Reset value: 0x0 - - - RD_REQ interrupt is inactive - INACTIVE - 0 - - - RD_REQ interrupt is active - ACTIVE - 1 - - - RD_REQ - - - read-only - [4:4] - 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.\n\n - Reset value: 0x0. - - - TX_EMPTY interrupt is inactive - INACTIVE - 0 - - - TX_EMPTY interrupt is active - ACTIVE - 1 - - - TX_EMPTY - - - read-only - [3:3] - 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.\n\n - Reset value: 0x0 - - - TX_OVER interrupt is inactive - INACTIVE - 0 - - - TX_OVER interrupt is active - ACTIVE - 1 - - - TX_OVER - - - read-only - [2:2] - 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.\n\n - Reset value: 0x0 - - - RX_FULL interrupt is inactive - INACTIVE - 0 - - - RX_FULL interrupt is active - ACTIVE - 1 - - - RX_FULL - - - read-only - [1:1] - 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.\n\n - 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.\n\n - Reset value: 0x0 - - - RX_OVER interrupt is inactive - INACTIVE - 0 - - - RX_OVER interrupt is active - ACTIVE - 1 - - - RX_OVER - - - read-only - [0:0] - 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.\n\n - Reset value: 0x0 - - - RX_UNDER interrupt is inactive - INACTIVE - 0 - - - RX_UNDER interrupt is active - ACTIVE - 1 - - - RX_UNDER - - - IC_RAW_INTR_STAT - 0x00000000 - - - 0x0038 - I2C Receive FIFO Threshold Register - - - read-write - [7:0] - Receive FIFO Threshold Level.\n\n - 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. - RX_TL - - - IC_RX_TL - 0x00000000 - - - 0x003c - I2C Transmit FIFO Threshold Register - - - read-write - [7:0] - Transmit FIFO Threshold Level.\n\n - 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. - TX_TL - - - IC_TX_TL - 0x00000000 - - - 0x0040 - Clear Combined and Individual Interrupt Register - - - read-only - [0:0] - 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.\n\n - Reset value: 0x0 - CLR_INTR - - - IC_CLR_INTR - 0x00000000 - - - 0x0044 - Clear RX_UNDER Interrupt Register - - - read-only - [0:0] - Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_RX_UNDER - - - IC_CLR_RX_UNDER - 0x00000000 - - - 0x0048 - Clear RX_OVER Interrupt Register - - - read-only - [0:0] - Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_RX_OVER - - - IC_CLR_RX_OVER - 0x00000000 - - - 0x004c - Clear TX_OVER Interrupt Register - - - read-only - [0:0] - Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_TX_OVER - - - IC_CLR_TX_OVER - 0x00000000 - - - 0x0050 - Clear RD_REQ Interrupt Register - - - read-only - [0:0] - Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_RD_REQ - - - IC_CLR_RD_REQ - 0x00000000 - - - 0x0054 - Clear TX_ABRT Interrupt Register - - - read-only - [0:0] - 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.\n\n - Reset value: 0x0 - CLR_TX_ABRT - - - IC_CLR_TX_ABRT - 0x00000000 - - - 0x0058 - Clear RX_DONE Interrupt Register - - - read-only - [0:0] - Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_RX_DONE - - - IC_CLR_RX_DONE - 0x00000000 - - - 0x005c - Clear ACTIVITY Interrupt Register - - - read-only - [0:0] - 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.\n\n - Reset value: 0x0 - CLR_ACTIVITY - - - IC_CLR_ACTIVITY - 0x00000000 - - - 0x0060 - Clear STOP_DET Interrupt Register - - - read-only - [0:0] - Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_STOP_DET - - - IC_CLR_STOP_DET - 0x00000000 - - - 0x0064 - Clear START_DET Interrupt Register - - - read-only - [0:0] - Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_START_DET - - - IC_CLR_START_DET - 0x00000000 - - - 0x0068 - Clear GEN_CALL Interrupt Register - - - read-only - [0:0] - Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_GEN_CALL - - - IC_CLR_GEN_CALL - 0x00000000 - - - 0x006c - I2C Enable Register - - - read-write - [2:2] - 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 - - - Tx Command execution not blocked - NOT_BLOCKED - 0 - - - Tx Command execution blocked - BLOCKED - 1 - - - TX_CMD_BLOCK - - - read-write - [1:1] - 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.\n\n - For a detailed description on how to abort I2C transfers, refer to 'Aborting I2C Transfers'.\n\n - Reset value: 0x0 - - - ABORT operation not in progress - DISABLE - 0 - - - ABORT operation in progress - ENABLED - 1 - - - ABORT - - - read-write - [0:0] - 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'.\n\n - 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.\n\n - 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'\n\n - Reset value: 0x0 - - - I2C is disabled - DISABLED - 0 - - - I2C is enabled - ENABLED - 1 - - - ENABLE - - - IC_ENABLE - 0x00000000 - - - 0x0070 - I2C Status Register\n\n - 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.\n\n - 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 - - - read-only - [6:6] - 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 - - - Slave is idle - IDLE - 0 - - - Slave not idle - ACTIVE - 1 - - - SLV_ACTIVITY - - - read-only - [5:5] - 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.\n\n - Reset value: 0x0 - - - Master is idle - IDLE - 0 - - - Master not idle - ACTIVE - 1 - - - MST_ACTIVITY - - - read-only - [4:4] - 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 - - - Rx FIFO not full - NOT_FULL - 0 - - - Rx FIFO is full - FULL - 1 - - - RFF - - - read-only - [3:3] - 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 - - - Rx FIFO is empty - EMPTY - 0 - - - Rx FIFO not empty - NOT_EMPTY - 1 - - - RFNE - - - read-only - [2:2] - 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 - - - Tx FIFO not empty - NON_EMPTY - 0 - - - Tx FIFO is empty - EMPTY - 1 - - - TFE - - - read-only - [1:1] - 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 - - - Tx FIFO is full - FULL - 0 - - - Tx FIFO not full - NOT_FULL - 1 - - - TFNF - - - read-only - [0:0] - I2C Activity Status. Reset value: 0x0 - - - I2C is idle - INACTIVE - 0 - - - I2C is active - ACTIVE - 1 - - - ACTIVITY - - - IC_STATUS - 0x00000006 - - - 0x0074 - 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. - - - read-only - [4:0] - Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO.\n\n - Reset value: 0x0 - TXFLR - - - IC_TXFLR - 0x00000000 - - - 0x0078 - 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. - - - read-only - [4:0] - Receive FIFO Level. Contains the number of valid data entries in the receive FIFO.\n\n - Reset value: 0x0 - RXFLR - - - IC_RXFLR - 0x00000000 - - - 0x007c - I2C SDA Hold Time Length Register\n\n - 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).\n\n - 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.\n\n - Writes to this register succeed only when IC_ENABLE[0]=0.\n\n - 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.\n\n - 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. - - - read-write - [23:16] - Sets the required SDA hold time in units of ic_clk period, when DW_apb_i2c acts as a receiver.\n\n - Reset value: IC_DEFAULT_SDA_HOLD[23:16]. - IC_SDA_RX_HOLD - - - read-write - [15:0] - Sets the required SDA hold time in units of ic_clk period, when DW_apb_i2c acts as a transmitter.\n\n - Reset value: IC_DEFAULT_SDA_HOLD[15:0]. - IC_SDA_TX_HOLD - - - IC_SDA_HOLD - 0x00000001 - - - 0x0080 - I2C Transmit Abort Source Register\n\n - 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]).\n\n - 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. - - - read-only - [31:23] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter - TX_FLUSH_CNT - - - read-only - [16:16] - This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE[1])\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter - - - Transfer abort detected by master- scenario not present - ABRT_USER_ABRT_VOID - 0 - - - Transfer abort detected by master - ABRT_USER_ABRT_GENERATED - 1 - - - ABRT_USER_ABRT - - - read-only - [15:15] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Slave-Transmitter - - - Slave trying to transmit to remote master in read mode- scenario not present - ABRT_SLVRD_INTX_VOID - 0 - - - Slave trying to transmit to remote master in read mode - ABRT_SLVRD_INTX_GENERATED - 1 - - - ABRT_SLVRD_INTX - - - read-only - [14:14] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Slave-Transmitter - - - Slave lost arbitration to remote master- scenario not present - ABRT_SLV_ARBLOST_VOID - 0 - - - Slave lost arbitration to remote master - ABRT_SLV_ARBLOST_GENERATED - 1 - - - ABRT_SLV_ARBLOST - - - read-only - [13:13] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Slave-Transmitter - - - Slave flushes existing data in TX-FIFO upon getting read command- scenario not present - ABRT_SLVFLUSH_TXFIFO_VOID - 0 - - - Slave flushes existing data in TX-FIFO upon getting read command - ABRT_SLVFLUSH_TXFIFO_GENERATED - 1 - - - ABRT_SLVFLUSH_TXFIFO - - - read-only - [12:12] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter - - - Master or Slave-Transmitter lost arbitration- scenario not present - ABRT_LOST_VOID - 0 - - - Master or Slave-Transmitter lost arbitration - ABRT_LOST_GENERATED - 1 - - - ARB_LOST - - - read-only - [11:11] - This field indicates that the User tries to initiate a Master operation with the Master mode disabled.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Master-Receiver - - - User initiating master operation when MASTER disabled- scenario not present - ABRT_MASTER_DIS_VOID - 0 - - - User initiating master operation when MASTER disabled - ABRT_MASTER_DIS_GENERATED - 1 - - - ABRT_MASTER_DIS - - - read-only - [10:10] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Receiver - - - Master not trying to read in 10Bit addressing mode when RESTART disabled - ABRT_10B_RD_VOID - 0 - - - Master trying to read in 10Bit addressing mode when RESTART disabled - ABRT_10B_RD_GENERATED - 1 - - - ABRT_10B_RD_NORSTRT - - - read-only - [9:9] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master - - - User trying to send START byte when RESTART disabled- scenario not present - ABRT_SBYTE_NORSTRT_VOID - 0 - - - User trying to send START byte when RESTART disabled - ABRT_SBYTE_NORSTRT_GENERATED - 1 - - - ABRT_SBYTE_NORSTRT - - - read-only - [8:8] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Master-Receiver - - - User trying to switch Master to HS mode when RESTART disabled- scenario not present - ABRT_HS_NORSTRT_VOID - 0 - - - User trying to switch Master to HS mode when RESTART disabled - ABRT_HS_NORSTRT_GENERATED - 1 - - - ABRT_HS_NORSTRT - - - read-only - [7:7] - This field indicates that the Master has sent a START Byte and the START Byte was acknowledged (wrong behavior).\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master - - - ACK detected for START byte- scenario not present - ABRT_SBYTE_ACKDET_VOID - 0 - - - ACK detected for START byte - ABRT_SBYTE_ACKDET_GENERATED - 1 - - - ABRT_SBYTE_ACKDET - - - read-only - [6:6] - This field indicates that the Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior).\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master - - - HS Master code ACKed in HS Mode- scenario not present - ABRT_HS_ACK_VOID - 0 - - - HS Master code ACKed in HS Mode - ABRT_HS_ACK_GENERATED - 1 - - - ABRT_HS_ACKDET - - - read-only - [5:5] - 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).\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter - - - GCALL is followed by read from bus-scenario not present - ABRT_GCALL_READ_VOID - 0 - - - GCALL is followed by read from bus - ABRT_GCALL_READ_GENERATED - 1 - - - ABRT_GCALL_READ - - - read-only - [4:4] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter - - - GCALL not ACKed by any slave-scenario not present - ABRT_GCALL_NOACK_VOID - 0 - - - GCALL not ACKed by any slave - ABRT_GCALL_NOACK_GENERATED - 1 - - - ABRT_GCALL_NOACK - - - read-only - [3:3] - 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).\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter - - - Transmitted data non-ACKed by addressed slave-scenario not present - ABRT_TXDATA_NOACK_VOID - 0 - - - Transmitted data not ACKed by addressed slave - ABRT_TXDATA_NOACK_GENERATED - 1 - - - ABRT_TXDATA_NOACK - - - read-only - [2:2] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Master-Receiver - - - This abort is not generated - INACTIVE - 0 - - - Byte 2 of 10Bit Address not ACKed by any slave - ACTIVE - 1 - - - ABRT_10ADDR2_NOACK - - - read-only - [1:1] - 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.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Master-Receiver - - - This abort is not generated - INACTIVE - 0 - - - Byte 1 of 10Bit Address not ACKed by any slave - ACTIVE - 1 - - - ABRT_10ADDR1_NOACK - - - read-only - [0:0] - This field indicates that the Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave.\n\n - Reset value: 0x0\n\n - Role of DW_apb_i2c: Master-Transmitter or Master-Receiver - - - This abort is not generated - INACTIVE - 0 - - - This abort is generated because of NOACK for 7-bit address - ACTIVE - 1 - - - ABRT_7B_ADDR_NOACK - - - IC_TX_ABRT_SOURCE - 0x00000000 - - - 0x0084 - Generate Slave Data NACK Register\n\n - 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.\n\n - 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. - - - read-write - [0:0] - 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.\n\n - 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 - - - Slave receiver generates NACK normally - DISABLED - 0 - - - Slave receiver generates NACK upon data reception only - ENABLED - 1 - - - NACK - - - IC_SLV_DATA_NACK_ONLY - 0x00000000 - - - 0x0088 - DMA Control Register\n\n - 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. - - - read-write - [1:1] - Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0 - - - transmit FIFO DMA channel disabled - DISABLED - 0 - - - Transmit FIFO DMA channel enabled - ENABLED - 1 - - - TDMAE - - - read-write - [0:0] - Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0 - - - Receive FIFO DMA channel disabled - DISABLED - 0 - - - Receive FIFO DMA channel enabled - ENABLED - 1 - - - RDMAE - - - IC_DMA_CR - 0x00000000 - - - 0x008c - DMA Transmit Data Level Register - - - read-write - [3:0] - 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.\n\n - Reset value: 0x0 - DMATDL - - - IC_DMA_TDLR - 0x00000000 - - - 0x0090 - I2C Receive Data Level Register - - - read-write - [3:0] - 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.\n\n - Reset value: 0x0 - DMARDL - - - IC_DMA_RDLR - 0x00000000 - - - 0x0094 - I2C SDA Setup Register\n\n - 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.\n\n - Writes to this register succeed only when IC_ENABLE[0] = 0.\n\n - 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. - - - read-write - [7:0] - 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. - SDA_SETUP - - - IC_SDA_SETUP - 0x00000064 - - - 0x0098 - I2C ACK General Call Register\n\n - The register controls whether DW_apb_i2c responds with a ACK or NACK when it receives an I2C General Call address.\n\n - This register is applicable only when the DW_apb_i2c is in slave mode. - - - read-write - [0:0] - 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). - - - Generate NACK for a General Call - DISABLED - 0 - - - Generate ACK for a General Call - ENABLED - 1 - - - ACK_GEN_CALL - - - IC_ACK_GENERAL_CALL - 0x00000001 - - - 0x009c - I2C Enable Status Register\n\n - 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.\n\n - If IC_ENABLE[0] has been set to 1, bits 2:1 are forced to 0, and bit 0 is forced to 1.\n\n - 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'.\n\n - 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. - - - read-only - [2:2] - 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.\n\n - 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.\n\n - 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.\n\n - Note: The CPU can safely read this bit when IC_EN (bit 0) is read as 0.\n\n - Reset value: 0x0 - - - Slave RX Data is not lost - INACTIVE - 0 - - - Slave RX Data is lost - ACTIVE - 1 - - - SLV_RX_DATA_LOST - - - read-only - [1:1] - 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:\n\n - (a) DW_apb_i2c is receiving the address byte of the Slave-Transmitter operation from a remote master;\n\n - OR,\n\n - (b) address and data bytes of the Slave-Receiver operation from a remote master.\n\n - 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.\n\n - 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.\n\n - 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.\n\n - Note: The CPU can safely read this bit when IC_EN (bit 0) is read as 0.\n\n - Reset value: 0x0 - - - Slave is disabled when it is idle - INACTIVE - 0 - - - Slave is disabled when it is active - ACTIVE - 1 - - - SLV_DISABLED_WHILE_BUSY - - - read-only - [0:0] - 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).\n\n - Reset value: 0x0 - - - I2C disabled - DISABLED - 0 - - - I2C enabled - ENABLED - 1 - - - IC_EN - - - IC_ENABLE_STATUS - 0x00000000 - - - 0x00a0 - I2C SS, FS or FM+ spike suppression limit\n\n - 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. - - - read-write - [7:0] - 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'. - IC_FS_SPKLEN - - - IC_FS_SPKLEN - 0x00000007 - - - 0x00a8 - Clear RESTART_DET Interrupt Register - - - read-only - [0:0] - Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register.\n\n - Reset value: 0x0 - CLR_RESTART_DET - - - IC_CLR_RESTART_DET - 0x00000000 - - - 0x00f4 - Component Parameter Register 1\n\n - 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 - - - read-only - [23:16] - TX Buffer Depth = 16 - TX_BUFFER_DEPTH - - - read-only - [15:8] - RX Buffer Depth = 16 - RX_BUFFER_DEPTH - - - read-only - [7:7] - Encoded parameters not visible - ADD_ENCODED_PARAMS - - - read-only - [6:6] - DMA handshaking signals are enabled - HAS_DMA - - - read-only - [5:5] - COMBINED Interrupt outputs - INTR_IO - - - read-only - [4:4] - Programmable count values for each mode. - HC_COUNT_VALUES - - - read-only - [3:2] - MAX SPEED MODE = FAST MODE - MAX_SPEED_MODE - - - read-only - [1:0] - APB data bus width is 32 bits - APB_DATA_WIDTH - - - IC_COMP_PARAM_1 - 0x00000000 - - - 0x00f8 - I2C Component Version Register - - - read-only - [31:0] - IC_COMP_VERSION - - - IC_COMP_VERSION - 0x3230312a - - - 0x00fc - I2C Component Type Register - - - read-only - [31:0] - 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. - IC_COMP_TYPE - - - IC_COMP_TYPE - 0x44570140 - - - 32 - 1 - - - 0x40048000 - - I2C1_IRQ - 24 - - I2C1 - - - - 0 - 0x1000 - registers - - 0x4004c000 - Control and data interface to SAR ADC - - ADC_IRQ_FIFO - 22 - - ADC - - - 0x0000 - ADC Control and Status - - - read-write - [20:16] - Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.\n - Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.\n - The first channel to be sampled will be the one currently indicated by AINSEL.\n - AINSEL will be updated after each conversion with the newly-selected channel. - RROBIN - - - read-write - [14:12] - Select analog mux input. Updated automatically in round-robin mode. - AINSEL - - - read-write - [10:10] - Some past ADC conversion encountered an error. Write 1 to clear. - oneToClear - ERR_STICKY - - - read-only - [9:9] - The most recent ADC conversion encountered an error; result is undefined or noisy. - ERR - - - read-only - [8:8] - 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed.\n - 0 whilst conversion in progress. - READY - - - read-write - [3:3] - Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes. - START_MANY - - - read-write - [2:2] - Start a single conversion. Self-clearing. Ignored if start_many is asserted. - clear - START_ONCE - - - read-write - [1:1] - Power on temperature sensor. 1 - enabled. 0 - disabled. - TS_EN - - - read-write - [0:0] - Power on ADC and enable its clock.\n - 1 - enabled. 0 - disabled. - EN - - - CS - 0x00000000 - - - 0x0004 - Result of most recent ADC conversion - - - read-only - [11:0] - RESULT - - - RESULT - 0x00000000 - - - 0x0008 - FIFO control and status - - - read-write - [27:24] - DREQ/IRQ asserted when level >= threshold - THRESH - - - read-only - [19:16] - The number of conversion results currently waiting in the FIFO - LEVEL - - - read-write - [11:11] - 1 if the FIFO has been overflowed. Write 1 to clear. - oneToClear - OVER - - - read-write - [10:10] - 1 if the FIFO has been underflowed. Write 1 to clear. - oneToClear - UNDER - - - read-only - [9:9] - FULL - - - read-only - [8:8] - EMPTY - - - read-write - [3:3] - If 1: assert DMA requests when FIFO contains data - DREQ_EN - - - read-write - [2:2] - If 1: conversion error bit appears in the FIFO alongside the result - ERR - - - read-write - [1:1] - If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers. - SHIFT - - - read-write - [0:0] - If 1: write result to the FIFO after each conversion. - EN - - - FCS - 0x00000000 - - - 0x000c - Conversion result FIFO - - - read-only - [15:15] - 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted. - ERR - - - read-only - [11:0] - VAL - - - FIFO - 0x00000000 - - - 0x0010 - Clock divider. If non-zero, CS_START_MANY will start conversions\n - at regular intervals rather than back-to-back.\n - The divider is reset when either of these fields are written.\n - Total period is 1 + INT + FRAC / 256 - - - read-write - [23:8] - Integer part of clock divisor. - INT - - - read-write - [7:0] - Fractional part of clock divisor. First-order delta-sigma. - FRAC - - - DIV - 0x00000000 - - - 0x0014 - Raw Interrupts - - - read-only - [0:0] - Triggered when the sample FIFO reaches a certain level.\n - This level can be programmed via the FCS_THRESH field. - FIFO - - - INTR - 0x00000000 - - - 0x0018 - Interrupt Enable - - - read-write - [0:0] - Triggered when the sample FIFO reaches a certain level.\n - This level can be programmed via the FCS_THRESH field. - FIFO - - - INTE - 0x00000000 - - - 0x001c - Interrupt Force - - - read-write - [0:0] - Triggered when the sample FIFO reaches a certain level.\n - This level can be programmed via the FCS_THRESH field. - FIFO - - - INTF - 0x00000000 - - - 0x0020 - Interrupt status after masking & forcing - - - read-only - [0:0] - Triggered when the sample FIFO reaches a certain level.\n - This level can be programmed via the FCS_THRESH field. - FIFO - - - INTS - 0x00000000 - - - 32 - 2 - - - - 0 - 0x1000 - registers - - 0x40050000 - Simple PWM - - PWM_IRQ_WRAP - 4 - - PWM - - - 0x0000 - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH0_CSR - 0x00000000 - - - 0x0004 - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH0_DIV - 0x00000010 - - - 0x0008 - Direct access to the PWM counter - - - read-write - [15:0] - CH0_CTR - - - CH0_CTR - 0x00000000 - - - 0x000c - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH0_CC - 0x00000000 - - - 0x0010 - Counter wrap value - - - read-write - [15:0] - CH0_TOP - - - CH0_TOP - 0x0000ffff - - - 0x0014 - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH1_CSR - 0x00000000 - - - 0x0018 - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH1_DIV - 0x00000010 - - - 0x001c - Direct access to the PWM counter - - - read-write - [15:0] - CH1_CTR - - - CH1_CTR - 0x00000000 - - - 0x0020 - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH1_CC - 0x00000000 - - - 0x0024 - Counter wrap value - - - read-write - [15:0] - CH1_TOP - - - CH1_TOP - 0x0000ffff - - - 0x0028 - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH2_CSR - 0x00000000 - - - 0x002c - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH2_DIV - 0x00000010 - - - 0x0030 - Direct access to the PWM counter - - - read-write - [15:0] - CH2_CTR - - - CH2_CTR - 0x00000000 - - - 0x0034 - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH2_CC - 0x00000000 - - - 0x0038 - Counter wrap value - - - read-write - [15:0] - CH2_TOP - - - CH2_TOP - 0x0000ffff - - - 0x003c - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH3_CSR - 0x00000000 - - - 0x0040 - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH3_DIV - 0x00000010 - - - 0x0044 - Direct access to the PWM counter - - - read-write - [15:0] - CH3_CTR - - - CH3_CTR - 0x00000000 - - - 0x0048 - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH3_CC - 0x00000000 - - - 0x004c - Counter wrap value - - - read-write - [15:0] - CH3_TOP - - - CH3_TOP - 0x0000ffff - - - 0x0050 - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH4_CSR - 0x00000000 - - - 0x0054 - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH4_DIV - 0x00000010 - - - 0x0058 - Direct access to the PWM counter - - - read-write - [15:0] - CH4_CTR - - - CH4_CTR - 0x00000000 - - - 0x005c - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH4_CC - 0x00000000 - - - 0x0060 - Counter wrap value - - - read-write - [15:0] - CH4_TOP - - - CH4_TOP - 0x0000ffff - - - 0x0064 - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH5_CSR - 0x00000000 - - - 0x0068 - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH5_DIV - 0x00000010 - - - 0x006c - Direct access to the PWM counter - - - read-write - [15:0] - CH5_CTR - - - CH5_CTR - 0x00000000 - - - 0x0070 - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH5_CC - 0x00000000 - - - 0x0074 - Counter wrap value - - - read-write - [15:0] - CH5_TOP - - - CH5_TOP - 0x0000ffff - - - 0x0078 - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH6_CSR - 0x00000000 - - - 0x007c - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH6_DIV - 0x00000010 - - - 0x0080 - Direct access to the PWM counter - - - read-write - [15:0] - CH6_CTR - - - CH6_CTR - 0x00000000 - - - 0x0084 - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH6_CC - 0x00000000 - - - 0x0088 - Counter wrap value - - - read-write - [15:0] - CH6_TOP - - - CH6_TOP - 0x0000ffff - - - 0x008c - Control and status register - - - read-write - [7:7] - Advance the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running\n - at less than full speed (div_int + div_frac / 16 > 1) - clear - PH_ADV - - - read-write - [6:6] - Retard the phase of the counter by 1 count, while it is running.\n - Self-clearing. Write a 1, and poll until low. Counter must be running. - clear - PH_RET - - - read-write - [5:4] - - - Free-running counting at rate dictated by fractional divider - div - 0 - - - Fractional divider operation is gated by the PWM B pin. - level - 1 - - - Counter advances with each rising edge of the PWM B pin. - rise - 2 - - - Counter advances with each falling edge of the PWM B pin. - fall - 3 - - - DIVMODE - - - read-write - [3:3] - Invert output B - B_INV - - - read-write - [2:2] - Invert output A - A_INV - - - read-write - [1:1] - 1: Enable phase-correct modulation. 0: Trailing-edge - PH_CORRECT - - - read-write - [0:0] - Enable the PWM channel. - EN - - - CH7_CSR - 0x00000000 - - - 0x0090 - INT and FRAC form a fixed-point fractional number.\n - Counting rate is system clock frequency divided by this number.\n - Fractional division uses simple 1st-order sigma-delta. - - - read-write - [11:4] - INT - - - read-write - [3:0] - FRAC - - - CH7_DIV - 0x00000010 - - - 0x0094 - Direct access to the PWM counter - - - read-write - [15:0] - CH7_CTR - - - CH7_CTR - 0x00000000 - - - 0x0098 - Counter compare values - - - read-write - [31:16] - B - - - read-write - [15:0] - A - - - CH7_CC - 0x00000000 - - - 0x009c - Counter wrap value - - - read-write - [15:0] - CH7_TOP - - - CH7_TOP - 0x0000ffff - - - 0x00a0 - This register aliases the CSR_EN bits for all channels.\n - Writing to this register allows multiple channels to be enabled\n - or disabled simultaneously, so they can run in perfect sync.\n - For each channel, there is only one physical EN register bit,\n - which can be accessed through here or CHx_CSR. - - - read-write - [7:7] - CH7 - - - read-write - [6:6] - CH6 - - - read-write - [5:5] - CH5 - - - read-write - [4:4] - CH4 - - - read-write - [3:3] - CH3 - - - read-write - [2:2] - CH2 - - - read-write - [1:1] - CH1 - - - read-write - [0:0] - CH0 - - - EN - 0x00000000 - - - 0x00a4 - Raw Interrupts - - - read-write - [7:7] - oneToClear - CH7 - - - read-write - [6:6] - oneToClear - CH6 - - - read-write - [5:5] - oneToClear - CH5 - - - read-write - [4:4] - oneToClear - CH4 - - - read-write - [3:3] - oneToClear - CH3 - - - read-write - [2:2] - oneToClear - CH2 - - - read-write - [1:1] - oneToClear - CH1 - - - read-write - [0:0] - oneToClear - CH0 - - - INTR - 0x00000000 - - - 0x00a8 - Interrupt Enable - - - read-write - [7:7] - CH7 - - - read-write - [6:6] - CH6 - - - read-write - [5:5] - CH5 - - - read-write - [4:4] - CH4 - - - read-write - [3:3] - CH3 - - - read-write - [2:2] - CH2 - - - read-write - [1:1] - CH1 - - - read-write - [0:0] - CH0 - - - INTE - 0x00000000 - - - 0x00ac - Interrupt Force - - - read-write - [7:7] - CH7 - - - read-write - [6:6] - CH6 - - - read-write - [5:5] - CH5 - - - read-write - [4:4] - CH4 - - - read-write - [3:3] - CH3 - - - read-write - [2:2] - CH2 - - - read-write - [1:1] - CH1 - - - read-write - [0:0] - CH0 - - - INTF - 0x00000000 - - - 0x00b0 - Interrupt status after masking & forcing - - - read-only - [7:7] - CH7 - - - read-only - [6:6] - CH6 - - - read-only - [5:5] - CH5 - - - read-only - [4:4] - CH4 - - - read-only - [3:3] - CH3 - - - read-only - [2:2] - CH2 - - - read-only - [1:1] - CH1 - - - read-only - [0:0] - CH0 - - - INTS - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40054000 - Controls time and alarms\n - time is a 64 bit value indicating the time in usec since power-on\n - timeh is the top 32 bits of time & timel is the bottom 32 bits\n - to change time write to timelw before timehw\n - to read time read from timelr before timehr\n - An alarm is set by setting alarm_enable and writing to the corresponding alarm register\n - When an alarm is pending, the corresponding alarm_running signal will be high\n - An alarm can be cancelled before it has finished by clearing the alarm_enable\n - When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared\n - To clear the interrupt write a 1 to the corresponding alarm_irq - - TIMER_IRQ_0 - 0 - - - TIMER_IRQ_1 - 1 - - - TIMER_IRQ_2 - 2 - - - TIMER_IRQ_3 - 3 - - TIMER - - - write-only - 0x0000 - Write to bits 63:32 of time\n - always write timelw before timehw - TIMEHW - 0x00000000 - - - write-only - 0x0004 - Write to bits 31:0 of time\n - writes do not get copied to time until timehw is written - TIMELW - 0x00000000 - - - read-only - 0x0008 - Read from bits 63:32 of time\n - always read timelr before timehr - TIMEHR - 0x00000000 - - - read-only - 0x000c - Read from bits 31:0 of time - TIMELR - 0x00000000 - - - read-write - 0x0010 - Arm alarm 0, and configure the time it will fire.\n - Once armed, the alarm fires when TIMER_ALARM0 == TIMELR.\n - The alarm will disarm itself once it fires, and can\n - be disarmed early using the ARMED status register. - ALARM0 - 0x00000000 - - - read-write - 0x0014 - Arm alarm 1, and configure the time it will fire.\n - Once armed, the alarm fires when TIMER_ALARM1 == TIMELR.\n - The alarm will disarm itself once it fires, and can\n - be disarmed early using the ARMED status register. - ALARM1 - 0x00000000 - - - read-write - 0x0018 - Arm alarm 2, and configure the time it will fire.\n - Once armed, the alarm fires when TIMER_ALARM2 == TIMELR.\n - The alarm will disarm itself once it fires, and can\n - be disarmed early using the ARMED status register. - ALARM2 - 0x00000000 - - - read-write - 0x001c - Arm alarm 3, and configure the time it will fire.\n - Once armed, the alarm fires when TIMER_ALARM3 == TIMELR.\n - The alarm will disarm itself once it fires, and can\n - be disarmed early using the ARMED status register. - ALARM3 - 0x00000000 - - - 0x0020 - Indicates the armed/disarmed status of each alarm.\n - A write to the corresponding ALARMx register arms the alarm.\n - Alarms automatically disarm upon firing, but writing ones here\n - will disarm immediately without waiting to fire. - - - read-write - [3:0] - oneToClear - ARMED - - - ARMED - 0x00000000 - - - read-only - 0x0024 - Raw read from bits 63:32 of time (no side effects) - TIMERAWH - 0x00000000 - - - read-only - 0x0028 - Raw read from bits 31:0 of time (no side effects) - TIMERAWL - 0x00000000 - - - 0x002c - Set bits high to enable pause when the corresponding debug ports are active - - - read-write - [2:2] - Pause when processor 1 is in debug mode - DBG1 - - - read-write - [1:1] - Pause when processor 0 is in debug mode - DBG0 - - - DBGPAUSE - 0x00000007 - - - 0x0030 - Set high to pause the timer - - - read-write - [0:0] - PAUSE - - - PAUSE - 0x00000000 - - - 0x0034 - Raw Interrupts - - - read-write - [3:3] - oneToClear - ALARM_3 - - - read-write - [2:2] - oneToClear - ALARM_2 - - - read-write - [1:1] - oneToClear - ALARM_1 - - - read-write - [0:0] - oneToClear - ALARM_0 - - - INTR - 0x00000000 - - - 0x0038 - Interrupt Enable - - - read-write - [3:3] - ALARM_3 - - - read-write - [2:2] - ALARM_2 - - - read-write - [1:1] - ALARM_1 - - - read-write - [0:0] - ALARM_0 - - - INTE - 0x00000000 - - - 0x003c - Interrupt Force - - - read-write - [3:3] - ALARM_3 - - - read-write - [2:2] - ALARM_2 - - - read-write - [1:1] - ALARM_1 - - - read-write - [0:0] - ALARM_0 - - - INTF - 0x00000000 - - - 0x0040 - Interrupt status after masking & forcing - - - read-only - [3:3] - ALARM_3 - - - read-only - [2:2] - ALARM_2 - - - read-only - [1:1] - ALARM_1 - - - read-only - [0:0] - ALARM_0 - - - INTS - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40058000 - WATCHDOG - - - 0x0000 - Watchdog control\n - The rst_wdsel register determines which subsystems are reset when the watchdog is triggered.\n - The watchdog can be triggered in software. - - - read-write - [31:31] - Trigger a watchdog reset - clear - TRIGGER - - - read-write - [30:30] - When not enabled the watchdog timer is paused - ENABLE - - - read-write - [26:26] - Pause the watchdog timer when processor 1 is in debug mode - PAUSE_DBG1 - - - read-write - [25:25] - Pause the watchdog timer when processor 0 is in debug mode - PAUSE_DBG0 - - - read-write - [24:24] - Pause the watchdog timer when JTAG is accessing the bus fabric - PAUSE_JTAG - - - read-only - [23:0] - Indicates the number of ticks / 2 (see errata RP2040-E1) before a watchdog reset will be triggered - TIME - - - CTRL - 0x07000000 - - - 0x0004 - Load the watchdog timer. The maximum setting is 0xffffff which corresponds to 0xffffff / 2 ticks before triggering a watchdog reset (see errata RP2040-E1). - - - write-only - [23:0] - LOAD - - - LOAD - 0x00000000 - - - 0x0008 - Logs the reason for the last reset. Both bits are zero for the case of a hardware reset. - - - read-only - [1:1] - FORCE - - - read-only - [0:0] - TIMER - - - REASON - 0x00000000 - - - read-write - 0x000c - Scratch register. Information persists through soft reset of the chip. - SCRATCH0 - 0x00000000 - - - read-write - 0x0010 - Scratch register. Information persists through soft reset of the chip. - SCRATCH1 - 0x00000000 - - - read-write - 0x0014 - Scratch register. Information persists through soft reset of the chip. - SCRATCH2 - 0x00000000 - - - read-write - 0x0018 - Scratch register. Information persists through soft reset of the chip. - SCRATCH3 - 0x00000000 - - - read-write - 0x001c - Scratch register. Information persists through soft reset of the chip. - SCRATCH4 - 0x00000000 - - - read-write - 0x0020 - Scratch register. Information persists through soft reset of the chip. - SCRATCH5 - 0x00000000 - - - read-write - 0x0024 - Scratch register. Information persists through soft reset of the chip. - SCRATCH6 - 0x00000000 - - - read-write - 0x0028 - Scratch register. Information persists through soft reset of the chip. - SCRATCH7 - 0x00000000 - - - 0x002c - Controls the tick generator - - - read-only - [19:11] - Count down timer: the remaining number clk_tick cycles before the next tick is generated. - COUNT - - - read-only - [10:10] - Is the tick generator running? - RUNNING - - - read-write - [9:9] - start / stop tick generation - ENABLE - - - read-write - [8:0] - Total number of clk_tick cycles before the next tick. - CYCLES - - - TICK - 0x00000200 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x4005c000 - Register block to control RTC - - RTC_IRQ - 25 - - RTC - - - 0x0000 - Divider minus 1 for the 1 second counter. Safe to change the value when RTC is not enabled. - - - read-write - [15:0] - CLKDIV_M1 - - - CLKDIV_M1 - 0x00000000 - - - 0x0004 - RTC setup register 0 - - - read-write - [23:12] - Year - YEAR - - - read-write - [11:8] - Month (1..12) - MONTH - - - read-write - [4:0] - Day of the month (1..31) - DAY - - - SETUP_0 - 0x00000000 - - - 0x0008 - RTC setup register 1 - - - read-write - [26:24] - Day of the week: 1-Monday...0-Sunday ISO 8601 mod 7 - DOTW - - - read-write - [20:16] - Hours - HOUR - - - read-write - [13:8] - Minutes - MIN - - - read-write - [5:0] - Seconds - SEC - - - SETUP_1 - 0x00000000 - - - 0x000c - RTC Control and status - - - read-write - [8:8] - If set, leapyear is forced off.\n - Useful for years divisible by 100 but not by 400 - FORCE_NOTLEAPYEAR - - - read-write - [4:4] - Load RTC - clear - LOAD - - - read-only - [1:1] - RTC enabled (running) - RTC_ACTIVE - - - read-write - [0:0] - Enable RTC - RTC_ENABLE - - - CTRL - 0x00000000 - - - 0x0010 - Interrupt setup register 0 - - - read-only - [29:29] - MATCH_ACTIVE - - - read-write - [28:28] - Global match enable. Don't change any other value while this one is enabled - MATCH_ENA - - - read-write - [26:26] - Enable year matching - YEAR_ENA - - - read-write - [25:25] - Enable month matching - MONTH_ENA - - - read-write - [24:24] - Enable day matching - DAY_ENA - - - read-write - [23:12] - Year - YEAR - - - read-write - [11:8] - Month (1..12) - MONTH - - - read-write - [4:0] - Day of the month (1..31) - DAY - - - IRQ_SETUP_0 - 0x00000000 - - - 0x0014 - Interrupt setup register 1 - - - read-write - [31:31] - Enable day of the week matching - DOTW_ENA - - - read-write - [30:30] - Enable hour matching - HOUR_ENA - - - read-write - [29:29] - Enable minute matching - MIN_ENA - - - read-write - [28:28] - Enable second matching - SEC_ENA - - - read-write - [26:24] - Day of the week - DOTW - - - read-write - [20:16] - Hours - HOUR - - - read-write - [13:8] - Minutes - MIN - - - read-write - [5:0] - Seconds - SEC - - - IRQ_SETUP_1 - 0x00000000 - - - 0x0018 - RTC register 1. - - - read-only - [23:12] - Year - YEAR - - - read-only - [11:8] - Month (1..12) - MONTH - - - read-only - [4:0] - Day of the month (1..31) - DAY - - - RTC_1 - 0x00000000 - - - 0x001c - RTC register 0\n - Read this before RTC 1! - - - read-only - [26:24] - Day of the week - DOTW - - - read-only - [20:16] - Hours - HOUR - - - read-only - [13:8] - Minutes - MIN - - - read-only - [5:0] - Seconds - SEC - - - RTC_0 - 0x00000000 - - - 0x0020 - Raw Interrupts - - - read-only - [0:0] - RTC - - - INTR - 0x00000000 - - - 0x0024 - Interrupt Enable - - - read-write - [0:0] - RTC - - - INTE - 0x00000000 - - - 0x0028 - Interrupt Force - - - read-write - [0:0] - RTC - - - INTF - 0x00000000 - - - 0x002c - Interrupt status after masking & forcing - - - read-only - [0:0] - RTC - - - INTS - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40060000 - ROSC - - - 0x0000 - Ring Oscillator control - - - read-write - [23:12] - On power-up this field is initialised to ENABLE\n - The system clock must be switched to another source before setting this field to DISABLE otherwise the chip will lock up\n - The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator. - - - DISABLE - 3358 - - - ENABLE - 4011 - - - ENABLE - - - read-write - [11:0] - Controls the number of delay stages in the ROSC ring\n - LOW uses stages 0 to 7\n - MEDIUM uses stages 0 to 5\n - HIGH uses stages 0 to 3\n - TOOHIGH uses stages 0 to 1 and should not be used because its frequency exceeds design specifications\n - The clock output will not glitch when changing the range up one step at a time\n - The clock output will glitch when changing the range down\n - Note: the values here are gray coded which is why HIGH comes before TOOHIGH - - - LOW - 4004 - - - MEDIUM - 4005 - - - HIGH - 4007 - - - TOOHIGH - 4006 - - - FREQ_RANGE - - - CTRL - 0x00000aa0 - - - 0x0004 - The FREQA & FREQB registers control the frequency by controlling the drive strength of each stage\n - The drive strength has 4 levels determined by the number of bits set\n - Increasing the number of bits set increases the drive strength and increases the oscillation frequency\n - 0 bits set is the default drive strength\n - 1 bit set doubles the drive strength\n - 2 bits set triples drive strength\n - 3 bits set quadruples drive strength - - - read-write - [31:16] - Set to 0x9696 to apply the settings\n - Any other value in this field will set all drive strengths to 0 - - - PASS - 38550 - - - PASSWD - - - read-write - [14:12] - Stage 3 drive strength - DS3 - - - read-write - [10:8] - Stage 2 drive strength - DS2 - - - read-write - [6:4] - Stage 1 drive strength - DS1 - - - read-write - [2:0] - Stage 0 drive strength - DS0 - - - FREQA - 0x00000000 - - - 0x0008 - For a detailed description see freqa register - - - read-write - [31:16] - Set to 0x9696 to apply the settings\n - Any other value in this field will set all drive strengths to 0 - - - PASS - 38550 - - - PASSWD - - - read-write - [14:12] - Stage 7 drive strength - DS7 - - - read-write - [10:8] - Stage 6 drive strength - DS6 - - - read-write - [6:4] - Stage 5 drive strength - DS5 - - - read-write - [2:0] - Stage 4 drive strength - DS4 - - - FREQB - 0x00000000 - - - read-write - 0x000c - Ring Oscillator pause control\n - This is used to save power by pausing the ROSC\n - On power-up this field is initialised to WAKE\n - An invalid write will also select WAKE\n - Warning: setup the irq before selecting dormant mode - DORMANT - 0x00000000 - - - 0x0010 - Controls the output divider - - - read-write - [11:0] - set to 0xaa0 + div where\n - div = 0 divides by 32\n - div = 1-31 divides by div\n - any other value sets div=31\n - this register resets to div=16 - - - PASS - 2720 - - - DIV - - - DIV - 0x00000000 - - - 0x0014 - Controls the phase shifted output - - - read-write - [11:4] - set to 0xaa\n - any other value enables the output with shift=0 - PASSWD - - - read-write - [3:3] - enable the phase-shifted output\n - this can be changed on-the-fly - ENABLE - - - read-write - [2:2] - invert the phase-shifted output\n - this is ignored when div=1 - FLIP - - - read-write - [1:0] - phase shift the phase-shifted output by SHIFT input clocks\n - this can be changed on-the-fly\n - must be set to 0 before setting div=1 - SHIFT - - - PHASE - 0x00000008 - - - 0x0018 - Ring Oscillator Status - - - read-only - [31:31] - Oscillator is running and stable - STABLE - - - read-write - [24:24] - An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT - oneToClear - BADWRITE - - - read-only - [16:16] - post-divider is running\n - this resets to 0 but transitions to 1 during chip startup - DIV_RUNNING - - - read-only - [12:12] - Oscillator is enabled but not necessarily running and stable\n - this resets to 0 but transitions to 1 during chip startup - ENABLED - - - STATUS - 0x00000000 - - - 0x001c - 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 - - - read-only - [0:0] - RANDOMBIT - - - RANDOMBIT - 0x00000001 - - - 0x0020 - A down counter running at the ROSC frequency which counts to zero and stops.\n - To start the counter write a non-zero value.\n - Can be used for short software pauses when setting up time sensitive hardware. - - - read-write - [7:0] - COUNT - - - COUNT - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x40064000 - control and status for on-chip voltage regulator and chip level reset subsystem - VREG_AND_CHIP_RESET - - - 0x0000 - Voltage regulator control and status - - - read-only - [12:12] - regulation status\n - 0=not in regulation, 1=in regulation - ROK - - - read-write - [7:4] - output voltage select\n - 0000 to 0101 - 0.80V\n - 0110 - 0.85V\n - 0111 - 0.90V\n - 1000 - 0.95V\n - 1001 - 1.00V\n - 1010 - 1.05V\n - 1011 - 1.10V (default)\n - 1100 - 1.15V\n - 1101 - 1.20V\n - 1110 - 1.25V\n - 1111 - 1.30V - VSEL - - - read-write - [1:1] - high impedance mode select\n - 0=not in high impedance mode, 1=in high impedance mode - HIZ - - - read-write - [0:0] - enable\n - 0=not enabled, 1=enabled - EN - - - VREG - 0x000000b1 - - - 0x0004 - brown-out detection control - - - read-write - [7:4] - threshold select\n - 0000 - 0.473V\n - 0001 - 0.516V\n - 0010 - 0.559V\n - 0011 - 0.602V\n - 0100 - 0.645V\n - 0101 - 0.688V\n - 0110 - 0.731V\n - 0111 - 0.774V\n - 1000 - 0.817V\n - 1001 - 0.860V (default)\n - 1010 - 0.903V\n - 1011 - 0.946V\n - 1100 - 0.989V\n - 1101 - 1.032V\n - 1110 - 1.075V\n - 1111 - 1.118V - VSEL - - - read-write - [0:0] - enable\n - 0=not enabled, 1=enabled - EN - - - BOD - 0x00000091 - - - 0x0008 - Chip reset control and status - - - read-write - [24:24] - This is set by psm_restart from the debugger.\n - Its purpose is to branch bootcode to a safe mode when the debugger has issued a psm_restart in order to recover from a boot lock-up.\n - In the safe mode the debugger can repair the boot code, clear this flag then reboot the processor. - oneToClear - PSM_RESTART_FLAG - - - read-only - [20:20] - Last reset was from the debug port - HAD_PSM_RESTART - - - read-only - [16:16] - Last reset was from the RUN pin - HAD_RUN - - - read-only - [8:8] - Last reset was from the power-on reset or brown-out detection blocks - HAD_POR - - - CHIP_RESET - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x4006c000 - Testbench manager. Allows the programmer to know what platform their software is running on. - TBMAN - - - 0x0000 - Indicates the type of platform in use - - - read-only - [1:1] - Indicates the platform is an FPGA - FPGA - - - read-only - [0:0] - Indicates the platform is an ASIC - ASIC - - - PLATFORM - 0x00000005 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x50000000 - DMA with separate read and write masters - - DMA_IRQ_0 - 11 - - - DMA_IRQ_1 - 12 - - DMA - - - read-write - 0x0000 - DMA Channel 0 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH0_READ_ADDR - 0x00000000 - - - read-write - 0x0004 - DMA Channel 0 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH0_WRITE_ADDR - 0x00000000 - - - read-write - 0x0008 - DMA Channel 0 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH0_TRANS_COUNT - 0x00000000 - - - 0x000c - DMA Channel 0 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH0_CTRL_TRIG - 0x00000000 - - - read-write - 0x0010 - Alias for channel 0 CTRL register - CH0_AL1_CTRL - 0x00000000 - - - read-write - 0x0014 - Alias for channel 0 READ_ADDR register - CH0_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0018 - Alias for channel 0 WRITE_ADDR register - CH0_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x001c - Alias for channel 0 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH0_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x0020 - Alias for channel 0 CTRL register - CH0_AL2_CTRL - 0x00000000 - - - read-write - 0x0024 - Alias for channel 0 TRANS_COUNT register - CH0_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x0028 - Alias for channel 0 READ_ADDR register - CH0_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x002c - Alias for channel 0 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH0_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x0030 - Alias for channel 0 CTRL register - CH0_AL3_CTRL - 0x00000000 - - - read-write - 0x0034 - Alias for channel 0 WRITE_ADDR register - CH0_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x0038 - Alias for channel 0 TRANS_COUNT register - CH0_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x003c - Alias for channel 0 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH0_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0040 - DMA Channel 1 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH1_READ_ADDR - 0x00000000 - - - read-write - 0x0044 - DMA Channel 1 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH1_WRITE_ADDR - 0x00000000 - - - read-write - 0x0048 - DMA Channel 1 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH1_TRANS_COUNT - 0x00000000 - - - 0x004c - DMA Channel 1 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH1_CTRL_TRIG - 0x00000000 - - - read-write - 0x0050 - Alias for channel 1 CTRL register - CH1_AL1_CTRL - 0x00000000 - - - read-write - 0x0054 - Alias for channel 1 READ_ADDR register - CH1_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0058 - Alias for channel 1 WRITE_ADDR register - CH1_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x005c - Alias for channel 1 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH1_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x0060 - Alias for channel 1 CTRL register - CH1_AL2_CTRL - 0x00000000 - - - read-write - 0x0064 - Alias for channel 1 TRANS_COUNT register - CH1_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x0068 - Alias for channel 1 READ_ADDR register - CH1_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x006c - Alias for channel 1 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH1_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x0070 - Alias for channel 1 CTRL register - CH1_AL3_CTRL - 0x00000000 - - - read-write - 0x0074 - Alias for channel 1 WRITE_ADDR register - CH1_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x0078 - Alias for channel 1 TRANS_COUNT register - CH1_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x007c - Alias for channel 1 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH1_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0080 - DMA Channel 2 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH2_READ_ADDR - 0x00000000 - - - read-write - 0x0084 - DMA Channel 2 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH2_WRITE_ADDR - 0x00000000 - - - read-write - 0x0088 - DMA Channel 2 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH2_TRANS_COUNT - 0x00000000 - - - 0x008c - DMA Channel 2 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH2_CTRL_TRIG - 0x00000000 - - - read-write - 0x0090 - Alias for channel 2 CTRL register - CH2_AL1_CTRL - 0x00000000 - - - read-write - 0x0094 - Alias for channel 2 READ_ADDR register - CH2_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0098 - Alias for channel 2 WRITE_ADDR register - CH2_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x009c - Alias for channel 2 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH2_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x00a0 - Alias for channel 2 CTRL register - CH2_AL2_CTRL - 0x00000000 - - - read-write - 0x00a4 - Alias for channel 2 TRANS_COUNT register - CH2_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x00a8 - Alias for channel 2 READ_ADDR register - CH2_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x00ac - Alias for channel 2 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH2_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x00b0 - Alias for channel 2 CTRL register - CH2_AL3_CTRL - 0x00000000 - - - read-write - 0x00b4 - Alias for channel 2 WRITE_ADDR register - CH2_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x00b8 - Alias for channel 2 TRANS_COUNT register - CH2_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x00bc - Alias for channel 2 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH2_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x00c0 - DMA Channel 3 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH3_READ_ADDR - 0x00000000 - - - read-write - 0x00c4 - DMA Channel 3 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH3_WRITE_ADDR - 0x00000000 - - - read-write - 0x00c8 - DMA Channel 3 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH3_TRANS_COUNT - 0x00000000 - - - 0x00cc - DMA Channel 3 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH3_CTRL_TRIG - 0x00000000 - - - read-write - 0x00d0 - Alias for channel 3 CTRL register - CH3_AL1_CTRL - 0x00000000 - - - read-write - 0x00d4 - Alias for channel 3 READ_ADDR register - CH3_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x00d8 - Alias for channel 3 WRITE_ADDR register - CH3_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x00dc - Alias for channel 3 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH3_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x00e0 - Alias for channel 3 CTRL register - CH3_AL2_CTRL - 0x00000000 - - - read-write - 0x00e4 - Alias for channel 3 TRANS_COUNT register - CH3_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x00e8 - Alias for channel 3 READ_ADDR register - CH3_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x00ec - Alias for channel 3 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH3_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x00f0 - Alias for channel 3 CTRL register - CH3_AL3_CTRL - 0x00000000 - - - read-write - 0x00f4 - Alias for channel 3 WRITE_ADDR register - CH3_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x00f8 - Alias for channel 3 TRANS_COUNT register - CH3_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x00fc - Alias for channel 3 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH3_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0100 - DMA Channel 4 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH4_READ_ADDR - 0x00000000 - - - read-write - 0x0104 - DMA Channel 4 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH4_WRITE_ADDR - 0x00000000 - - - read-write - 0x0108 - DMA Channel 4 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH4_TRANS_COUNT - 0x00000000 - - - 0x010c - DMA Channel 4 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH4_CTRL_TRIG - 0x00000000 - - - read-write - 0x0110 - Alias for channel 4 CTRL register - CH4_AL1_CTRL - 0x00000000 - - - read-write - 0x0114 - Alias for channel 4 READ_ADDR register - CH4_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0118 - Alias for channel 4 WRITE_ADDR register - CH4_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x011c - Alias for channel 4 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH4_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x0120 - Alias for channel 4 CTRL register - CH4_AL2_CTRL - 0x00000000 - - - read-write - 0x0124 - Alias for channel 4 TRANS_COUNT register - CH4_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x0128 - Alias for channel 4 READ_ADDR register - CH4_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x012c - Alias for channel 4 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH4_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x0130 - Alias for channel 4 CTRL register - CH4_AL3_CTRL - 0x00000000 - - - read-write - 0x0134 - Alias for channel 4 WRITE_ADDR register - CH4_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x0138 - Alias for channel 4 TRANS_COUNT register - CH4_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x013c - Alias for channel 4 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH4_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0140 - DMA Channel 5 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH5_READ_ADDR - 0x00000000 - - - read-write - 0x0144 - DMA Channel 5 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH5_WRITE_ADDR - 0x00000000 - - - read-write - 0x0148 - DMA Channel 5 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH5_TRANS_COUNT - 0x00000000 - - - 0x014c - DMA Channel 5 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH5_CTRL_TRIG - 0x00000000 - - - read-write - 0x0150 - Alias for channel 5 CTRL register - CH5_AL1_CTRL - 0x00000000 - - - read-write - 0x0154 - Alias for channel 5 READ_ADDR register - CH5_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0158 - Alias for channel 5 WRITE_ADDR register - CH5_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x015c - Alias for channel 5 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH5_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x0160 - Alias for channel 5 CTRL register - CH5_AL2_CTRL - 0x00000000 - - - read-write - 0x0164 - Alias for channel 5 TRANS_COUNT register - CH5_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x0168 - Alias for channel 5 READ_ADDR register - CH5_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x016c - Alias for channel 5 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH5_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x0170 - Alias for channel 5 CTRL register - CH5_AL3_CTRL - 0x00000000 - - - read-write - 0x0174 - Alias for channel 5 WRITE_ADDR register - CH5_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x0178 - Alias for channel 5 TRANS_COUNT register - CH5_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x017c - Alias for channel 5 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH5_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0180 - DMA Channel 6 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH6_READ_ADDR - 0x00000000 - - - read-write - 0x0184 - DMA Channel 6 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH6_WRITE_ADDR - 0x00000000 - - - read-write - 0x0188 - DMA Channel 6 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH6_TRANS_COUNT - 0x00000000 - - - 0x018c - DMA Channel 6 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH6_CTRL_TRIG - 0x00000000 - - - read-write - 0x0190 - Alias for channel 6 CTRL register - CH6_AL1_CTRL - 0x00000000 - - - read-write - 0x0194 - Alias for channel 6 READ_ADDR register - CH6_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0198 - Alias for channel 6 WRITE_ADDR register - CH6_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x019c - Alias for channel 6 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH6_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x01a0 - Alias for channel 6 CTRL register - CH6_AL2_CTRL - 0x00000000 - - - read-write - 0x01a4 - Alias for channel 6 TRANS_COUNT register - CH6_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x01a8 - Alias for channel 6 READ_ADDR register - CH6_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x01ac - Alias for channel 6 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH6_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x01b0 - Alias for channel 6 CTRL register - CH6_AL3_CTRL - 0x00000000 - - - read-write - 0x01b4 - Alias for channel 6 WRITE_ADDR register - CH6_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x01b8 - Alias for channel 6 TRANS_COUNT register - CH6_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x01bc - Alias for channel 6 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH6_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x01c0 - DMA Channel 7 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH7_READ_ADDR - 0x00000000 - - - read-write - 0x01c4 - DMA Channel 7 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH7_WRITE_ADDR - 0x00000000 - - - read-write - 0x01c8 - DMA Channel 7 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH7_TRANS_COUNT - 0x00000000 - - - 0x01cc - DMA Channel 7 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH7_CTRL_TRIG - 0x00000000 - - - read-write - 0x01d0 - Alias for channel 7 CTRL register - CH7_AL1_CTRL - 0x00000000 - - - read-write - 0x01d4 - Alias for channel 7 READ_ADDR register - CH7_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x01d8 - Alias for channel 7 WRITE_ADDR register - CH7_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x01dc - Alias for channel 7 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH7_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x01e0 - Alias for channel 7 CTRL register - CH7_AL2_CTRL - 0x00000000 - - - read-write - 0x01e4 - Alias for channel 7 TRANS_COUNT register - CH7_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x01e8 - Alias for channel 7 READ_ADDR register - CH7_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x01ec - Alias for channel 7 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH7_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x01f0 - Alias for channel 7 CTRL register - CH7_AL3_CTRL - 0x00000000 - - - read-write - 0x01f4 - Alias for channel 7 WRITE_ADDR register - CH7_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x01f8 - Alias for channel 7 TRANS_COUNT register - CH7_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x01fc - Alias for channel 7 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH7_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0200 - DMA Channel 8 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH8_READ_ADDR - 0x00000000 - - - read-write - 0x0204 - DMA Channel 8 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH8_WRITE_ADDR - 0x00000000 - - - read-write - 0x0208 - DMA Channel 8 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH8_TRANS_COUNT - 0x00000000 - - - 0x020c - DMA Channel 8 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH8_CTRL_TRIG - 0x00000000 - - - read-write - 0x0210 - Alias for channel 8 CTRL register - CH8_AL1_CTRL - 0x00000000 - - - read-write - 0x0214 - Alias for channel 8 READ_ADDR register - CH8_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0218 - Alias for channel 8 WRITE_ADDR register - CH8_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x021c - Alias for channel 8 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH8_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x0220 - Alias for channel 8 CTRL register - CH8_AL2_CTRL - 0x00000000 - - - read-write - 0x0224 - Alias for channel 8 TRANS_COUNT register - CH8_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x0228 - Alias for channel 8 READ_ADDR register - CH8_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x022c - Alias for channel 8 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH8_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x0230 - Alias for channel 8 CTRL register - CH8_AL3_CTRL - 0x00000000 - - - read-write - 0x0234 - Alias for channel 8 WRITE_ADDR register - CH8_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x0238 - Alias for channel 8 TRANS_COUNT register - CH8_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x023c - Alias for channel 8 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH8_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0240 - DMA Channel 9 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH9_READ_ADDR - 0x00000000 - - - read-write - 0x0244 - DMA Channel 9 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH9_WRITE_ADDR - 0x00000000 - - - read-write - 0x0248 - DMA Channel 9 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH9_TRANS_COUNT - 0x00000000 - - - 0x024c - DMA Channel 9 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH9_CTRL_TRIG - 0x00000000 - - - read-write - 0x0250 - Alias for channel 9 CTRL register - CH9_AL1_CTRL - 0x00000000 - - - read-write - 0x0254 - Alias for channel 9 READ_ADDR register - CH9_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0258 - Alias for channel 9 WRITE_ADDR register - CH9_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x025c - Alias for channel 9 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH9_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x0260 - Alias for channel 9 CTRL register - CH9_AL2_CTRL - 0x00000000 - - - read-write - 0x0264 - Alias for channel 9 TRANS_COUNT register - CH9_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x0268 - Alias for channel 9 READ_ADDR register - CH9_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x026c - Alias for channel 9 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH9_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x0270 - Alias for channel 9 CTRL register - CH9_AL3_CTRL - 0x00000000 - - - read-write - 0x0274 - Alias for channel 9 WRITE_ADDR register - CH9_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x0278 - Alias for channel 9 TRANS_COUNT register - CH9_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x027c - Alias for channel 9 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH9_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x0280 - DMA Channel 10 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH10_READ_ADDR - 0x00000000 - - - read-write - 0x0284 - DMA Channel 10 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH10_WRITE_ADDR - 0x00000000 - - - read-write - 0x0288 - DMA Channel 10 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH10_TRANS_COUNT - 0x00000000 - - - 0x028c - DMA Channel 10 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH10_CTRL_TRIG - 0x00000000 - - - read-write - 0x0290 - Alias for channel 10 CTRL register - CH10_AL1_CTRL - 0x00000000 - - - read-write - 0x0294 - Alias for channel 10 READ_ADDR register - CH10_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x0298 - Alias for channel 10 WRITE_ADDR register - CH10_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x029c - Alias for channel 10 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH10_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x02a0 - Alias for channel 10 CTRL register - CH10_AL2_CTRL - 0x00000000 - - - read-write - 0x02a4 - Alias for channel 10 TRANS_COUNT register - CH10_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x02a8 - Alias for channel 10 READ_ADDR register - CH10_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x02ac - Alias for channel 10 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH10_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x02b0 - Alias for channel 10 CTRL register - CH10_AL3_CTRL - 0x00000000 - - - read-write - 0x02b4 - Alias for channel 10 WRITE_ADDR register - CH10_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x02b8 - Alias for channel 10 TRANS_COUNT register - CH10_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x02bc - Alias for channel 10 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH10_AL3_READ_ADDR_TRIG - 0x00000000 - - - read-write - 0x02c0 - DMA Channel 11 Read Address pointer\n - This register updates automatically each time a read completes. The current value is the next address to be read by this channel. - CH11_READ_ADDR - 0x00000000 - - - read-write - 0x02c4 - DMA Channel 11 Write Address pointer\n - This register updates automatically each time a write completes. The current value is the next address to be written by this channel. - CH11_WRITE_ADDR - 0x00000000 - - - read-write - 0x02c8 - DMA Channel 11 Transfer Count\n - 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).\n\n - When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n - 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.\n\n - 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. - CH11_TRANS_COUNT - 0x00000000 - - - 0x02cc - DMA Channel 11 Control and Status - - - read-only - [31:31] - 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. - AHB_ERROR - - - read-write - [30:30] - If 1, the channel received a read bus error. Write one to clear.\n - READ_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 3 transfers later) - oneToClear - READ_ERROR - - - read-write - [29:29] - If 1, the channel received a write bus error. Write one to clear.\n - WRITE_ADDR shows the approximate address where the bus error was encountered (will not be earlier, or more than 5 transfers later) - oneToClear - WRITE_ERROR - - - read-only - [24:24] - 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.\n\n - To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. - BUSY - - - read-write - [23:23] - 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.\n\n - This allows checksum to be enabled or disabled on a per-control- block basis. - SNIFF_EN - - - read-write - [22:22] - Apply byte-swap transformation to DMA data.\n - 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. - BSWAP - - - read-write - [21:21] - 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.\n\n - This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. - IRQ_QUIET - - - read-write - [20:15] - Select a Transfer Request signal.\n - 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).\n - 0x0 to 0x3a -> select DREQ n as TREQ - - - Select Timer 0 as TREQ - TIMER0 - 59 - - - Select Timer 1 as TREQ - TIMER1 - 60 - - - Select Timer 2 as TREQ (Optional) - TIMER2 - 61 - - - Select Timer 3 as TREQ (Optional) - TIMER3 - 62 - - - Permanent request, for unpaced transfers. - PERMANENT - 63 - - - TREQ_SEL - - - read-write - [14:11] - When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_. - CHAIN_TO - - - read-write - [10:10] - Select whether RING_SIZE applies to read or write addresses.\n - If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. - RING_SEL - - - read-write - [9:6] - 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.\n\n - Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. - - - RING_NONE - 0 - - - RING_SIZE - - - read-write - [5:5] - If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n - Generally this should be disabled for memory-to-peripheral transfers. - INCR_WRITE - - - read-write - [4:4] - If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n - Generally this should be disabled for peripheral-to-memory transfers. - INCR_READ - - - read-write - [3:2] - 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. - - - SIZE_BYTE - 0 - - - SIZE_HALFWORD - 1 - - - SIZE_WORD - 2 - - - DATA_SIZE - - - read-write - [1:1] - 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.\n\n - 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. - HIGH_PRIORITY - - - read-write - [0:0] - DMA Channel Enable.\n - 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) - EN - - - CH11_CTRL_TRIG - 0x00000000 - - - read-write - 0x02d0 - Alias for channel 11 CTRL register - CH11_AL1_CTRL - 0x00000000 - - - read-write - 0x02d4 - Alias for channel 11 READ_ADDR register - CH11_AL1_READ_ADDR - 0x00000000 - - - read-write - 0x02d8 - Alias for channel 11 WRITE_ADDR register - CH11_AL1_WRITE_ADDR - 0x00000000 - - - read-write - 0x02dc - Alias for channel 11 TRANS_COUNT register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH11_AL1_TRANS_COUNT_TRIG - 0x00000000 - - - read-write - 0x02e0 - Alias for channel 11 CTRL register - CH11_AL2_CTRL - 0x00000000 - - - read-write - 0x02e4 - Alias for channel 11 TRANS_COUNT register - CH11_AL2_TRANS_COUNT - 0x00000000 - - - read-write - 0x02e8 - Alias for channel 11 READ_ADDR register - CH11_AL2_READ_ADDR - 0x00000000 - - - read-write - 0x02ec - Alias for channel 11 WRITE_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH11_AL2_WRITE_ADDR_TRIG - 0x00000000 - - - read-write - 0x02f0 - Alias for channel 11 CTRL register - CH11_AL3_CTRL - 0x00000000 - - - read-write - 0x02f4 - Alias for channel 11 WRITE_ADDR register - CH11_AL3_WRITE_ADDR - 0x00000000 - - - read-write - 0x02f8 - Alias for channel 11 TRANS_COUNT register - CH11_AL3_TRANS_COUNT - 0x00000000 - - - read-write - 0x02fc - Alias for channel 11 READ_ADDR register\n - This is a trigger register (0xc). Writing a nonzero value will\n - reload the channel counter and start the channel. - CH11_AL3_READ_ADDR_TRIG - 0x00000000 - - - 0x0400 - Interrupt Status (raw) - - - read-write - [15:0] - 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, INTS0 or INTS1.\n\n - Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1.\n\n - This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores.\n\n - It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0. - oneToClear - INTR - - - INTR - 0x00000000 - - - 0x0404 - Interrupt Enables for IRQ 0 - - - read-write - [15:0] - Set bit n to pass interrupts from channel n to DMA IRQ 0. - INTE0 - - - INTE0 - 0x00000000 - - - 0x0408 - Force Interrupts - - - read-write - [15:0] - Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared. - INTF0 - - - INTF0 - 0x00000000 - - - 0x040c - Interrupt Status for IRQ 0 - - - read-write - [15:0] - Indicates active channel interrupt requests which are currently causing IRQ 0 to be asserted.\n - Channel interrupts can be cleared by writing a bit mask here. - oneToClear - INTS0 - - - INTS0 - 0x00000000 - - - 0x0414 - Interrupt Enables for IRQ 1 - - - read-write - [15:0] - Set bit n to pass interrupts from channel n to DMA IRQ 1. - INTE1 - - - INTE1 - 0x00000000 - - - 0x0418 - Force Interrupts for IRQ 1 - - - read-write - [15:0] - Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared. - INTF1 - - - INTF1 - 0x00000000 - - - 0x041c - Interrupt Status (masked) for IRQ 1 - - - read-write - [15:0] - Indicates active channel interrupt requests which are currently causing IRQ 1 to be asserted.\n - Channel interrupts can be cleared by writing a bit mask here. - oneToClear - INTS1 - - - INTS1 - 0x00000000 - - - 0x0420 - Pacing (X/Y) Fractional Timer\n - 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. - - - read-write - [31:16] - Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. - X - - - read-write - [15:0] - Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. - Y - - - TIMER0 - 0x00000000 - - - 0x0424 - Pacing (X/Y) Fractional Timer\n - 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. - - - read-write - [31:16] - Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. - X - - - read-write - [15:0] - Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. - Y - - - TIMER1 - 0x00000000 - - - 0x0428 - Pacing (X/Y) Fractional Timer\n - 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. - - - read-write - [31:16] - Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. - X - - - read-write - [15:0] - Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. - Y - - - TIMER2 - 0x00000000 - - - 0x042c - Pacing (X/Y) Fractional Timer\n - 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. - - - read-write - [31:16] - Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. - X - - - read-write - [15:0] - Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. - Y - - - TIMER3 - 0x00000000 - - - 0x0430 - Trigger one or more channels simultaneously - - - read-write - [15:0] - 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. - clear - MULTI_CHAN_TRIGGER - - - MULTI_CHAN_TRIGGER - 0x00000000 - - - 0x0434 - Sniffer Control - - - read-write - [11:11] - 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. - OUT_INV - - - read-write - [10:10] - 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. - OUT_REV - - - read-write - [9:9] - Locally perform a byte reverse on the sniffed data, before feeding into checksum.\n\n - 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. - BSWAP - - - read-write - [8:5] - - - Calculate a CRC-32 (IEEE802.3 polynomial) - CRC32 - 0 - - - Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data - CRC32R - 1 - - - Calculate a CRC-16-CCITT - CRC16 - 2 - - - Calculate a CRC-16-CCITT with bit reversed data - CRC16R - 3 - - - XOR reduction over all data. == 1 if the total 1 population count is odd. - EVEN - 14 - - - Calculate a simple 32-bit checksum (addition with a 32 bit accumulator) - SUM - 15 - - - CALC - - - read-write - [4:1] - DMA channel for Sniffer to observe - DMACH - - - read-write - [0:0] - Enable sniffer - EN - - - SNIFF_CTRL - 0x00000000 - - - read-write - 0x0438 - Data accumulator for sniff hardware\n - 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. - SNIFF_DATA - 0x00000000 - - - 0x0440 - Debug RAF, WAF, TDF levels - - - read-only - [23:16] - Current Read-Address-FIFO fill level - RAF_LVL - - - read-only - [15:8] - Current Write-Address-FIFO fill level - WAF_LVL - - - read-only - [7:0] - Current Transfer-Data-FIFO fill level - TDF_LVL - - - FIFO_LEVELS - 0x00000000 - - - 0x0444 - Abort an in-progress transfer sequence on one or more channels - - - read-write - [15:0] - 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.\n\n - After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel. - clear - CHAN_ABORT - - - CHAN_ABORT - 0x00000000 - - - 0x0448 - 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. - - - read-only - [4:0] - N_CHANNELS - - - N_CHANNELS - 0x00000000 - - - 0x0800 - 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. - - - read-write - [5:0] - oneToClear - CH0_DBG_CTDREQ - - - CH0_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0804 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH0_DBG_TCR - 0x00000000 - - - 0x0840 - 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. - - - read-write - [5:0] - oneToClear - CH1_DBG_CTDREQ - - - CH1_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0844 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH1_DBG_TCR - 0x00000000 - - - 0x0880 - 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. - - - read-write - [5:0] - oneToClear - CH2_DBG_CTDREQ - - - CH2_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0884 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH2_DBG_TCR - 0x00000000 - - - 0x08c0 - 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. - - - read-write - [5:0] - oneToClear - CH3_DBG_CTDREQ - - - CH3_DBG_CTDREQ - 0x00000000 - - - read-only - 0x08c4 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH3_DBG_TCR - 0x00000000 - - - 0x0900 - 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. - - - read-write - [5:0] - oneToClear - CH4_DBG_CTDREQ - - - CH4_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0904 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH4_DBG_TCR - 0x00000000 - - - 0x0940 - 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. - - - read-write - [5:0] - oneToClear - CH5_DBG_CTDREQ - - - CH5_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0944 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH5_DBG_TCR - 0x00000000 - - - 0x0980 - 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. - - - read-write - [5:0] - oneToClear - CH6_DBG_CTDREQ - - - CH6_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0984 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH6_DBG_TCR - 0x00000000 - - - 0x09c0 - 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. - - - read-write - [5:0] - oneToClear - CH7_DBG_CTDREQ - - - CH7_DBG_CTDREQ - 0x00000000 - - - read-only - 0x09c4 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH7_DBG_TCR - 0x00000000 - - - 0x0a00 - 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. - - - read-write - [5:0] - oneToClear - CH8_DBG_CTDREQ - - - CH8_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0a04 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH8_DBG_TCR - 0x00000000 - - - 0x0a40 - 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. - - - read-write - [5:0] - oneToClear - CH9_DBG_CTDREQ - - - CH9_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0a44 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH9_DBG_TCR - 0x00000000 - - - 0x0a80 - 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. - - - read-write - [5:0] - oneToClear - CH10_DBG_CTDREQ - - - CH10_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0a84 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH10_DBG_TCR - 0x00000000 - - - 0x0ac0 - 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. - - - read-write - [5:0] - oneToClear - CH11_DBG_CTDREQ - - - CH11_DBG_CTDREQ - 0x00000000 - - - read-only - 0x0ac4 - Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer - CH11_DBG_TCR - 0x00000000 - - - 32 - 1 - - - - 0 - 0x0100 - registers - - 0x50100000 - DPRAM layout for USB device. - USBCTRL_DPRAM - - - 0x0000 - Bytes 0-3 of the SETUP packet from the host. - - - read-write - [31:16] - WVALUE - - - read-write - [15:8] - BREQUEST - - - read-write - [7:0] - BMREQUESTTYPE - - - SETUP_PACKET_LOW - 0x00000000 - - - 0x0004 - Bytes 4-7 of the setup packet from the host. - - - read-write - [31:16] - WLENGTH - - - read-write - [15:0] - WINDEX - - - SETUP_PACKET_HIGH - 0x00000000 - - - 0x0008 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP1_IN_CONTROL - 0x00000000 - - - 0x000c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP1_OUT_CONTROL - 0x00000000 - - - 0x0010 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP2_IN_CONTROL - 0x00000000 - - - 0x0014 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP2_OUT_CONTROL - 0x00000000 - - - 0x0018 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP3_IN_CONTROL - 0x00000000 - - - 0x001c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP3_OUT_CONTROL - 0x00000000 - - - 0x0020 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP4_IN_CONTROL - 0x00000000 - - - 0x0024 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP4_OUT_CONTROL - 0x00000000 - - - 0x0028 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP5_IN_CONTROL - 0x00000000 - - - 0x002c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP5_OUT_CONTROL - 0x00000000 - - - 0x0030 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP6_IN_CONTROL - 0x00000000 - - - 0x0034 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP6_OUT_CONTROL - 0x00000000 - - - 0x0038 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP7_IN_CONTROL - 0x00000000 - - - 0x003c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP7_OUT_CONTROL - 0x00000000 - - - 0x0040 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP8_IN_CONTROL - 0x00000000 - - - 0x0044 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP8_OUT_CONTROL - 0x00000000 - - - 0x0048 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP9_IN_CONTROL - 0x00000000 - - - 0x004c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP9_OUT_CONTROL - 0x00000000 - - - 0x0050 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP10_IN_CONTROL - 0x00000000 - - - 0x0054 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP10_OUT_CONTROL - 0x00000000 - - - 0x0058 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP11_IN_CONTROL - 0x00000000 - - - 0x005c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP11_OUT_CONTROL - 0x00000000 - - - 0x0060 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP12_IN_CONTROL - 0x00000000 - - - 0x0064 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP12_OUT_CONTROL - 0x00000000 - - - 0x0068 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP13_IN_CONTROL - 0x00000000 - - - 0x006c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP13_OUT_CONTROL - 0x00000000 - - - 0x0070 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP14_IN_CONTROL - 0x00000000 - - - 0x0074 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP14_OUT_CONTROL - 0x00000000 - - - 0x0078 - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP15_IN_CONTROL - 0x00000000 - - - 0x007c - - - read-write - [31:31] - Enable this endpoint. The device will not reply to any packets for this endpoint if this bit is not set. - ENABLE - - - read-write - [30:30] - This endpoint is double buffered. - DOUBLE_BUFFERED - - - read-write - [29:29] - Trigger an interrupt each time a buffer is done. - INTERRUPT_PER_BUFF - - - read-write - [28:28] - Trigger an interrupt each time both buffers are done. Only valid in double buffered mode. - INTERRUPT_PER_DOUBLE_BUFF - - - read-write - [27:26] - - - Control - 0 - - - Isochronous - 1 - - - Bulk - 2 - - - Interrupt - 3 - - - ENDPOINT_TYPE - - - read-write - [17:17] - Trigger an interrupt if a STALL is sent. Intended for debug only. - INTERRUPT_ON_STALL - - - read-write - [16:16] - Trigger an interrupt if a NAK is sent. Intended for debug only. - INTERRUPT_ON_NAK - - - read-write - [15:0] - 64 byte aligned buffer address for this EP (bits 0-5 are ignored). Relative to the start of the DPRAM. - BUFFER_ADDRESS - - - EP15_OUT_CONTROL - 0x00000000 - - - 0x0080 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP0_IN_BUFFER_CONTROL - 0x00000000 - - - 0x0084 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP0_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x0088 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP1_IN_BUFFER_CONTROL - 0x00000000 - - - 0x008c - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP1_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x0090 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP2_IN_BUFFER_CONTROL - 0x00000000 - - - 0x0094 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP2_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x0098 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP3_IN_BUFFER_CONTROL - 0x00000000 - - - 0x009c - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP3_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00a0 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP4_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00a4 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP4_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00a8 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP5_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00ac - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP5_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00b0 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP6_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00b4 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP6_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00b8 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP7_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00bc - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP7_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00c0 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP8_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00c4 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP8_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00c8 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP9_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00cc - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP9_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00d0 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP10_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00d4 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP10_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00d8 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP11_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00dc - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP11_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00e0 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP12_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00e4 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP12_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00e8 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP13_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00ec - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP13_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00f0 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP14_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00f4 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP14_OUT_BUFFER_CONTROL - 0x00000000 - - - 0x00f8 - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP15_IN_BUFFER_CONTROL - 0x00000000 - - - 0x00fc - Buffer control for both buffers of an endpoint. Fields ending in a _1 are for buffer 1.\n - Fields ending in a _0 are for buffer 0. Buffer 1 controls are only valid if the endpoint is in double buffered mode. - - - read-write - [31:31] - Buffer 1 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_1 - - - read-write - [30:30] - Buffer 1 is the last buffer of the transfer. - LAST_1 - - - read-write - [29:29] - The data pid of buffer 1. - PID_1 - - - read-write - [28:27] - The number of bytes buffer 1 is offset from buffer 0 in Isochronous mode. Only valid in double buffered mode for an Isochronous endpoint.\n - For a non Isochronous endpoint the offset is always 64 bytes. - - - 128 - 0 - - - 256 - 1 - - - 512 - 2 - - - 1024 - 3 - - - DOUBLE_BUFFER_ISO_OFFSET - - - read-write - [26:26] - Buffer 1 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_1 - - - read-write - [25:16] - The length of the data in buffer 1. - LENGTH_1 - - - read-write - [15:15] - Buffer 0 is full. For an IN transfer (TX to the host) the bit is set to indicate the data is valid. For an OUT transfer (RX from the host) this bit should be left as a 0. The host will set it when it has filled the buffer with data. - FULL_0 - - - read-write - [14:14] - Buffer 0 is the last buffer of the transfer. - LAST_0 - - - read-write - [13:13] - The data pid of buffer 0. - PID_0 - - - read-write - [12:12] - Reset the buffer selector to buffer 0. - RESET - - - read-write - [11:11] - Reply with a stall (valid for both buffers). - STALL - - - read-write - [10:10] - Buffer 0 is available. This bit is set to indicate the buffer can be used by the controller. The controller clears the available bit when writing the status back. - AVAILABLE_0 - - - read-write - [9:0] - The length of the data in buffer 0. - LENGTH_0 - - - EP15_OUT_BUFFER_CONTROL - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x50110000 - USB FS/LS controller device registers - - USBCTRL_IRQ - 5 - - USBCTRL_REGS - - - 0x0000 - Device address and endpoint control - - - read-write - [19:16] - Device endpoint to send data to. Only valid for HOST mode. - ENDPOINT - - - read-write - [6:0] - 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. - ADDRESS - - - ADDR_ENDP - 0x00000000 - - - 0x0004 - Interrupt endpoint 1. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP1 - 0x00000000 - - - 0x0008 - Interrupt endpoint 2. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP2 - 0x00000000 - - - 0x000c - Interrupt endpoint 3. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP3 - 0x00000000 - - - 0x0010 - Interrupt endpoint 4. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP4 - 0x00000000 - - - 0x0014 - Interrupt endpoint 5. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP5 - 0x00000000 - - - 0x0018 - Interrupt endpoint 6. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP6 - 0x00000000 - - - 0x001c - Interrupt endpoint 7. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP7 - 0x00000000 - - - 0x0020 - Interrupt endpoint 8. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP8 - 0x00000000 - - - 0x0024 - Interrupt endpoint 9. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP9 - 0x00000000 - - - 0x0028 - Interrupt endpoint 10. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP10 - 0x00000000 - - - 0x002c - Interrupt endpoint 11. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP11 - 0x00000000 - - - 0x0030 - Interrupt endpoint 12. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP12 - 0x00000000 - - - 0x0034 - Interrupt endpoint 13. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP13 - 0x00000000 - - - 0x0038 - Interrupt endpoint 14. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP14 - 0x00000000 - - - 0x003c - Interrupt endpoint 15. Only valid for HOST mode. - - - read-write - [26:26] - Interrupt EP requires preamble (is a low speed device on a full speed hub) - INTEP_PREAMBLE - - - read-write - [25:25] - Direction of the interrupt endpoint. In=0, Out=1 - INTEP_DIR - - - read-write - [19:16] - Endpoint number of the interrupt endpoint - ENDPOINT - - - read-write - [6:0] - Device address - ADDRESS - - - ADDR_ENDP15 - 0x00000000 - - - 0x0040 - Main control register - - - read-write - [31:31] - Reduced timings for simulation - SIM_TIMING - - - read-write - [1:1] - Device mode = 0, Host mode = 1 - HOST_NDEVICE - - - read-write - [0:0] - Enable controller - CONTROLLER_EN - - - MAIN_CTRL - 0x00000000 - - - 0x0044 - 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. - - - write-only - [10:0] - COUNT - - - SOF_WR - 0x00000000 - - - 0x0048 - 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. - - - read-only - [10:0] - COUNT - - - SOF_RD - 0x00000000 - - - 0x004c - SIE control register - - - read-write - [31:31] - Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL - EP0_INT_STALL - - - read-write - [30:30] - Device: EP0 single buffered = 0, double buffered = 1 - EP0_DOUBLE_BUF - - - read-write - [29:29] - Device: Set bit in BUFF_STATUS for every buffer completed on EP0 - EP0_INT_1BUF - - - read-write - [28:28] - Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0 - EP0_INT_2BUF - - - read-write - [27:27] - Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK - EP0_INT_NAK - - - read-write - [26:26] - Direct bus drive enable - DIRECT_EN - - - read-write - [25:25] - Direct control of DP - DIRECT_DP - - - read-write - [24:24] - Direct control of DM - DIRECT_DM - - - read-write - [18:18] - Power down bus transceiver - TRANSCEIVER_PD - - - read-write - [17:17] - Device: Pull-up strength (0=1K2, 1=2k3) - RPU_OPT - - - read-write - [16:16] - Device: Enable pull up resistor - PULLUP_EN - - - read-write - [15:15] - Host: Enable pull down resistors - PULLDOWN_EN - - - read-write - [13:13] - Host: Reset bus - clear - RESET_BUS - - - read-write - [12:12] - Device: Remote wakeup. Device can initiate its own resume after suspend. - clear - RESUME - - - read-write - [11:11] - Host: Enable VBUS - VBUS_EN - - - read-write - [10:10] - Host: Enable keep alive packet (for low speed bus) - KEEP_ALIVE_EN - - - read-write - [9:9] - Host: Enable SOF generation (for full speed bus) - SOF_EN - - - read-write - [8:8] - Host: Delay packet(s) until after SOF - SOF_SYNC - - - read-write - [6:6] - Host: Preable enable for LS device on FS hub - PREAMBLE_EN - - - read-write - [4:4] - Host: Stop transaction - clear - STOP_TRANS - - - read-write - [3:3] - Host: Receive transaction (IN to host) - RECEIVE_DATA - - - read-write - [2:2] - Host: Send transaction (OUT from host) - SEND_DATA - - - read-write - [1:1] - Host: Send Setup packet - SEND_SETUP - - - read-write - [0:0] - Host: Start transaction - clear - START_TRANS - - - SIE_CTRL - 0x00000000 - - - 0x0050 - SIE status register - - - read-write - [31:31] - Data Sequence Error.\n\n - The device can raise a sequence error in the following conditions:\n\n - * 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\n\n - The host can raise a data sequence error in the following conditions:\n\n - * An IN packet from the device has the wrong data PID - oneToClear - DATA_SEQ_ERROR - - - read-write - [30:30] - ACK received. Raised by both host and device. - oneToClear - ACK_REC - - - read-write - [29:29] - Host: STALL received - oneToClear - STALL_REC - - - read-write - [28:28] - Host: NAK received - oneToClear - NAK_REC - - - read-write - [27:27] - 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. - oneToClear - RX_TIMEOUT - - - read-write - [26:26] - RX overflow is raised by the Serial RX engine if the incoming data is too fast. - oneToClear - RX_OVERFLOW - - - read-write - [25:25] - Bit Stuff Error. Raised by the Serial RX engine. - oneToClear - BIT_STUFF_ERROR - - - read-write - [24:24] - CRC Error. Raised by the Serial RX engine. - oneToClear - CRC_ERROR - - - read-write - [19:19] - Device: bus reset received - oneToClear - BUS_RESET - - - read-write - [18:18] - Transaction complete.\n\n - Raised by device if:\n\n - * An IN or OUT packet is sent with the `LAST_BUFF` bit set in the buffer control register\n\n - Raised by host if:\n\n - * 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 - oneToClear - TRANS_COMPLETE - - - read-write - [17:17] - Device: Setup packet received - oneToClear - SETUP_REC - - - read-write - [16:16] - Device: connected - oneToClear - CONNECTED - - - read-write - [11:11] - Host: Device has initiated a remote resume. Device: host has initiated a resume. - oneToClear - RESUME - - - read-only - [10:10] - VBUS over current detected - VBUS_OVER_CURR - - - read-write - [9:8] - Host: device speed. Disconnected = 00, LS = 01, FS = 10 - oneToClear - SPEED - - - read-write - [4:4] - Bus in suspended state. Valid for device and host. Host and device will go into suspend if neither Keep Alive / SOF frames are enabled. - oneToClear - SUSPENDED - - - read-only - [3:2] - USB bus line state - LINE_STATE - - - read-only - [0:0] - Device: VBUS Detected - VBUS_DETECTED - - - SIE_STATUS - 0x00000000 - - - 0x0054 - interrupt endpoint control register - - - read-write - [15:1] - Host: Enable interrupt endpoint 1 -> 15 - INT_EP_ACTIVE - - - INT_EP_CTRL - 0x00000000 - - - 0x0058 - 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. - - - read-write - [31:31] - oneToClear - EP15_OUT - - - read-write - [30:30] - oneToClear - EP15_IN - - - read-write - [29:29] - oneToClear - EP14_OUT - - - read-write - [28:28] - oneToClear - EP14_IN - - - read-write - [27:27] - oneToClear - EP13_OUT - - - read-write - [26:26] - oneToClear - EP13_IN - - - read-write - [25:25] - oneToClear - EP12_OUT - - - read-write - [24:24] - oneToClear - EP12_IN - - - read-write - [23:23] - oneToClear - EP11_OUT - - - read-write - [22:22] - oneToClear - EP11_IN - - - read-write - [21:21] - oneToClear - EP10_OUT - - - read-write - [20:20] - oneToClear - EP10_IN - - - read-write - [19:19] - oneToClear - EP9_OUT - - - read-write - [18:18] - oneToClear - EP9_IN - - - read-write - [17:17] - oneToClear - EP8_OUT - - - read-write - [16:16] - oneToClear - EP8_IN - - - read-write - [15:15] - oneToClear - EP7_OUT - - - read-write - [14:14] - oneToClear - EP7_IN - - - read-write - [13:13] - oneToClear - EP6_OUT - - - read-write - [12:12] - oneToClear - EP6_IN - - - read-write - [11:11] - oneToClear - EP5_OUT - - - read-write - [10:10] - oneToClear - EP5_IN - - - read-write - [9:9] - oneToClear - EP4_OUT - - - read-write - [8:8] - oneToClear - EP4_IN - - - read-write - [7:7] - oneToClear - EP3_OUT - - - read-write - [6:6] - oneToClear - EP3_IN - - - read-write - [5:5] - oneToClear - EP2_OUT - - - read-write - [4:4] - oneToClear - EP2_IN - - - read-write - [3:3] - oneToClear - EP1_OUT - - - read-write - [2:2] - oneToClear - EP1_IN - - - read-write - [1:1] - oneToClear - EP0_OUT - - - read-write - [0:0] - oneToClear - EP0_IN - - - BUFF_STATUS - 0x00000000 - - - 0x005c - 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. - - - read-only - [31:31] - EP15_OUT - - - read-only - [30:30] - EP15_IN - - - read-only - [29:29] - EP14_OUT - - - read-only - [28:28] - EP14_IN - - - read-only - [27:27] - EP13_OUT - - - read-only - [26:26] - EP13_IN - - - read-only - [25:25] - EP12_OUT - - - read-only - [24:24] - EP12_IN - - - read-only - [23:23] - EP11_OUT - - - read-only - [22:22] - EP11_IN - - - read-only - [21:21] - EP10_OUT - - - read-only - [20:20] - EP10_IN - - - read-only - [19:19] - EP9_OUT - - - read-only - [18:18] - EP9_IN - - - read-only - [17:17] - EP8_OUT - - - read-only - [16:16] - EP8_IN - - - read-only - [15:15] - EP7_OUT - - - read-only - [14:14] - EP7_IN - - - read-only - [13:13] - EP6_OUT - - - read-only - [12:12] - EP6_IN - - - read-only - [11:11] - EP5_OUT - - - read-only - [10:10] - EP5_IN - - - read-only - [9:9] - EP4_OUT - - - read-only - [8:8] - EP4_IN - - - read-only - [7:7] - EP3_OUT - - - read-only - [6:6] - EP3_IN - - - read-only - [5:5] - EP2_OUT - - - read-only - [4:4] - EP2_IN - - - read-only - [3:3] - EP1_OUT - - - read-only - [2:2] - EP1_IN - - - read-only - [1:1] - EP0_OUT - - - read-only - [0:0] - EP0_IN - - - BUFF_CPU_SHOULD_HANDLE - 0x00000000 - - - 0x0060 - 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. - - - read-write - [31:31] - EP15_OUT - - - read-write - [30:30] - EP15_IN - - - read-write - [29:29] - EP14_OUT - - - read-write - [28:28] - EP14_IN - - - read-write - [27:27] - EP13_OUT - - - read-write - [26:26] - EP13_IN - - - read-write - [25:25] - EP12_OUT - - - read-write - [24:24] - EP12_IN - - - read-write - [23:23] - EP11_OUT - - - read-write - [22:22] - EP11_IN - - - read-write - [21:21] - EP10_OUT - - - read-write - [20:20] - EP10_IN - - - read-write - [19:19] - EP9_OUT - - - read-write - [18:18] - EP9_IN - - - read-write - [17:17] - EP8_OUT - - - read-write - [16:16] - EP8_IN - - - read-write - [15:15] - EP7_OUT - - - read-write - [14:14] - EP7_IN - - - read-write - [13:13] - EP6_OUT - - - read-write - [12:12] - EP6_IN - - - read-write - [11:11] - EP5_OUT - - - read-write - [10:10] - EP5_IN - - - read-write - [9:9] - EP4_OUT - - - read-write - [8:8] - EP4_IN - - - read-write - [7:7] - EP3_OUT - - - read-write - [6:6] - EP3_IN - - - read-write - [5:5] - EP2_OUT - - - read-write - [4:4] - EP2_IN - - - read-write - [3:3] - EP1_OUT - - - read-write - [2:2] - EP1_IN - - - read-write - [1:1] - EP0_OUT - - - read-write - [0:0] - EP0_IN - - - EP_ABORT - 0x00000000 - - - 0x0064 - 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. - - - read-write - [31:31] - oneToClear - EP15_OUT - - - read-write - [30:30] - oneToClear - EP15_IN - - - read-write - [29:29] - oneToClear - EP14_OUT - - - read-write - [28:28] - oneToClear - EP14_IN - - - read-write - [27:27] - oneToClear - EP13_OUT - - - read-write - [26:26] - oneToClear - EP13_IN - - - read-write - [25:25] - oneToClear - EP12_OUT - - - read-write - [24:24] - oneToClear - EP12_IN - - - read-write - [23:23] - oneToClear - EP11_OUT - - - read-write - [22:22] - oneToClear - EP11_IN - - - read-write - [21:21] - oneToClear - EP10_OUT - - - read-write - [20:20] - oneToClear - EP10_IN - - - read-write - [19:19] - oneToClear - EP9_OUT - - - read-write - [18:18] - oneToClear - EP9_IN - - - read-write - [17:17] - oneToClear - EP8_OUT - - - read-write - [16:16] - oneToClear - EP8_IN - - - read-write - [15:15] - oneToClear - EP7_OUT - - - read-write - [14:14] - oneToClear - EP7_IN - - - read-write - [13:13] - oneToClear - EP6_OUT - - - read-write - [12:12] - oneToClear - EP6_IN - - - read-write - [11:11] - oneToClear - EP5_OUT - - - read-write - [10:10] - oneToClear - EP5_IN - - - read-write - [9:9] - oneToClear - EP4_OUT - - - read-write - [8:8] - oneToClear - EP4_IN - - - read-write - [7:7] - oneToClear - EP3_OUT - - - read-write - [6:6] - oneToClear - EP3_IN - - - read-write - [5:5] - oneToClear - EP2_OUT - - - read-write - [4:4] - oneToClear - EP2_IN - - - read-write - [3:3] - oneToClear - EP1_OUT - - - read-write - [2:2] - oneToClear - EP1_IN - - - read-write - [1:1] - oneToClear - EP0_OUT - - - read-write - [0:0] - oneToClear - EP0_IN - - - EP_ABORT_DONE - 0x00000000 - - - 0x0068 - 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. - - - read-write - [1:1] - EP0_OUT - - - read-write - [0:0] - EP0_IN - - - EP_STALL_ARM - 0x00000000 - - - 0x006c - Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK. - - - read-write - [25:16] - NAK polling interval for a full speed device - DELAY_FS - - - read-write - [9:0] - NAK polling interval for a low speed device - DELAY_LS - - - NAK_POLL - 0x00100010 - - - 0x0070 - 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. - - - read-write - [31:31] - oneToClear - EP15_OUT - - - read-write - [30:30] - oneToClear - EP15_IN - - - read-write - [29:29] - oneToClear - EP14_OUT - - - read-write - [28:28] - oneToClear - EP14_IN - - - read-write - [27:27] - oneToClear - EP13_OUT - - - read-write - [26:26] - oneToClear - EP13_IN - - - read-write - [25:25] - oneToClear - EP12_OUT - - - read-write - [24:24] - oneToClear - EP12_IN - - - read-write - [23:23] - oneToClear - EP11_OUT - - - read-write - [22:22] - oneToClear - EP11_IN - - - read-write - [21:21] - oneToClear - EP10_OUT - - - read-write - [20:20] - oneToClear - EP10_IN - - - read-write - [19:19] - oneToClear - EP9_OUT - - - read-write - [18:18] - oneToClear - EP9_IN - - - read-write - [17:17] - oneToClear - EP8_OUT - - - read-write - [16:16] - oneToClear - EP8_IN - - - read-write - [15:15] - oneToClear - EP7_OUT - - - read-write - [14:14] - oneToClear - EP7_IN - - - read-write - [13:13] - oneToClear - EP6_OUT - - - read-write - [12:12] - oneToClear - EP6_IN - - - read-write - [11:11] - oneToClear - EP5_OUT - - - read-write - [10:10] - oneToClear - EP5_IN - - - read-write - [9:9] - oneToClear - EP4_OUT - - - read-write - [8:8] - oneToClear - EP4_IN - - - read-write - [7:7] - oneToClear - EP3_OUT - - - read-write - [6:6] - oneToClear - EP3_IN - - - read-write - [5:5] - oneToClear - EP2_OUT - - - read-write - [4:4] - oneToClear - EP2_IN - - - read-write - [3:3] - oneToClear - EP1_OUT - - - read-write - [2:2] - oneToClear - EP1_IN - - - read-write - [1:1] - oneToClear - EP0_OUT - - - read-write - [0:0] - oneToClear - EP0_IN - - - EP_STATUS_STALL_NAK - 0x00000000 - - - 0x0074 - Where to connect the USB controller. Should be to_phy by default. - - - read-write - [3:3] - SOFTCON - - - read-write - [2:2] - TO_DIGITAL_PAD - - - read-write - [1:1] - TO_EXTPHY - - - read-write - [0:0] - TO_PHY - - - USB_MUXING - 0x00000000 - - - 0x0078 - 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. - - - read-write - [5:5] - OVERCURR_DETECT_EN - - - read-write - [4:4] - OVERCURR_DETECT - - - read-write - [3:3] - VBUS_DETECT_OVERRIDE_EN - - - read-write - [2:2] - VBUS_DETECT - - - read-write - [1:1] - VBUS_EN_OVERRIDE_EN - - - read-write - [0:0] - VBUS_EN - - - USB_PWR - 0x00000000 - - - 0x007c - This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit. - - - read-only - [22:22] - DM over voltage - DM_OVV - - - read-only - [21:21] - DP over voltage - DP_OVV - - - read-only - [20:20] - DM overcurrent - DM_OVCN - - - read-only - [19:19] - DP overcurrent - DP_OVCN - - - read-only - [18:18] - DPM pin state - RX_DM - - - read-only - [17:17] - DPP pin state - RX_DP - - - read-only - [16:16] - Differential RX - RX_DD - - - read-write - [15:15] - TX_DIFFMODE=0: Single ended mode\n - TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored) - TX_DIFFMODE - - - read-write - [14:14] - TX_FSSLEW=0: Low speed slew rate\n - TX_FSSLEW=1: Full speed slew rate - TX_FSSLEW - - - read-write - [13:13] - TX power down override (if override enable is set). 1 = powered down. - TX_PD - - - read-write - [12:12] - RX power down override (if override enable is set). 1 = powered down. - RX_PD - - - read-write - [11:11] - Output data. TX_DIFFMODE=1, Ignored\n - TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM - TX_DM - - - read-write - [10:10] - Output data. If TX_DIFFMODE=1, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP\n - If TX_DIFFMODE=0, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP - TX_DP - - - read-write - [9:9] - Output enable. If TX_DIFFMODE=1, Ignored.\n - If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving - TX_DM_OE - - - read-write - [8:8] - Output enable. If TX_DIFFMODE=1, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving\n - If TX_DIFFMODE=0, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving - TX_DP_OE - - - read-write - [6:6] - DM pull down enable - DM_PULLDN_EN - - - read-write - [5:5] - DM pull up enable - DM_PULLUP_EN - - - read-write - [4:4] - Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 - DM_PULLUP_HISEL - - - read-write - [2:2] - DP pull down enable - DP_PULLDN_EN - - - read-write - [1:1] - DP pull up enable - DP_PULLUP_EN - - - read-write - [0:0] - Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 - DP_PULLUP_HISEL - - - USBPHY_DIRECT - 0x00000000 - - - 0x0080 - Override enable for each control in usbphy_direct - - - read-write - [15:15] - TX_DIFFMODE_OVERRIDE_EN - - - read-write - [12:12] - DM_PULLUP_OVERRIDE_EN - - - read-write - [11:11] - TX_FSSLEW_OVERRIDE_EN - - - read-write - [10:10] - TX_PD_OVERRIDE_EN - - - read-write - [9:9] - RX_PD_OVERRIDE_EN - - - read-write - [8:8] - TX_DM_OVERRIDE_EN - - - read-write - [7:7] - TX_DP_OVERRIDE_EN - - - read-write - [6:6] - TX_DM_OE_OVERRIDE_EN - - - read-write - [5:5] - TX_DP_OE_OVERRIDE_EN - - - read-write - [4:4] - DM_PULLDN_EN_OVERRIDE_EN - - - read-write - [3:3] - DP_PULLDN_EN_OVERRIDE_EN - - - read-write - [2:2] - DP_PULLUP_EN_OVERRIDE_EN - - - read-write - [1:1] - DM_PULLUP_HISEL_OVERRIDE_EN - - - read-write - [0:0] - DP_PULLUP_HISEL_OVERRIDE_EN - - - USBPHY_DIRECT_OVERRIDE - 0x00000000 - - - 0x0084 - Used to adjust trim values of USB phy pull down resistors. - - - read-write - [12:8] - Value to drive to USB PHY\n - DM pulldown resistor trim control\n - Experimental data suggests that the reset value will work, but this register allows adjustment if required - DM_PULLDN_TRIM - - - read-write - [4:0] - Value to drive to USB PHY\n - DP pulldown resistor trim control\n - Experimental data suggests that the reset value will work, but this register allows adjustment if required - DP_PULLDN_TRIM - - - USBPHY_TRIM - 0x00001f1f - - - 0x008c - Raw Interrupts - - - read-only - [19:19] - Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. - EP_STALL_NAK - - - read-only - [18:18] - Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. - ABORT_DONE - - - read-only - [17:17] - Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD - DEV_SOF - - - read-only - [16:16] - Device. Source: SIE_STATUS.SETUP_REC - SETUP_REQ - - - read-only - [15:15] - Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME - DEV_RESUME_FROM_HOST - - - read-only - [14:14] - Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED - DEV_SUSPEND - - - read-only - [13:13] - Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED - DEV_CONN_DIS - - - read-only - [12:12] - Source: SIE_STATUS.BUS_RESET - BUS_RESET - - - read-only - [11:11] - Source: SIE_STATUS.VBUS_DETECTED - VBUS_DETECT - - - read-only - [10:10] - Source: SIE_STATUS.STALL_REC - STALL - - - read-only - [9:9] - Source: SIE_STATUS.CRC_ERROR - ERROR_CRC - - - read-only - [8:8] - Source: SIE_STATUS.BIT_STUFF_ERROR - ERROR_BIT_STUFF - - - read-only - [7:7] - Source: SIE_STATUS.RX_OVERFLOW - ERROR_RX_OVERFLOW - - - read-only - [6:6] - Source: SIE_STATUS.RX_TIMEOUT - ERROR_RX_TIMEOUT - - - read-only - [5:5] - Source: SIE_STATUS.DATA_SEQ_ERROR - ERROR_DATA_SEQ - - - read-only - [4:4] - Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. - BUFF_STATUS - - - read-only - [3:3] - Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. - TRANS_COMPLETE - - - read-only - [2:2] - Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD - HOST_SOF - - - read-only - [1:1] - Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME - HOST_RESUME - - - read-only - [0:0] - Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED - HOST_CONN_DIS - - - INTR - 0x00000000 - - - 0x0090 - Interrupt Enable - - - read-write - [19:19] - Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. - EP_STALL_NAK - - - read-write - [18:18] - Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. - ABORT_DONE - - - read-write - [17:17] - Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD - DEV_SOF - - - read-write - [16:16] - Device. Source: SIE_STATUS.SETUP_REC - SETUP_REQ - - - read-write - [15:15] - Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME - DEV_RESUME_FROM_HOST - - - read-write - [14:14] - Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED - DEV_SUSPEND - - - read-write - [13:13] - Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED - DEV_CONN_DIS - - - read-write - [12:12] - Source: SIE_STATUS.BUS_RESET - BUS_RESET - - - read-write - [11:11] - Source: SIE_STATUS.VBUS_DETECTED - VBUS_DETECT - - - read-write - [10:10] - Source: SIE_STATUS.STALL_REC - STALL - - - read-write - [9:9] - Source: SIE_STATUS.CRC_ERROR - ERROR_CRC - - - read-write - [8:8] - Source: SIE_STATUS.BIT_STUFF_ERROR - ERROR_BIT_STUFF - - - read-write - [7:7] - Source: SIE_STATUS.RX_OVERFLOW - ERROR_RX_OVERFLOW - - - read-write - [6:6] - Source: SIE_STATUS.RX_TIMEOUT - ERROR_RX_TIMEOUT - - - read-write - [5:5] - Source: SIE_STATUS.DATA_SEQ_ERROR - ERROR_DATA_SEQ - - - read-write - [4:4] - Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. - BUFF_STATUS - - - read-write - [3:3] - Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. - TRANS_COMPLETE - - - read-write - [2:2] - Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD - HOST_SOF - - - read-write - [1:1] - Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME - HOST_RESUME - - - read-write - [0:0] - Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED - HOST_CONN_DIS - - - INTE - 0x00000000 - - - 0x0094 - Interrupt Force - - - read-write - [19:19] - Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. - EP_STALL_NAK - - - read-write - [18:18] - Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. - ABORT_DONE - - - read-write - [17:17] - Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD - DEV_SOF - - - read-write - [16:16] - Device. Source: SIE_STATUS.SETUP_REC - SETUP_REQ - - - read-write - [15:15] - Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME - DEV_RESUME_FROM_HOST - - - read-write - [14:14] - Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED - DEV_SUSPEND - - - read-write - [13:13] - Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED - DEV_CONN_DIS - - - read-write - [12:12] - Source: SIE_STATUS.BUS_RESET - BUS_RESET - - - read-write - [11:11] - Source: SIE_STATUS.VBUS_DETECTED - VBUS_DETECT - - - read-write - [10:10] - Source: SIE_STATUS.STALL_REC - STALL - - - read-write - [9:9] - Source: SIE_STATUS.CRC_ERROR - ERROR_CRC - - - read-write - [8:8] - Source: SIE_STATUS.BIT_STUFF_ERROR - ERROR_BIT_STUFF - - - read-write - [7:7] - Source: SIE_STATUS.RX_OVERFLOW - ERROR_RX_OVERFLOW - - - read-write - [6:6] - Source: SIE_STATUS.RX_TIMEOUT - ERROR_RX_TIMEOUT - - - read-write - [5:5] - Source: SIE_STATUS.DATA_SEQ_ERROR - ERROR_DATA_SEQ - - - read-write - [4:4] - Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. - BUFF_STATUS - - - read-write - [3:3] - Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. - TRANS_COMPLETE - - - read-write - [2:2] - Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD - HOST_SOF - - - read-write - [1:1] - Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME - HOST_RESUME - - - read-write - [0:0] - Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED - HOST_CONN_DIS - - - INTF - 0x00000000 - - - 0x0098 - Interrupt status after masking & forcing - - - read-only - [19:19] - Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. - EP_STALL_NAK - - - read-only - [18:18] - Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. - ABORT_DONE - - - read-only - [17:17] - Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD - DEV_SOF - - - read-only - [16:16] - Device. Source: SIE_STATUS.SETUP_REC - SETUP_REQ - - - read-only - [15:15] - Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME - DEV_RESUME_FROM_HOST - - - read-only - [14:14] - Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED - DEV_SUSPEND - - - read-only - [13:13] - Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED - DEV_CONN_DIS - - - read-only - [12:12] - Source: SIE_STATUS.BUS_RESET - BUS_RESET - - - read-only - [11:11] - Source: SIE_STATUS.VBUS_DETECTED - VBUS_DETECT - - - read-only - [10:10] - Source: SIE_STATUS.STALL_REC - STALL - - - read-only - [9:9] - Source: SIE_STATUS.CRC_ERROR - ERROR_CRC - - - read-only - [8:8] - Source: SIE_STATUS.BIT_STUFF_ERROR - ERROR_BIT_STUFF - - - read-only - [7:7] - Source: SIE_STATUS.RX_OVERFLOW - ERROR_RX_OVERFLOW - - - read-only - [6:6] - Source: SIE_STATUS.RX_TIMEOUT - ERROR_RX_TIMEOUT - - - read-only - [5:5] - Source: SIE_STATUS.DATA_SEQ_ERROR - ERROR_DATA_SEQ - - - read-only - [4:4] - Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. - BUFF_STATUS - - - read-only - [3:3] - Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. - TRANS_COMPLETE - - - read-only - [2:2] - Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD - HOST_SOF - - - read-only - [1:1] - Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME - HOST_RESUME - - - read-only - [0:0] - Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED - HOST_CONN_DIS - - - INTS - 0x00000000 - - - 32 - 1 - - - - 0 - 0x1000 - registers - - 0x50200000 - Programmable IO block - - PIO0_IRQ_0 - 7 - - - PIO0_IRQ_1 - 8 - - PIO0 - - - 0x0000 - PIO control register - - - read-write - [11:8] - 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.\n\n - 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.\n\n - 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. - clear - CLKDIV_RESTART - - - read-write - [7:4] - Write 1 to instantly clear internal SM state which may be otherwise difficult to access and will affect future execution.\n\n - 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.\n\n - The program counter, the contents of the output shift register and the X/Y scratch registers are not affected. - clear - SM_RESTART - - - read-write - [3:0] - 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. - SM_ENABLE - - - CTRL - 0x00000000 - - - 0x0004 - FIFO status register - - - read-only - [27:24] - State machine TX FIFO is empty - TXEMPTY - - - read-only - [19:16] - State machine TX FIFO is full - TXFULL - - - read-only - [11:8] - State machine RX FIFO is empty - RXEMPTY - - - read-only - [3:0] - State machine RX FIFO is full - RXFULL - - - FSTAT - 0x0f000f00 - - - 0x0008 - FIFO debug register - - - read-write - [27:24] - State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear. - oneToClear - TXSTALL - - - read-write - [19:16] - 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. - oneToClear - TXOVER - - - read-write - [11:8] - 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. - oneToClear - RXUNDER - - - read-write - [3:0] - 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. - oneToClear - RXSTALL - - - FDEBUG - 0x00000000 - - - 0x000c - FIFO levels - - - read-only - [31:28] - RX3 - - - read-only - [27:24] - TX3 - - - read-only - [23:20] - RX2 - - - read-only - [19:16] - TX2 - - - read-only - [15:12] - RX1 - - - read-only - [11:8] - TX1 - - - read-only - [7:4] - RX0 - - - read-only - [3:0] - TX0 - - - FLEVEL - 0x00000000 - - - write-only - 0x0010 - 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. - TXF0 - 0x00000000 - - - write-only - 0x0014 - 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. - TXF1 - 0x00000000 - - - write-only - 0x0018 - 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. - TXF2 - 0x00000000 - - - write-only - 0x001c - 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. - TXF3 - 0x00000000 - - - read-only - 0x0020 - 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. - RXF0 - 0x00000000 - - - read-only - 0x0024 - 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. - RXF1 - 0x00000000 - - - read-only - 0x0028 - 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. - RXF2 - 0x00000000 - - - read-only - 0x002c - 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. - RXF3 - 0x00000000 - - - 0x0030 - State machine IRQ flags register. Write 1 to clear. There are 8 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.\n\n - Any of the 8 flags can be used for timing synchronisation between state machines, using IRQ and WAIT instructions. The lower four of these flags are also routed out to system-level interrupt requests, alongside FIFO status interrupts -- see e.g. IRQ0_INTE. - - - read-write - [7:0] - oneToClear - IRQ - - - IRQ - 0x00000000 - - - 0x0034 - 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. - - - write-only - [7:0] - IRQ_FORCE - - - IRQ_FORCE - 0x00000000 - - - read-write - 0x0038 - 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.\n - 0 -> input is synchronized (default)\n - 1 -> synchronizer is bypassed\n - If in doubt, leave this register as all zeroes. - INPUT_SYNC_BYPASS - 0x00000000 - - - read-only - 0x003c - 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. - DBG_PADOUT - 0x00000000 - - - read-only - 0x0040 - 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. - DBG_PADOE - 0x00000000 - - - 0x0044 - The PIO hardware has some free parameters that may vary between chip products.\n - These should be provided in the chip datasheet, but are also exposed here. - - - read-only - [21:16] - The size of the instruction memory, measured in units of one instruction - IMEM_SIZE - - - read-only - [11:8] - The number of state machines this PIO instance is equipped with. - SM_COUNT - - - read-only - [5:0] - The depth of the state machine TX/RX FIFOs, measured in words.\n - Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double\n - this depth. - FIFO_DEPTH - - - DBG_CFGINFO - 0x00000000 - - - 0x0048 - Write-only access to instruction memory location 0 - - - write-only - [15:0] - INSTR_MEM0 - - - INSTR_MEM0 - 0x00000000 - - - 0x004c - Write-only access to instruction memory location 1 - - - write-only - [15:0] - INSTR_MEM1 - - - INSTR_MEM1 - 0x00000000 - - - 0x0050 - Write-only access to instruction memory location 2 - - - write-only - [15:0] - INSTR_MEM2 - - - INSTR_MEM2 - 0x00000000 - - - 0x0054 - Write-only access to instruction memory location 3 - - - write-only - [15:0] - INSTR_MEM3 - - - INSTR_MEM3 - 0x00000000 - - - 0x0058 - Write-only access to instruction memory location 4 - - - write-only - [15:0] - INSTR_MEM4 - - - INSTR_MEM4 - 0x00000000 - - - 0x005c - Write-only access to instruction memory location 5 - - - write-only - [15:0] - INSTR_MEM5 - - - INSTR_MEM5 - 0x00000000 - - - 0x0060 - Write-only access to instruction memory location 6 - - - write-only - [15:0] - INSTR_MEM6 - - - INSTR_MEM6 - 0x00000000 - - - 0x0064 - Write-only access to instruction memory location 7 - - - write-only - [15:0] - INSTR_MEM7 - - - INSTR_MEM7 - 0x00000000 - - - 0x0068 - Write-only access to instruction memory location 8 - - - write-only - [15:0] - INSTR_MEM8 - - - INSTR_MEM8 - 0x00000000 - - - 0x006c - Write-only access to instruction memory location 9 - - - write-only - [15:0] - INSTR_MEM9 - - - INSTR_MEM9 - 0x00000000 - - - 0x0070 - Write-only access to instruction memory location 10 - - - write-only - [15:0] - INSTR_MEM10 - - - INSTR_MEM10 - 0x00000000 - - - 0x0074 - Write-only access to instruction memory location 11 - - - write-only - [15:0] - INSTR_MEM11 - - - INSTR_MEM11 - 0x00000000 - - - 0x0078 - Write-only access to instruction memory location 12 - - - write-only - [15:0] - INSTR_MEM12 - - - INSTR_MEM12 - 0x00000000 - - - 0x007c - Write-only access to instruction memory location 13 - - - write-only - [15:0] - INSTR_MEM13 - - - INSTR_MEM13 - 0x00000000 - - - 0x0080 - Write-only access to instruction memory location 14 - - - write-only - [15:0] - INSTR_MEM14 - - - INSTR_MEM14 - 0x00000000 - - - 0x0084 - Write-only access to instruction memory location 15 - - - write-only - [15:0] - INSTR_MEM15 - - - INSTR_MEM15 - 0x00000000 - - - 0x0088 - Write-only access to instruction memory location 16 - - - write-only - [15:0] - INSTR_MEM16 - - - INSTR_MEM16 - 0x00000000 - - - 0x008c - Write-only access to instruction memory location 17 - - - write-only - [15:0] - INSTR_MEM17 - - - INSTR_MEM17 - 0x00000000 - - - 0x0090 - Write-only access to instruction memory location 18 - - - write-only - [15:0] - INSTR_MEM18 - - - INSTR_MEM18 - 0x00000000 - - - 0x0094 - Write-only access to instruction memory location 19 - - - write-only - [15:0] - INSTR_MEM19 - - - INSTR_MEM19 - 0x00000000 - - - 0x0098 - Write-only access to instruction memory location 20 - - - write-only - [15:0] - INSTR_MEM20 - - - INSTR_MEM20 - 0x00000000 - - - 0x009c - Write-only access to instruction memory location 21 - - - write-only - [15:0] - INSTR_MEM21 - - - INSTR_MEM21 - 0x00000000 - - - 0x00a0 - Write-only access to instruction memory location 22 - - - write-only - [15:0] - INSTR_MEM22 - - - INSTR_MEM22 - 0x00000000 - - - 0x00a4 - Write-only access to instruction memory location 23 - - - write-only - [15:0] - INSTR_MEM23 - - - INSTR_MEM23 - 0x00000000 - - - 0x00a8 - Write-only access to instruction memory location 24 - - - write-only - [15:0] - INSTR_MEM24 - - - INSTR_MEM24 - 0x00000000 - - - 0x00ac - Write-only access to instruction memory location 25 - - - write-only - [15:0] - INSTR_MEM25 - - - INSTR_MEM25 - 0x00000000 - - - 0x00b0 - Write-only access to instruction memory location 26 - - - write-only - [15:0] - INSTR_MEM26 - - - INSTR_MEM26 - 0x00000000 - - - 0x00b4 - Write-only access to instruction memory location 27 - - - write-only - [15:0] - INSTR_MEM27 - - - INSTR_MEM27 - 0x00000000 - - - 0x00b8 - Write-only access to instruction memory location 28 - - - write-only - [15:0] - INSTR_MEM28 - - - INSTR_MEM28 - 0x00000000 - - - 0x00bc - Write-only access to instruction memory location 29 - - - write-only - [15:0] - INSTR_MEM29 - - - INSTR_MEM29 - 0x00000000 - - - 0x00c0 - Write-only access to instruction memory location 30 - - - write-only - [15:0] - INSTR_MEM30 - - - INSTR_MEM30 - 0x00000000 - - - 0x00c4 - Write-only access to instruction memory location 31 - - - write-only - [15:0] - INSTR_MEM31 - - - INSTR_MEM31 - 0x00000000 - - - 0x00c8 - Clock divisor register for state machine 0\n - Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) - - - read-write - [31:16] - Effective frequency is sysclk/(int + frac/256).\n - Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. - INT - - - read-write - [15:8] - Fractional part of clock divisor - FRAC - - - SM0_CLKDIV - 0x00010000 - - - 0x00cc - Execution/behavioural settings for state machine 0 - - - read-only - [31:31] - If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. - EXEC_STALLED - - - read-write - [30:30] - 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. - SIDE_EN - - - read-write - [29:29] - If 1, side-set data is asserted to pin directions, instead of pin values - SIDE_PINDIR - - - read-write - [28:24] - The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. - JMP_PIN - - - read-write - [23:19] - Which data bit to use for inline OUT enable - OUT_EN_SEL - - - read-write - [18:18] - If 1, use a bit of OUT data as an auxiliary write enable\n - When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n - deassert the latest pin write. This can create useful masking/override behaviour\n - due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) - INLINE_OUT_EN - - - read-write - [17:17] - Continuously assert the most recent OUT/SET to the pins - OUT_STICKY - - - read-write - [16:12] - After reaching this address, execution is wrapped to wrap_bottom.\n - If the instruction is a jump, and the jump condition is true, the jump takes priority. - WRAP_TOP - - - read-write - [11:7] - After reaching wrap_top, execution is wrapped to this address. - WRAP_BOTTOM - - - read-write - [4:4] - Comparison used for the MOV x, STATUS instruction. - - - All-ones if TX FIFO level < N, otherwise all-zeroes - TXLEVEL - 0 - - - All-ones if RX FIFO level < N, otherwise all-zeroes - RXLEVEL - 1 - - - STATUS_SEL - - - read-write - [3:0] - Comparison level for the MOV x, STATUS instruction - STATUS_N - - - SM0_EXECCTRL - 0x0001f000 - - - 0x00d0 - Control behaviour of the input/output shift registers for state machine 0 - - - read-write - [31:31] - When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n - TX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_RX - - - read-write - [30:30] - When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n - RX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_TX - - - read-write - [29:25] - Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place.\n - Write 0 for value of 32. - PULL_THRESH - - - read-write - [24:20] - Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place.\n - Write 0 for value of 32. - PUSH_THRESH - - - read-write - [19:19] - 1 = shift out of output shift register to right. 0 = to left. - OUT_SHIFTDIR - - - read-write - [18:18] - 1 = shift input shift register to right (data enters from left). 0 = to left. - IN_SHIFTDIR - - - read-write - [17:17] - 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. - AUTOPULL - - - read-write - [16:16] - 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. - AUTOPUSH - - - SM0_SHIFTCTRL - 0x000c0000 - - - 0x00d4 - Current instruction address of state machine 0 - - - read-only - [4:0] - SM0_ADDR - - - SM0_ADDR - 0x00000000 - - - 0x00d8 - Read to see the instruction currently addressed by state machine 0's program counter\n - Write to execute an instruction immediately (including jumps) and then resume execution. - - - read-write - [15:0] - SM0_INSTR - - - SM0_INSTR - 0x00000000 - - - 0x00dc - State machine pin control - - - read-write - [31:29] - 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). - SIDESET_COUNT - - - read-write - [28:26] - The number of pins asserted by a SET. In the range 0 to 5 inclusive. - SET_COUNT - - - read-write - [25:20] - The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. - OUT_COUNT - - - read-write - [19:15] - 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. - IN_BASE - - - read-write - [14:10] - 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. - SIDESET_BASE - - - read-write - [9:5] - 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. - SET_BASE - - - read-write - [4:0] - 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. - OUT_BASE - - - SM0_PINCTRL - 0x14000000 - - - 0x00e0 - Clock divisor register for state machine 1\n - Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) - - - read-write - [31:16] - Effective frequency is sysclk/(int + frac/256).\n - Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. - INT - - - read-write - [15:8] - Fractional part of clock divisor - FRAC - - - SM1_CLKDIV - 0x00010000 - - - 0x00e4 - Execution/behavioural settings for state machine 1 - - - read-only - [31:31] - If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. - EXEC_STALLED - - - read-write - [30:30] - 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. - SIDE_EN - - - read-write - [29:29] - If 1, side-set data is asserted to pin directions, instead of pin values - SIDE_PINDIR - - - read-write - [28:24] - The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. - JMP_PIN - - - read-write - [23:19] - Which data bit to use for inline OUT enable - OUT_EN_SEL - - - read-write - [18:18] - If 1, use a bit of OUT data as an auxiliary write enable\n - When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n - deassert the latest pin write. This can create useful masking/override behaviour\n - due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) - INLINE_OUT_EN - - - read-write - [17:17] - Continuously assert the most recent OUT/SET to the pins - OUT_STICKY - - - read-write - [16:12] - After reaching this address, execution is wrapped to wrap_bottom.\n - If the instruction is a jump, and the jump condition is true, the jump takes priority. - WRAP_TOP - - - read-write - [11:7] - After reaching wrap_top, execution is wrapped to this address. - WRAP_BOTTOM - - - read-write - [4:4] - Comparison used for the MOV x, STATUS instruction. - - - All-ones if TX FIFO level < N, otherwise all-zeroes - TXLEVEL - 0 - - - All-ones if RX FIFO level < N, otherwise all-zeroes - RXLEVEL - 1 - - - STATUS_SEL - - - read-write - [3:0] - Comparison level for the MOV x, STATUS instruction - STATUS_N - - - SM1_EXECCTRL - 0x0001f000 - - - 0x00e8 - Control behaviour of the input/output shift registers for state machine 1 - - - read-write - [31:31] - When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n - TX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_RX - - - read-write - [30:30] - When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n - RX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_TX - - - read-write - [29:25] - Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place.\n - Write 0 for value of 32. - PULL_THRESH - - - read-write - [24:20] - Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place.\n - Write 0 for value of 32. - PUSH_THRESH - - - read-write - [19:19] - 1 = shift out of output shift register to right. 0 = to left. - OUT_SHIFTDIR - - - read-write - [18:18] - 1 = shift input shift register to right (data enters from left). 0 = to left. - IN_SHIFTDIR - - - read-write - [17:17] - 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. - AUTOPULL - - - read-write - [16:16] - 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. - AUTOPUSH - - - SM1_SHIFTCTRL - 0x000c0000 - - - 0x00ec - Current instruction address of state machine 1 - - - read-only - [4:0] - SM1_ADDR - - - SM1_ADDR - 0x00000000 - - - 0x00f0 - Read to see the instruction currently addressed by state machine 1's program counter\n - Write to execute an instruction immediately (including jumps) and then resume execution. - - - read-write - [15:0] - SM1_INSTR - - - SM1_INSTR - 0x00000000 - - - 0x00f4 - State machine pin control - - - read-write - [31:29] - 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). - SIDESET_COUNT - - - read-write - [28:26] - The number of pins asserted by a SET. In the range 0 to 5 inclusive. - SET_COUNT - - - read-write - [25:20] - The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. - OUT_COUNT - - - read-write - [19:15] - 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. - IN_BASE - - - read-write - [14:10] - 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. - SIDESET_BASE - - - read-write - [9:5] - 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. - SET_BASE - - - read-write - [4:0] - 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. - OUT_BASE - - - SM1_PINCTRL - 0x14000000 - - - 0x00f8 - Clock divisor register for state machine 2\n - Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) - - - read-write - [31:16] - Effective frequency is sysclk/(int + frac/256).\n - Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. - INT - - - read-write - [15:8] - Fractional part of clock divisor - FRAC - - - SM2_CLKDIV - 0x00010000 - - - 0x00fc - Execution/behavioural settings for state machine 2 - - - read-only - [31:31] - If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. - EXEC_STALLED - - - read-write - [30:30] - 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. - SIDE_EN - - - read-write - [29:29] - If 1, side-set data is asserted to pin directions, instead of pin values - SIDE_PINDIR - - - read-write - [28:24] - The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. - JMP_PIN - - - read-write - [23:19] - Which data bit to use for inline OUT enable - OUT_EN_SEL - - - read-write - [18:18] - If 1, use a bit of OUT data as an auxiliary write enable\n - When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n - deassert the latest pin write. This can create useful masking/override behaviour\n - due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) - INLINE_OUT_EN - - - read-write - [17:17] - Continuously assert the most recent OUT/SET to the pins - OUT_STICKY - - - read-write - [16:12] - After reaching this address, execution is wrapped to wrap_bottom.\n - If the instruction is a jump, and the jump condition is true, the jump takes priority. - WRAP_TOP - - - read-write - [11:7] - After reaching wrap_top, execution is wrapped to this address. - WRAP_BOTTOM - - - read-write - [4:4] - Comparison used for the MOV x, STATUS instruction. - - - All-ones if TX FIFO level < N, otherwise all-zeroes - TXLEVEL - 0 - - - All-ones if RX FIFO level < N, otherwise all-zeroes - RXLEVEL - 1 - - - STATUS_SEL - - - read-write - [3:0] - Comparison level for the MOV x, STATUS instruction - STATUS_N - - - SM2_EXECCTRL - 0x0001f000 - - - 0x0100 - Control behaviour of the input/output shift registers for state machine 2 - - - read-write - [31:31] - When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n - TX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_RX - - - read-write - [30:30] - When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n - RX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_TX - - - read-write - [29:25] - Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place.\n - Write 0 for value of 32. - PULL_THRESH - - - read-write - [24:20] - Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place.\n - Write 0 for value of 32. - PUSH_THRESH - - - read-write - [19:19] - 1 = shift out of output shift register to right. 0 = to left. - OUT_SHIFTDIR - - - read-write - [18:18] - 1 = shift input shift register to right (data enters from left). 0 = to left. - IN_SHIFTDIR - - - read-write - [17:17] - 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. - AUTOPULL - - - read-write - [16:16] - 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. - AUTOPUSH - - - SM2_SHIFTCTRL - 0x000c0000 - - - 0x0104 - Current instruction address of state machine 2 - - - read-only - [4:0] - SM2_ADDR - - - SM2_ADDR - 0x00000000 - - - 0x0108 - Read to see the instruction currently addressed by state machine 2's program counter\n - Write to execute an instruction immediately (including jumps) and then resume execution. - - - read-write - [15:0] - SM2_INSTR - - - SM2_INSTR - 0x00000000 - - - 0x010c - State machine pin control - - - read-write - [31:29] - 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). - SIDESET_COUNT - - - read-write - [28:26] - The number of pins asserted by a SET. In the range 0 to 5 inclusive. - SET_COUNT - - - read-write - [25:20] - The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. - OUT_COUNT - - - read-write - [19:15] - 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. - IN_BASE - - - read-write - [14:10] - 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. - SIDESET_BASE - - - read-write - [9:5] - 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. - SET_BASE - - - read-write - [4:0] - 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. - OUT_BASE - - - SM2_PINCTRL - 0x14000000 - - - 0x0110 - Clock divisor register for state machine 3\n - Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) - - - read-write - [31:16] - Effective frequency is sysclk/(int + frac/256).\n - Value of 0 is interpreted as 65536. If INT is 0, FRAC must also be 0. - INT - - - read-write - [15:8] - Fractional part of clock divisor - FRAC - - - SM3_CLKDIV - 0x00010000 - - - 0x0114 - Execution/behavioural settings for state machine 3 - - - read-only - [31:31] - If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes. - EXEC_STALLED - - - read-write - [30:30] - 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. - SIDE_EN - - - read-write - [29:29] - If 1, side-set data is asserted to pin directions, instead of pin values - SIDE_PINDIR - - - read-write - [28:24] - The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. - JMP_PIN - - - read-write - [23:19] - Which data bit to use for inline OUT enable - OUT_EN_SEL - - - read-write - [18:18] - If 1, use a bit of OUT data as an auxiliary write enable\n - When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n - deassert the latest pin write. This can create useful masking/override behaviour\n - due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) - INLINE_OUT_EN - - - read-write - [17:17] - Continuously assert the most recent OUT/SET to the pins - OUT_STICKY - - - read-write - [16:12] - After reaching this address, execution is wrapped to wrap_bottom.\n - If the instruction is a jump, and the jump condition is true, the jump takes priority. - WRAP_TOP - - - read-write - [11:7] - After reaching wrap_top, execution is wrapped to this address. - WRAP_BOTTOM - - - read-write - [4:4] - Comparison used for the MOV x, STATUS instruction. - - - All-ones if TX FIFO level < N, otherwise all-zeroes - TXLEVEL - 0 - - - All-ones if RX FIFO level < N, otherwise all-zeroes - RXLEVEL - 1 - - - STATUS_SEL - - - read-write - [3:0] - Comparison level for the MOV x, STATUS instruction - STATUS_N - - - SM3_EXECCTRL - 0x0001f000 - - - 0x0118 - Control behaviour of the input/output shift registers for state machine 3 - - - read-write - [31:31] - When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n - TX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_RX - - - read-write - [30:30] - When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n - RX FIFO is disabled as a result (always reads as both full and empty).\n - FIFOs are flushed when this bit is changed. - FJOIN_TX - - - read-write - [29:25] - Number of bits shifted out of OSR before autopull, or conditional pull (PULL IFEMPTY), will take place.\n - Write 0 for value of 32. - PULL_THRESH - - - read-write - [24:20] - Number of bits shifted into ISR before autopush, or conditional push (PUSH IFFULL), will take place.\n - Write 0 for value of 32. - PUSH_THRESH - - - read-write - [19:19] - 1 = shift out of output shift register to right. 0 = to left. - OUT_SHIFTDIR - - - read-write - [18:18] - 1 = shift input shift register to right (data enters from left). 0 = to left. - IN_SHIFTDIR - - - read-write - [17:17] - 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. - AUTOPULL - - - read-write - [16:16] - 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. - AUTOPUSH - - - SM3_SHIFTCTRL - 0x000c0000 - - - 0x011c - Current instruction address of state machine 3 - - - read-only - [4:0] - SM3_ADDR - - - SM3_ADDR - 0x00000000 - - - 0x0120 - Read to see the instruction currently addressed by state machine 3's program counter\n - Write to execute an instruction immediately (including jumps) and then resume execution. - - - read-write - [15:0] - SM3_INSTR - - - SM3_INSTR - 0x00000000 - - - 0x0124 - State machine pin control - - - read-write - [31:29] - 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). - SIDESET_COUNT - - - read-write - [28:26] - The number of pins asserted by a SET. In the range 0 to 5 inclusive. - SET_COUNT - - - read-write - [25:20] - The number of pins asserted by an OUT PINS, OUT PINDIRS or MOV PINS instruction. In the range 0 to 32 inclusive. - OUT_COUNT - - - read-write - [19:15] - 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. - IN_BASE - - - read-write - [14:10] - 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. - SIDESET_BASE - - - read-write - [9:5] - 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. - SET_BASE - - - read-write - [4:0] - 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. - OUT_BASE - - - SM3_PINCTRL - 0x14000000 - - - 0x0128 - Raw Interrupts - - - read-only - [11:11] - SM3 - - - read-only - [10:10] - SM2 - - - read-only - [9:9] - SM1 - - - read-only - [8:8] - SM0 - - - read-only - [7:7] - SM3_TXNFULL - - - read-only - [6:6] - SM2_TXNFULL - - - read-only - [5:5] - SM1_TXNFULL - - - read-only - [4:4] - SM0_TXNFULL - - - read-only - [3:3] - SM3_RXNEMPTY - - - read-only - [2:2] - SM2_RXNEMPTY - - - read-only - [1:1] - SM1_RXNEMPTY - - - read-only - [0:0] - SM0_RXNEMPTY - - - INTR - 0x00000000 - - - 0x012c - Interrupt Enable for irq0 - - - read-write - [11:11] - SM3 - - - read-write - [10:10] - SM2 - - - read-write - [9:9] - SM1 - - - read-write - [8:8] - SM0 - - - read-write - [7:7] - SM3_TXNFULL - - - read-write - [6:6] - SM2_TXNFULL - - - read-write - [5:5] - SM1_TXNFULL - - - read-write - [4:4] - SM0_TXNFULL - - - read-write - [3:3] - SM3_RXNEMPTY - - - read-write - [2:2] - SM2_RXNEMPTY - - - read-write - [1:1] - SM1_RXNEMPTY - - - read-write - [0:0] - SM0_RXNEMPTY - - - IRQ0_INTE - 0x00000000 - - - 0x0130 - Interrupt Force for irq0 - - - read-write - [11:11] - SM3 - - - read-write - [10:10] - SM2 - - - read-write - [9:9] - SM1 - - - read-write - [8:8] - SM0 - - - read-write - [7:7] - SM3_TXNFULL - - - read-write - [6:6] - SM2_TXNFULL - - - read-write - [5:5] - SM1_TXNFULL - - - read-write - [4:4] - SM0_TXNFULL - - - read-write - [3:3] - SM3_RXNEMPTY - - - read-write - [2:2] - SM2_RXNEMPTY - - - read-write - [1:1] - SM1_RXNEMPTY - - - read-write - [0:0] - SM0_RXNEMPTY - - - IRQ0_INTF - 0x00000000 - - - 0x0134 - Interrupt status after masking & forcing for irq0 - - - read-only - [11:11] - SM3 - - - read-only - [10:10] - SM2 - - - read-only - [9:9] - SM1 - - - read-only - [8:8] - SM0 - - - read-only - [7:7] - SM3_TXNFULL - - - read-only - [6:6] - SM2_TXNFULL - - - read-only - [5:5] - SM1_TXNFULL - - - read-only - [4:4] - SM0_TXNFULL - - - read-only - [3:3] - SM3_RXNEMPTY - - - read-only - [2:2] - SM2_RXNEMPTY - - - read-only - [1:1] - SM1_RXNEMPTY - - - read-only - [0:0] - SM0_RXNEMPTY - - - IRQ0_INTS - 0x00000000 - - - 0x0138 - Interrupt Enable for irq1 - - - read-write - [11:11] - SM3 - - - read-write - [10:10] - SM2 - - - read-write - [9:9] - SM1 - - - read-write - [8:8] - SM0 - - - read-write - [7:7] - SM3_TXNFULL - - - read-write - [6:6] - SM2_TXNFULL - - - read-write - [5:5] - SM1_TXNFULL - - - read-write - [4:4] - SM0_TXNFULL - - - read-write - [3:3] - SM3_RXNEMPTY - - - read-write - [2:2] - SM2_RXNEMPTY - - - read-write - [1:1] - SM1_RXNEMPTY - - - read-write - [0:0] - SM0_RXNEMPTY - - - IRQ1_INTE - 0x00000000 - - - 0x013c - Interrupt Force for irq1 - - - read-write - [11:11] - SM3 - - - read-write - [10:10] - SM2 - - - read-write - [9:9] - SM1 - - - read-write - [8:8] - SM0 - - - read-write - [7:7] - SM3_TXNFULL - - - read-write - [6:6] - SM2_TXNFULL - - - read-write - [5:5] - SM1_TXNFULL - - - read-write - [4:4] - SM0_TXNFULL - - - read-write - [3:3] - SM3_RXNEMPTY - - - read-write - [2:2] - SM2_RXNEMPTY - - - read-write - [1:1] - SM1_RXNEMPTY - - - read-write - [0:0] - SM0_RXNEMPTY - - - IRQ1_INTF - 0x00000000 - - - 0x0140 - Interrupt status after masking & forcing for irq1 - - - read-only - [11:11] - SM3 - - - read-only - [10:10] - SM2 - - - read-only - [9:9] - SM1 - - - read-only - [8:8] - SM0 - - - read-only - [7:7] - SM3_TXNFULL - - - read-only - [6:6] - SM2_TXNFULL - - - read-only - [5:5] - SM1_TXNFULL - - - read-only - [4:4] - SM0_TXNFULL - - - read-only - [3:3] - SM3_RXNEMPTY - - - read-only - [2:2] - SM2_RXNEMPTY - - - read-only - [1:1] - SM1_RXNEMPTY - - - read-only - [0:0] - SM0_RXNEMPTY - - - IRQ1_INTS - 0x00000000 - - - 32 - 1 - - - 0x50300000 - - PIO1_IRQ_0 - 9 - - - PIO1_IRQ_1 - 10 - - PIO1 - - - - 0 - 0x0200 - registers - - 0xd0000000 - Single-cycle IO block\n - Provides core-local and inter-core hardware for the two processors, with single-cycle access. - - SIO_IRQ_PROC0 - 15 - - - SIO_IRQ_PROC1 - 16 - - SIO - - - read-only - 0x0000 - Processor core identifier\n - Value is 0 when read from processor core 0, and 1 when read from processor core 1. - CPUID - 0x00000000 - - - 0x0004 - Input value for GPIO pins - - - read-only - [29:0] - Input value for GPIO0...29 - GPIO_IN - - - GPIO_IN - 0x00000000 - - - 0x0008 - Input value for QSPI pins - - - read-only - [5:0] - Input value on QSPI IO in order 0..5: SCLK, SSn, SD0, SD1, SD2, SD3 - GPIO_HI_IN - - - GPIO_HI_IN - 0x00000000 - - - 0x0010 - GPIO output value - - - read-write - [29:0] - Set output level (1/0 -> high/low) for GPIO0...29.\n - Reading back gives the last value written, NOT the input value from the pins.\n - If core 0 and core 1 both write to GPIO_OUT simultaneously (or to a SET/CLR/XOR alias),\n - the result is as though the write from core 0 took place first,\n - and the write from core 1 was then applied to that intermediate result. - GPIO_OUT - - - GPIO_OUT - 0x00000000 - - - 0x0014 - GPIO output value set - - - write-only - [29:0] - Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata` - GPIO_OUT_SET - - - GPIO_OUT_SET - 0x00000000 - - - 0x0018 - GPIO output value clear - - - write-only - [29:0] - Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= ~wdata` - GPIO_OUT_CLR - - - GPIO_OUT_CLR - 0x00000000 - - - 0x001c - GPIO output value XOR - - - write-only - [29:0] - Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= wdata` - GPIO_OUT_XOR - - - GPIO_OUT_XOR - 0x00000000 - - - 0x0020 - GPIO output enable - - - read-write - [29:0] - Set output enable (1/0 -> output/input) for GPIO0...29.\n - Reading back gives the last value written.\n - If core 0 and core 1 both write to GPIO_OE simultaneously (or to a SET/CLR/XOR alias),\n - the result is as though the write from core 0 took place first,\n - and the write from core 1 was then applied to that intermediate result. - GPIO_OE - - - GPIO_OE - 0x00000000 - - - 0x0024 - GPIO output enable set - - - write-only - [29:0] - Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata` - GPIO_OE_SET - - - GPIO_OE_SET - 0x00000000 - - - 0x0028 - GPIO output enable clear - - - write-only - [29:0] - Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= ~wdata` - GPIO_OE_CLR - - - GPIO_OE_CLR - 0x00000000 - - - 0x002c - GPIO output enable XOR - - - write-only - [29:0] - Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= wdata` - GPIO_OE_XOR - - - GPIO_OE_XOR - 0x00000000 - - - 0x0030 - QSPI output value - - - read-write - [5:0] - Set output level (1/0 -> high/low) for QSPI IO0...5.\n - Reading back gives the last value written, NOT the input value from the pins.\n - If core 0 and core 1 both write to GPIO_HI_OUT simultaneously (or to a SET/CLR/XOR alias),\n - the result is as though the write from core 0 took place first,\n - and the write from core 1 was then applied to that intermediate result. - GPIO_HI_OUT - - - GPIO_HI_OUT - 0x00000000 - - - 0x0034 - QSPI output value set - - - write-only - [5:0] - Perform an atomic bit-set on GPIO_HI_OUT, i.e. `GPIO_HI_OUT |= wdata` - GPIO_HI_OUT_SET - - - GPIO_HI_OUT_SET - 0x00000000 - - - 0x0038 - QSPI output value clear - - - write-only - [5:0] - Perform an atomic bit-clear on GPIO_HI_OUT, i.e. `GPIO_HI_OUT &= ~wdata` - GPIO_HI_OUT_CLR - - - GPIO_HI_OUT_CLR - 0x00000000 - - - 0x003c - QSPI output value XOR - - - write-only - [5:0] - Perform an atomic bitwise XOR on GPIO_HI_OUT, i.e. `GPIO_HI_OUT ^= wdata` - GPIO_HI_OUT_XOR - - - GPIO_HI_OUT_XOR - 0x00000000 - - - 0x0040 - QSPI output enable - - - read-write - [5:0] - Set output enable (1/0 -> output/input) for QSPI IO0...5.\n - Reading back gives the last value written.\n - If core 0 and core 1 both write to GPIO_HI_OE simultaneously (or to a SET/CLR/XOR alias),\n - the result is as though the write from core 0 took place first,\n - and the write from core 1 was then applied to that intermediate result. - GPIO_HI_OE - - - GPIO_HI_OE - 0x00000000 - - - 0x0044 - QSPI output enable set - - - write-only - [5:0] - Perform an atomic bit-set on GPIO_HI_OE, i.e. `GPIO_HI_OE |= wdata` - GPIO_HI_OE_SET - - - GPIO_HI_OE_SET - 0x00000000 - - - 0x0048 - QSPI output enable clear - - - write-only - [5:0] - Perform an atomic bit-clear on GPIO_HI_OE, i.e. `GPIO_HI_OE &= ~wdata` - GPIO_HI_OE_CLR - - - GPIO_HI_OE_CLR - 0x00000000 - - - 0x004c - QSPI output enable XOR - - - write-only - [5:0] - Perform an atomic bitwise XOR on GPIO_HI_OE, i.e. `GPIO_HI_OE ^= wdata` - GPIO_HI_OE_XOR - - - GPIO_HI_OE_XOR - 0x00000000 - - - 0x0050 - Status register for inter-core FIFOs (mailboxes).\n - 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.\n - Core 0 can see the read side of the 1->0 FIFO (RX), and the write side of 0->1 FIFO (TX).\n - Core 1 can see the read side of the 0->1 FIFO (RX), and the write side of 1->0 FIFO (TX).\n - The SIO IRQ for each core is the logical OR of the VLD, WOF and ROE fields of its FIFO_ST register. - - - read-write - [3:3] - Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO. - oneToClear - ROE - - - read-write - [2:2] - Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO. - oneToClear - WOF - - - read-only - [1:1] - Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data) - RDY - - - read-only - [0:0] - Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid) - VLD - - - FIFO_ST - 0x00000002 - - - write-only - 0x0054 - Write access to this core's TX FIFO - FIFO_WR - 0x00000000 - - - read-only - 0x0058 - Read access to this core's RX FIFO - FIFO_RD - 0x00000000 - - - read-only - 0x005c - Spinlock state\n - A bitmap containing the state of all 32 spinlocks (1=locked).\n - Mainly intended for debugging. - SPINLOCK_ST - 0x00000000 - - - read-write - 0x0060 - Divider unsigned dividend\n - Write to the DIVIDEND operand of the divider, i.e. the p in `p / q`.\n - Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER.\n - UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an\n - unsigned calculation, and the S alias starts a signed calculation. - DIV_UDIVIDEND - 0x00000000 - - - read-write - 0x0064 - Divider unsigned divisor\n - Write to the DIVISOR operand of the divider, i.e. the q in `p / q`.\n - Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER.\n - UDIVISOR/SDIVISOR are aliases of the same internal register. The U alias starts an\n - unsigned calculation, and the S alias starts a signed calculation. - DIV_UDIVISOR - 0x00000000 - - - read-write - 0x0068 - Divider signed dividend\n - The same as UDIVIDEND, but starts a signed calculation, rather than unsigned. - DIV_SDIVIDEND - 0x00000000 - - - read-write - 0x006c - Divider signed divisor\n - The same as UDIVISOR, but starts a signed calculation, rather than unsigned. - DIV_SDIVISOR - 0x00000000 - - - read-write - 0x0070 - Divider result quotient\n - The result of `DIVIDEND / DIVISOR` (division). Contents undefined while CSR_READY is low.\n - For signed calculations, QUOTIENT is negative when the signs of DIVIDEND and DIVISOR differ.\n - This register can be written to directly, for context save/restore purposes. This halts any\n - in-progress calculation and sets the CSR_READY and CSR_DIRTY flags.\n - Reading from QUOTIENT clears the CSR_DIRTY flag, so should read results in the order\n - REMAINDER, QUOTIENT if CSR_DIRTY is used. - DIV_QUOTIENT - 0x00000000 - - - read-write - 0x0074 - Divider result remainder\n - The result of `DIVIDEND % DIVISOR` (modulo). Contents undefined while CSR_READY is low.\n - For signed calculations, REMAINDER is negative only when DIVIDEND is negative.\n - This register can be written to directly, for context save/restore purposes. This halts any\n - in-progress calculation and sets the CSR_READY and CSR_DIRTY flags. - DIV_REMAINDER - 0x00000000 - - - 0x0078 - Control and status register for divider. - - - read-only - [1:1] - Changes to 1 when any register is written, and back to 0 when QUOTIENT is read.\n - Software can use this flag to make save/restore more efficient (skip if not DIRTY).\n - If the flag is used in this way, it's recommended to either read QUOTIENT only,\n - or REMAINDER and then QUOTIENT, to prevent data loss on context switch. - DIRTY - - - read-only - [0:0] - Reads as 0 when a calculation is in progress, 1 otherwise.\n - Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no\n - matter if one is already in progress.\n - Writing to a result register will immediately terminate any in-progress calculation\n - and set the READY and DIRTY flags. - READY - - - DIV_CSR - 0x00000001 - - - read-write - 0x0080 - Read/write access to accumulator 0 - INTERP0_ACCUM0 - 0x00000000 - - - read-write - 0x0084 - Read/write access to accumulator 1 - INTERP0_ACCUM1 - 0x00000000 - - - read-write - 0x0088 - Read/write access to BASE0 register. - INTERP0_BASE0 - 0x00000000 - - - read-write - 0x008c - Read/write access to BASE1 register. - INTERP0_BASE1 - 0x00000000 - - - read-write - 0x0090 - Read/write access to BASE2 register. - INTERP0_BASE2 - 0x00000000 - - - read-only - 0x0094 - Read LANE0 result, and simultaneously write lane results to both accumulators (POP). - INTERP0_POP_LANE0 - 0x00000000 - - - read-only - 0x0098 - Read LANE1 result, and simultaneously write lane results to both accumulators (POP). - INTERP0_POP_LANE1 - 0x00000000 - - - read-only - 0x009c - Read FULL result, and simultaneously write lane results to both accumulators (POP). - INTERP0_POP_FULL - 0x00000000 - - - read-only - 0x00a0 - Read LANE0 result, without altering any internal state (PEEK). - INTERP0_PEEK_LANE0 - 0x00000000 - - - read-only - 0x00a4 - Read LANE1 result, without altering any internal state (PEEK). - INTERP0_PEEK_LANE1 - 0x00000000 - - - read-only - 0x00a8 - Read FULL result, without altering any internal state (PEEK). - INTERP0_PEEK_FULL - 0x00000000 - - - 0x00ac - Control register for lane 0 - - - read-only - [25:25] - Set if either OVERF0 or OVERF1 is set. - OVERF - - - read-only - [24:24] - Indicates if any masked-off MSBs in ACCUM1 are set. - OVERF1 - - - read-only - [23:23] - Indicates if any masked-off MSBs in ACCUM0 are set. - OVERF0 - - - read-write - [21:21] - Only present on INTERP0 on each core. If BLEND mode is enabled:\n - - LANE1 result is a linear interpolation between BASE0 and BASE1, controlled\n - by the 8 LSBs of lane 1 shift and mask value (a fractional number between\n - 0 and 255/256ths)\n - - LANE0 result does not have BASE0 added (yields only the 8 LSBs of lane 1 shift+mask value)\n - - FULL result does not have lane 1 shift+mask value added (BASE2 + lane 0 shift+mask)\n - LANE1 SIGNED flag controls whether the interpolation is signed or unsigned. - BLEND - - - read-write - [20:19] - ORed into bits 29:28 of the lane result presented to the processor on the bus.\n - No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n - of pointers into flash or SRAM. - FORCE_MSB - - - read-write - [18:18] - If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. - ADD_RAW - - - read-write - [17:17] - If 1, feed the opposite lane's result into this lane's accumulator on POP. - CROSS_RESULT - - - read-write - [16:16] - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n - Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) - CROSS_INPUT - - - read-write - [15:15] - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n - before adding to BASE0, and LANE0 PEEK/POP appear extended to 32 bits when read by processor. - SIGNED - - - read-write - [14:10] - The most-significant bit allowed to pass by the mask (inclusive)\n - Setting MSB < LSB may cause chip to turn inside-out - MASK_MSB - - - read-write - [9:5] - The least-significant bit allowed to pass by the mask (inclusive) - MASK_LSB - - - read-write - [4:0] - Logical right-shift applied to accumulator before masking - SHIFT - - - INTERP0_CTRL_LANE0 - 0x00000000 - - - 0x00b0 - Control register for lane 1 - - - read-write - [20:19] - ORed into bits 29:28 of the lane result presented to the processor on the bus.\n - No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n - of pointers into flash or SRAM. - FORCE_MSB - - - read-write - [18:18] - If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. - ADD_RAW - - - read-write - [17:17] - If 1, feed the opposite lane's result into this lane's accumulator on POP. - CROSS_RESULT - - - read-write - [16:16] - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n - Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) - CROSS_INPUT - - - read-write - [15:15] - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n - before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor. - SIGNED - - - read-write - [14:10] - The most-significant bit allowed to pass by the mask (inclusive)\n - Setting MSB < LSB may cause chip to turn inside-out - MASK_MSB - - - read-write - [9:5] - The least-significant bit allowed to pass by the mask (inclusive) - MASK_LSB - - - read-write - [4:0] - Logical right-shift applied to accumulator before masking - SHIFT - - - INTERP0_CTRL_LANE1 - 0x00000000 - - - 0x00b4 - Values written here are atomically added to ACCUM0\n - Reading yields lane 0's raw shift and mask value (BASE0 not added). - - - read-write - [23:0] - INTERP0_ACCUM0_ADD - - - INTERP0_ACCUM0_ADD - 0x00000000 - - - 0x00b8 - Values written here are atomically added to ACCUM1\n - Reading yields lane 1's raw shift and mask value (BASE1 not added). - - - read-write - [23:0] - INTERP0_ACCUM1_ADD - - - INTERP0_ACCUM1_ADD - 0x00000000 - - - write-only - 0x00bc - On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously.\n - Each half is sign-extended to 32 bits if that lane's SIGNED flag is set. - INTERP0_BASE_1AND0 - 0x00000000 - - - read-write - 0x00c0 - Read/write access to accumulator 0 - INTERP1_ACCUM0 - 0x00000000 - - - read-write - 0x00c4 - Read/write access to accumulator 1 - INTERP1_ACCUM1 - 0x00000000 - - - read-write - 0x00c8 - Read/write access to BASE0 register. - INTERP1_BASE0 - 0x00000000 - - - read-write - 0x00cc - Read/write access to BASE1 register. - INTERP1_BASE1 - 0x00000000 - - - read-write - 0x00d0 - Read/write access to BASE2 register. - INTERP1_BASE2 - 0x00000000 - - - read-only - 0x00d4 - Read LANE0 result, and simultaneously write lane results to both accumulators (POP). - INTERP1_POP_LANE0 - 0x00000000 - - - read-only - 0x00d8 - Read LANE1 result, and simultaneously write lane results to both accumulators (POP). - INTERP1_POP_LANE1 - 0x00000000 - - - read-only - 0x00dc - Read FULL result, and simultaneously write lane results to both accumulators (POP). - INTERP1_POP_FULL - 0x00000000 - - - read-only - 0x00e0 - Read LANE0 result, without altering any internal state (PEEK). - INTERP1_PEEK_LANE0 - 0x00000000 - - - read-only - 0x00e4 - Read LANE1 result, without altering any internal state (PEEK). - INTERP1_PEEK_LANE1 - 0x00000000 - - - read-only - 0x00e8 - Read FULL result, without altering any internal state (PEEK). - INTERP1_PEEK_FULL - 0x00000000 - - - 0x00ec - Control register for lane 0 - - - read-only - [25:25] - Set if either OVERF0 or OVERF1 is set. - OVERF - - - read-only - [24:24] - Indicates if any masked-off MSBs in ACCUM1 are set. - OVERF1 - - - read-only - [23:23] - Indicates if any masked-off MSBs in ACCUM0 are set. - OVERF0 - - - read-write - [22:22] - Only present on INTERP1 on each core. If CLAMP mode is enabled:\n - - LANE0 result is shifted and masked ACCUM0, clamped by a lower bound of\n - BASE0 and an upper bound of BASE1.\n - - Signedness of these comparisons is determined by LANE0_CTRL_SIGNED - CLAMP - - - read-write - [20:19] - ORed into bits 29:28 of the lane result presented to the processor on the bus.\n - No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n - of pointers into flash or SRAM. - FORCE_MSB - - - read-write - [18:18] - If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. - ADD_RAW - - - read-write - [17:17] - If 1, feed the opposite lane's result into this lane's accumulator on POP. - CROSS_RESULT - - - read-write - [16:16] - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n - Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) - CROSS_INPUT - - - read-write - [15:15] - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n - before adding to BASE0, and LANE0 PEEK/POP appear extended to 32 bits when read by processor. - SIGNED - - - read-write - [14:10] - The most-significant bit allowed to pass by the mask (inclusive)\n - Setting MSB < LSB may cause chip to turn inside-out - MASK_MSB - - - read-write - [9:5] - The least-significant bit allowed to pass by the mask (inclusive) - MASK_LSB - - - read-write - [4:0] - Logical right-shift applied to accumulator before masking - SHIFT - - - INTERP1_CTRL_LANE0 - 0x00000000 - - - 0x00f0 - Control register for lane 1 - - - read-write - [20:19] - ORed into bits 29:28 of the lane result presented to the processor on the bus.\n - No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n - of pointers into flash or SRAM. - FORCE_MSB - - - read-write - [18:18] - If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. - ADD_RAW - - - read-write - [17:17] - If 1, feed the opposite lane's result into this lane's accumulator on POP. - CROSS_RESULT - - - read-write - [16:16] - If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n - Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) - CROSS_INPUT - - - read-write - [15:15] - If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n - before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor. - SIGNED - - - read-write - [14:10] - The most-significant bit allowed to pass by the mask (inclusive)\n - Setting MSB < LSB may cause chip to turn inside-out - MASK_MSB - - - read-write - [9:5] - The least-significant bit allowed to pass by the mask (inclusive) - MASK_LSB - - - read-write - [4:0] - Logical right-shift applied to accumulator before masking - SHIFT - - - INTERP1_CTRL_LANE1 - 0x00000000 - - - 0x00f4 - Values written here are atomically added to ACCUM0\n - Reading yields lane 0's raw shift and mask value (BASE0 not added). - - - read-write - [23:0] - INTERP1_ACCUM0_ADD - - - INTERP1_ACCUM0_ADD - 0x00000000 - - - 0x00f8 - Values written here are atomically added to ACCUM1\n - Reading yields lane 1's raw shift and mask value (BASE1 not added). - - - read-write - [23:0] - INTERP1_ACCUM1_ADD - - - INTERP1_ACCUM1_ADD - 0x00000000 - - - write-only - 0x00fc - On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously.\n - Each half is sign-extended to 32 bits if that lane's SIGNED flag is set. - INTERP1_BASE_1AND0 - 0x00000000 - - - read-write - 0x0100 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK0 - 0x00000000 - - - read-write - 0x0104 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK1 - 0x00000000 - - - read-write - 0x0108 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK2 - 0x00000000 - - - read-write - 0x010c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK3 - 0x00000000 - - - read-write - 0x0110 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK4 - 0x00000000 - - - read-write - 0x0114 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK5 - 0x00000000 - - - read-write - 0x0118 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK6 - 0x00000000 - - - read-write - 0x011c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK7 - 0x00000000 - - - read-write - 0x0120 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK8 - 0x00000000 - - - read-write - 0x0124 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK9 - 0x00000000 - - - read-write - 0x0128 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK10 - 0x00000000 - - - read-write - 0x012c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK11 - 0x00000000 - - - read-write - 0x0130 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK12 - 0x00000000 - - - read-write - 0x0134 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK13 - 0x00000000 - - - read-write - 0x0138 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK14 - 0x00000000 - - - read-write - 0x013c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK15 - 0x00000000 - - - read-write - 0x0140 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK16 - 0x00000000 - - - read-write - 0x0144 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK17 - 0x00000000 - - - read-write - 0x0148 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK18 - 0x00000000 - - - read-write - 0x014c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK19 - 0x00000000 - - - read-write - 0x0150 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK20 - 0x00000000 - - - read-write - 0x0154 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK21 - 0x00000000 - - - read-write - 0x0158 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK22 - 0x00000000 - - - read-write - 0x015c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK23 - 0x00000000 - - - read-write - 0x0160 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK24 - 0x00000000 - - - read-write - 0x0164 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK25 - 0x00000000 - - - read-write - 0x0168 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK26 - 0x00000000 - - - read-write - 0x016c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK27 - 0x00000000 - - - read-write - 0x0170 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK28 - 0x00000000 - - - read-write - 0x0174 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK29 - 0x00000000 - - - read-write - 0x0178 - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK30 - 0x00000000 - - - read-write - 0x017c - Reading from a spinlock address will:\n - - Return 0 if lock is already locked\n - - Otherwise return nonzero, and simultaneously claim the lock\n\n - Writing (any value) releases the lock.\n - If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n - The value returned on success is 0x1 << lock number. - SPINLOCK31 - 0x00000000 - - - 32 - 1 - - - - 0 - 0x10000 - registers - - 0xe0000000 - PPB - - - 0xe010 - Use the SysTick Control and Status Register to enable the SysTick features. - - - read-only - [16:16] - Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger. - COUNTFLAG - - - read-write - [2:2] - SysTick clock source. Always reads as one if SYST_CALIB reports NOREF.\n - Selects the SysTick timer clock source:\n - 0 = External reference clock.\n - 1 = Processor clock. - CLKSOURCE - - - read-write - [1:1] - Enables SysTick exception request:\n - 0 = Counting down to zero does not assert the SysTick exception request.\n - 1 = Counting down to zero to asserts the SysTick exception request. - TICKINT - - - read-write - [0:0] - Enable SysTick counter:\n - 0 = Counter disabled.\n - 1 = Counter enabled. - ENABLE - - - SYST_CSR - 0x00000000 - - - 0xe014 - 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.\n - 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. - - - read-write - [23:0] - Value to load into the SysTick Current Value Register when the counter reaches 0. - RELOAD - - - SYST_RVR - 0x00000000 - - - 0xe018 - Use the SysTick Current Value Register to find the current value in the register. The reset value of this register is UNKNOWN. - - - read-write - [23:0] - 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. - CURRENT - - - SYST_CVR - 0x00000000 - - - 0xe01c - Use the SysTick Calibration Value Register to enable software to scale to any required speed using divide and multiply. - - - read-only - [31:31] - 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. - NOREF - - - read-only - [30:30] - If reads as 1, the calibration value for 10ms is inexact (due to clock frequency). - SKEW - - - read-only - [23:0] - 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. - TENMS - - - SYST_CALIB - 0x00000000 - - - 0xe100 - Use the Interrupt Set-Enable Register to enable interrupts and determine which interrupts are currently enabled.\n - If a pending interrupt is enabled, the NVIC activates the interrupt based on its priority. If an interrupt is not enabled, asserting its interrupt signal changes the interrupt state to pending, but the NVIC never activates the interrupt, regardless of its priority. - - - read-write - [31:0] - Interrupt set-enable bits.\n - Write:\n - 0 = No effect.\n - 1 = Enable interrupt.\n - Read:\n - 0 = Interrupt disabled.\n - 1 = Interrupt enabled. - SETENA - - - NVIC_ISER - 0x00000000 - - - 0xe180 - Use the Interrupt Clear-Enable Registers to disable interrupts and determine which interrupts are currently enabled. - - - read-write - [31:0] - Interrupt clear-enable bits.\n - Write:\n - 0 = No effect.\n - 1 = Disable interrupt.\n - Read:\n - 0 = Interrupt disabled.\n - 1 = Interrupt enabled. - CLRENA - - - NVIC_ICER - 0x00000000 - - - 0xe200 - The NVIC_ISPR forces interrupts into the pending state, and shows which interrupts are pending. - - - read-write - [31:0] - Interrupt set-pending bits.\n - Write:\n - 0 = No effect.\n - 1 = Changes interrupt state to pending.\n - Read:\n - 0 = Interrupt is not pending.\n - 1 = Interrupt is pending.\n - Note: Writing 1 to the NVIC_ISPR bit corresponding to:\n - An interrupt that is pending has no effect.\n - A disabled interrupt sets the state of that interrupt to pending. - SETPEND - - - NVIC_ISPR - 0x00000000 - - - 0xe280 - Use the Interrupt Clear-Pending Register to clear pending interrupts and determine which interrupts are currently pending. - - - read-write - [31:0] - Interrupt clear-pending bits.\n - Write:\n - 0 = No effect.\n - 1 = Removes pending state and interrupt.\n - Read:\n - 0 = Interrupt is not pending.\n - 1 = Interrupt is pending. - CLRPEND - - - NVIC_ICPR - 0x00000000 - - - 0xe400 - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.\n - Note: Writing 1 to an NVIC_ICPR bit does not affect the active state of the corresponding interrupt.\n - These registers are only word-accessible - - - read-write - [31:30] - Priority of interrupt 3 - IP_3 - - - read-write - [23:22] - Priority of interrupt 2 - IP_2 - - - read-write - [15:14] - Priority of interrupt 1 - IP_1 - - - read-write - [7:6] - Priority of interrupt 0 - IP_0 - - - NVIC_IPR0 - 0x00000000 - - - 0xe404 - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 7 - IP_7 - - - read-write - [23:22] - Priority of interrupt 6 - IP_6 - - - read-write - [15:14] - Priority of interrupt 5 - IP_5 - - - read-write - [7:6] - Priority of interrupt 4 - IP_4 - - - NVIC_IPR1 - 0x00000000 - - - 0xe408 - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 11 - IP_11 - - - read-write - [23:22] - Priority of interrupt 10 - IP_10 - - - read-write - [15:14] - Priority of interrupt 9 - IP_9 - - - read-write - [7:6] - Priority of interrupt 8 - IP_8 - - - NVIC_IPR2 - 0x00000000 - - - 0xe40c - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 15 - IP_15 - - - read-write - [23:22] - Priority of interrupt 14 - IP_14 - - - read-write - [15:14] - Priority of interrupt 13 - IP_13 - - - read-write - [7:6] - Priority of interrupt 12 - IP_12 - - - NVIC_IPR3 - 0x00000000 - - - 0xe410 - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 19 - IP_19 - - - read-write - [23:22] - Priority of interrupt 18 - IP_18 - - - read-write - [15:14] - Priority of interrupt 17 - IP_17 - - - read-write - [7:6] - Priority of interrupt 16 - IP_16 - - - NVIC_IPR4 - 0x00000000 - - - 0xe414 - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 23 - IP_23 - - - read-write - [23:22] - Priority of interrupt 22 - IP_22 - - - read-write - [15:14] - Priority of interrupt 21 - IP_21 - - - read-write - [7:6] - Priority of interrupt 20 - IP_20 - - - NVIC_IPR5 - 0x00000000 - - - 0xe418 - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 27 - IP_27 - - - read-write - [23:22] - Priority of interrupt 26 - IP_26 - - - read-write - [15:14] - Priority of interrupt 25 - IP_25 - - - read-write - [7:6] - Priority of interrupt 24 - IP_24 - - - NVIC_IPR6 - 0x00000000 - - - 0xe41c - Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. - - - read-write - [31:30] - Priority of interrupt 31 - IP_31 - - - read-write - [23:22] - Priority of interrupt 30 - IP_30 - - - read-write - [15:14] - Priority of interrupt 29 - IP_29 - - - read-write - [7:6] - Priority of interrupt 28 - IP_28 - - - NVIC_IPR7 - 0x00000000 - - - 0xed00 - Read the CPU ID Base Register to determine: the ID number of the processor core, the version number of the processor core, the implementation details of the processor core. - - - read-only - [31:24] - Implementor code: 0x41 = ARM - IMPLEMENTER - - - read-only - [23:20] - Major revision number n in the rnpm revision status:\n - 0x0 = Revision 0. - VARIANT - - - read-only - [19:16] - Constant that defines the architecture of the processor:\n - 0xC = ARMv6-M architecture. - ARCHITECTURE - - - read-only - [15:4] - Number of processor within family: 0xC60 = Cortex-M0+ - PARTNO - - - read-only - [3:0] - Minor revision number m in the rnpm revision status:\n - 0x1 = Patch 1. - REVISION - - - CPUID - 0x410cc601 - - - 0xed04 - Use the Interrupt Control State Register to set a pending Non-Maskable Interrupt (NMI), set or clear a pending PendSV, set or clear a pending SysTick, check for pending exceptions, check the vector number of the highest priority pended exception, check the vector number of the active exception. - - - read-write - [31:31] - Setting this bit will activate an NMI. Since NMI is the highest priority exception, it will activate as soon as it is registered.\n - NMI set-pending bit.\n - Write:\n - 0 = No effect.\n - 1 = Changes NMI exception state to pending.\n - Read:\n - 0 = NMI exception is not pending.\n - 1 = NMI exception is pending.\n - Because NMI is the highest-priority exception, normally the processor enters the NMI\n - exception handler as soon as it detects a write of 1 to this bit. Entering the handler then clears\n - this bit to 0. This means a read of this bit by the NMI exception handler returns 1 only if the\n - NMI signal is reasserted while the processor is executing that handler. - NMIPENDSET - - - read-write - [28:28] - PendSV set-pending bit.\n - Write:\n - 0 = No effect.\n - 1 = Changes PendSV exception state to pending.\n - Read:\n - 0 = PendSV exception is not pending.\n - 1 = PendSV exception is pending.\n - Writing 1 to this bit is the only way to set the PendSV exception state to pending. - PENDSVSET - - - read-write - [27:27] - PendSV clear-pending bit.\n - Write:\n - 0 = No effect.\n - 1 = Removes the pending state from the PendSV exception. - PENDSVCLR - - - read-write - [26:26] - SysTick exception set-pending bit.\n - Write:\n - 0 = No effect.\n - 1 = Changes SysTick exception state to pending.\n - Read:\n - 0 = SysTick exception is not pending.\n - 1 = SysTick exception is pending. - PENDSTSET - - - read-write - [25:25] - SysTick exception clear-pending bit.\n - Write:\n - 0 = No effect.\n - 1 = Removes the pending state from the SysTick exception.\n - This bit is WO. On a register read its value is Unknown. - PENDSTCLR - - - read-only - [23:23] - The system can only access this bit when the core is halted. It indicates that a pending interrupt is to be taken in the next running cycle. If C_MASKINTS is clear in the Debug Halting Control and Status Register, the interrupt is serviced. - ISRPREEMPT - - - read-only - [22:22] - External interrupt pending flag - ISRPENDING - - - read-only - [20:12] - Indicates the exception number for the highest priority pending exception: 0 = no pending exceptions. Non zero = The pending state includes the effect of memory-mapped enable and mask registers. It does not include the PRIMASK special-purpose register qualifier. - VECTPENDING - - - read-only - [8:0] - Active exception number field. Reset clears the VECTACTIVE field. - VECTACTIVE - - - ICSR - 0x00000000 - - - 0xed08 - The VTOR holds the vector table offset address. - - - read-write - [31:8] - Bits [31:8] of the indicate the vector table offset address. - TBLOFF - - - VTOR - 0x00000000 - - - 0xed0c - 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. - - - read-write - [31:16] - Register key:\n - Reads as Unknown\n - On writes, write 0x05FA to VECTKEY, otherwise the write is ignored. - VECTKEY - - - read-only - [15:15] - Data endianness implemented:\n - 0 = Little-endian. - ENDIANESS - - - read-write - [2:2] - 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. - SYSRESETREQ - - - read-write - [1:1] - 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. - VECTCLRACTIVE - - - AIRCR - 0x00000000 - - - 0xed10 - 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. - - - read-write - [4:4] - Send Event on Pending bit:\n - 0 = Only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded.\n - 1 = Enabled events and all interrupts, including disabled interrupts, can wakeup the processor.\n - When an event or interrupt becomes pending, the event signal wakes up the processor from WFE. If the\n - processor is not waiting for an event, the event is registered and affects the next WFE.\n - The processor also wakes up on execution of an SEV instruction or an external event. - SEVONPEND - - - read-write - [2:2] - Controls whether the processor uses sleep or deep sleep as its low power mode:\n - 0 = Sleep.\n - 1 = Deep sleep. - SLEEPDEEP - - - read-write - [1:1] - Indicates sleep-on-exit when returning from Handler mode to Thread mode:\n - 0 = Do not sleep when returning to Thread mode.\n - 1 = Enter sleep, or deep sleep, on return from an ISR to Thread mode.\n - Setting this bit to 1 enables an interrupt driven application to avoid returning to an empty main application. - SLEEPONEXIT - - - SCR - 0x00000000 - - - 0xed14 - The Configuration and Control Register permanently enables stack alignment and causes unaligned accesses to result in a Hard Fault. - - - read-only - [9:9] - Always reads as one, indicates 8-byte stack alignment on exception entry. On exception entry, the processor uses bit[9] of the stacked PSR to indicate the stack alignment. On return from the exception it uses this stacked bit to restore the correct stack alignment. - STKALIGN - - - read-only - [3:3] - Always reads as one, indicates that all unaligned accesses generate a HardFault. - UNALIGN_TRP - - - CCR - 0x00000000 - - - 0xed1c - System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 2 to set the priority of SVCall. - - - read-write - [31:30] - Priority of system handler 11, SVCall - PRI_11 - - - SHPR2 - 0x00000000 - - - 0xed20 - System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 3 to set the priority of PendSV and SysTick. - - - read-write - [31:30] - Priority of system handler 15, SysTick - PRI_15 - - - read-write - [23:22] - Priority of system handler 14, PendSV - PRI_14 - - - SHPR3 - 0x00000000 - - - 0xed24 - Use the System Handler Control and State Register to determine or clear the pending status of SVCall. - - - read-write - [15:15] - Reads as 1 if SVCall is Pending. Write 1 to set pending SVCall, write 0 to clear pending SVCall. - SVCALLPENDED - - - SHCSR - 0x00000000 - - - 0xed90 - Read the MPU Type Register to determine if the processor implements an MPU, and how many regions the MPU supports. - - - read-only - [23:16] - Instruction region. Reads as zero as ARMv6-M only supports a unified MPU. - IREGION - - - read-only - [15:8] - Number of regions supported by the MPU. - DREGION - - - read-only - [0:0] - Indicates support for separate instruction and data address maps. Reads as 0 as ARMv6-M only supports a unified MPU. - SEPARATE - - - MPU_TYPE - 0x00000800 - - - 0xed94 - Use the MPU Control Register to enable and disable the MPU, and to control whether the default memory map is enabled as a background region for privileged accesses, and whether the MPU is enabled for HardFaults and NMIs. - - - read-write - [2:2] - Controls whether the default memory map is enabled as a background region for privileged accesses. This bit is ignored when ENABLE is clear.\n - 0 = If the MPU is enabled, disables use of the default memory map. Any memory access to a location not\n - covered by any enabled region causes a fault.\n - 1 = If the MPU is enabled, enables use of the default memory map as a background region for privileged software accesses.\n - When enabled, the background region acts as if it is region number -1. Any region that is defined and enabled has priority over this default map. - PRIVDEFENA - - - read-write - [1:1] - Controls the use of the MPU for HardFaults and NMIs. Setting this bit when ENABLE is clear results in UNPREDICTABLE behaviour.\n - When the MPU is enabled:\n - 0 = MPU is disabled during HardFault and NMI handlers, regardless of the value of the ENABLE bit.\n - 1 = the MPU is enabled during HardFault and NMI handlers. - HFNMIENA - - - read-write - [0:0] - Enables the MPU. If the MPU is disabled, privileged and unprivileged accesses use the default memory map.\n - 0 = MPU disabled.\n - 1 = MPU enabled. - ENABLE - - - MPU_CTRL - 0x00000000 - - - 0xed98 - Use the MPU Region Number Register to select the region currently accessed by MPU_RBAR and MPU_RASR. - - - read-write - [3:0] - Indicates the MPU region referenced by the MPU_RBAR and MPU_RASR registers.\n - The MPU supports 8 memory regions, so the permitted values of this field are 0-7. - REGION - - - MPU_RNR - 0x00000000 - - - 0xed9c - Read the MPU Region Base Address Register to determine the base address of the region identified by MPU_RNR. Write to update the base address of said region or that of a specified region, with whose number MPU_RNR will also be updated. - - - read-write - [31:8] - Base address of the region. - ADDR - - - read-write - [4:4] - On writes, indicates whether the write must update the base address of the region identified by the REGION field, updating the MPU_RNR to indicate this new region.\n - Write:\n - 0 = MPU_RNR not changed, and the processor:\n - Updates the base address for the region specified in the MPU_RNR.\n - Ignores the value of the REGION field.\n - 1 = The processor:\n - Updates the value of the MPU_RNR to the value of the REGION field.\n - Updates the base address for the region specified in the REGION field.\n - Always reads as zero. - VALID - - - read-write - [3:0] - On writes, specifies the number of the region whose base address to update provided VALID is set written as 1. On reads, returns bits [3:0] of MPU_RNR. - REGION - - - MPU_RBAR - 0x00000000 - - - 0xeda0 - Use the MPU Region Attribute and Size Register to define the size, access behaviour and memory type of the region identified by MPU_RNR, and enable that region. - - - read-write - [31:16] - The MPU Region Attribute field. Use to define the region attribute control.\n - 28 = XN: Instruction access disable bit:\n - 0 = Instruction fetches enabled.\n - 1 = Instruction fetches disabled.\n - 26:24 = AP: Access permission field\n - 18 = S: Shareable bit\n - 17 = C: Cacheable bit\n - 16 = B: Bufferable bit - ATTRS - - - read-write - [15:8] - Subregion Disable. For regions of 256 bytes or larger, each bit of this field controls whether one of the eight equal subregions is enabled. - SRD - - - read-write - [5:1] - Indicates the region size. Region size in bytes = 2^(SIZE+1). The minimum permitted value is 7 (b00111) = 256Bytes - SIZE - - - read-write - [0:0] - Enables the region. - ENABLE - - - MPU_RASR - 0x00000000 - - - 32 - 1 - - - SWI_IRQ - Virtual Peripheral to access unused NVIC software interrupts - 0 - - - SWI_IRQ_0 - 26 - - - SWI_IRQ_1 - 27 - - - SWI_IRQ_2 - 28 - - - SWI_IRQ_3 - 29 - - - SWI_IRQ_4 - 30 - - - SWI_IRQ_5 - 31 - - - - \ No newline at end of file diff --git a/svd/rp2040.yaml b/svd/rp2040.yaml index ca61c523..67b0cdb0 100644 --- a/svd/rp2040.yaml +++ b/svd/rp2040.yaml @@ -98,7 +98,7 @@ transforms: from: pio::Pio0 to: pio::Pio - MergeEnums: - from: pio::vals::Sm\d+ExecctrlStatusSel + from: pio::vals::Sm\d+(ExecctrlStatusSel|ExecctrlStatusN) to: pio::vals::SmExecctrlStatusSel - RenameFields: fieldset: pio::regs::Sm\d+(Pinctrl|Shiftctrl|Clkdiv|Execctrl|Addr|Instr) @@ -337,9 +337,6 @@ transforms: from: ep\d+_(.*) to: ep_$1 - - Rename: - from: usbctrl_dpram::(.*) - to: usb_dpram::$1 - MergeEnums: from: usb_dpram::vals::Ep\d+(In|Out)(.*) to: usb_dpram::vals::Ep$2 diff --git a/svd/rp2350.yaml b/svd/rp2350.yaml new file mode 100644 index 00000000..53d2f453 --- /dev/null +++ b/svd/rp2350.yaml @@ -0,0 +1,411 @@ +transforms: + #- DeleteEnums: + # from: .* + # bit_size: 1 + - DeleteFieldsets: + from: .* + useless: true + + # =========== DMA + - MergeEnums: + from: dma::vals::Ch\d+CtrlTrigTreqSel + to: dma::vals::TreqSel + - MergeEnums: + from: dma::vals::Ch\d+CtrlTrigDataSize + to: dma::vals::DataSize + - DeleteEnums: + from: dma::vals::Ch\d+CtrlTrigRingSize + - MergeFieldsets: + from: dma::regs::Timer\d+ + to: dma::regs::Timer + - MergeFieldsets: + from: dma::regs::Ch\d+CtrlTrig + to: dma::regs::CtrlTrig + - RenameFields: + fieldset: dma::regs::Ch\d+DbgCtdreq + from: ch\d+_(.*) + to: $1 + - MergeFieldsets: + from: dma::regs::Ch\d+DbgCtdreq + to: dma::regs::DbgCtdreq + - MakeBlock: + blocks: dma::Dma + from: ch(\d+)_(.*) + to_block: dma::Channel + to_outer: ch$1 + to_inner: $2 + - MakeRegisterArray: + blocks: dma::Dma + from: ch\d+ + to: ch + - MakeRegisterArray: + blocks: dma::Dma + from: timer\d+ + to: timer + + # =========== TIMER + - MakeRegisterArray: + blocks: timer0::Timer0 + from: alarm\d+ + to: alarm + - MergeFieldsets: + from: timer0::regs::Int[efrs] + to: timer0::regs::Int + - MakeFieldArray: + fieldsets: timer0::regs::Int + from: alarm_\d+ + to: alarm + - Rename: + from: timer0::(.*) + to: timer::$1 + - Rename: + from: timer::Timer0 + to: timer::Timer + + # =========== UART + - Rename: + from: uart0::(.*) + to: uart::$1 + - Rename: + from: uart::Uart0 + to: uart::Uart + + # =========== SPI + - Rename: + from: spi0::(.*) + to: spi::$1 + - Rename: + from: spi::Spi0 + to: spi::Spi + - RenameRegisters: + block: spi::Spi + from: ssp(.*) + to: $1 + - Rename: + from: spi::regs::Ssp(.*) + to: spi::regs::$1 + + # =========== I2C + - Rename: + from: i2c0::(.*) + to: i2c::$1 + - Rename: + from: i2c::I2c0 + to: i2c::I2c + - DeleteEnums: + from: i2c::vals::.* + bit_size: 1 + + # =========== PIO + - Rename: + from: pio0::(.*) + to: pio::$1 + - Rename: + from: pio::Pio0 + to: pio::Pio + - MergeEnums: + from: pio::vals::Sm\d+(ExecctrlStatusSel|ExecctrlStatusN) + to: pio::vals::$1 + - RenameFields: + fieldset: pio::regs::Sm\d+(Pinctrl|Shiftctrl|Clkdiv|Execctrl|Addr|Instr) + from: sm\d+_(.*) + to: $1 + - MergeFieldsets: + from: pio::regs::Sm\d+(Pinctrl|Shiftctrl|Clkdiv|Execctrl|Addr|Instr) + to: pio::regs::Sm$1 + - RenameFields: + fieldset: pio::regs::InstrMem\d+ + from: instr_mem\d+ + to: instr_mem + - MergeFieldsets: + from: pio::regs::InstrMem\d+ + to: pio::regs::InstrMem + - MergeFieldsets: + from: pio::regs::(Irq\dInt.|Intr) + to: pio::regs::Intr + - MakeRegisterArray: + blocks: pio::Pio + from: (instr_mem|txf|rxf)\d+ + to: $1 + - MakeBlock: + blocks: pio::Pio + from: sm(\d+)_(.+) + to_outer: sm$1 + to_inner: $2 + to_block: pio::StateMachine + - MakeRegisterArray: + blocks: pio::Pio + from: sm\d+ + to: sm + - MakeBlock: + blocks: pio::Pio + from: irq(\d+)_(.+) + to_outer: irq$1 + to_inner: $2 + to_block: pio::Irq + - MakeRegisterArray: + blocks: pio::Pio + from: irq\d+ + to: irqs + + # ========= SIO + - MakeBlock: + blocks: sio::Sio + from: interp(\d+)_(.*) + to_block: sio::Interp + to_outer: interp$1 + to_inner: $2 + - MakeBlock: + blocks: sio::Sio + from: div_(.*) + to_block: sio::Div + to_outer: div + to_inner: $1 + - MakeBlock: + blocks: sio::Sio + from: fifo_(.*) + to_block: sio::Fifo + to_outer: fifo + to_inner: $1 + - MakeRegisterArray: + blocks: sio::Sio + from: interp(\d+) + to: interp + - MakeRegisterArray: + blocks: sio::Sio + from: spinlock(\d+) + to: spinlock + - DeleteFieldsets: + from: sio::regs::Gpio.* + - MakeBlock: + blocks: sio::Sio + from: gpio_(hi_)?(out|oe)(|_set|_clr|_xor) + to_block: sio::Gpio + to_outer: gpio_$1$2 + to_inner: value$3 + - MakeRegisterArray: + blocks: sio::Sio + from: gpio_(hi_)?(in|out|oe) + to: gpio_$2 + + # ========= IO + - Rename: + from: io_bank0::(.*) + to: io::$1 + - Rename: + from: io::IoBank0 + to: io::Io + - MergeEnums: + from: io::vals::Gpio.+Ctrl(.+)over + to: io::vals::${1}over + - DeleteEnums: + from: io::vals::Gpio\d+CtrlFuncsel + soft: true + - MergeFieldsets: + from: io::regs::Gpio\d+(Status|Ctrl) + to: io::regs::Gpio$1 + - MakeBlock: + blocks: io::Io + from: gpio(\d+)_(.*) + to_block: io::Gpio + to_outer: gpio$1 + to_inner: $2 + - MakeRegisterArray: + blocks: io::Io + from: gpio\d+ + to: gpio + - MakeFieldArray: + fieldsets: io::regs::.*Int.* + from: gpio\d+_(.*) + to: $1 + - MergeFieldsets: + from: io::regs::.*Int.* + to: io::regs::Int + # io has only 30 gpios, so the last reg has only 6 instead of 8. + # homogenize this by picking the first reg and disabling checking. + main: .*0 + check: NoCheck + - MakeRegisterArray: + blocks: io::Io + from: (.*int.*)\d+ + to: $1 + - MakeBlock: + blocks: io::Io + from: (.*)_(int[sfre]) + to_block: io::Int + to_outer: int_$1 + to_inner: $2 + - MakeRegisterArray: + blocks: io::Io + from: int_proc\d + to: int_proc + - MergeBlocks: + from: (io::Io|io_qspi::IoQspi) + main: io::Io + to: io::Io + check: NoCheck + + # =========== PADS + - Rename: + from: pads_bank0::(.*) + to: pads::$1 + - Rename: + from: pads::PadsBank0 + to: pads::Pads + - MergeEnums: + from: pads::vals::.*Drive + to: pads::vals::Drive + - MergeFieldsets: + from: pads::regs::(Gpio\d+|Swclk|Swd) + to: pads::regs::GpioCtrl + - MakeRegisterArray: + blocks: pads::Pads + from: (gpio\d+|swclk|swd) + to: gpio + - MergeBlocks: + from: (pads::Pads|pads_qspi::PadsQspi) + main: pads::Pads + to: pads::Pads + check: NoCheck + + # ========= PLL + - Rename: + from: pll_sys::(.*) + to: pll::$1 + - Rename: + from: pll::PllSys + to: pll::Pll + + # ========= RTC + - MergeFieldsets: + from: rtc::regs::Int. + to: rtc::regs::Int + + # ========= ADC + - MergeFieldsets: + from: adc::regs::Int. + to: adc::regs::Int + + # ========= BUSCTRL + - RenameFields: + fieldset: busctrl::regs::(Perfctr|Perfsel)\d+ + from: (perfctr|perfsel)\d + to: $1 + - MergeEnums: + from: busctrl::vals::Perfsel\d+ + to: busctrl::vals::Perfsel + - MergeFieldsets: + from: busctrl::regs::(Perfctr|Perfsel)\d+ + to: busctrl::regs::$1 + - MakeRegisterArray: + blocks: busctrl::Busctrl + from: (perfctr|perfsel)\d + to: $1 + + # ========= CLOCKS + - MergeFieldsets: + from: clocks::regs::Int. + to: clocks::regs::Int + - RenameEnumVariants: + enum: clocks::vals::ClkGpout\dCtrlAuxsrc + from: ROSC_CLKSRC_PH + to: ROSC_CLKSRC + - MergeEnums: + from: clocks::vals::ClkGpout\dCtrlAuxsrc + to: clocks::vals::ClkGpoutCtrlAuxsrc + - MergeFieldsets: + from: clocks::regs::ClkGpout\d(Ctrl|Div) + to: clocks::regs::ClkGpout$1 + - MakeRegisterArray: + blocks: clocks::Clocks + from: clk_gpout\d_(ctrl|div|selected) + to: clk_gpout_$1 + + # ========= USB + - Rename: + from: usbctrl_regs::(.*) + to: usb::$1 + - Rename: + from: usb::UsbctrlRegs + to: usb::Usb + - MergeFieldsets: + from: usb::regs::Int. + to: usb::regs::Int + - MergeFieldsets: + from: usb::regs::AddrEndp\d+ + to: usb::regs::AddrEndpX + - MakeRegisterArray: + blocks: usb::Usb + from: addr_endp\d+ + to: addr_endp_x + - MakeFieldArray: + fieldsets: usb::regs::(BuffStatus|BuffCpuShouldHandle|EpAbort|EpAbortDone|EpStatusStallNak) + from: ep\d+_(.*) + to: ep_$1 + + - Rename: + from: usbctrl_dpram::(.*) + to: usb_dpram::$1 + - MergeEnums: + from: usb_dpram::vals::Ep\d+(In|Out)(.*) + to: usb_dpram::vals::Ep$2 + - MergeFieldsets: + from: usb_dpram::regs::Ep\d+(In|Out)(.*) + to: usb_dpram::regs::Ep$2 + - Rename: + from: usb_dpram::UsbctrlDpram + to: usb_dpram::UsbDpram + - MakeRegisterArray: + blocks: usb_dpram::UsbDpram + from: ep\d+(.*) + to: ep$1 + - MakeFieldArray: + fieldsets: usb_dpram::regs::.*BufferControl + from: (.*)_[01] + to: $1 + + # =========== PWM + - MergeFieldsets: + from: pwm::regs::Ch\d+(.+) + to: pwm::regs::Ch$1 + check: NoCheck + - RenameFields: + fieldset: pwm::regs::Ch.+ + from: ch\d+_(.+) + to: $1 + - MergeEnums: + from: pwm::vals::Ch\dCsrDivmode + to: pwm::vals::Divmode + - MakeBlock: + blocks: pwm::Pwm + from: ch(\d+)_(.+) + to_block: pwm::Channel + to_outer: ch$1 + to_inner: $2 + - MakeRegisterArray: + blocks: pwm::Pwm + from: ch\d+ + to: ch + + + # =========== Misc + - MergeEnums: + from: rosc::vals::.+Passwd + to: rosc::vals::Passwd + - MergeFieldsets: + from: resets::regs::(Reset|ResetDone) + to: resets::regs::Peripherals + - Rename: + from: xip_ctrl + to: xip + + # =========== Cleanup + - Delete: + from: ppb::.* # We already get this from cortex_m crate + - Delete: + from: io_qspi::.* + - Delete: + from: swi_irq::.* + - Delete: + from: pads_qspi::.* + - Sanitize: {} diff --git a/update.sh b/update.sh index 18b5feb7..dfc9bb13 100755 --- a/update.sh +++ b/update.sh @@ -6,11 +6,17 @@ rm -rf src mkdir src #(cd ../chiptool/; cargo build) -#RUST_LOG=info ../chiptool/target/debug/chiptool generate --svd svd/rp2040.svd --transform svd/rp2040.yaml -chiptool generate --svd svd/rp2040.svd --transform svd/rp2040.yaml +#RUST_LOG=info ../chiptool/target/debug/chiptool generate --svd svd/RP2040.svd --transform svd/rp2040.yaml +chiptool generate --svd svd/RP2040.svd --transform svd/rp2040.yaml # cargo install form -form -i lib.rs -o src +form -i lib.rs -o src/rp2040 +rm lib.rs + +chiptool generate --svd svd/RP2350.svd --transform svd/rp2350.yaml + +# cargo install form +form -i lib.rs -o src/rp2350 rm lib.rs cargo fmt