Precautions When Using Pwc Timer - Fujitsu MB90335 Series Hardware Manual

16-bit microcontroller
Table of Contents

Advertisement

MB90335 Series
13.4

Precautions when Using PWC Timer

Precautions when using the PWC timer are described.
■ Precautions when Using PWC Timer
Notes concerning rewriting register
Following bits among PWCSRs are inhibited to be updated during the operation. Always update the bits
before starting or after stopping the operation.
• (bit7, bit6) CKS1,CKS0 (clock selection)
• (bit5, bit4) PIS1, PIS0 (input signal selection)
• (bit3) S/C (Measurement mode (single/continuous) selection)
• (bit2, bit1, bit0) MOD2, MOD1, MOD0 (operation mode/measurement edge selection)
It is inhibited to update the DIVR during the operation. Always update the bits before starting or after
stopping the operation.
Handling of measurement ending flag of timer mode
Measurement termination interrupt request flag (EDIR) value in the PWCSR has no meaning in the timer
mode. Therefore, always set "0" to the measurement termination interrupt request bit (EDIE) in the
PWCSR, when using in the timer mode.
Treatment of STRT and STOP bit in PWCSR
Note that both bits have different meaning between when writing and reading (see "13.2.1 PWC Control
Status Register (PWCSR)"). In addition, the read value is "11
regardless of the bit value. Therefore, note that no bit process instruction can be used to read the operating
status (reading always produces the operating status). When writing to the STRT and STOP bits to start/
stop the timer, bit process instruction (bit clear instruction, etc.) can be used for the respective bits.
Clearing Timer
Since the timer is cleared by the measurement start edge in the pulse width measurement mode, the data
present in the timer before starting become invalid.
Value of PWCR and timer when mode is changed
• Always write the value before using the timer because the held value in the PWCR and the timer value
become undefined when they are used in the reload timer mode before forcibly stopping the timer to
switch to the one-shot timer mode.
• Always write the value before the use because the PWCR value becomes undefined if it is used in the
one-shot timer mode.
• Always reset the value to the PWCR before starting the operation when switching the pulse width
measurement mode to the timer mode.
CM44-10137-6E
FUJITSU MICROELECTRONICS LIMITED
CHAPTER 13 PWC TIMER
13.4 Precautions when Using PWC Timer
" when using a read-modify-write instruction
B
315

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16lxMb90v330aMb90f337Mb90337

Table of Contents