UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
237 of 464
NXP Semiconductors
UM10850
Chapter 17: LPC5410x Multi-Rate Timer (MRT)
17.5.1 Repeat interrupt mode
The repeat interrupt mode generates repeated interrupts after a selected time interval.
This mode can be used for software-based PWM or PPM applications.
When the timer n is in idle state, writing a non-zero value IVALUE to the INTVALn register
immediately loads the time interval value IVALUE - 1, and the timer begins to count down
from this value. When the timer reaches zero, an interrupt is generated, the value in the
INTVALn register IVALUE - 1 is reloaded automatically, and the timer starts to count down
again.
While the timer is running in repeat interrupt mode, the following actions can be
performed:
•
Change the interval value on the next timer cycle by writing a new value (>0) to the
INTVALn register and setting the LOAD bit to 0. An interrupt is generated when the
timer reaches zero. On the next cycle, the timer counts down from the new value.
•
Change the interval value on-the-fly immediately by writing a new value (>0) to the
INTVALn register and setting the LOAD bit to 1. The timer immediately starts to count
down from the new timer interval value. An interrupt is generated when the timer
reaches 0.
•
Stop the timer at the end of time interval by writing a 0 to the INTVALn register and
setting the LOAD bit to 0. An interrupt is generated when the timer reaches zero.
•
Stop the timer immediately by writing a 0 to the INTVALn register and setting the
LOAD bit to 1. No interrupt is generated when the INTVALn register is written.
17.5.2 One-shot interrupt mode
The one-shot interrupt generates one interrupt after a one-time count. With this mode, a
single interrupt can be generated at any point. This mode can be used to introduce a
specific delay in a software task.
When the timer is in the idle state, writing a non-zero value IVALUE to the INTVALn
register immediately loads the time interval value IVALUE - 1, and the timer starts to count
down. When the timer reaches 0, an interrupt is generated and the timer stops and enters
the idle state.
While the timer is running in the one-shot interrupt mode, the following actions can be
performed:
Fig 39. MRT block diagram
7LPHU
,QW9DO
&RQWURO
6WDWXV
6RIWZDUH
ZULWHWR,QW9DO
,QWHUUXSW
RXW
,QWHUUXSW
JHQHUDWLRQ