Texas Instruments TMS320C642X manual I2C Interrupt Status Register Icstr, Sdir Nacksnt Rsfull Xsmt

Page 25

www.ti.com

Registers

3.3I2C Interrupt Status Register (ICSTR)

The I2C interrupt status register (ICSTR) is used to determine which interrupt has occurred and to read status information.

The I2C interrupt status register (ICSTR) is shown in Figure 15 and described in Table 7.

Figure 15. I2C Interrupt Status Register (ICSTR)

31

 

 

 

 

 

 

 

 

16

 

 

 

 

Reserved

 

 

 

 

 

 

 

 

R-0

 

 

 

15

14

13

12

11

10

9

8

 

 

 

 

 

 

 

 

 

 

Reserved

 

SDIR

NACKSNT

BB

 

RSFULL

XSMT

AAS

AD0

R-0

 

R/W1C-0

R/W1C-0

R/W1C-0

 

R-0

R-1

R-0

R-0

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

Reserved

SCD

ICXRDY

 

ICRRDY

ARDY

NACK

AL

 

 

 

 

 

 

 

 

 

 

 

R-0

R/W1C-0

R/W1C-1

 

R/W1C-0

R/W1C-0

R/W1C-0

R/W1C-0

LEGEND: R/W = Read/Write; R = Read only; W1C = Write 1 to clear (writing 0 has no effect); -n= value after reset

Table 7. I2C Interrupt Status Register (ICSTR) Field Descriptions

Bit

Field

 

Value

Description

 

 

 

 

 

 

 

31-15

Reserved

 

0

These reserved bit locations are always read as zeros. A value written to this field has no effect.

 

 

 

 

 

 

 

14

SDIR

 

 

Slave direction bit. In digital-loopback mode (DLB), the SDIR bit is cleared to 0.

 

 

 

 

0

I2C is acting as a master-transmitter/receiver or a slave-receiver. SDIR is cleared by one of the

 

 

 

 

 

following events:

 

 

 

 

 

• A STOP or a START condition.

 

 

 

 

 

• SDIR is manually cleared. To clear this bit, write a 1 to it.

 

 

 

 

1

I2C is acting as a slave-transmitter.

 

 

 

 

 

 

13

NACKSNT

 

 

No-acknowledgment sent bit. NACKSNT bit is used when the I2C is in the receiver mode. One instance

 

 

 

 

in which NACKSNT is affected is when the NACK mode is used (see the description for NACKMOD in

 

 

 

 

 

Section 3.9).

 

 

 

 

0

NACK is not sent. NACKSNT is cleared by one of the following events:

 

 

 

 

 

• It is manually cleared. To clear this bit, write a 1 to it.

 

 

 

 

 

• The I2C is reset (either when 0 is written to the IRS bit of ICMDR or when the processor is reset).

 

 

 

 

1

NACK is sent. A no-acknowledge bit was sent during the acknowledge cycle on the I2C-bus.

 

 

 

 

 

 

 

12

BB

 

 

Bus busy bit. BB bit indicates whether the I2C-bus is busy or is free for another data transfer. In the

 

 

 

 

 

master mode, BB is controlled by the software.

 

 

 

 

0

Bus is free. BB is cleared by one of the following events:

 

 

 

 

 

• The I2C receives or transmits a STOP bit (bus free).

 

 

 

 

 

• BB is manually cleared. To clear this bit, write a 1 to it.

 

 

 

 

 

• The I2C is reset (either when 0 is written to the IRS bit of ICMDR or when the processor is reset).

 

 

 

 

1

Bus is busy. When the STT bit in ICMDR is set to 1, a restart condition is generated. BB is set by one of

 

 

 

 

the following events:

 

 

 

 

 

• The I2C has received or transmitted a START bit on the bus.

 

 

 

 

 

• SCL is in a low state and the IRS bit in ICMDR is 0.

 

 

 

 

 

 

 

11

RSFULL

 

 

Receive shift register full bit. RSFULL indicates an overrun condition during reception. Overrun occurs

 

 

 

 

 

