BAT32G1x9 user manual | Chapter 10 Timer M
375 / 1149
Rev.1.02
Table 10-12
Specifications for input capture function
project
specification
Count the sources
f
CLK
, f
CLK
/2, f
CLK
/4, f
CLK
/8, f
CLK
/32
An external input signal from the TMCLK pin that
procedurally selects a valid edge
count
Increment the count
Count cycles
When the CCLR2~CCLR0 bits of the TMCRi register are "000B" (free-running).
1/fk
65536 fk: The frequency at which the source is counted
Count start criteria
Write "1" (start counting) to the TSTARTi bit of the TMSTR register.
Count stop conditions
When the CSELi bit of the TMSTR register is "1", write "0" (stop count) to the TSTARTi bit.
Timing of the generation of
interrupt requests
• Input capture (effective edge of TMIOji input).
• Overflow of TMi
TMIOA0 pin function
I/O port, input capture input, or TMCLK (external clock) input
TMIOB0, TMIOC0,
TMIOD0, TMIOA1
~
TMIOD1 pin function
I/O ports or inputs captured by pins
INTP0 pin function
Not used (input private port or INTP0
interrupt input).
Read timer
If you read the TMi
register, you can read the count value.
Write timer
• Write the TMi register when the TMSYNC bit of the TMMR register is "0" (timer M0 and
timer M1 operate independently).
• If you write the TMi register when the TMSYNC bit of the TMMR register is "1" (timer M0
and timer M1 run simultaneously), The data is written to both the TM0 register and the TM1
register.
Select Features
• Input capture of the selection of input pins
One or more pins in the TMIOAi, TMIOBi, TMIOCi, TMIODi pins
• Select the rising, falling, or
bilateral edges of the input valid
edges for input snaps
• Timing overflow or input
capture of TMi to "0000H"
•Buffer run (see "10.4.2 buffer run").
•Synchronous run (see "10.4.3 sync run").
• Digital filters
The TMIOji input is sampled and if the signals are the same 3 times, the level is considered
determined.
• Input capture runs through ELC input events
Remark
i=0, 1,j=A, B, C, D