UM11029
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
334 of 515
NXP Semiconductors
UM11029
Chapter 19: LPC84x I2C0/1/2/3
19.3.2.2 Slave write to master
•
Set the SLVEN bit to 1 in the CFG register. See
•
Write the slave address x to the address 0 match register. See
Write data to the master:
1. Wait for the pending status to be set (SLVPENDING = 1) by polling the STAT register.
2. ACK the address by setting SLVCONTINUE = 1 in the slave control register. See
3. Wait for the pending status to be set (SLVPENDING = 1) by polling the STAT register.
4. Write 8 bits of data to SLVDAT register. See
5. Continue the transaction by setting SLVCONTINUE = 1 in the slave control register.
See
19.3.3 Configure the I2C for wake-up
In sleep mode, any activity on the I2C-bus that triggers an I2C interrupt can wake up the
part, provided that the interrupt is enabled in the INTENSET register and the NVIC. As
long as the I2C clock I2C_PCLK remains active in sleep mode, the I2C can wake up the
part independently of whether the I2C block is configured in master or slave mode.
In Deep-sleep or Power-down mode, the I2C clock is turned off as are all peripheral
clocks. However, if the I2C is configured in slave mode and an external master on the
I2C-bus provides the clock signal, the I2C block can create an interrupt asynchronously.
This interrupt, if enabled in the NVIC and in the I2C block’s INTENCLR register, can then
wake up the core.
19.3.3.1 Wake-up from Sleep mode
•
Enable the I2C interrupt in the NVIC.
•
Enable the I2C wake-up event in the I2C INTENSET register. Wake-up on any
enabled interrupts is supported (see the INTENSET register). Examples are the
following events:
–
Master pending
–
Change to idle state
–
Start/stop error
–
Slave pending
–
Address match (in slave mode)
–
Data available/ready
19.3.3.2 Wake-up from Deep-sleep and Power-down modes
•
Enable the I2C interrupt in the NVIC.
•
Enable the I2C interrupt in the STARTERP1 register in the SYSCON block to create
the interrupt signal asynchronously while the core and the peripheral are not clocked.
See
Table 169 “Start logic 1 interrupt wake-up enable register (STARTERP1, address
.