Timer Mode Operation - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

25.5.5 Timer Mode Operation

This section describes the device operation in timer mode.
Clearing the timer
In the following cases, the 16-bit up-count timer is cleared to "0000
At reset
If, in pulse width measurement mode, a measurement start edge is detected and counting
starts
One-shot operation mode
In one-shot operation mode, the timer count is incremented with every count clock after timer
start. If an overflow occurs while incrementing from "FFFF
stops. If the PWCR is set to any value before timer start, counting will start with that value. In
this case, the value that was previously set will not be preserved, and the PWCR value will
always indicate the current count value.
Reload operation mode
In reload operation mode, the timer is set to the reload value stored in PWCR, and the timer will
be incremented with every count clock after the timer starts. If an overflow occurs while
incrementing from "FFFF
timer (reload operation), and counting will be repeated from that value. The timer does not stop
until it is forcibly stopped due to writing the PWCSR: STOP bit, or due to a reset. The value set
in the PWCR before the timer starts is retained during counting as a reload value, and will be
loaded into the timer if a start/restart or an overflow occurs. If the value that is set in the PWCR
changes during counting, this new, changed reload value will be used at the next overflow or
timer restart.
Timer value and reload value
In one-shot operation mode, the PWCR is directly accessed by the up-count timer. Any value
written to the PWCR will also be written to the timer as it is. When reading the PWCR while the
timer is in progress, the value of the current timer count will be returned. If any value is set to
the PWCR before the timer starts, counting will start from this value. In reload operation mode,
accessing the count-up timer is prohibited. The PWCR operates as a reload register that stores
a reload value. If a start/restart/overflow occurs, the timer is always set to the value stored in the
PWCR. When reading the PWCR, the stored reload value will be read.
If the timer is placed in one-shot operation mode after the reload operation mode is forcibly
canceled, the PWCR value and timer value are not specified. Be sure to always specify these
values before using the timer.
CHAPTER 25 PWC TIMER (ONLY MB90485 SERIES)
" to "0000
", the reload value in PWCR will be loaded again into the
H
H
":
H
" to "0000
", the timer automatically
H
H
537

Advertisement

Table of Contents
loading

Table of Contents