Datasheet

Section 12 16-Bit Duty Period Measurement Timer (TDP)
Rev. 3.00 Sep. 28, 2009 Page 334 of 910
REJ09B0350-0300
12.3.2 TDP Pulse Width Upper Limit Register (TDPWDMX)
TDPWDMX is a 16-bit readable/writable register. When the TDPMDS bit in TDPCR1 is cleared
(timer mode), TDPWDMX is available as a compare match register. When the TDPMDS bit in
TDPCR1 is set to 1 (cycle measurement mode), TDPWDMX is available as a pulse width upper
limit register.
In timer mode, the TDPWDMX value is continually compared with the TDPCNT value. If the
values match, the CMF flag in TDPCSR is set to 1. Note, however, that comparison is disabled in
the second half of a write cycle to TDPWDMX.
In cycle measurement mode, TDPWDMX can be used to set the upper limit value of the
measurement pulse width. When the second edge (the second edge of this period) of the
measurement period is detected, the TDPCNT value is transferred to TDPICR and the values of
TDPICR and TDPWDMX are compared. If the TDPICR value is greater than the TDPWDMX
value, the TWDMXOVF flag in TDPCSR is set to 1. TDPWDMX must always be accessed in 16-
bit units and cannot be accessed in 8-bit units. TDPWDMX is initialized to H'FFFF.
12.3.3 TDP Pulse Width Lower Limit Register (TDPWDMN)
TDPWDMN is a 16-bit readable/writable register. When the TDPMDS bit in TDPCR1 is set to 1
(cycle measurement mode), TDPWDMN is available as a pulse width lower limit register.
In cycle measurement mode, TDPWDMN can be used to set the lower limit value of measurement
pulse width. When the second edge (the second edge of this period) of the measurement period is
detected, the TDPCNT value is transferred to TDPICR and the values of TDPICR and
TDPWDMN are compared. If the TDPICR value is less than the TDPWDMN value, the
TWDMNUDF flag in TDPCSR is set to 1. TDPWDMN must always be accessed in 16-bit units
and cannot be accessed in 8-bit units. TDPWDMN is initialized to H'0000.
12.3.4 TDP Cycle Upper Limit Register (TDPPDMX)
TDPPDMX is a 16-bit readable/writable register. When the TDPMDS bit in TDPCR1 is set to 1
(cycle measurement mode), TDPPDMX is available as a cycle upper limit register.
In cycle measurement mode, TDPPDMX can be used to set the upper limit value of measurement
period. When the third edge (the first edge of the next period) of the measurement period is
detected, the TDPCNT value is transferred to TDPICR and the values of TDPICR and TDPPDMX
are compared. If the TDPICR value is greater than the TDPPDMX value, the TPDMXOVF flag in