Philips Semiconductors
I2C Interface
PRELIMINARY SPECIFICATION
16-3
16.4.3
The I
2
C
status register contains status information re-
garding the transfer in progress and the nature of inter-
rupts associated with
I
2
C
operation.
IIC_SR Register
The IIC_SR register is read only and is intended as the
primary source of status regarding current
I
2
C
operation.
The IIC_SR register must be used in conjunction with the
IIC_CR register. The interrupt sources of the IIC_SR reg-
ister are individually enabled by writing to the appropriate
enable bit in the IIC_CR register. The bitfield definitions
of the IIC_SR register are presented in
Table 16-3
. The
IIC_SR provides four sources of interrupts. Note: the in-
terrupt should be set up as level triggered interrupt.
GDI
interrupt
—
The GDI bit together with the FI bits
provide status about I
2
C transfer completion. The
interpretation of GDI/FI bit combinations are different
depending on whether the I
2
C interface is in master
transmit or master receive mode. Refer to
Table 16-4
and
Table 16-6
for GDI/FI interpretation.
FI
interrupt
—
See GDI bit definition and GDI/FI
transmit and receive definitions in
Table 16-4
and
Table 16-6
.
SANACKI
interrupt
—
This interrupt flag bit indicates
that a slave address was transmitted but no slave on
the I
2
C bus acknowledges the address to claim the
transaction. This is an error condition. Once the I
C
interface has set this interrupt flag, the interface is
idle. The DSPCPU should clear this interrupt flag by
writing a
‘
1
’
to IIC_CR.CLRSANACKI before re-
attempting this transfer or starting another I
C trans-
fer.
SDNACKI
interrupt
—
This interrupt flag bit indicates
that an addressed slave receiver device has refused
to acknowledge the current byte of data for an ongo-
ing transfer. This is an error condition. Once the I
2
C
interface has set this interrupt flag, the interface is
idle. The DSPCPU should clear this interrupt flag by
writing a
‘
1
’
to IIC_CR.CLRSDNACKI before retrying
this transfer or starting another.
The SDA_STAT and SCL_STAT bits indicate the current
state of the SDA and SCL signals. The STATE field indi-
Table 16-3. IIC_SR register
Bits
Field Name
Definition
31
GDI
Good Data Interrupt. This is the nor-
mal transfer complete interrupt flag.
This interrupt may be asserted without
the IIC_SR.FI interrupt bit at the end of
an I
2
C transfer or after master abort of
an I
2
C transfer.
Full Interrupt. This interrupt indicates
the condition of the IIC_DR register
dependent upon whether the I
2
C inter-
face is in receive or transmit mode.
Slave Address No Acknowledge Inter-
rupt.
Slave Data No Acknowledge Interrupt.
This bit is used to examine the state of
the external I
2
C SDA data pin. Bit
polarity is:
1 = SDA pad is low
0 = SDA pad floated high
This bit is used to examine the state of
the external I
2
C SCL clock pin. Bit
polarity is:
1 = SCL pad is low
0 = SCL pad floated high
The STATE field indicates the microac-
tivity of the I
2
C bus.
Direction of current data transfer.
Read as
‘
0
’
Remaining Byte Count.
Read as
‘
0
’
30
FI
29
SANACKI
28
27
SDNACKI
SDA_STAT
26
SCL_STAT
25:23
STATE
22
21
15:8
7:0
DIRECTION
Reserved
RBC
Reserved
Table 16-4. Master transmit mode GDI/FI status
GDI
FI
Description
0
0
Message is not complete. The IIC_DR is not
empty. No interrupt.
Message is not complete. The IIC_DR is empty
and the requested transmit byte count is not
equal to 0. The DSPCPU must write additional
bytes of the current transfer to the IIC_DR regis-
ter.
Message transmission has completed. The
IIC_DR is empty. The byte transmit count = 0.
0
1
1
X
Table 16-5. STATE field values
STATE
000
Meaning
I
2
C Interface is idle.
RESERVED FOR FUTURE USE
IDLE (MSG is done, awaiting clear GDI to go to
000 state)
Address phase is being processed
BYTE3 (first byte) is being processed
BYTE2 is being processed
BYTE1 is being processed
BYTE0 (last) is being processed
001
010
011
100
101
110
111
Table 16-6. Master receive GDI/FI conditions
GDI
FI
Description
0
0
Message is not complete. IIC_DR is not full.
No interrupt.
IIC_DR contains received data and needs to
be read serviced. More data bytes are
expected since the receive byte count is not
equal to 0.
The transfer has been completed and the
receive byte count is equal to 0. 0 to 4 valid
bytes are in the IIC_DR register awaiting read
servicing by the DSPCPU.
0
1
1
X