DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
568 of 571
continued >>
NXP Semiconductors
UM10316
Chapter 32: LPC29xx Supplementary information
C Bus obstructed by a Low level on SCL or SDA
413
Bus error . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
C State service routines . . . . . . . . . . . . . . . 414
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . 414
C interrupt service . . . . . . . . . . . . . . . . . . . 415
The state service routines. . . . . . . . . . . . . . . 415
Adapting state services to an application . . . 415
Software example . . . . . . . . . . . . . . . . . . . . . 415
Initialization routine . . . . . . . . . . . . . . . . . . . . 415
Start master transmit function . . . . . . . . . . . . 415
Start master receive function . . . . . . . . . . . . 415
C interrupt routine . . . . . . . . . . . . . . . . . . . 416
Non mode specific states . . . . . . . . . . . . . . . 416
State : 0x00. . . . . . . . . . . . . . . . . . . . . . . . . . 416
Master states . . . . . . . . . . . . . . . . . . . . . . . . 416
State : 0x08. . . . . . . . . . . . . . . . . . . . . . . . . . 416
State : 0x10. . . . . . . . . . . . . . . . . . . . . . . . . . 416
Master Transmitter states . . . . . . . . . . . . . . . 417
State : 0x18. . . . . . . . . . . . . . . . . . . . . . . . . . 417
State : 0x20. . . . . . . . . . . . . . . . . . . . . . . . . . 417
State : 0x28. . . . . . . . . . . . . . . . . . . . . . . . . . 417
State : 0x30. . . . . . . . . . . . . . . . . . . . . . . . . . 417
State : 0x38 . . . . . . . . . . . . . . . . . . . . . . . . . 418
Master Receive states . . . . . . . . . . . . . . . . . 418
State : 0x40 . . . . . . . . . . . . . . . . . . . . . . . . . 418
State : 0x48 . . . . . . . . . . . . . . . . . . . . . . . . . 418
State : 0x50 . . . . . . . . . . . . . . . . . . . . . . . . . 418
State : 0x58 . . . . . . . . . . . . . . . . . . . . . . . . . 418
Slave Receiver states . . . . . . . . . . . . . . . . . 419
State : 0x60 . . . . . . . . . . . . . . . . . . . . . . . . . 419
State : 0x68 . . . . . . . . . . . . . . . . . . . . . . . . . 419
State : 0x70 . . . . . . . . . . . . . . . . . . . . . . . . . 419
State : 0x78 . . . . . . . . . . . . . . . . . . . . . . . . . 419
State : 0x80 . . . . . . . . . . . . . . . . . . . . . . . . . 420
State : 0x88 . . . . . . . . . . . . . . . . . . . . . . . . . 420
State : 0x90 . . . . . . . . . . . . . . . . . . . . . . . . . 420
State : 0x98 . . . . . . . . . . . . . . . . . . . . . . . . . 420
State : 0xA0 . . . . . . . . . . . . . . . . . . . . . . . . . 420
Slave Transmitter States . . . . . . . . . . . . . . . 421
State : 0xA8 . . . . . . . . . . . . . . . . . . . . . . . . . 421
State : 0xB0 . . . . . . . . . . . . . . . . . . . . . . . . . 421
State : 0xB8 . . . . . . . . . . . . . . . . . . . . . . . . . 421
State : 0xC0 . . . . . . . . . . . . . . . . . . . . . . . . . 421
State : 0xC8 . . . . . . . . . . . . . . . . . . . . . . . . . 422
Chapter 24: LPC29xx Modulation and Sampling Control Subsystem (MSCSS)
How to read this chapter . . . . . . . . . . . . . . . . 423
MSCSS functional description . . . . . . . . . . . 423
MSCSS miscellaneous operations . . . . . . . . 425
Continuous level measurement . . . . . . . . . . 426
Comparator functionality . . . . . . . . . . . . . . . 426
Dimmer using PWMs . . . . . . . . . . . . . . . . . . 426
Generating sine waves . . . . . . . . . . . . . . . . 426
Register overview . . . . . . . . . . . . . . . . . . . . 427
Chapter 25: LPC29xx Pulse Width Modulator (PWM)
How to read this chapter . . . . . . . . . . . . . . . . 428
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Functional description . . . . . . . . . . . . . . . . . 429
PWM counter synchronization . . . . . . . . . . . 430
Delayed register update triggered by timer 0 430
Center-aligned PWM . . . . . . . . . . . . . . . . . . 431
Input capturing . . . . . . . . . . . . . . . . . . . . . . . 431
Modulation of PWM and timer carrier . . . . . . 431
PWM register overview . . . . . . . . . . . . . . . . . 432
PWM shadow registers. . . . . . . . . . . . . . . . . 435
PWM mode control register . . . . . . . . . . . . . 435
PWM trap control register . . . . . . . . . . . . . . . 437
PWM capture control register . . . . . . . . . . . . 438
PWM capture source register . . . . . . . . . . . . 438
PWM control register . . . . . . . . . . . . . . . . . . 439
PWM period register . . . . . . . . . . . . . . . . . . 439
PWM prescale register. . . . . . . . . . . . . . . . . 440
PWM synchronization delay register . . . . . . 440
PWM count register . . . . . . . . . . . . . . . . . . . 440
PWM match active registers . . . . . . . . . . . . 441
PWM match deactive registers . . . . . . . . . . 441
PWM capture registers . . . . . . . . . . . . . . . . 442
PWM mode control shadow register . . . . . . 442
PWM trap control shadow register . . . . . . . . 442
PWM capture control shadow register . . . . . 443
PWM capture source shadow register . . . . . 443
PWM control shadow register . . . . . . . . . . . 444
PWM period shadow register . . . . . . . . . . . . 444
PWM prescale shadow register . . . . . . . . . . 445