
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
365 of 368
NXP Semiconductors
UM10375
Chapter 23: LPC13xx Supplementary information
Slave Receiver mode . . . . . . . . . . . . . . . . . . 232
Slave Transmitter mode . . . . . . . . . . . . . . . . 236
Miscellaneous states . . . . . . . . . . . . . . . . . . 238
13.11.5.1 I2STAT = 0xF8 . . . . . . . . . . . . . . . . . . . . . . . 238
13.11.5.2 I2STAT = 0x00 . . . . . . . . . . . . . . . . . . . . . . . 238
13.11.6
Some special cases . . . . . . . . . . . . . . . . . . . 239
13.11.6.1 Simultaneous Repeated START conditions from
two masters . . . . . . . . . . . . . . . . . . . . . . . . . 239
13.11.6.2 Data transfer after loss of arbitration . . . . . . 240
13.11.6.3 Forced access to the I
2
C-bus . . . . . . . . . . . . 240
C-bus obstructed by a LOW level on SCL or
SDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
13.11.6.5 Bus error . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
13.11.7 I
C state service routines . . . . . . . . . . . . . . . 241
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . 242
C interrupt service . . . . . . . . . . . . . . . . . . . 242
Software example . . . . . . . . . . . . . . . . . . . . . 242
Initialization routine . . . . . . . . . . . . . . . . . . . . 242
Start Master Transmit function . . . . . . . . . . . 242
Start Master Receive function. . . . . . . . . . . . 243
C interrupt routine . . . . . . . . . . . . . . . . . . . 243
Non mode specific states . . . . . . . . . . . . . . . 243
13.12.5.1 State: 0x00 . . . . . . . . . . . . . . . . . . . . . . . . . . 243
13.12.5.2 Master States . . . . . . . . . . . . . . . . . . . . . . . . 243
13.12.5.3 State: 0x08 . . . . . . . . . . . . . . . . . . . . . . . . . . 243
13.12.5.4 State: 0x10 . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Master Transmitter states . . . . . . . . . . . . . . 244
13.12.6.1 State: 0x18 . . . . . . . . . . . . . . . . . . . . . . . . . . 244
13.12.6.2 State: 0x20 . . . . . . . . . . . . . . . . . . . . . . . . . . 244
13.12.6.3 State: 0x28 . . . . . . . . . . . . . . . . . . . . . . . . . . 244
13.12.6.4 State: 0x30 . . . . . . . . . . . . . . . . . . . . . . . . . . 245
13.12.6.5 State: 0x38 . . . . . . . . . . . . . . . . . . . . . . . . . . 245
13.12.7
Master Receive states . . . . . . . . . . . . . . . . . 245
13.12.7.1 State: 0x40 . . . . . . . . . . . . . . . . . . . . . . . . . . 245
13.12.7.2 State: 0x48 . . . . . . . . . . . . . . . . . . . . . . . . . . 245
13.12.7.3 State: 0x50 . . . . . . . . . . . . . . . . . . . . . . . . . . 245
13.12.7.4 State: 0x58 . . . . . . . . . . . . . . . . . . . . . . . . . . 246
13.12.8
Slave Receiver states . . . . . . . . . . . . . . . . . 246
13.12.8.1 State: 0x60 . . . . . . . . . . . . . . . . . . . . . . . . . . 246
13.12.8.2 State: 0x68 . . . . . . . . . . . . . . . . . . . . . . . . . . 246
13.12.8.3 State: 0x70 . . . . . . . . . . . . . . . . . . . . . . . . . . 246
13.12.8.4 State: 0x78 . . . . . . . . . . . . . . . . . . . . . . . . . . 247
13.12.8.5 State: 0x80 . . . . . . . . . . . . . . . . . . . . . . . . . . 247
13.12.8.6 State: 0x88 . . . . . . . . . . . . . . . . . . . . . . . . . . 247
13.12.8.7 State: 0x90 . . . . . . . . . . . . . . . . . . . . . . . . . . 247
13.12.8.8 State: 0x98 . . . . . . . . . . . . . . . . . . . . . . . . . . 248
13.12.8.9 State: 0xA0. . . . . . . . . . . . . . . . . . . . . . . . . . 248
13.12.9
Slave Transmitter states . . . . . . . . . . . . . . . 248
13.12.9.1 State: 0xA8. . . . . . . . . . . . . . . . . . . . . . . . . . 248
13.12.9.2 State: 0xB0. . . . . . . . . . . . . . . . . . . . . . . . . . 248
13.12.9.3 State: 0xB8. . . . . . . . . . . . . . . . . . . . . . . . . . 248
13.12.9.4 State: 0xC0 . . . . . . . . . . . . . . . . . . . . . . . . . 249
13.12.9.5 State: 0xC8 . . . . . . . . . . . . . . . . . . . . . . . . . 249
How to read this chapter . . . . . . . . . . . . . . . . 250
Basic configuration . . . . . . . . . . . . . . . . . . . . 250
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
General description . . . . . . . . . . . . . . . . . . . . 250
Pin description . . . . . . . . . . . . . . . . . . . . . . . . 251
Clocking and power control . . . . . . . . . . . . . 252
Register description . . . . . . . . . . . . . . . . . . . 252
SSP Control Register 0 . . . . . . . . . . . . . . . . 254
SSP Control Register 1 . . . . . . . . . . . . . . . . 254
Register . . . . . . . . . . . . . . . . . . . . 255
SSP Status Register . . . . . . . . . . . . . . . . . . . 256
SSP Clock Prescale Register . . . . . . . . . . . 256
SSP Interrupt Mask Set/Clear Register . . . . 256
SSP Raw Interrupt Status Register. . . . . . . . 257
SSP Masked Interrupt Status Register . . . . 257
Clear Register . . . . . . . . . . . . 258
Functional description . . . . . . . . . . . . . . . . . 258
SPI frame format . . . . . . . . . . . . . . . . . . . . . 259
14.8.2.1 Clock Polarity (CPOL) and Phase (CPHA) control
14.8.2.2 SPI format with CPOL=0,CPHA=0. . . . . . . . 260
14.8.2.3 SPI format with CPOL=0,CPHA=1. . . . . . . . 261
14.8.2.4 SPI format with CPOL = 1,CPHA = 0. . . . . . 261
14.8.2.5 SPI format with CPOL = 1,CPHA = 1. . . . . . 263
14.8.3
Semiconductor Microwire frame format . . . . 263
14.8.3.1 Setup and hold time requirements on CS with
respect to SK in Microwire mode . . . . . . . . . 265
Chapter 15: LPC13xx 16-bit timer/counters (CT16B0/1)
How to read this chapter . . . . . . . . . . . . . . . . 266
Basic configuration . . . . . . . . . . . . . . . . . . . . 266
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Pin description . . . . . . . . . . . . . . . . . . . . . . . . 267
Clocking and power control . . . . . . . . . . . . . 267
Register description . . . . . . . . . . . . . . . . . . . 267
Interrupt Register (TMR16B0IR and
TMR16B1IR) . . . . . . . . . . . . . . . . . . . . . . . . 269
Timer Control Register (TMR16B0TCR and
TMR16B1TCR) . . . . . . . . . . . . . . . . . . . . . . 270
Timer Counter (TMR16B0TC - address 0x4000
0x4001 0008) . . . . . . . . . . . . . . . . . . . . . . . . 270