------------- Registers -- -------------
I2C0_Periph : aliased I2C_Peripheral
with Import, Address => I2C0_Base;
I2C1_Periph : aliased I2C_Peripheral
with Import, Address => I2C1_Base;
type I2C_Peripheral is record
IC_CON : aliased IC_CON_Register;
IC_TAR : aliased IC_TAR_Register;
IC_SAR : aliased IC_SAR_Register;
IC_DATA_CMD : aliased IC_DATA_CMD_Register;
IC_SS_SCL_HCNT : aliased IC_SS_SCL_HCNT_Register;
IC_SS_SCL_LCNT : aliased IC_SS_SCL_LCNT_Register;
IC_FS_SCL_HCNT : aliased IC_FS_SCL_HCNT_Register;
IC_FS_SCL_LCNT : aliased IC_FS_SCL_LCNT_Register;
IC_INTR_STAT : aliased IC_INTR_STAT_Register;
IC_INTR_MASK : aliased IC_INTR_MASK_Register;
IC_RAW_INTR_STAT : aliased IC_RAW_INTR_STAT_Register;
IC_RX_TL : aliased IC_RX_TL_Register;
IC_TX_TL : aliased IC_TX_TL_Register;
IC_CLR_INTR : aliased IC_CLR_INTR_Register;
IC_CLR_RX_UNDER : aliased IC_CLR_RX_UNDER_Register;
IC_CLR_RX_OVER : aliased IC_CLR_RX_OVER_Register;
IC_CLR_TX_OVER : aliased IC_CLR_TX_OVER_Register;
IC_CLR_RD_REQ : aliased IC_CLR_RD_REQ_Register;
IC_CLR_TX_ABRT : aliased IC_CLR_TX_ABRT_Register;
IC_CLR_RX_DONE : aliased IC_CLR_RX_DONE_Register;
IC_CLR_ACTIVITY : aliased IC_CLR_ACTIVITY_Register;
IC_CLR_STOP_DET : aliased IC_CLR_STOP_DET_Register;
IC_CLR_START_DET : aliased IC_CLR_START_DET_Register;
IC_CLR_GEN_CALL : aliased IC_CLR_GEN_CALL_Register;
IC_ENABLE : aliased IC_ENABLE_Register;
IC_STATUS : aliased IC_STATUS_Register;
IC_TXFLR : aliased IC_TXFLR_Register;
IC_RXFLR : aliased IC_RXFLR_Register;
IC_SDA_HOLD : aliased IC_SDA_HOLD_Register;
IC_TX_ABRT_SOURCE : aliased IC_TX_ABRT_SOURCE_Register;
IC_SLV_DATA_NACK_ONLY : aliased IC_SLV_DATA_NACK_ONLY_Register;
IC_DMA_CR : aliased IC_DMA_CR_Register;
IC_DMA_TDLR : aliased IC_DMA_TDLR_Register;
IC_DMA_RDLR : aliased IC_DMA_RDLR_Register;
IC_SDA_SETUP : aliased IC_SDA_SETUP_Register;
IC_ACK_GENERAL_CALL : aliased IC_ACK_GENERAL_CALL_Register;
IC_ENABLE_STATUS : aliased IC_ENABLE_STATUS_Register;
IC_FS_SPKLEN : aliased IC_FS_SPKLEN_Register;
IC_CLR_RESTART_DET : aliased IC_CLR_RESTART_DET_Register;
IC_COMP_PARAM_1 : aliased IC_COMP_PARAM_1_Register;
IC_COMP_VERSION : aliased HAL.UInt32;
IC_COMP_TYPE : aliased HAL.UInt32;
end record;
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.
I2C Slave Address Register
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.
Standard Speed I2C Clock SCL High Count Register
Standard Speed I2C Clock SCL Low Count Register
Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register
Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register
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.
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.
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.
I2C Receive FIFO Threshold Register
I2C Transmit FIFO Threshold Register
Clear Combined and Individual Interrupt Register
Clear RX_UNDER Interrupt Register
Clear RX_OVER Interrupt Register
Clear TX_OVER Interrupt Register
Clear RD_REQ Interrupt Register
Clear TX_ABRT Interrupt Register
Clear RX_DONE Interrupt Register
Clear ACTIVITY Interrupt Register
Clear STOP_DET Interrupt Register
Clear START_DET Interrupt Register
Clear GEN_CALL Interrupt Register
I2C Enable Register
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
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.
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.
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.
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.
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.
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.
DMA Transmit Data Level Register
I2C Receive Data Level Register
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.
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.
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.
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.
Clear RESTART_DET Interrupt Register
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
I2C Component Version Register
I2C Component Type Register
type IC_ACK_GENERAL_CALL_ACK_GEN_CALL_Field is
DISABLED,
ENABLED)
with Size => 1;
Generate ACK for a General Call
type IC_ACK_GENERAL_CALL_Register is record
ACK_GEN_CALL : IC_ACK_GENERAL_CALL_ACK_GEN_CALL_Field :=
RP2040_SVD.I2C.ENABLED;
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record;
unspecified
type IC_CLR_ACTIVITY_Register is record
CLR_ACTIVITY : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_GEN_CALL_Register is record
CLR_GEN_CALL : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_INTR_Register is record
CLR_INTR : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_RD_REQ_Register is record
CLR_RD_REQ : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_RESTART_DET_Register is record
CLR_RESTART_DET : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_RX_DONE_Register is record
CLR_RX_DONE : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_RX_OVER_Register is record
CLR_RX_OVER : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_RX_UNDER_Register is record
CLR_RX_UNDER : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_START_DET_Register is record
CLR_START_DET : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_STOP_DET_Register is record
CLR_STOP_DET : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_TX_ABRT_Register is record
CLR_TX_ABRT : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type IC_CLR_TX_OVER_Register is record
CLR_TX_OVER : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
subtype IC_COMP_PARAM_1_APB_DATA_WIDTH_Field is HAL.UInt2;
subtype IC_COMP_PARAM_1_MAX_SPEED_MODE_Field is HAL.UInt2;
type IC_COMP_PARAM_1_Register is record
APB_DATA_WIDTH : IC_COMP_PARAM_1_APB_DATA_WIDTH_Field;
MAX_SPEED_MODE : IC_COMP_PARAM_1_MAX_SPEED_MODE_Field;
HC_COUNT_VALUES : Boolean;
INTR_IO : Boolean;
HAS_DMA : Boolean;
ADD_ENCODED_PARAMS : Boolean;
RX_BUFFER_DEPTH : IC_COMP_PARAM_1_RX_BUFFER_DEPTH_Field;
TX_BUFFER_DEPTH : IC_COMP_PARAM_1_TX_BUFFER_DEPTH_Field;
Reserved_24_31 : HAL.UInt8;
end record;
Read-only. MAX SPEED MODE = FAST MODE
Read-only. Programmable count values for each mode.
Read-only. COMBINED Interrupt outputs
Read-only. DMA handshaking signals are enabled
Read-only. Encoded parameters not visible
Read-only. RX Buffer Depth = 16
Read-only. TX Buffer Depth = 16
unspecified
subtype IC_COMP_PARAM_1_RX_BUFFER_DEPTH_Field is HAL.UInt8;
subtype IC_COMP_PARAM_1_TX_BUFFER_DEPTH_Field is HAL.UInt8;
type IC_CON_IC_10BITADDR_MASTER_Field is
ADDR_7BITS,
ADDR_10BITS)
with Size => 1;
Master 10Bit addressing mode
type IC_CON_IC_10BITADDR_SLAVE_Field is
ADDR_7BITS,
ADDR_10BITS)
with Size => 1;
Slave 10Bit addressing
type IC_CON_IC_RESTART_EN_Field is
DISABLED,
ENABLED)
with Size => 1;
Master restart enabled
type IC_CON_IC_SLAVE_DISABLE_Field is
SLAVE_ENABLED,
SLAVE_DISABLED)
with Size => 1;
Slave mode is disabled
type IC_CON_MASTER_MODE_Field is
DISABLED,
ENABLED)
with Size => 1;
Master mode is enabled
type IC_CON_Register is record
MASTER_MODE : IC_CON_MASTER_MODE_Field :=
RP2040_SVD.I2C.ENABLED;
SPEED : IC_CON_SPEED_Field := RP2040_SVD.I2C.FAST;
IC_10BITADDR_SLAVE : IC_CON_IC_10BITADDR_SLAVE_Field :=
RP2040_SVD.I2C.ADDR_7BITS;
IC_10BITADDR_MASTER : IC_CON_IC_10BITADDR_MASTER_Field :=
RP2040_SVD.I2C.ADDR_7BITS;
IC_RESTART_EN : IC_CON_IC_RESTART_EN_Field :=
RP2040_SVD.I2C.ENABLED;
IC_SLAVE_DISABLE : IC_CON_IC_SLAVE_DISABLE_Field :=
RP2040_SVD.I2C.SLAVE_DISABLED;
STOP_DET_IFADDRESSED : IC_CON_STOP_DET_IFADDRESSED_Field :=
RP2040_SVD.I2C.DISABLED;
TX_EMPTY_CTRL : IC_CON_TX_EMPTY_CTRL_Field :=
RP2040_SVD.I2C.DISABLED;
RX_FIFO_FULL_HLD_CTRL : IC_CON_RX_FIFO_FULL_HLD_CTRL_Field :=
RP2040_SVD.I2C.DISABLED;
STOP_DET_IF_MASTER_ACTIVE : Boolean := False;
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record;
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
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.
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
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
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.
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).
This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register.\n\n Reset value: 0x0.
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.
Read-only. Master issues the STOP_DET interrupt irrespective of whether master is active or not
unspecified
type IC_CON_RX_FIFO_FULL_HLD_CTRL_Field is
DISABLED,
ENABLED)
with Size => 1;
Hold bus when RX_FIFO is full
type IC_CON_SPEED_Field is
STANDARD,
FAST,
HIGH)
with Size => 2;
Fast or Fast Plus mode of operation
High Speed mode of operation
type IC_CON_STOP_DET_IFADDRESSED_Field is
DISABLED,
ENABLED)
with Size => 1;
slave issues STOP_DET intr only if addressed
type IC_CON_TX_EMPTY_CTRL_Field is
DISABLED,
ENABLED)
with Size => 1;
Controlled generation of TX_EMPTY interrupt
type IC_DATA_CMD_CMD_Field is
WRITE,
READ)
with Size => 1;
Master Read Command
subtype IC_DATA_CMD_DAT_Field is HAL.UInt8;
type IC_DATA_CMD_FIRST_DATA_BYTE_Field is
INACTIVE,
ACTIVE)
with Size => 1;
Non sequential data byte received
type IC_DATA_CMD_Register is record
DAT : IC_DATA_CMD_DAT_Field := 16#0#;
CMD : IC_DATA_CMD_CMD_Field := RP2040_SVD.I2C.WRITE;
STOP : IC_DATA_CMD_STOP_Field := RP2040_SVD.I2C.DISABLE;
RESTART : IC_DATA_CMD_RESTART_Field := RP2040_SVD.I2C.DISABLE;
FIRST_DATA_BYTE : IC_DATA_CMD_FIRST_DATA_BYTE_Field :=
RP2040_SVD.I2C.INACTIVE;
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record;
After a write operation all bits in the field are cleared (set to zero). 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
After a write operation all bits in the field are cleared (set to zero). 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
After a write operation all bits in the field are cleared (set to zero). 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
Read-only. 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.
unspecified
type IC_DATA_CMD_RESTART_Field is
DISABLE,
ENABLE)
with Size => 1;
Issue RESTART before this command
type IC_DATA_CMD_STOP_Field is
DISABLE,
ENABLE)
with Size => 1;
Issue STOP after this command
type IC_DMA_CR_RDMAE_Field is
DISABLED,
ENABLED)
with Size => 1;
Receive FIFO DMA channel enabled
type IC_DMA_CR_Register is record
RDMAE : IC_DMA_CR_RDMAE_Field := RP2040_SVD.I2C.DISABLED;
TDMAE : IC_DMA_CR_TDMAE_Field := RP2040_SVD.I2C.DISABLED;
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record;
Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0
unspecified
type IC_DMA_CR_TDMAE_Field is
DISABLED,
ENABLED)
with Size => 1;
Transmit FIFO DMA channel enabled
subtype IC_DMA_RDLR_DMARDL_Field is HAL.UInt4;
type IC_DMA_RDLR_Register is record
DMARDL : IC_DMA_RDLR_DMARDL_Field := 16#0#;
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record;
unspecified
subtype IC_DMA_TDLR_DMATDL_Field is HAL.UInt4;
type IC_DMA_TDLR_Register is record
DMATDL : IC_DMA_TDLR_DMATDL_Field := 16#0#;
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record;
unspecified
type IC_ENABLE_ABORT_Field is
DISABLE,
ENABLED)
with Size => 1;
ABORT operation in progress
type IC_ENABLE_ENABLE_Field is
DISABLED,
ENABLED)
with Size => 1;
I2C is enabled
type IC_ENABLE_Register is record
ENABLE : IC_ENABLE_ENABLE_Field := RP2040_SVD.I2C.DISABLED;
ABORT_k : IC_ENABLE_ABORT_Field := RP2040_SVD.I2C.DISABLE;
TX_CMD_BLOCK : IC_ENABLE_TX_CMD_BLOCK_Field :=
RP2040_SVD.I2C.NOT_BLOCKED;
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record;
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
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
unspecified
type IC_ENABLE_STATUS_IC_EN_Field is
DISABLED,
ENABLED)
with Size => 1;
I2C enabled
type IC_ENABLE_STATUS_Register is record
IC_EN : IC_ENABLE_STATUS_IC_EN_Field;
SLV_DISABLED_WHILE_BUSY : IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_Field;
SLV_RX_DATA_LOST : IC_ENABLE_STATUS_SLV_RX_DATA_LOST_Field;
Reserved_3_31 : HAL.UInt29;
end record;
Read-only. 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
Read-only. 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
unspecified
type IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_Field is
INACTIVE,
ACTIVE)
with Size => 1;
Slave is disabled when it is active
type IC_ENABLE_STATUS_SLV_RX_DATA_LOST_Field is
INACTIVE,
ACTIVE)
with Size => 1;
Slave RX Data is lost
type IC_ENABLE_TX_CMD_BLOCK_Field is
NOT_BLOCKED,
BLOCKED)
with Size => 1;
Tx Command execution blocked
subtype IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_Field is HAL.UInt16;
type IC_FS_SCL_HCNT_Register is record
IC_FS_SCL_HCNT : IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_Field := 16#6#;
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record;
unspecified
subtype IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_Field is HAL.UInt16;
type IC_FS_SCL_LCNT_Register is record
IC_FS_SCL_LCNT : IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_Field := 16#D#;
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record;
unspecified
subtype IC_FS_SPKLEN_IC_FS_SPKLEN_Field is HAL.UInt8;
type IC_FS_SPKLEN_Register is record
IC_FS_SPKLEN : IC_FS_SPKLEN_IC_FS_SPKLEN_Field := 16#7#;
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record;
unspecified
type IC_INTR_MASK_M_ACTIVITY_Field is
ENABLED,
DISABLED)
with Size => 1;
ACTIVITY interrupt is unmasked
type IC_INTR_MASK_M_GEN_CALL_Field is
ENABLED,
DISABLED)
with Size => 1;
GEN_CALL interrupt is unmasked
type IC_INTR_MASK_M_RD_REQ_Field is
ENABLED,
DISABLED)
with Size => 1;
RD_REQ interrupt is unmasked
type IC_INTR_MASK_M_RESTART_DET_Field is
ENABLED,
DISABLED)
with Size => 1;
RESTART_DET interrupt is unmasked
type IC_INTR_MASK_M_RX_DONE_Field is
ENABLED,
DISABLED)
with Size => 1;
RX_DONE interrupt is unmasked
type IC_INTR_MASK_M_RX_FULL_Field is
ENABLED,
DISABLED)
with Size => 1;
RX_FULL interrupt is unmasked
type IC_INTR_MASK_M_RX_OVER_Field is
ENABLED,
DISABLED)
with Size => 1;
RX_OVER interrupt is unmasked
type IC_INTR_MASK_M_RX_UNDER_Field is
ENABLED,
DISABLED)
with Size => 1;
RX_UNDER interrupt is unmasked
type IC_INTR_MASK_M_START_DET_Field is
ENABLED,
DISABLED)
with Size => 1;
START_DET interrupt is unmasked
type IC_INTR_MASK_M_STOP_DET_Field is
ENABLED,
DISABLED)
with Size => 1;
STOP_DET interrupt is unmasked
type IC_INTR_MASK_M_TX_ABRT_Field is
ENABLED,
DISABLED)
with Size => 1;
TX_ABORT interrupt is unmasked
type IC_INTR_MASK_M_TX_EMPTY_Field is
ENABLED,
DISABLED)
with Size => 1;
TX_EMPTY interrupt is unmasked
type IC_INTR_MASK_M_TX_OVER_Field is
ENABLED,
DISABLED)
with Size => 1;
TX_OVER interrupt is unmasked
type IC_INTR_MASK_Register is record
M_RX_UNDER : IC_INTR_MASK_M_RX_UNDER_Field :=
RP2040_SVD.I2C.DISABLED;
M_RX_OVER : IC_INTR_MASK_M_RX_OVER_Field :=
RP2040_SVD.I2C.DISABLED;
M_RX_FULL : IC_INTR_MASK_M_RX_FULL_Field :=
RP2040_SVD.I2C.DISABLED;
M_TX_OVER : IC_INTR_MASK_M_TX_OVER_Field :=
RP2040_SVD.I2C.DISABLED;
M_TX_EMPTY : IC_INTR_MASK_M_TX_EMPTY_Field :=
RP2040_SVD.I2C.DISABLED;
M_RD_REQ : IC_INTR_MASK_M_RD_REQ_Field :=
RP2040_SVD.I2C.DISABLED;
M_TX_ABRT : IC_INTR_MASK_M_TX_ABRT_Field :=
RP2040_SVD.I2C.DISABLED;
M_RX_DONE : IC_INTR_MASK_M_RX_DONE_Field :=
RP2040_SVD.I2C.DISABLED;
M_ACTIVITY : IC_INTR_MASK_M_ACTIVITY_Field :=
RP2040_SVD.I2C.ENABLED;
M_STOP_DET : IC_INTR_MASK_M_STOP_DET_Field :=
RP2040_SVD.I2C.ENABLED;
M_START_DET : IC_INTR_MASK_M_START_DET_Field :=
RP2040_SVD.I2C.ENABLED;
M_GEN_CALL : IC_INTR_MASK_M_GEN_CALL_Field :=
RP2040_SVD.I2C.DISABLED;
M_RESTART_DET : IC_INTR_MASK_M_RESTART_DET_Field :=
RP2040_SVD.I2C.ENABLED;
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record;
This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register.\n\n Reset value: 0x0
This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register.\n\n Reset value: 0x0
This bit masks the R_START_DET interrupt in IC_INTR_STAT register.\n\n Reset value: 0x0
This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register.\n\n Reset value: 0x1
This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register.\n\n Reset value: 0x0
unspecified
type IC_INTR_STAT_R_ACTIVITY_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_ACTIVITY interrupt is active
type IC_INTR_STAT_R_GEN_CALL_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_GEN_CALL interrupt is active
type IC_INTR_STAT_R_RD_REQ_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_RD_REQ interrupt is active
type IC_INTR_STAT_R_RESTART_DET_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_RESTART_DET interrupt is active
type IC_INTR_STAT_R_RX_DONE_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_RX_DONE interrupt is active
type IC_INTR_STAT_R_RX_FULL_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_RX_FULL interrupt is active
type IC_INTR_STAT_R_RX_OVER_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_RX_OVER interrupt is active
type IC_INTR_STAT_R_RX_UNDER_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RX_UNDER interrupt is active
type IC_INTR_STAT_R_START_DET_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_START_DET interrupt is active
type IC_INTR_STAT_R_STOP_DET_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_STOP_DET interrupt is active
type IC_INTR_STAT_R_TX_ABRT_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_TX_ABRT interrupt is active
type IC_INTR_STAT_R_TX_EMPTY_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_TX_EMPTY interrupt is active
type IC_INTR_STAT_R_TX_OVER_Field is
INACTIVE,
ACTIVE)
with Size => 1;
R_TX_OVER interrupt is active
type IC_INTR_STAT_Register is record
R_RX_UNDER : IC_INTR_STAT_R_RX_UNDER_Field;
R_RX_OVER : IC_INTR_STAT_R_RX_OVER_Field;
R_RX_FULL : IC_INTR_STAT_R_RX_FULL_Field;
R_TX_OVER : IC_INTR_STAT_R_TX_OVER_Field;
R_TX_EMPTY : IC_INTR_STAT_R_TX_EMPTY_Field;
R_RD_REQ : IC_INTR_STAT_R_RD_REQ_Field;
R_TX_ABRT : IC_INTR_STAT_R_TX_ABRT_Field;
R_RX_DONE : IC_INTR_STAT_R_RX_DONE_Field;
R_ACTIVITY : IC_INTR_STAT_R_ACTIVITY_Field;
R_STOP_DET : IC_INTR_STAT_R_STOP_DET_Field;
R_START_DET : IC_INTR_STAT_R_START_DET_Field;
R_GEN_CALL : IC_INTR_STAT_R_GEN_CALL_Field;
R_RESTART_DET : IC_INTR_STAT_R_RESTART_DET_Field;
Reserved_13_31 : HAL.UInt19;
end record;
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit.\n\n Reset value: 0x0
Read-only. See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit.\n\n Reset value: 0x0
unspecified
type IC_RAW_INTR_STAT_ACTIVITY_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RAW_INTR_ACTIVITY interrupt is active
type IC_RAW_INTR_STAT_GEN_CALL_Field is
INACTIVE,
ACTIVE)
with Size => 1;
GEN_CALL interrupt is active
type IC_RAW_INTR_STAT_RD_REQ_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RD_REQ interrupt is active
type IC_RAW_INTR_STAT_Register is record
RX_UNDER : IC_RAW_INTR_STAT_RX_UNDER_Field;
RX_OVER : IC_RAW_INTR_STAT_RX_OVER_Field;
RX_FULL : IC_RAW_INTR_STAT_RX_FULL_Field;
TX_OVER : IC_RAW_INTR_STAT_TX_OVER_Field;
TX_EMPTY : IC_RAW_INTR_STAT_TX_EMPTY_Field;
RD_REQ : IC_RAW_INTR_STAT_RD_REQ_Field;
TX_ABRT : IC_RAW_INTR_STAT_TX_ABRT_Field;
RX_DONE : IC_RAW_INTR_STAT_RX_DONE_Field;
ACTIVITY : IC_RAW_INTR_STAT_ACTIVITY_Field;
STOP_DET : IC_RAW_INTR_STAT_STOP_DET_Field;
START_DET : IC_RAW_INTR_STAT_START_DET_Field;
GEN_CALL : IC_RAW_INTR_STAT_GEN_CALL_Field;
RESTART_DET : IC_RAW_INTR_STAT_RESTART_DET_Field;
Reserved_13_31 : HAL.UInt19;
end record;
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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.
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
unspecified
type IC_RAW_INTR_STAT_RESTART_DET_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RESTART_DET interrupt is active
type IC_RAW_INTR_STAT_RX_DONE_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RX_DONE interrupt is active
type IC_RAW_INTR_STAT_RX_FULL_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RX_FULL interrupt is active
type IC_RAW_INTR_STAT_RX_OVER_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RX_OVER interrupt is active
type IC_RAW_INTR_STAT_RX_UNDER_Field is
INACTIVE,
ACTIVE)
with Size => 1;
RX_UNDER interrupt is active
type IC_RAW_INTR_STAT_START_DET_Field is
INACTIVE,
ACTIVE)
with Size => 1;
START_DET interrupt is active
type IC_RAW_INTR_STAT_STOP_DET_Field is
INACTIVE,
ACTIVE)
with Size => 1;
STOP_DET interrupt is active
type IC_RAW_INTR_STAT_TX_ABRT_Field is
INACTIVE,
ACTIVE)
with Size => 1;
TX_ABRT interrupt is active
type IC_RAW_INTR_STAT_TX_EMPTY_Field is
INACTIVE,
ACTIVE)
with Size => 1;
TX_EMPTY interrupt is active
type IC_RAW_INTR_STAT_TX_OVER_Field is
INACTIVE,
ACTIVE)
with Size => 1;
TX_OVER interrupt is active
type IC_RX_TL_Register is record
RX_TL : IC_RX_TL_RX_TL_Field := 16#0#;
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record;
unspecified
subtype IC_RX_TL_RX_TL_Field is HAL.UInt8;
type IC_RXFLR_Register is record
RXFLR : IC_RXFLR_RXFLR_Field;
Reserved_5_31 : HAL.UInt27;
end record;
unspecified
subtype IC_RXFLR_RXFLR_Field is HAL.UInt5;
subtype IC_SAR_IC_SAR_Field is HAL.UInt10;
type IC_SAR_Register is record
IC_SAR : IC_SAR_IC_SAR_Field := 16#55#;
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record;
unspecified
subtype IC_SDA_HOLD_IC_SDA_RX_HOLD_Field is HAL.UInt8;
subtype IC_SDA_HOLD_IC_SDA_TX_HOLD_Field is HAL.UInt16;
type IC_SDA_HOLD_Register is record
IC_SDA_TX_HOLD : IC_SDA_HOLD_IC_SDA_TX_HOLD_Field := 16#1#;
IC_SDA_RX_HOLD : IC_SDA_HOLD_IC_SDA_RX_HOLD_Field := 16#0#;
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record;
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].
unspecified
type IC_SDA_SETUP_Register is record
SDA_SETUP : IC_SDA_SETUP_SDA_SETUP_Field := 16#64#;
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record;
unspecified
subtype IC_SDA_SETUP_SDA_SETUP_Field is HAL.UInt8;
type IC_SLV_DATA_NACK_ONLY_NACK_Field is
DISABLED,
ENABLED)
with Size => 1;
Slave receiver generates NACK upon data reception only
type IC_SLV_DATA_NACK_ONLY_Register is record
NACK : IC_SLV_DATA_NACK_ONLY_NACK_Field :=
RP2040_SVD.I2C.DISABLED;
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record;
unspecified
subtype IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_Field is HAL.UInt16;
type IC_SS_SCL_HCNT_Register is record
IC_SS_SCL_HCNT : IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_Field := 16#28#;
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record;
unspecified
subtype IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_Field is HAL.UInt16;
type IC_SS_SCL_LCNT_Register is record
IC_SS_SCL_LCNT : IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_Field := 16#2F#;
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record;
unspecified
type IC_STATUS_ACTIVITY_Field is
INACTIVE,
ACTIVE)
with Size => 1;
I2C is active
type IC_STATUS_MST_ACTIVITY_Field is
IDLE,
ACTIVE)
with Size => 1;
Master not idle
type IC_STATUS_Register is record
ACTIVITY : IC_STATUS_ACTIVITY_Field;
TFNF : IC_STATUS_TFNF_Field;
TFE : IC_STATUS_TFE_Field;
RFNE : IC_STATUS_RFNE_Field;
RFF : IC_STATUS_RFF_Field;
MST_ACTIVITY : IC_STATUS_MST_ACTIVITY_Field;
SLV_ACTIVITY : IC_STATUS_SLV_ACTIVITY_Field;
Reserved_7_31 : HAL.UInt25;
end record;
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
unspecified
type IC_STATUS_RFF_Field is
NOT_FULL,
FULL)
with Size => 1;
Rx FIFO is full
type IC_STATUS_RFNE_Field is
EMPTY,
NOT_EMPTY)
with Size => 1;
Rx FIFO not empty
type IC_STATUS_SLV_ACTIVITY_Field is
IDLE,
ACTIVE)
with Size => 1;
Slave not idle
type IC_STATUS_TFE_Field is
NON_EMPTY,
EMPTY)
with Size => 1;
Tx FIFO is empty
type IC_STATUS_TFNF_Field is
FULL,
NOT_FULL)
with Size => 1;
Tx FIFO not full
type IC_TAR_GC_OR_START_Field is
GENERAL_CALL,
START_BYTE)
with Size => 1;
START byte transmission
subtype IC_TAR_IC_TAR_Field is HAL.UInt10;
type IC_TAR_Register is record
IC_TAR : IC_TAR_IC_TAR_Field := 16#55#;
GC_OR_START : IC_TAR_GC_OR_START_Field :=
RP2040_SVD.I2C.GENERAL_CALL;
SPECIAL : IC_TAR_SPECIAL_Field := RP2040_SVD.I2C.DISABLED;
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record;
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
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
unspecified
type IC_TAR_SPECIAL_Field is
DISABLED,
ENABLED)
with Size => 1;
Enables programming of GENERAL_CALL or START_BYTE transmission
type IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_Field is
INACTIVE,
ACTIVE)
with Size => 1;
Byte 1 of 10Bit Address not ACKed by any slave
type IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_Field is
INACTIVE,
ACTIVE)
with Size => 1;
Byte 2 of 10Bit Address not ACKed by any slave
type IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_Field is
ABRT_10B_RD_VOID,
ABRT_10B_RD_GENERATED)
with Size => 1;
Master trying to read in 10Bit addressing mode when RESTART disabled
type IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_Field is
INACTIVE,
ACTIVE)
with Size => 1;
This abort is generated because of NOACK for 7-bit address
type IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_Field is
ABRT_GCALL_NOACK_VOID,
ABRT_GCALL_NOACK_GENERATED)
with Size => 1;
GCALL not ACKed by any slave
type IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_Field is
ABRT_GCALL_READ_VOID,
ABRT_GCALL_READ_GENERATED)
with Size => 1;
GCALL is followed by read from bus
type IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_Field is
ABRT_HS_ACK_VOID,
ABRT_HS_ACK_GENERATED)
with Size => 1;
HS Master code ACKed in HS Mode
type IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_Field is
ABRT_HS_NORSTRT_VOID,
ABRT_HS_NORSTRT_GENERATED)
with Size => 1;
User trying to switch Master to HS mode when RESTART disabled
type IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_Field is
ABRT_MASTER_DIS_VOID,
ABRT_MASTER_DIS_GENERATED)
with Size => 1;
User initiating master operation when MASTER disabled
type IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_Field is
ABRT_SBYTE_ACKDET_VOID,
ABRT_SBYTE_ACKDET_GENERATED)
with Size => 1;
ACK detected for START byte
type IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_Field is
ABRT_SBYTE_NORSTRT_VOID,
ABRT_SBYTE_NORSTRT_GENERATED)
with Size => 1;
User trying to send START byte when RESTART disabled
type IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_Field is
ABRT_SLV_ARBLOST_VOID,
ABRT_SLV_ARBLOST_GENERATED)
with Size => 1;
Slave lost arbitration to remote master
type IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_Field is
ABRT_SLVFLUSH_TXFIFO_VOID,
ABRT_SLVFLUSH_TXFIFO_GENERATED)
with Size => 1;
Slave flushes existing data in TX-FIFO upon getting read command
type IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_Field is
ABRT_SLVRD_INTX_VOID,
ABRT_SLVRD_INTX_GENERATED)
with Size => 1;
Slave trying to transmit to remote master in read mode
type IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_Field is
ABRT_TXDATA_NOACK_VOID,
ABRT_TXDATA_NOACK_GENERATED)
with Size => 1;
Transmitted data not ACKed by addressed slave
type IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_Field is
ABRT_USER_ABRT_VOID,
ABRT_USER_ABRT_GENERATED)
with Size => 1;
Transfer abort detected by master
type IC_TX_ABRT_SOURCE_ARB_LOST_Field is
ABRT_LOST_VOID,
ABRT_LOST_GENERATED)
with Size => 1;
Master or Slave-Transmitter lost arbitration
type IC_TX_ABRT_SOURCE_Register is record
ABRT_7B_ADDR_NOACK : IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_Field;
ABRT_10ADDR1_NOACK : IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_Field;
ABRT_10ADDR2_NOACK : IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_Field;
ABRT_TXDATA_NOACK : IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_Field;
ABRT_GCALL_NOACK : IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_Field;
ABRT_GCALL_READ : IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_Field;
ABRT_HS_ACKDET : IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_Field;
ABRT_SBYTE_ACKDET : IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_Field;
ABRT_HS_NORSTRT : IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_Field;
ABRT_SBYTE_NORSTRT : IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_Field;
ABRT_10B_RD_NORSTRT : IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_Field;
ABRT_MASTER_DIS : IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_Field;
ARB_LOST : IC_TX_ABRT_SOURCE_ARB_LOST_Field;
ABRT_SLVFLUSH_TXFIFO : IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_Field;
ABRT_SLV_ARBLOST : IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_Field;
ABRT_SLVRD_INTX : IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_Field;
ABRT_USER_ABRT : IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_Field;
Reserved_17_22 : HAL.UInt6;
TX_FLUSH_CNT : IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_Field;
end record;
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
Read-only. 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
unspecified
Read-only. 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
subtype IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_Field is HAL.UInt9;
type IC_TX_TL_Register is record
TX_TL : IC_TX_TL_TX_TL_Field := 16#0#;
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record;
unspecified
subtype IC_TX_TL_TX_TL_Field is HAL.UInt8;
type IC_TXFLR_Register is record
TXFLR : IC_TXFLR_TXFLR_Field;
Reserved_5_31 : HAL.UInt27;
end record;
unspecified
subtype IC_TXFLR_TXFLR_Field is HAL.UInt5;