r5f21346mnfp Renesas Electronics Corporation., r5f21346mnfp Datasheet - Page 329

no-image

r5f21346mnfp

Manufacturer Part Number
r5f21346mnfp
Description
Single-chip Mcus Incorporates The R8c Cpu Core
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
r5f21346mnfp#V0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
R8C/34M Group
R01UH0131EJ0100 Rev.1.00
Jun 21, 2011
19.9
19.9.1
19.9.2
19.9.3
19.9.4
Reading from the TRCSR register immediately after writing to it can result in the value previous to the write
being read out. To prevent this, execute the JMP.B instruction between the read and the write instructions.
To set bits TCK2 to TCK0 in the TRCCR1 register to 111b (fOCO-F), set fOCO-F to the clock frequency
higher than the CPU clock frequency.
Switching procedure
(1) Set the TSTART bit in the TRCMR register to 0 (count stops).
(2) Change the settings of bits TCK2 to TCK0 in the TRCCR1 register.
Switching procedure
(1) Set the TSTART bit in the TRCMR register to 0 (count stops).
(2) Change the settings of bits TCK2 to TCK0 in the TRCCR1 register.
(3) Wait for a minimum of two cycles of f1.
(4) Set the FRA00 bit in the FRA0 register to 0 (high-speed on-chip oscillator off).
The following note applies when the CCLR bit in the TRCCR1 register is set to 1 (clear TRC register at
compare match with TRCGRA register).
When using a program to write a value to the TRC register while the TSTART bit in the TRCMR register is
set to 1 (count starts), ensure that the write does not overlap with the timing with which the TRC register is set
to 0000h.
If the timing of the write to the TRC register and the setting of the TRC register to 0000h coincide, the write
value will not be written to the TRC register and the TRC register will be set to 0000h.
Reading from the TRC register immediately after writing to it can result in the value previous to the write
being read out. To prevent this, execute the JMP.B instruction between the read and the write instructions.
Stop the count before switching the count source.
After switching the count source from fOCO40M to another clock, allow a minimum of two cycles of f1 to
elapse after changing the clock setting before stopping fOCO40M.
Notes on Timer RC
TRC Register
TRCCR1 Register
Count Source Switching
TRCSR Register
Program Example
Program Example
L1:
L1:
MOV.W
JMP.B
MOV.W
MOV.B
JMP.B
MOV.B
#XXXXh, TRC
L1
TRC,DATA
#XXh, TRCSR
L1
TRCSR,DATA
;Write
;JMP.B instruction
;Read
;Write
;JMP.B instruction
;Read
Page 297 of 740
19. Timer RC

Related parts for r5f21346mnfp