Fujitsu F2MC-16LX MB90580 Series Hardware Manual page 277

16-bit microcontrollers
Hide thumbs Also See for F2MC-16LX MB90580 Series:
Table of Contents

Advertisement

(6) Clearing the Timer
The 16-bit up-count timer is cleared to 0000
A reset
When counting starts after detection of a count start edge in pulse width count mode(6)
(7) Details of Timer Mode Operation
(a) Single-Shot Operation Mode
When the timer is started in this mode, the timer counts up on each count clock. The timer
automatically stops when an overflow from FFFF
If PWCR is set before starting the timer, the count starts from the set value. In this case, the set value is
not saved and PWCR contains the current count value.
Bit 8 (POUT) of PWCSR is inverted when an overflow occurs but the value is not output from the pin in
this mode, even if pulse output mode is specified.
(b) Reload Operation Mode
When the timer is started in this mode, the reload value in PWCR is set to the timer and the timer
counts up on each count clock. When an overflow from FFFF
PWCR is set again to the timer (reloading), the POUT bit (bit 8) of PWCSR is inverted, and the count
operation repeated. The timer does not stop until forcibly halted by writing to the STOP bit of PWCSR
or until a reset occurs.
The reload value set to PWCR before starting the timer is stored during counting and is set to the timer
when the timer is started or restarted and each time an overflow occurs. If the set value is changed
during counting, the new reload value is used when the next overflow or restart occurs.
(c) Timer Value and Reload Value
In single-shot operation mode, accessing PWCR directly accesses the up-count timer. Writing a value
to PWCR writes the value directly to the timer and reading PWCR during count operation reads the
current timer value. Setting a value to PWCR before starting the timer causes the count to start from the
specified value.
In reload operation mode, the up-count timer cannot be accessed and PWCR acts as the reload
register (stores the reload value). The value written to PWCR is set to the timer when the timer is
started or restarted and each time an overflow occurs. Reading PWCR reads the stored reload value.
The value in PWCR and the timer value are indeterminate if the timer is set to single-shot mode after
forcibly halting operation in reload mode. Therefore, always set a value before using the timer.
The value in PWCR is indeterminate if the timer is set to reload mode after forcibly halting operation in
single-shot mode. Therefore, always set a value before using the timer.
(d) Generation of Interrupt Requests
Interrupt requests can be generated by overflows when operating in timer mode. When an overflow
occurs due to the timer counting up, the overflow flag is set and an interrupt request is generated if the
overflow interrupt request is enabled.
MB90580 Series
in the following cases.
H
to 0000
occurs.
H
H
to 0000
H
Chapter 18: Pulse Width Counter (PWC) Timer
18.4 Operations
occurs, the reload value in
H
257

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lx mb90v580F2mc-16lx mb90583F2mc-16lx mb90f583

Table of Contents