
NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 332 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
Enhance Timer Controller (ETMR)
5.11
5.11.1 Overview
This chip is equipped with four enhance timer modules including ETIMER0, ETIMER1, ETIMER2
and ETIMER3, which allow user to easily implement a counting scheme or timing control for
applications. The timer can perform functions like frequency measurement, interval measurement,
clock generation, delay timing, and so on. The timer can generate an interrupt signal upon
timeout, or provide the current value of count during operation.
5.11.2 Features
Independent Clock Enable Control for each Timer (ECLKetmr0, ECLKetmr1,
ECLKetmr2 and ECLKetmr3)
Time-out period = (Period of timer clock input) * (8-bit pre-scale c 1) * (24-bit
TCMP)
Counting cycle time = (1 / ECLKetmr) * (2^8) * (2^24)
Internal 8-bit pre-scale counter
Internal 24-bit up counter is readable through TDR (Timer Data Register)
Supports One-shot, Periodic, Output Toggle and Continuous Counting Operation
mode
Supports external pin capture for interval measurement
Supports external pin capture for timer counter reset
5.11.3 Block Diagram
Each timer is equipped with an 8-bit pre-scale counter, a 24-bit up-counter, a 24-bit compare register
and an interrupt request signal. Refer to Figure 5.11-1 for the timer controller block diagram. There are
four options of clock sources for each timer.
24-bit
Up-Counter
TMRx_DR[23:0]
TMRx_CMPR[23:0]
+
-
=
Q
Q
SET
CLR
D
TMRx_ISR.
TRM_IS
TMRx_INT
~TMRx_CTL.TCAP_MODE
TMRx_IER.TMR_IE
TMRx_TCAP[23:0]
TMRx_CTL.
TCAP_EDGE = 2'b00
TMRx_CTL.
TCAP_EDGE = 2'b01
TMRx_CTL.
TCAP_EDGE =
2'b10
TMRx_CTL.
TCAP_MODE
Reset
Counter
TCapture_x
8-bit
Prescale
Q
Q
SET
CLR
D
TMRx_ISR.
TCAP_IS
TMRx_IER.TCAP_IE
Counting
Enable
0
1
TMRx_CTL.EVENT_EDGE
EXT_TMRx
TMRx_CTL.TMR_EN
TMRx_CTL.
TCAP_EDGE = 2'b11
TMRx_CLK
Q
Q
SET
CLR
D
Toggle
0
1
“
0
”
TMRx_TOGGLE
TMRx_CTL.MODE_SEL=0x2
Where x = 0, 1, 2, 3
Figure 5.11-1 Enhance Timer Controller Block Diagram