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
371 of 515
NXP Semiconductors
UM11029
Chapter 20: LPC84x Standard counter/timer (CTIMER)
20.8 Functional description
shows a timer configured to reset the count and generate an interrupt on match.
The prescaler is set to 2 and the match register set to 6. At the end of the timer cycle
where the match occurs, the timer count is reset. This gives a full length cycle to the
match value. The interrupt indicating that a match occurred is generated in the next clock
after the timer reached the match value.
shows a timer configured to stop and generate an interrupt on match. The
prescaler is again set to 2 and the match register set to 6. In the next clock after the timer
reaches the match value, the timer enable bit in TCR is cleared, and the interrupt
indicating that a match occurred is generated.
20.8.1 Rules for single edge controlled PWM outputs
1. All single edge controlled PWM outputs go LOW at the beginning of each PWM cycle
(timer is set to zero) unless their match value is equal to zero.
2. Each PWM output will go HIGH when its match value is reached. If no match occurs
(i.e. the match value is greater than the PWM cycle length), the PWM output remains
continuously LOW.
3. If a match value larger than the PWM cycle length is written to the match register, and
the PWM signal is HIGH already, then the PWM signal will be cleared with the start of
the next PWM cycle.
Fig 37. A timer cycle in which PR=2, MRx=6, and both interrupt and reset on match are enabled
3&/.
SUHVFDOH
FRXQWHU
LQWHUUXSW
WLPHU
FRXQWHU
WLPHUFRXQWHU
UHVHW
Fig 38. A timer cycle in which PR=2, MRx=6, and both interrupt and stop on match are enabled
3&/.
SUHVFDOHFRXQWHU
LQWHUUXSW
WLPHUFRXQWHU
7&5>@
FRXQWHUHQDEOH