Precautions When Using Pwc Timer - Fujitsu F2MC-16LX Hardware Manual

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

Advertisement

15.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.
• (Bit 7,6) CKS1,CKS0 (clock selection)
• (Bit 5,4) PIS1, PIS0 (input signal selection)
• (Bit 3) S/C (Measurement mode (single/continuous) selection)
• (Bit 2,1,0) 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 "15.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.
CHAPTER 15 PWC TIMER
" when using a read-modify-write instruction
B
381

Advertisement

Table of Contents
loading

Table of Contents