HD6417641 RENESAS [Renesas Technology Corp], HD6417641 Datasheet - Page 613

no-image

HD6417641

Manufacturer Part Number
HD6417641
Description
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
Example of Count Operation Setting Procedure: Figure 18.3 shows an example of the count
operation setting procedure.
Free-Running Count Operation and Periodic Count Operation: Immediately after a reset, the
MTU's TCNT counters are all designated as free-running counters. When the relevant bit in TSTR
is set to 1 the corresponding TCNT counter starts up-count operation as a free-running counter.
When TCNT overflows (from H'FFFF to H'0000), the TCFV bit in TSR is set to 1. If the value of
the corresponding TCIEV bit in TIER is 1 at this point, the MTU requests an interrupt. After
overflow, TCNT starts counting up again from H'0000.
Figure 18.4 illustrates free-running counter operation.
Select counter clearing
Select output compare
Start count operation
Select counter clock
Operation selection
<Periodic counter>
Periodic counter
Set period
register
source
Figure 18.3 Example of Counter Operation Setting Procedure
[1]
[2]
[3]
[4]
[5]
<Free-running counter>
Free-running counter
Start count operation
Section 18 Multi-Function Timer Pulse Unit (MTU)
[5]
Rev. 4.00 Sep. 14, 2005 Page 563 of 982
[1] Select the counter clock with
[2] For periodic counter operation,
[3] Designate the TGR selected in
[4] Set the periodic counter cycle
[5] Set the CST bit in TSTR to 1 to
bits TPSC2 to TPSC0 in TCR.
At the same time, select the
input clock edge with bits
CKEG1 and CKEG0 in TCR.
select the TGR to be used as
the TCNT clearing source with
bits CCLR2 to CCLR0 in TCR.
[2] as an output compare
register by means of TIOR.
in the TGR selected in [2].
start the counter operation.
REJ09B0023-0400

Related parts for HD6417641