EasyManuals Logo
Home>Renesas>Computer Hardware>R8C series

Renesas R8C series User Manual

Renesas R8C series
341 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #318 background imageLoading...
Page #318 background image
R8C/1A Group, R8C/1B Group 20. Usage Notes
Rev.1.30 Dec 08, 2006 Page 300 of 315
REJ09B0252-0130
20.3 Precautions on Timers
20.3.1 Notes on Timer X
• Timer X stops counting after a reset. Set the values in the timer and prescaler before the count starts.
• Even if the prescaler and timer are read out in 16-bit units, these registers are read 1 byte at a time by the
MCU. Consequently, the timer value may be updated during the period when these two registers are being
read.
• Do not rewrite bits TXMOD0 to TXMOD1, and bits TXMOD2 and TXS simultaneously.
• In pulse period measurement mode, bits TXEDG and TXUND in the TXMR register can be set to 0 by
writing 0 to these bits by a program. However, these bits remain unchanged if 1 is written. When using the
READ-MODIFY-WRITE instruction for the TXMR register, the TXEDG or TXUND bit may be set to 0
although these bits are set to 1 while the instruction is being executed. In this case, write 1 to the TXEDG or
TXUND bit which is not supposed to be set to 0 with the MOV instruction.
• When changing to pulse period measurement mode from another mode, the contents of bits TXEDG and
TXUND are undefined. Write 0 to bits TXEDG and TXUND before the count starts.
• The TXEDG bit may be set to 1 by the prescaler X underflow generated after the count starts.
• When using the pulse period measurement mode, leave two or more periods of the prescaler X immediately
after the count starts, then set the TXEDG bit to 0.
• The TXS bit in the TXMR register has a function to instruct timer X to start or stop counting and a function
to indicate that the count has started or stopped.
0 (count stops) can be read until the following count source is applied after 1 (count starts) is written to the
TXS bit while the count is being stopped. If the following count source is applied, 1 can be read from the
TXS bit. After writing 1 to the TXS bit, do not access registers associated with timer X (registers TXMR,
PREX, TX, TCSS, and TXIC) except for the TXS bit, until 1 can be read from the TXS bit. The count starts
at the following count source after the TXS bit is set to 1.
Also, after writing 0 (count stops) to the TXS bit during the count, timer X stops counting at the following
count source.
1 (count starts) can be read by reading the TXS bit until the count stops after writing 0 to the TXS bit. After
writing 0 to the TXS bit, do not access registers associated with timer X except for the TXS bit, until 0 can
be read from the TXS bit.
20.3.2 Notes on Timer Z
• Timer Z stops counting after a reset. Set the values in the timer and prescaler before the count starts.
• Even if the prescaler and timer are read out in 16-bit units, these registers are read 1 byte at a time by the
MCU. Consequently, the timer value may be updated during the period when these two registers are being
read.
• Do not rewrite bits TZMOD0 to TZMOD1, and the TZS bit simultaneously.
• In programmable one-shot generation mode, and programmable wait one-shot generation mode, when
setting the TZS bit in the TZMR register to 0 (stops counting) or setting the TZOS bit in the TZOC register
to 0 (stops one-shot), the timer reloads the value of the reload register and stops. Therefore, in
programmable one-shot generation mode and programmable wait one-shot generation mode read the timer
count value before the timer stops.
• The TZS bit in the TZMR register has a function to instruct timer Z to start or stop counting and a function
to indicate that the count has started or stopped.
0 (count stops) can be read until the following count source is applied after 1 (count starts) is written to the
TZS bit while the count is being stopped. If the following count source is applied, 1 can be read from the
TZS bit. After writing 1 to the TZS bit, do not access registers associated with timer Z (registers TZMR,
PREZ, TZSC, TZPR, TZOC, PUM, TCSC, and TZIC) except for the TZS bit, until 1 can be read from the
TZS bit. The count starts at the following count source after the TZS bit is set to 1.
Also, after writing 0 (count stops) to the TZS bit during the count, timer Z stops counting at the following
count source.
1 (count starts) can be read by reading the TZS bit until the count stops after writing 0 to the TZS bit. After
writing 0 to the TZS bit, do not access registers associated with timer Z except for the TZS bit, until 0 can
be read from the TZS bit.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas R8C series and is the answer not in the manual?

Renesas R8C series Specifications

General IconGeneral
BrandRenesas
ModelR8C series
CategoryComputer Hardware
LanguageEnglish

Related product manuals