
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
248 of 487
NXP Semiconductors
UM10800
Chapter 15: LPC82x I2C0/1/2/3
After an initial I2C Start, MSTCTL should generally only be written when the
MSTPENDING flag in the STAT register is set, after the last bus operation has completed.
An exception is when DMA is being used and a transfer completes. In this case there is no
MSTPENDING flag, and the MSTDMA control bit would be cleared by software potentially
at the same time as setting either the MSTSTOP or MSTSTART control bit.
Remark:
When in the idle or slave NACKed states (see
), set the MSTDMA bit
either with or after the MSTCONTINUE bit. MSTDMA can be cleared at any time.
15.6.9 Master Time
The MSTTIME register allows programming of certain times that may be controlled by the
Master function. These include the clock (SCL) high and low times, repeated Start setup
time, and transmitted data setup time.
Table 213. Master Control register (MSTCTL, address 0x4005 0020 (I2C0), 0x4005 4020
(I2C1), 0x4007 0020 (I2C2), 0x4007 4020 (I2C3)) bit description
Bit Symbol
Value Description
Reset
value
0
MSTCONTINUE
Master Continue. This bit is write-only.
0
0
No effect.
1
Continue. Informs the Master function to continue to the
next operation. This must done after writing transmit data,
reading received data, or any other housekeeping related
to the next bus operation.
1
MSTSTART
Master Start control. This bit is write-only.
0
0
No effect.
1
Start. A Start will be generated on the I
2
C bus at the next
allowed time.
2
MSTSTOP
Master Stop control. This bit is write-only.
0
0
No effect.
1
Stop. A Stop will be generated on the I
2
C bus at the next
allowed time, preceded by a NACK to the slave if the
master is receiving data from the slave (Master Receiver
mode).
3
MSTDMA
Master DMA enable. Data operations of the I
2
C can be
performed with DMA. Protocol type operations such as
Start, address, Stop, and address match must always be
done with software, typically via an interrupt. When a
DMA data transfer is complete, MSTDMA must be
cleared prior to beginning the next operation, typically a
Start or Stop.This bit is read/write.
0
0
Disable. No DMA requests are generated for master
operation.
1
Enable. A DMA request is generated for I
2
C master data
operations. When this I
2
C master is generating
Acknowledge bits in Master Receiver mode, the
acknowledge is generated automatically.
31:
4
-
Reserved. Read value is undefined, only zero should be
written.
NA