
UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
332 of 464
NXP Semiconductors
UM10850
Chapter 23: LPC5410x I2C-bus interfaces (I2C0/1/2)
For Slave Transmitter mode, the slave function responds to the initial address in the same
fashion as for Slave Receiver mode, and checks that it has previously been addressed
with a full 10-bit address. If the address matched is address 0, and address qualification is
enabled, software must check that the first part of the 10-bit address is a complete match
to the previous address before acknowledging the address.
23.7.4 Clocking and power considerations
The Master function of the I
2
C always requires a peripheral clock to be running in order to
operate. The Slave function can operate without any internal clocking when the slave is
not currently addressed. This means that reduced power modes up to Power-down mode
can be entered, and the device will wake up when the I
2
C Slave function recognizes an
address. Monitor mode can similarly wake up the device from a reduced power mode
when information becomes available.
23.7.5 lnterrupt handling
The I
2
C provides a single interrupt output that handles all interrupts for Master, Slave, and
Monitor functions.
23.7.6 DMA
DMA with the I
2
C is done only for data transfer, DMA cannot handle control of the I
2
C.
Once DMA is transferring data, I
2
C acknowledges are handled implicitly. No CPU
intervention is required while DMA is transferring data.
Generally, data transfers can be handled by DMA for Master mode after an address is
sent and acknowledged by a slave, and for Slave mode after software has acknowledged
an address. In either mode, software is always involved in the address portion of a
message. In master and slave modes, data receive and transmit data can be transferred
by the DMA. The DMA supports three DMA requests: data transfer in master mode, slave
mode, and monitor mode.
A received NACK (from a slave in Master mode, or from a master in Slave mode) will
cause DMA to stop and an interrupt to be generated. A Repeated Start sensed on the bus
will similarly cause DMA to stop and an interrupt to be generated.
23.7.6.1 DMA as a Master transmitter
A basic sequence for a Master transmitter:
•
Software sets up DMA to transmit a message.
•
Software causes a slave address with write command to be sent and checks that the
address was acknowledged.
•
Software turns on DMA mode in the I
2
C.
•
DMA transfers data and eventually completes the transfer.
•
Software causes a stop (or repeated start) to be sent.
Software will be invoked to handle any exceptions to the standard transfer, such as the
slave sending a NACK before the end of the transfer.