![](http://datasheet.mmic.net.cn/260000/PTM1300FBEA_datasheet_15959396/PTM1300FBEA_236.png)
TM1300 Data Book
Philips Semiconductors
16-2
PRODUCT SPECIFICATION
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
I
2
C
. 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 rewriting 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 I
2
C bus. However,
the last byte is saved in an internal register and the
DSPCPU can write a new word when COUNT = 0.
DIRECTION = 1 –> I
2
C read
16.4.2
IIC_DR Register
The IIC_DR register contains the actual data transferred
during
I
2
C
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
I
2
C
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
I
2
C
inter-
face. Data bytes received are loaded into the IIC_DR
register starting with byte3, then byte2, byte1 and byte0.:
is written into the COUNT bitfield of the IIC_AR register.
The transfer completes when the
I
2
C
interface receives
the number of bytes indicated by the COUNT bitfield of
the IIC_AR register.
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.
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
IIC_SR Register
Figure 16-2. I
2
C registers
MMIO_base
offset:
0x10 3400
IIC_AR (r/w)
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
SDA_STAT
SCL_STAT
SANACKI
FI
GDI
GD_IEN
F_IEN
SANACK_IEN
SDNACK_IEN
IIC_CR (r/w)
0x10 340C
0
3
7
11
15
19
23
27
31
CLRFI
CLRSANACKI
CLRSDNACKI
CLRGDI
ENABLE
RBC
SW_MODE_EN
SDA_OUT
SCL_OUT