Figure 6.7-8 Continuous Counting Mode - Nuvoton ISD94124BYI Technical Reference Manual

Isd arm cortex-m4f soc
Table of Contents

Advertisement

For example, if CMPDAT value is initially set as 80, when CNT reaches 80, timer raises TIF and
generates interrupt (if interrupt enabled), and counting continues. Now assume software clears
TIF and re-set CMPDAT value to 200, then when CNT reaches 200 timer will raise TIF and generate
interrupt again.
In this mode, timer counter counts endlessly from 0 to 2
disabled.
TIF = 1 and
Interrupt
Generation
Set
Clear TIF as 0
CMPDAT = 80
CMPDAT = 200
CNT = 0
CNT = 100
6.7.5.7
Event Counting Mode
In Event Counting mode, a timer counts the external input event from its TMx pin. The timer clock
source should be from PCLK.
-
EXTCNTEN (TIMERx_CTL[24]): Event counting mode enable bit.
-
CNT (TIMERx_CNT[23:0]): number of events occurred on the TMx pin.
-
ECNTSSEL (TIMERx_EXTCTL[16]): equals 0 to choose event source from TMx pin. '1' is a
reserved value for this bit.
-
CNTDBEN (TIMERx_EXTCTL[7]): configures the TMx pin de-bounce value.
-
CNTPHASE (TIMERx_EXTCTL[0]): determine to count falling edge or rising edge
In this mode, the clock source should choose PCK0 for Time0/1, and PCK1 for Timer2/3. Timer
counting mode can be selected as one-shot, periodic or continuous counting mode.
6.7.5.8
External Capture Mode
The event capture function is used to load CNT (TIMERx_CNT[23:0]) value to CAPDAT
(TIMERx_CAP[23:0]) value while edge transition detected on TMx_EXT (x= 0~3) pin. In this mode,
CAPFUNCS (TIMERx_EXTCTL[4]) should be as 0 to trigger event capture function and the timer
peripheral clock source should be set as PCLK.
Sep 9, 2019
ISD94100 Series Technical Reference Manual
TIF = 1 and
Interrupt
Generation
Clear TIF as 0
and Set
and Set
CMPDAT = 500
CNT = 200
CNT = 300
24
CNT from 2

Figure 6.7-8 Continuous Counting Mode

Page 347 of 928
24
-1, then from 0 again, until CNTEN is
TIF = 1 and
Interrupt
Generation
Clear TIF as 0
and Set
CMPDAT = 80
CNT = 400
CNT = 500
-1 to 0
24
CNT = 2
-1
Rev1.09

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents