
NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 334 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
Periodic Mode
5.11.5.2
If the timer is operated in Periodic mode (MODE_SEL[1:0] is 01) and ETMR_EN (ETMRn_CTL[0]
timer counter enable bit) is set to 1, the timer counter starts up counting. Once the timer counter
value (ETMRn_DR value) reaches timer compare register (ETMRn_CMPR) value, the ETMR_IS
(ETMRn_ISR[0] timer interrupt status) will set to 1. If ETMR_IE (ETMRn_IER[0] timer interrupt
enable bit) is set to 1 then the interrupt signal is generated and sent to AIC to inform CPU for
indicating that the timer counting overflow happens. If ETMR_IE (ETMRn_IER[0] timer interrupt
enable bit) is set to 0, no interrupt signal is generated.
In this operating mode, once the timer counter value (ETMRn_DR value) reaches timer compare
register (ETMRn_CMPR) value, ETMR_IS (ETMRn_ISR[0] timer interrupt status) will set to 1, the
timer counter value (ETMRn_DR value) goes back to counting initial value and ETMR_EN
(ETMRn_CTL[0] timer counter enable bit) is kept at 1 (counting enable continuously) and timer
counter operates up counting again. If ETMR_IS (ETMRn_ISR[0] timer interrupt status) is cleared
by software, once the timer counter value (ETMRn_DR value) reaches timer compare register
(ETMRn_CMPR) value again, ETMR_IS (ETMRn_ISR[0] timer interrupt status) will set to 1 also.
That is to say, timer operates timer counting and compares with ETMRn_CMPR value function
periodically. The timer counting operation does not stop until the ETMR_EN (ETMRn_CTL[0]
timer counter enable bit) is set to 0. The interrupt signal is also generated periodically. So, this
operating mode is called Periodic mode.
Toggle Mode
5.11.5.3
If the timer is operated in Toggle mode (MODE_SEL[1:0] is 10) and ETMR_EN (ETMRn_CTL[0]
timer counter enable bit) is set to 1, the timer counter starts up counting. Once the timer counter
value (ETMRn_DR value) reaches timer compare register (ETMRn_CMPR) value, the ETMR_IS
(ETMRn_ISR[0] timer interrupt status) will set to 1. If ETMR_IE (ETMRn_IER[0] timer interrupt
enable bit) is set to 1 then the interrupt signal is generated and sent to AIC to inform CPU for
indicating that the timer counting overflow happens. If ETMR_IE (ETMRn_IER[0] timer interrupt
enable bit) is set to 0, no interrupt signal is generated.
In this operating mode, once the timer counter value (ETMRn_DR value) reaches timer compare
register (ETMRn_CMPR) value, ETMR_IS (ETMRn_ISR[0] timer interrupt status) and toggle out
signal will set to 1, the timer counter value (ETMRn_DR value) goes back to counting initial value
and ETMR_EN (ETMRn_CTL[0] timer counter enable bit) is still kept at 1 (counting enable
continuously), and timer counter operates up counting again.
when the timer counter value
(ETMRn_DR value) reaches timer compare register value again, toggle out signal is set to 0, and
ETMR_IS (ETMRn_ISR[0] timer interrupt status) will set to 1 also. The timer counting operation
does not stop until the ETMR_EN (ETMRn_CTL[0] timer counter enable bit) is set to 0. Thus, the
toggle output signal changes back and forth with 50% duty cycle. So, this operating mode is
called Toggle mode.
Continuous Counting Mode
5.11.5.4
If the timer is operated in Continuous Counting mode (MODE_SEL[1:0] is 11) and ETMR_EN
(ETMRn_CTL[0] timer counter enable bit) is set to 1, the timer counter starts up counting. Once
the timer counter value (ETMRn_DR value) reaches timer compare register (ETMRn_CMPR)
value, the ETMR_IS (ETMRn_ISR[0] timer interrupt status) will set to 1. If ETMR_IE
(ETMRn_IER[0] timer counter enable bit) is set to 1 then the interrupt signal is generated and sent
to AIC to inform CPU for indicating that the timer counting overflow happens. If ETMR_IE
(ETMRn_IER[0] timer counter enable bit) is set to 0, no interrupt signal is generated.
In this operating mode, once the timer counter value (ETMRn_DR value) reaches timer compare
register (ETMRn_CMPR) value, ETMR_IS (ETMRn_ISR[0] timer interrupt status) will set to 1 and
ETMR_EN (ETMRn_CTL[0] timer counter enable bit) is kept at 1 (counting enable continuously)
and timer counter continuous counting without reload the timer counter value (ETMRn_DR value)
to counting initial value. User can change different timer compare register (ETMRn_CMPR) value
immediately without disabling timer counter and restarting timer counter counting.