Operation Of Timer Mode - Fujitsu F2MC-16LX Hardware Manual

16-bit microcontroller mb90330 series
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

15.3.5

Operation of Timer Mode

The operation of the timer mode is explained.
Clearing Timer
The 16-bit up count timer is cleared to be 0000
• At a reset
• In the pulse width measurement mode, when the measurement start edge is detected and the count is
started.
One-shot Operation Modes.
In the one-shot operation mode, the count up is performed at every count clock after the timer started and
an overflow occurrence at counting from FFFF
set in the PWCR before starting the timer, the count is started from the value. In this case, the set value is
not held and the PWCR value indicates the current count value.
Reload Operation Mode
In the reload operation mode, the count up is performed at every count clock after the reload value in the
PWCR is set in the timer after starting the timer. Overflow occurrence at counting from FFFF
again sets the reload value in the PWCR in the timer (reload operation) to repeat the count operation. The
timer does not stop until it is forcibly stopped by writing into the PWCSR STOP bit or it is reset. The value
set in the PWCR before starting the timer is held as the reload value during the count operation and always
set in the timer at starting/restarting and an overflow occurrence. Use a newly changed reload value to
change the set value during the count operation at the next overflow occurrence or the timer restarting.
Timer Value and Reload Value
The PWCR in the one-shot operation mode has a direct access to the up count timer. The value written in
the PWCR is written in the timer as it is so that you can acquire the timer value in the count operation by
reading the PWCR value during the timer operation. If you write an arbiter value in the PWCR before
starting the timer, the count operation is started from this specified value. In the reload operation mode,
accessing the up count timer is impossible. The PWCR functions as the reload register to hold the reload
value. When the timer start, restart, or overflow occurs, the value written in the PWCR always set to the
timer. When PWCR is read, the stored reload value is read.
The PWCR value and the timer value are undefined when the timer is set to the one-shot operation mode
after forcibly suspending the reload operation mode. Therefore, always write the value before using the
timer.
Interrupt Generation Request
In timer mode operation, interrupt request by the timer overflow can be generated. An interrupt request is
generated when the overflow flag is set at an overflow occurrence caused by the count up and the overflow
interrupt request is permitted.
in the following case:
H
to 0000
automatically stops the count. When a value is
H
H
CHAPTER 15 PWC TIMER
to 0000
H
H
373

Advertisement

Table of Contents
loading

Table of Contents