223
Following a reset, TCG starts incrementing on the ø/64 internal clock. The input clock
can be selected from four internal clock sources by bits CKS1 and CKS0 in TMG. TCG
increments on the selected clock, and when it overflows from H’FF to H’00, the OVFL bit
is set to 1 in TMG. If the OVIE bit in TMG is 1 at this time, IRRTG is set to 1 in IRR2,
and if the IENTG bit in IENR2 is 1, timer G sends an interrupt request to the CPU. For
details of the interrupt, see 3.3., Interrupts.
2.
Increment timing
TCG is incremented by internal clock input. Bits CKS1 and CKS0 in TMG select one of four
internal clock sources (ø/64, ø/32, ø/2, or øw/4) created by dividing the system clock (ø) or watch
clock (øw).
3.
Input capture input timing
a. Without noise cancellation function
For input capture input, dedicated input capture functions are provided for rising and
falling edges.
Figure 9-10 shows the timing for rising/falling edge input capture input.
Figure 9-10 Input Capture Input Timing (without Noise Cancellation Function)
b. With noise cancellation function
When noise cancellation is performed on the input capture input, the passage of the input
capture signal through the noise canceler results in a delay of five sampling clock cycles
from the input capture input signal edge.
Figure 9-11 shows the timing in this case.
Input capture
input signal
Input capture
signal F
Input capture
signal R