EasyManuals Logo
Home>Renesas>Computer Hardware>M16C Series

Renesas M16C Series User Manual

Renesas M16C Series
380 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 #187 background imageLoading...
Page #187 background image
Timer A
M30240 Group
Rev.1.00 Sep 24, 2003 Page 169 of 360
2.2.3 Precautions
2.2.3.1 Timer mode
(1) At reset, the count start flag is set to “0”. Set a value in the Timer Ai register, then set the flag to “1”.
(2) Reading the Timer Ai register while a count is in progress allows reading, with arbitrary timing, the
value of the counter. Reading the Timer Ai register with the reload timing shown in Figure 2.29 gets
“FFFF
16
”. Reading the Timer Ai register after setting a value in the Timer Ai register with a count halted
but before the counter starts counting gets a proper value.
Figure 2.29: Reading Timer Ai register in Timer mode
2.2.3.2 Event counter mode
(1) At reset, the count start flag is set to “0”. Set a value in the Timer Ai register, then set the flag to “1”.
(2) Reading the Timer Ai register while a count is in progress allows reading, with arbitrary timing, the
value of the counter. Reading the Timer Ai register with the reload timing shown in Figure 2.30 gets
“FFFF
16
” by underflow or “0000
16
” by overflow. Reading the Timer Ai register after setting a value in the
Timer Ai register with a count halted but before the counter starts counting gets a proper value.
(3) Please note the standards for the differences between the 2 pulses used in the 2-phase pulse signals
input signals to the TAi
IN
pin and TAi
OUT
pin (i = 2, 3, 4), as shown in Figure 2.31.
(4) In the case of using “Event counter mode” as a “Free-Run type” timer, register contents may be
unknown when the counting begins. If the timer register is set before counting has started, then the
starting value will be unknown.
This issue will occur only for the “Event counter mode” operating as “Free-Run type”. The value of the
timer register will be unknown during counting.
Countermeasure
• In the case where the up/down count will not be changed.
Enable the “Reload” function and write to the timer register before counting begins. Rewrite the value
to the timer register immediately after counting has started.
If counting up, rewrite “0000
16
” to the timer register.
If counting down, rewrite “FFFF
16
” to the timer register.
This will cause the same operation as “Free-Run type” mode.
• In the case where the up/down count has changed.
First set to “Reload type” operation. Once the first counting pulse has occurred, the timer may be
changed to “Free-Run type”.
2 1 0 n n – 1
Counter value (Hex.)
2 1 0 FFFF n – 1
Read value (Hex.)
Reload
Time
n = reload register content

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas M16C Series and is the answer not in the manual?

Renesas M16C Series Specifications

General IconGeneral
BrandRenesas
ModelM16C Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals