BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
178 / 1149
Rev.1.02
(5) Capture & Run of Single Count mode (measurement of high level width).
(1) Write "1" in the TSmn bit of register m(TSm) through the given timer channel and enter the run Enabled
state (TEmn=1).
(2) The timer count register mn (TCRmn) remains at its initial value until a start trigger signal is generated.
(3) Detect the rising edge of the TImn input.
(4) Load "0000H" into the TCRmn register after generating the start trigger signal, and start counting.
(5) If the falling edge of the TImn input is detected, the value of the TCRmn register is captured to the
TDRmn register and an INTTmn interrupt is generated.
Figure 6-30 Runtime Sequence (Capture & Single Count Mode: Measurement of High Level Width).
TSmn(write)
TImn(input)
rising edge
falling edge
start
trigger
detection
singal
initial value
edge detection
edge
detection
Note: This is the timing when no noise filter is used. If a noise filter is used, edge detection is delayed
by
2
f
MCK
cycles
(
3
to
4
cycles in total
) from the
TImn
input
. The
1-cycle error is due to
the TImn
input and the count clock (f
MCK
)
are out of sync.