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
322 of 464
NXP Semiconductors
UM10850
Chapter 23: LPC5410x I2C-bus interfaces (I2C0/1/2)
23.6.8 Master Control register
The MSTCTL register contains bits that control various functions of the I
2
C Master
interface. Only write to this register when the master is pending (MSTPENDING = 1 in the
STAT register,
Software should always write a complete value to MSTCTL, and not OR new control bits
into the register as is possible in other registers such as CFG. This is due to the fact that
MSTSTART and MSTSTOP are not self-clearing flags. ORing in new data following a
Start or Stop may cause undesirable side effects.
After an initial I
2
C 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.
Table 357. Address map MSTCTL register
Peripheral
Base address
Offset
Increment
Dimension
I2C0
0x4009 4000
0x020
-
1
I2C1
0x4009 8000
0x020
-
1
I2C2
0x4009 C000
0x020
-
1
Table 358. Master Control register (MSTCTL, address offset 0x020) 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).