I2C Control Registers
1790
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Inter-Integrated Circuit (I2C) Module
31.6.10 I2C Mode Register (I2CMDR)
and
describe this register.
Figure 31-22. I2C Mode Register (I2CMDR) [offset = 24h]
15
14
13
12
11
10
9
8
NACKMOD
FREE
STT
Reserved
STP
MST
TRX
XA
R/W-0
R/W-0
R/W-0
R-0
R/W-0
R/W-0
R/W-0
R/W-0
7
6
5
4
3
2
0
RM
DLB
nIRS
STB
FDF
BC
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 31-15. I2C Mode Register (I2CMDR) Field Descriptions
Bit
Field
Value
Description
15
NACKMOD
No-acknowledge (NACK) mode.
This bit is used to send an acknowledge (ACK) or a no-acknowledge (NACK) to the transmitter. This bit
is only applicable when the I2C is in receiver mode. In master receiver mode, when the internal data
counter decrements to 0, the I2C sends a NACK. The master receiver I2C finishes a transfer when it
sends a NACK. The I2C ignores ICCNT when NACKMOD is 1. The NACKMOD bit should be set before
the rising edge of the last data bit if a NACK must be sent, and this bit is cleared once a NACK has
been sent.
0
The I2C sends an ACK to the transmitter during the acknowledge cycle.
1
The I2C sends a NACK to the transmitter during the acknowledge cycle.
14
FREE
Free running bit.
This bit is used to determine the state of the I2C when a breakpoint is encountered in the high level
language (HLL) debugger.
0
The I2C stops immediately if SCL is low and keeps driving SCL low if the I2C master is a
transmitter/receiver. If SCL is high, I2C waits until SCL becomes low and then stops. If the I2C is a
slave, it will stop when the transmission/reception completes.
1
The I2C runs free.
13
STT
Start condition.
The start condition bit works with the STP bit (master only mode). The STT and STP bits are configured
to generate different transfer formats (see
). The STT and STP bits can be used to
terminate the repeat mode. This bit takes one I2C module clock cycle to set.
0
STT is reset to 0 by the hardware after the START condition has been generated.
1
STT is set to 1 by the device to generate a START condition. In master mode, setting STT to 1
generates a START condition.
12
Reserved
0
Reads return 0. Writes have no effect.
11
STP
Stop condition (Master mode only).
This bit can be set to a 1 by the CPU to generate a stop condition. It is reset to 0 by the hardware after
the stop condition has been generated. The stop condition is generated when ICCNT passes 0 when
the I2C is in non-repeat mode (RM=0). In repeat mode (RM=1), the stop condition is generated if STP
bit is 1. In transmitter mode, I2CTXRDY needs to be 1 (that is, you have to set STP bit unless you write
data into I2CDXR).
0
STP is reset to 0 by the hardware after the STOP condition has been generated.
1
STP is set to 1 by the device to generate a STOP condition.
10
MST
Master/slave mode bit.
This bit determines whether the module will operate in master or slave mode; see
. This bit
is cleared after generating a STOP condition. The BB bit is cleared first, and MST bit is cleared second.
Before starting the next transaction in master mode, this bit must be confirmed to be cleared.
0
The module is in the slave mode and the clock is received from the master device.
1
The module is in the master mode and it generates the clock. This bit is cleared when the transfer has
completed.