UM10462 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2016. All rights reserved.
User manual Rev. 5.5 — 21 December 2016 518 of 523
NXP Semiconductors
UM10462
Chapter 25: Supplementary information
14.9.1 Master Transmitter mode . . . . . . . . . . . . . . . 304
14.9.2 Master Receiver mode . . . . . . . . . . . . . . . . . 305
14.9.3 Slave Receiver mode . . . . . . . . . . . . . . . . . . 306
14.9.4 Slave Transmitter mode . . . . . . . . . . . . . . . . 307
14.10 Details of I
2
C operating modes. . . . . . . . . . . 307
14.10.1 Master Transmitter mode . . . . . . . . . . . . . . . 308
14.10.2 Master Receiver mode . . . . . . . . . . . . . . . . . 312
14.10.3 Slave Receiver mode . . . . . . . . . . . . . . . . . . 315
14.10.4 Slave Transmitter mode . . . . . . . . . . . . . . . . 319
14.10.5 Miscellaneous states . . . . . . . . . . . . . . . . . . 321
14.10.5.1 STAT = 0xF8. . . . . . . . . . . . . . . . . . . . . . . . . 321
14.10.5.2 STAT = 0x00 . . . . . . . . . . . . . . . . . . . . . . . . . 321
14.10.6 Some special cases . . . . . . . . . . . . . . . . . . . 322
14.10.6.1 Simultaneous Repeated START conditions from
two masters . . . . . . . . . . . . . . . . . . . . . . . . . 322
14.10.6.2 Data transfer after loss of arbitration . . . . . . 323
14.10.6.3 Forced access to the I
2
C-bus . . . . . . . . . . . . 323
14.10.6.4 I
2
C-bus obstructed by a LOW level on SCL or
SDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
14.10.6.5 Bus error. . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
14.10.7 I
2
C state service routines . . . . . . . . . . . . . . . 324
14.10.8 Initialization. . . . . . . . . . . . . . . . . . . . . . . . . . 325
14.10.9 I
2
C interrupt service . . . . . . . . . . . . . . . . . . . 325
14.10.10 The state service routines. . . . . . . . . . . . . . . 325
14.10.11 Adapting state services to an application . . . 325
14.11 Software example . . . . . . . . . . . . . . . . . . . . . 325
14.11.1 Initialization routine. . . . . . . . . . . . . . . . . . . . 325
14.11.2 Start Master Transmit function . . . . . . . . . . . 325
14.11.3 Start Master Receive function. . . . . . . . . . . . 326
14.11.4 I
2
C interrupt routine . . . . . . . . . . . . . . . . . . . 326
14.11.5 Non mode specific states . . . . . . . . . . . . . . . 326
14.11.5.1 State: 0x00. . . . . . . . . . . . . . . . . . . . . . . . . . 326
14.11.5.2 Master States. . . . . . . . . . . . . . . . . . . . . . . . 326
14.11.5.3 State: 0x08. . . . . . . . . . . . . . . . . . . . . . . . . . 326
14.11.5.4 State: 0x10. . . . . . . . . . . . . . . . . . . . . . . . . . 327
14.11.6 Master Transmitter states . . . . . . . . . . . . . . 327
14.11.6.1 State: 0x18. . . . . . . . . . . . . . . . . . . . . . . . . . 327
14.11.6.2 State: 0x20. . . . . . . . . . . . . . . . . . . . . . . . . . 327
14.11.6.3 State: 0x28. . . . . . . . . . . . . . . . . . . . . . . . . . 327
14.11.6.4 State: 0x30. . . . . . . . . . . . . . . . . . . . . . . . . . 328
14.11.6.5 State: 0x38. . . . . . . . . . . . . . . . . . . . . . . . . . 328
14.11.7 Master Receive states . . . . . . . . . . . . . . . . . 328
14.11.7.1 State: 0x40. . . . . . . . . . . . . . . . . . . . . . . . . . 328
14.11.7.2 State: 0x48. . . . . . . . . . . . . . . . . . . . . . . . . . 328
14.11.7.3 State: 0x50. . . . . . . . . . . . . . . . . . . . . . . . . . 328
14.11.7.4 State: 0x58. . . . . . . . . . . . . . . . . . . . . . . . . . 329
14.11.8 Slave Receiver states . . . . . . . . . . . . . . . . . 329
14.11.8.1 State: 0x60. . . . . . . . . . . . . . . . . . . . . . . . . . 329
14.11.8.2 State: 0x68. . . . . . . . . . . . . . . . . . . . . . . . . . 329
14.11.8.3 State: 0x70. . . . . . . . . . . . . . . . . . . . . . . . . . 329
14.11.8.4 State: 0x78. . . . . . . . . . . . . . . . . . . . . . . . . . 330
14.11.8.5 State: 0x80. . . . . . . . . . . . . . . . . . . . . . . . . . 330
14.11.8.6 State: 0x88. . . . . . . . . . . . . . . . . . . . . . . . . . 330
14.11.8.7 State: 0x90. . . . . . . . . . . . . . . . . . . . . . . . . . 330
14.11.8.8 State: 0x98. . . . . . . . . . . . . . . . . . . . . . . . . . 331
14.11.8.9 State: 0xA0. . . . . . . . . . . . . . . . . . . . . . . . . . 331
14.11.9 Slave Transmitter states . . . . . . . . . . . . . . . 331
14.11.9.1 State: 0xA8. . . . . . . . . . . . . . . . . . . . . . . . . . 331
14.11.9.2 State: 0xB0. . . . . . . . . . . . . . . . . . . . . . . . . . 331
14.11.9.3 State: 0xB8. . . . . . . . . . . . . . . . . . . . . . . . . . 331
14.11.9.4 State: 0xC0 . . . . . . . . . . . . . . . . . . . . . . . . . 332
14.11.9.5 State: 0xC8 . . . . . . . . . . . . . . . . . . . . . . . . . 332
Chapter 15: LPC11U3x/2x/1x 16-bit counter/timers CT16B0/1
15.1 How to read this chapter. . . . . . . . . . . . . . . . 333
15.2 Basic configuration . . . . . . . . . . . . . . . . . . . . 333
15.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
15.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 334
15.5 General description. . . . . . . . . . . . . . . . . . . . 334
15.6 Pin description. . . . . . . . . . . . . . . . . . . . . . . . 334
15.7 Register description . . . . . . . . . . . . . . . . . . . 334
15.7.1 Interrupt Register . . . . . . . . . . . . . . . . . . . . . 337
15.7.2 Timer Control Register . . . . . . . . . . . . . . . . . 337
15.7.3 Timer Counter . . . . . . . . . . . . . . . . . . . . . . . 338
15.7.4 Prescale Register . . . . . . . . . . . . . . . . . . . . 338
15.7.5 Prescale Counter register . . . . . . . . . . . . . . 338
15.7.6 Match Control Register . . . . . . . . . . . . . . . . 339
15.7.7 Match Registers . . . . . . . . . . . . . . . . . . . . . 340
15.7.8 Capture Control Register . . . . . . . . . . . . . . 340
15.7.9 Capture Registers . . . . . . . . . . . . . . . . . . . . 342
15.7.10 External Match Register . . . . . . . . . . . . . . . 343
15.7.11 Count Control Register . . . . . . . . . . . . . . . . 344
15.7.12 PWM Control register . . . . . . . . . . . . . . . . . 347
15.7.13 Rules for single edge controlled PWM
outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
15.8 Example timer operation . . . . . . . . . . . . . . . 349
15.9 Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . 349
Chapter 16: LPC11U3x/2x/1x 32-bit counter/timers CT32B0/1
16.1 How to read this chapter. . . . . . . . . . . . . . . . 351
16.2 Basic configuration . . . . . . . . . . . . . . . . . . . . 351
16.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
16.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 352
16.5 General description. . . . . . . . . . . . . . . . . . . . 352
16.6 Pin description. . . . . . . . . . . . . . . . . . . . . . . . 352
16.7 Register description . . . . . . . . . . . . . . . . . . . 352
16.7.1 Interrupt Register . . . . . . . . . . . . . . . . . . . . . 355
16.7.2 Timer Control Register . . . . . . . . . . . . . . . . 355
16.7.3 Timer Counter registers . . . . . . . . . . . . . . . 356
16.7.4 Prescale Register. . . . . . . . . . . . . . . . . . . . . 356
16.7.5 Prescale Counter Register . . . . . . . . . . . . . 356
16.7.6 Match Control Register . . . . . . . . . . . . . . . . 357
16.7.7 Match Registers. . . . . . . . . . . . . . . . . . . . . . 358
16.7.8 Capture Control Register . . . . . . . . . . . . . . . 358
16.7.9 Capture Registers . . . . . . . . . . . . . . . . . . . . 360
16.7.10 External Match Register . . . . . . . . . . . . . . . 360