when the receive shift register (ICRSR) is full with new data but the previous data has not been read

 

 

 

 

 

from the data receive register (ICDRR). The new data will not be copied to ICDRR until the previous

 

 

 

 

 

data is read. As new bits arrive from the SDA pin, they overwrite the bits in ICRSR.

 

 

 

 

0

No overrun is detected. RSFULL is cleared by one of the following events:

 

 

 

 

 

• ICDRR is read.

 

 

 

 

 

• The I2C is reset (either when 0 is written to the IRS bit of ICMDR or when the processor is reset).

 

 

 

 

1

Overrun is detected.

 

 

 

 

 

 

 

 

 

 

 

 

 

SPRUEN0D –March 2011

 

Inter-Integrated Circuit (I2C) Peripheral

25

Submit Documentation Feedback

 

 

© 2011, Texas Instruments Incorporated

Image 25
Contents Users Guide Submit Documentation Feedback Appendix a Revision HistoryList of Figures List of Tables Read This First Features Not Supported FeaturesPurpose of the Peripheral Industry Standards Compliance Statement Functional Block DiagramMultiple I2C Modules Connected Bus StructureClock Generation Clocking Diagram for the I2C PeripheralClock Synchronization Signal DescriptionsInput and Output Voltage Levels Data Validity Start and Stop Conditions1 7-Bit Addressing Format Serial Data Formats2 10-Bit Addressing Format Using a Repeated Start ConditionFree Data Format ACKEndianness Considerations Operating Mode DescriptionOperating Modes Operating Modes of the I2C PeripheralWays to Generate a Nack Bit Nack Bit GenerationNack Bit Generation I2C Peripheral Condition Basic OptionalArbitration Arbitration Procedure Between Two Master-TransmittersSoftware Reset Considerations Reset ConsiderationsHardware Reset Considerations InitializationConfiguring the I2C in Slave Receiver and Transmitter Mode Peripheral Architecture Interrupt Support Power ManagementDMA Events Generated by the I2C Peripheral Inter-Integrated Circuit I2C Registers Emulation ConsiderationsAcronym Register Description I2C Own Address Register Icoar Field Descriptions I2C Own Address Register IcoarOaddr Bit Field Value DescriptionI2C Interrupt Mask Register Icimr Field Descriptions I2C Interrupt Mask Register IcimrSCD Icxrdy Icrrdy Ardy Nack AASI2C Interrupt Status Register Icstr Field Descriptions I2C Interrupt Status Register IcstrSdir Nacksnt Rsfull Xsmt SdirAD0 Bit FieldAn acknowledge bit ACK has been sent by the receiver 1 I2C Clock Low-Time Divider Register Icclkl I2C Clock Divider Registers Icclkl and Icclkh2 I2C Clock High-Time Divider Register Icclkh IcclI2C Data Count Register Iccnt Field Descriptions I2C Data Count Register IccntIcdc I2C Slave Address Register Icsar I2C Data Receive Register IcdrrI2C Data Receive Register Icdrr Field Descriptions I2C Slave Address Register Icsar Field DescriptionsI2C Data Transmit Register Icdxr Field Descriptions I2C Data Transmit Register IcdxrI2C Mode Register Icmdr Field Descriptions I2C Mode Register IcmdrRM bit is dont care Bus Activity Description Icmdr BitI2C State Function of TRX Bit How the MST and FDF Bits Affect the Role of TRX BitI2C Interrupt Vector Register Icivr Field Descriptions 10 I2C Interrupt Vector Register IcivrIntcode I2C Extended Mode Register Icemdr Field Descriptions 11 I2C Extended Mode Register IcemdrIgnack BCM R/W-0 R/W-1 IgnackI2C Prescaler Register Icpsc Field Descriptions 12 I2C Prescaler Register IcpscIpsc 14 I2C Peripheral Identification Register ICPID2 13 I2C Peripheral Identification Register ICPID1Type I2CReference Additions/Modifications/Deletions Document Revision HistoryDSP Products ApplicationsRfid TI E2E Community Home