ic_intr_stat

         Name: 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.
      
Module Instance Base Address Register Address
i_i2c_0_i2c 0xFFC02200 0xFFC0222C
i_i2c_1_i2c 0xFFC02300 0xFFC0232C

Offset: 0x2C

Access: RO

Important: The value of a reserved bit must be maintained in software. When you modify registers containing reserved bit fields, you must use a read-modify-write operation to preserve state and prevent indeterminate system behavior.
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16

Reserved

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Reserved

r_master_on_hold

RO 0x0

r_restart_det

RO 0x0

r_gen_call

RO 0x0

r_start_det

RO 0x0

r_stop_det

RO 0x0

r_activity

RO 0x0

r_rx_done

RO 0x0

r_tx_abrt

RO 0x0

r_rd_req

RO 0x0

r_tx_empty

RO 0x0

r_tx_over

RO 0x0

r_rx_full

RO 0x0

r_rx_over

RO 0x0

r_rx_under

RO 0x0

ic_intr_stat Fields

Bit Name Description Access Reset
13 r_master_on_hold
Indicates whether master is holding the bus and TX FIFO is empty.

Reset value: 0x0
RO 0x0
12 r_restart_det
Indicates a RESTART condition has occurred on the I2C
interface when the I2C module is operating in slave mode and addressed. 
Reset value: 0x0
RO 0x0
11 r_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 the I2C or when the CPU
reads bit 0 of the IC_CLR_GEN_CALL register. The I2C stores the
received data in the Rx buffer.
Reset value: 0x0
RO 0x0
10 r_start_det
Indicates whether a START or RESTART condition has occurred on the I2C
interface regardless of whether the I2C is operating in slave or master
mode.
Reset value: 0x0
RO 0x0
9 r_stop_det
The behavior of the STOP_DET interrupt status differs based on the
STOP_DET_IFADDRESSED selection in the IC_CON register
When STOP_DET_IFADDRESSED =0 : 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, a STOP_DET interrupt is generated irrespective of whether
the slave is addressed or not.
When STOP_DET_IFADDRESSED = 1 : 
In Master Mode (MASTER_MODE = 1'b1), indicates a STOP condition has occurred on the I2C interface.
In Slave Mode (MASTER_MODE = 1'b0),STOP_DET interrupt is generated only if the slave is addressed.

NOTE: During a general call address, this slave does not issue a STOP_DET
interrupt if STOP_DET_IFADDRESSED=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).
Reset value: 0x0
RO 0x0
8 r_activity
This bit captures the I2C activity and stays set until it is cleared. There
are four ways to clear it:
- Disabling the I2C module
- 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 I2C module is idle, this bit remains set until cleared,
indicating that there was activity on the bus.
Reset value: 0x0
RO 0x0
7 r_rx_done
When the I2C module 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
RO 0x0
6 r_tx_abrt
This bit indicates if the I2C module, 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 I2C flushes/resets/empties the TX FIFO whenever this
bit is set. The TX FIFO 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
RO 0x0
5 r_rd_req
This bit is set to 1 when the I2C module is acting as a slave and another I2C
master is attempting to read data from it. The I2C module 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
RO 0x0
4 r_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
RO 0x0
3 r_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
RO 0x0
2 r_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
RO 0x0
1 r_rx_over
Set if the receive buffer is completely filled to the Rx buffer depth of 64 and
an additional byte is received from an external I2C device. The 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.

Reset value: 0x0
RO 0x0
0 r_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
RO 0x0