Section 12 16-Bit Duty Period Measurement Timer (TDP)
Rev. 1.00 Apr. 28, 2008 Page 346 of 994
REJ09B0452-0100
(2) Measuring a Cycle
In cycle measurement mode, one cycle of the TDP input waveform forms one measurement cycle.
Start by setting TDPMDS
=
0 and CST
=
0, which clears TDPCNT to H'0000. Next, set the upper
limit and lower limit values of the measurement pulse width in TDPWDMX and TDPWDMN, and
set the upper limit and lower limit values of the measurement cycle in the TDPPDMX and
TDPPDMN. Finally, place the TDP in cycle measurement mode by setting the TDPMDS bit in
TDPCR1 to 1. TDPCNT will count up cycles of the selected clock. When the first edge (either
rising or falling, as selected by the POCTL bit in TDPCR1) of the measurement cycle is detected,
TDPCNT is automatically cleared to H'0000. When the second edge is detected, the value in
TDPCNT is transferred to TDPICR. At this time, the value in TDPICR is compared with the
values in TDPWDMX and TDPWDMN. If TDPIR is greater than TDPWDMX or less than
TDPWDMN, the TWDMXOVF or TWDMNUDF flag, respectively, in TDPCSR is set to 1.
When the third edge is detected, the value in TDPCNT is transferred to TDPICR. At this time, the
value in TDPICR is compared with the values in TDPPDMX and TDPPDMN. If TDPICR is
greater than TDPPDMX or less than TDPPDMN, the TPDMXOVF or TPDMNUDF flag,
respectively, in TDPCSR is set to 1. Generation of the corresponding interrupt request is enabled
by the setting in TDPIER. Also, when the third edge is detected, TDPCNT is cleared to H'0000,
and the next round of measurement starts.
When the CPSPE bit in TDPCR1 is cleared to 0, the next round of cycle measurement will start
regardless of whether any of these flags is set to 1.
If any of these flags is set to 1 while the CPSPE bit in TDPCR1 is set to 1, counting up by
TDPCNT stops and cycle measurement also stops. Subsequently clearing the corresponding flag
to 0 automatically clears TDPCNT to H'0000, and counting up for cycle measurement is restarted.
Summary of Contents for H8S/2100 Series
Page 2: ...Rev 1 00 Apr 28 2008 Page ii of xxvi...
Page 54: ...Section 1 Overview Rev 1 00 Apr 28 2008 Page 28 of 994 REJ09B0452 0100...
Page 92: ...Section 2 CPU Rev 1 00 Apr 28 2008 Page 66 of 994 REJ09B0452 0100...
Page 158: ...Section 5 Interrupt Controller Rev 1 00 Apr 28 2008 Page 132 of 994 REJ09B0452 0100...
Page 244: ...Section 8 8 Bit PWM Timer PWMU Rev 1 00 Apr 28 2008 Page 218 of 994 REJ09B0452 0100...
Page 330: ...Section 10 16 Bit Timer Pulse Unit TPU Rev 1 00 Apr 28 2008 Page 304 of 994 REJ09B0452 0100...
Page 416: ...Section 13 8 Bit Timer TMR Rev 1 00 Apr 28 2008 Page 390 of 994 REJ09B0452 0100...
Page 612: ...Section 18 I 2 C Bus Interface IIC Rev 1 00 Apr 28 2008 Page 586 of 994 REJ09B0452 0100...
Page 706: ...Section 20 LPC Interface LPC Rev 1 00 Apr 28 2008 Page 680 of 994 REJ09B0452 0100...
Page 752: ...Section 21 FSI Interface Rev 1 00 Apr 28 2008 Page 726 of 994 REJ09B0452 0100...
Page 774: ...Section 23 RAM Rev 1 00 Apr 28 2008 Page 748 of 994 REJ09B0452 0100...
Page 1008: ...Section 28 Electrical Characteristics Rev 1 00 Apr 28 2008 Page 982 of 994 REJ09B0452 0100...
Page 1020: ...Rev 1 00 Apr 28 2008 Page 994 of 994 REJ09B0452 0100...
Page 1023: ......
Page 1024: ...H8S 2117R Group Hardware Manual...