SWCU193A April 2023 – August 2024 CC2340R2 , CC2340R5 , CC2340R5-Q1
The target module can generate an interrupt when data is received or requested. This interrupt is enabled by setting the I2C Target Interrupt Mask register (I2C.TIMR). Software determines whether the module must write (transmit) or read (receive) data from the I2C Target Data register, I2C.TDR[7:0] DATA bit field and by checking the I2C.TSTAT[0] RREQ and I2C.TSTAT[1] TREQ bits. If the target module is in receive mode and the first byte of a transfer is received, the I2C.TSTAT[2] FBR and I2C.TSTAT[0] RREQ bits are set. The interrupt is cleared by setting the I2C Target Interrupt Clear register I2C.TICR[0] DATAIC bit.
In addition, the target module generates an interrupt when a Start and a Stop condition is detected. These interrupts are enabled by setting the I2C.TIMR[1] STARTIM and I2C.TIMR[2] STOPIM bits; these interrupts are cleared by setting the I2C.TICR[1] STARTIC and I2C.TICR[2] STOPIC bits to 1.
If the application does not require the use of interrupts, the raw interrupt status is always visible through the I2C Target Raw Interrupt Status register (I2C.TRIS).