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 #138 background imageLoading...
Page #138 background image
Precautions
M30240 Group
Rev.1.00 Sep 24, 2003 Page 120 of 360
1.3.1.9 Stop Mode and Wait Mode
When returning from stop mode by hardware reset, RESET
pin must be set to “L” level until main clock
oscillation is stabilized.
When entering either wait or stop mode, you must first enable any interrupts you want to cancel the
wait or stop. Also, make sure to disable any interrupts that you don’t want to cancel the wait or stop.
If only hardware reset or NMI
interrupts are desired to cancel wait or stop, all other interrupt priority
levels should be set to “0”
If using f
SYN
as the internal clock, switch it to f(X
IN
) before entering stop mode.
When switching to either wait or stop mode, the WAIT instruction or the instruction that sets the all
clock stop bit to “1” are prefetched within the instruction queue before the program stops. Put at least
four NOPs in succession after the WAIT instruction or after the instruction that sets the all clock stop
control bit to “1.”
1.3.1.10 Timer A (Timer mode)
Reading the Timer Ai register while a count is in progress allows reading, with arbitrary timing, the val-
ue of the counter. Reading the Timer Ai register with the reload timing gets “FFFF
16
”. Reading the Tim-
er 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.
1.3.1.11 Timer A (Event counter mode)
1. 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 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.
2. When counting has stopped in free-run type, set the timer again.
3. When using Free-run type, the timer’s register contents may be undefined when counting starts. Set
the timer value immediately after counting has started.
When the up/down count is not switched:
•Enable the reload function and set a value to the timer register before counting starts.
•Rewrite the value to the timer register immediately after counting has started. (This is the same operation
as free-run type.)
•If counting up, rewrite 0000
16.
•If counting down, rewrite FFFF
16.
When the up/down count is switched:
•Use the reload type until the first count pulse is input.
•Switch to free-run type afterwards.
1.3.1.12 Timer A (One-shot Timer mode)
1. Setting the count start flag to “0” while the count is in progress causes:
The counter to stop counting
The contents of the reload register are reloaded
The TAiOUT pin outputs “L” level
The interrupt request is generated
2. Timer Ai interrupt request bit goes to “1” if the operation mode is set by:
Selecting one-shot timer mode after reset
Changing operation mode from timer mode to one-shot timer mode
Changing operation mode from event counter mode to one-shot timer mode
Note: To use Timer Ai interrupt request bit, clear the Timer Ai interrupt request bit to “0” after these
changes have been made.

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