upd70f3422gj-gae-qs-ax Renesas Electronics Corporation., upd70f3422gj-gae-qs-ax Datasheet - Page 421

no-image

upd70f3422gj-gae-qs-ax

Manufacturer Part Number
upd70f3422gj-gae-qs-ax
Description
32-bit Single-chip Microcontroller
Manufacturer
Renesas Electronics Corporation.
Datasheet
16-bit Timer/Event Counter P (TMP)
INTTPnCCm signal
TPnCCRm register
Figure 11-38
INTTPnOV signal
TIPnm pin input
16-bit counter
TPnOVF bit
TPnCE bit
FFFFH
0000H
Basic timing in pulse width measurement mode
When the TPnCE bit is set to 1, the 16-bit counter starts counting. When the
valid edge input to the TIPnm pin is later detected, the count value of the 16-bit
counter is stored in the TPnCCRm register, the 16-bit counter is cleared to
0000H, and a capture interrupt request signal (INTTPnCCm) is generated.
The pulse width is calculated as follows.
If the valid edge is not input to the TIPnm pin even when the 16-bit counter
counted up to FFFFH, an overflow interrupt request signal (INTTPnOV) is
generated at the next count clock, and the counter is cleared to 0000H and
continues counting. At this time, the overflow flag (TPnOPT0.TPnOVF bit) is
also set to 1. Clear the overflow flag to 0 by executing the CLR instruction via
software.
If the overflow flag is set to 1, the pulse width can be calculated as follows.
Preliminary User’s Manual U17566EE1V2UM00
First pulse width = (D
Second and subsequent pulse width = (D
First pulse width = (D
Second pulse width and on = (10000H + D
0000H
0
0
+ 1) × Count clock cycle
+ 10001H) × Count clock cycle
D
0
N
N
- D
- D
D
N - 1
1
N - 1
) × Count clock cycle
) × Count clock cycle
Cleared to 0 by
CLR instruction
D
2
Chapter 11
D
3
421

Related parts for upd70f3422gj-gae-qs-ax