TM1100 Preliminary Data Book
Philips Semiconductors
15-2
PRELIMINARY INFORMATION
File: i2c.fm5, modified 7/25/99
DIRECTION = 1 –> I2C read
The COUNT field must contain the desired bytecount for
the current transfer. The COUNT field will decrement by
one for each data byte transferred across I2C. The re-
maining bytecount for the current transfer can be read
from the COUNT field at any time. Note that the
DSPCPU must refrain from re-writing the IIC_AR register
until the current transfer completes to avoid corrupting
the bytecount or address fields.
Note:
For writes, the byte count decrements before the
byte is actually transferred over the I2C bus. However,
the last byte is saved in an internal register and the
DSPCPU can write a new word when COUNT = 0.
15.4.2
IIC_DR Register
The IIC_DR register contains the actual data transferred
during I2C operation. For a master transmit operation,
data transfer will be initiated when data is written to this
register. Transmission will begin with the transfer of the
address byte in the IIC_AR register followed by the data
bytes that were written to the IIC_DR register, byte3 first
and byte0 last. The I2C interface will interrupt for more
transmit data to be written to the IIC_DR until the transfer
bytecount COUNT in the IIC_AR register is reached.
In master receive operation, one or more data bytes re-
ceived are placed in the IIC_DR register by the I2C inter-
face. Data bytes received are loaded into the IIC_DR
register starting with byte3, then byte2, byte1 and byte0.:
The number of bytes the DSPCPU requests for a transfer
is written into the COUNT bitfield of the IIC_AR register.
The transfer completes when the I2C interface receives
the number of bytes indicated by the COUNT bitfield of
the IIC_AR register.
15.4.3
IIC_SR Register
The I2C status register contains status information re-
garding the transfer in progress and the nature of inter-
rupts associated with I2C operation.
The IIC_SR register is read only and is intended as the
primary source of status regarding current I2C 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
Figure 15-2. I2C Registers
MMIO_base
offset:
IIC_AR (r/w)
0x10 3400
0
3
7
11
15
19
23
27
31
COUNT
IIC_DR (r/w)
0x10 3404
0
3
7
11
15
19
23
27
31
IIC_SR (r/o)
0x10 3408
0
3
7
11
15
19
23
27
31
reserved
DIRECTION
ADDRESS
BYTE3
BYTE2
BYTE1
BYTE0
reservd
DIRECTION
STATE
SDNACKI
SANACKI
FI
GDI
GD_IEN
F_IEN
SDNACK_IEN
SANACK_IEN
IIC_CR (r/w)
0x10 340C
0
3
7
11
15
19
23
27
31
CLRFI
CLRGDI
CLRSANACKI
CLRSDNACKI
ENABLE
RBC
SDA_STAT
SCL_STAT
SW_MODE_EN
SDA_OUT
SCL_OUT