Operation; Basic Functions - Renesas RX100 Series User Manual

32-bit mcu
Hide thumbs Also See for RX100 Series:
Table of Contents

Advertisement

RX13T Group
19.3

Operation

19.3.1

Basic Functions

Each channel has TCNT and TGR register. TCNT performs up-counting, and is also capable of free-running operation,
periodic counting, and external event counting.
Each TGR register can be used as an input capture register or an output compare register.
(1) Counter Operation
When one of bits CST0 to CST4 in the TSTRA register, and bits CSTU5, CSTV5, and CSTW5 in the MTU5.TSTR
register is set to 1, TCNT for the corresponding channel begins counting. TCNT can operate as a free-running counter,
periodic counter, for example.
(a) Example of Count Operation Setting Procedure
Figure 19.4 shows an example of the count operation setting procedure.
Operation selection
Select count clock
Periodic counter
Select counter clearing
source
Select output compare
register
Set period
Start count operation
<Periodic counter>
Figure 19.4
Example of Count Operation Setting Procedure
R01UH0822EJ0100 Rev.1.00
Jul 31, 2019
[1]
Free-running counter
[2]
[3]
[4]
Start count operation
[5]
<Free-running counter>
19. Multi-Function Timer Pulse Unit 3 (MTU3c)
[1] Select the count clock source with bits
TPSC[2:0] in TCR. At the same time,
select the clock edge with bits
CKEG[1:0] in TCR.
[2] For periodic counter operation, select
the TGR to be used as the TCNT
clearing source with bits CCLR[2:0] in
TCR.
[3] Designate the TGR selected in [2] as
an output compare register by means
of TIOR.
[4] Set the periodic counter period in the
TGR selected in [2].
[5] Set the CSTn bit in TSTRA or
MTU5.TSTR to 1 to start the counter
[5]
operation.
Page 387 of 1041

Advertisement

Table of Contents
loading

Table of Contents