Inter-Integrated Circuit Controller
7-76
Table 7–60. I
2
C Data Counter Register (I2C_CNT)
Bit
Name
Description
15–0
DCOUNT
Data count
Data Count (DCOUNT)
Master mode only (receive or transmit).
This 16-bit countdown counter decrements by 1 for every byte received or
sent. A write initializes DCOUNT to a saved initial value. A read returns the
number of bytes that are yet to be received or sent. A read into DCOUNT re-
turns the initial value only before a start condition and after a stop condition.
When DCOUNT reaches 0, the core generates a stop condition if a stop condi-
tion was specified (STP = 1) and the ARDY status flag is set to 1.
If STP = 0, then the I
2
C asserts SCL = 0 when DCOUNT reaches 0. The local
host can then reprogram DCOUNT to a new value and resume sending or
receiving data with a new start condition (restart). This process repeats until
the STP is set to 1 by the LH.
The ARDY flag is set each time DCOUNT reaches 0 and DCOUNT is reloaded
to its initial value.
In slave mode (receive or transmit), DCOUNT is not used.
-
0x0: Reserved value. Do not use this setting.
-
0x1: Data counter = 1 bytes.
-
↓
↓
-
0xFFFF: Data counter = 65535 bytes (2
16
-1)
Note that DCOUNT is a don’t care when RM is set to 1.
Values after reset are low (all 16 bits).