
R01UH0336EJ0102 Rev.1.02
Page 667 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 14 Timer Array Unit J (TAUJ)
14.12.4
TAUJnTTINm Input Signal Width Measurement Function
(1)
Overview
Summary
This function measures the width of a TAUJnTTINm input signal.
Prerequisites
• The operating mode should be set to Capture & One-Count Mode. (See
Table 14-26, TAUJnCMORm Settings for TAUJnTTINm Input Signal Width
Measurement Function.)
• TAUJnTTOUTm is not used with this function.
• TAUJnCMORm.TAUJnMD0 should be set to 0.
Functional
description
The counter is started by setting the channel trigger bit (TAUJnTS.TAUJnTSm)
to 1. This in turn sets TAUJnTE.TAUJnTEm = 1, enabling count operation.
When a valid TAUJnTTINm start edge is detected, the counter TAUJnCNTm
starts counting up from 0000 0000
H
. When a valid TAUJnTTINm stop edge is
detected, the value of TAUJnCNTm is captured and transferred to
TAUJnCDRm, and an interrupt INTTAUJnIm is generated. The counter retains
its value and awaits the next valid TAUJnTTINm input start edge.
If the counter reaches FFFF FFFF
H
before a valid TAUJnTTINm stop edge is
detected, it overflows. The counter is reset to 0000 0000
H
and subsequently
continues operation. The values transferred to TAUJnCDRm and
TAUJnCSRm.TAUJnOVF respectively depend on the values of
TAUJnCMORm.TAUJnCOS[1:0] bits.
When TAUJnCMORm.TAUJnCOS[0] = 1, overflow bit
TAUJnCSRm.TAUJnOVF can be cleared only by setting
TAUJnCSCm.TAUJnCLOV to 1.
The combination of the values of TAUJnCDRm and TAUJnCSRm.TAUJnOVF
can be used to deduce the width of the TAUJnTTINm signal. However, if
multiple overflows occur before a valid TAUJnTTINm input is detected, the
overflow bit TAUJnCSRm.TAUJnOVF cannot indicate their occurrences.
Caution
The TAUJnTTINm input signal width measurement function cannot make a
forced restart.
Note
If TAUJnCMORm.TAUJnCOS[1] = 1, the value of TAUJnCNTm is not loaded
into TAUJnCDRm when the first valid TAUJnTTINm input edge occurs after an
overflow. However, an interrupt is generated.
Table 14-25
Effects of Overflow
TAUJnCMORm.
TAUJnCOS[1:0]
When Overflow Occurs
When Valid TAUJnTTINm Input Stop Edge Is
Detected
TAUJnCDRm
TAUJnCSRm.
TAUJnOVF
TAUJnCDRm, TAUJnCNTm
TAUJnCSRm.
TAUJnOVF
00
Unchanged
0
TAUJnCNTm is loaded into
TAUJnCDRm
1
01
1
10
Set to FFFF
FFFF
H
0
TAUJnCNTm stops counting.
TAUJnCDRm remains unchanged
Unchanged
11
1