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
242 of 464
NXP Semiconductors
UM10850
Chapter 17: LPC5410x Multi-Rate Timer (MRT)
17.6.5 Module Configuration register (MODCFG)
The MODCFG register provides the configuration (number of channels and timer width)
for this MRT. See
Section 17.6.6 “Idle channel register (IDLE_CH)”
for details.
17.6.6 Idle channel register (IDLE_CH)
The idle channel register can be used to assist software in finding available channels in
the MRT. This allows more flexibility by not giving hard assignments to software that
makes use of the MRT, without the need to search for an available channel. Generally,
IDLE_CH returns the lowest available channel number.
IDLE_CH can be used in two ways, controlled by the value of the MULTITASK bit in the
MODCFG register. MULTITASK affects both the function of IDLE_CH, and the function of
the INUSE bit for each MRT channel as follows:
•
MULTITASK = 0: hardware status mode. The INUSE flags for all MRT channels are
reset. IDLECH returns the lowest idle channel number. A channel is considered idle if
its RUN flag = 0, and there is no interrupt pending for that channel.
•
MULTITASK = 1: multi-task mode. In this mode, the INUSE flags allow more control
over when MRT channels are released for further use. When IDLE_CH is read,
returning a channel number of an idle channel, the INUSE flag for that channel is set
by hardware. That channel will not be considered idle until its RUN flag = 0, there is
no interrupt pending, and its INUSE flag = 0. This allows reserving an MRT channel
with a single register read, and no need to start the channel before it is no longer
considered idle by IDLE_CH. It also allows software to identify a specific MRT
channel that it can use, then use it more than once without releasing it, removing the
need to ask for an available channel for every use.
Table 285. Module Configuration register (MODCFG, address 0x4007 40F0) bit description
Bit
Symbol
Value
Description
Reset
Value
3:0
NOC
Identifies the number of channels in this MRT.
4
8:4
NOB
Identifies the number of timer bits in this MRT.
24
30:9
-
Reserved. Read value is undefined, only zero should be written.
NA
31
MULTITASK
Selects the operating mode for the INUSE flags and the IDLE_CH register.
0
0
Hardware status mode. In this mode, the INUSE(n) flags for all channels are reset.
1
Multi-task mode.
Table 286. Idle channel register (IDLE_CH, address 0x4007 40F4) bit description
Bit
Symbol
Description
Reset
value
3:0
-
Reserved.
0
7:4
CHAN
Idle channel. Reading the CHAN bits, returns the lowest idle timer channel. The number is
positioned such that it can be used as an offset from the MRT base address in order to access the
registers for the allocated channel.
If all timer channels are running, CHAN = 0xF. See text above for more details.
0
31:8
-
Reserved.
0