Tdp Timer Counter (Tdpcnt); Tdp Pulse Width Upper Limit Register (Tdpwdmx) - Renesas H8S/2100 Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

12.3.1

TDP Timer Counter (TDPCNT)

TDPCNT is a 16-bit readable/writable up-counter. The input clock is selected by bits CKS2 to
CKS0 in TDPCR1. When CKS2 to CKS0 are set to B'111, the external clock is selected. Rising or
falling edge is selected by CKSEG in TDPCSR.
When TDPCNT overflows (H'FFFF changes to H'0000), the OVF flag in TDPCSR is set to 1. In
timer mode, TDPCNT is initialized to H'0000 when the CST bit in TDPCR1 is cleared. In cycle
measurement mode, TDPCNT is cleared when the first edge (the edge selected by the IEDG bit in
TDPCR1) of the measurement period (equal to one input waveform period) is detected.
In timer mode, TDPCNT is always writable. In cycle measurement mode, TDPCNT cannot be
modified. TDPCNT must always be accessed in 16-bit units and cannot be accessed in 8-bit units.
TDPCNT is initialized to H'0000.
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.
Section 12 16-Bit Duty Period Measurement Timer (TDP)
Rev. 1.00 Apr. 28, 2008 Page 333 of 994
REJ09B0452-0100

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2117r seriesR4f2117r

Table of Contents