UG-1262
Rev. B | Page 230 of 312
The ALT register contains the alternate device ID for a hardware general call sequence. If the hardware general call enable bit, the general
call enable bit, and the slave enable bit are all set (HGCEN, GCEN, and SLVEN in the SCTL register), the device recognizes a hardware
general call. When a general call sequence is issued and the second byte of the sequence is identical to the ALT register, the hardware call
sequence is recognized for the device.
I
2
C Reset Mode
The slave state machine is reset when SCTL, Bit 0 is written to 0. The master state machine is reset when MCTL, Bit 0 is written to 0.
I
2
C Test Modes
The device can be placed in an internal loopback mode by setting MCTL, Bit 2. There are four FIFOs (master transmit and receive, and
slave transmit and receive). Therefore, the I
2
C peripheral can, in effect, be set up to communicate with itself. External loopback can be
performed if the master is set up to address the slave address.
I
2
C Low Power Mode
If the master and slave are both disabled (MCTL, Bit 0 = SCTL, Bit 0 = 0), the I
2
C section is off. To fully power down the I
2
C block,
disable the clock to the I
2
C section of the chip by setting CTL5, Bit 3 = 1.
Power-Down Considerations
If the master or slave is idle, they can be immediately disabled by clearing MCTL, Bit 0 or SCTL, Bit 0 in the master or slave control
registers, respectively. However, if the master or slave is active, there are four possible events occurring and, therefore, four ways to
power down the device, as follows:
I
2
C is a master and is receiving data. The device is receiving data based on the count programmed in the MRXCNT register. It is in
continuous read mode if the MRXCNT, Bit 8 is set. To stop the read transfer, clear this bit and assign the MRXCNT register with
MCRXCNT, Bits[7:0] + 1, where MCRXCNT, Bits[7:0] give the current read count. The addition of + 1 signifies that there is some
room for the completion. If the newly programmed value is less than the current count, the I
2
C master receives until the current
count overflows and reaches the programmed count. When this overflow occurs, the transfer ends after receiving the next byte.
When the transaction complete interrupt is received, the core disables the master by clearing MCTL, Bit 0.
I
2
C is a master and is transmitting data. The software flushes the transmit FIFO by setting STAT, Bit 9 and disables the transmit
request by clearing MCTL, Bit 5. When the transmit request is disabled, the current transfer ends after transmitting the byte in
progress. When the transaction complete interrupt is received, the software clears MCTL, Bit 0. Disabling the master before
completion can cause the bus to stall indefinitely.
I
2
C is a slave and is receiving data. The software sets SCTL, Bit 7, giving a no acknowledge for the next communication, after which
the external master must stop. On receiving the stop interrupt, the core disables the slave by clearing SCTL, Bit 0.
I
2
C is a slave and is transmitting data. After the slave transmits starts, it cannot no acknowledge any further transactions, because the
acknowledge is driven only by the master. Therefore, the slave transmit must wait until the external master issues a stop condition.
After receiving the stop interrupt, the slave can be disabled. However, if the slave must be disabled immediately, such an action can
only be performed at the cost of wrong data being transmitted (all 0xFFs) because the I2C_SDA line is not driven anymore and is
pulled up during data phase. The bus does not stall in this case.
DMA Requests
Four DMA channels are provided to service the I
2
C master and slave. DMA enable bits are provided in the slave control register and in
the master control register.
I
2
is Unpowered
When the
is not powered up, do not apply logic high signals to any digital pins. The maximum voltage that can be applied
to a digital input pin at any time is DVDD + 0.3 V. If this limit is exceeded, the ESD protection diodes start to conduct to ground. If the
is unpowered but the I
2
C bus pins are at a logic high, the
pin protection structure pulls I2C_SCL and I2C_SDA
toward ground, causing issues for devices that are powered on the bus.
It is recommended that all devices with an I
2
C bus (including the
) are fully powered up before any communications is
started on the bus.