Fujitsu MB90480 Series Hardware Manual page 558

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 25 PWC TIMER (ONLY MB90485 SERIES)
Restart
Restart is defined as a start operation (setting the STRT bit to "0") performed after entering
timer/pulse width measurement mode.
Restart operates as follows depending on the mode:
❍ One-shot timer mode
Restart has no effect.
❍ Reload Timer Mode
Reload is performed and operation continues. If a restart occurs at the same time as an
overflow, the overflow flag (OVIR) is set.
❍ Pulse width measurement mode
In the measurement start edge wait state, restart has no effect on the operation. In
measurement mode, counting stops and the measurement start edge wait state is entered. If, in
this mode, measurement end edge detection and restart occur at the same time, the
measurement end interrupt request flag (EDIR) is set. In repeated measurement mode, the
result will be transferred to the PWCR.
Stop
In one-shot timer mode or one-shot measurement mode, no explicit stop operation needs to be
performed because counting will automatically stop at a timer overflow or at measurement end.
However, in other modes, the timer must be forcibly stopped. Moreover, providing an explicit
stop operation allows the timer to stop before it would stop automatically.
❍ Comparing and selection of two inputs
If a forcible stop is performed before the edge selected via PWC1 has been detected, the first
measurement result after restart of measurement will contain an error. Be sure to perform a
forcible stop only after the edge in PWC1 has been detected.
Confirmation of operation state
The STRT/STOP bits, which have been explained above, operate as operation state indicator
bits when read.
Table 25.5-4 shows the function of the operation state indicator bits.
Table 25.5-4 Function of the operation state indicator bits
STRT
0
1
Note:
The same value is read regardless of whether STRT or STOP bit is read. If these bits are read with
read-modify-write instructions (such as bit operation instructions), "11
use read-modify-write instructions for reading.
536
STOP
Timer stop (except in measurement start edge wait state):
0
Indicates that the timer has not started or that measurement
has ended.
Timer counting is being performed or the system is in
1
measurement start edge wait state
Operation state
" is always returned. Do not
B

Advertisement

Table of Contents
loading

Table of Contents