Figure 7.8 Error On Starting Counter Operation; Notes On Using 8-Bit Pwm Timer - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

8
7.

Notes on Using 8-bit PWM Timer

This section lists points to note when using the 8-bit PWM timer.
n Notes on Using 8-bit PWM Timer
l
Error
Activating the counter by program is not synchronized with the start of counting-up using the
selected count clock. Therefore, the time from activating the counter until a match with the PWM
compare register (COMR) is detected may be shorter than the theoretical time by a maximum of
one cycle of the count clock. Figure 7.8 shows the error that occurs on starting counter
operation.
Counter value
Count clock
Notes on setting by program
l
Do not change the count clock cycle (CNTR: P1, P0) when the interval timer function or
PWM timer function is operating (CNTR: TPE = "1").
Stop the counter (CNTR: TPE = "0"), disable interrupts (TIE = "0"), and clear the interrupt
request flag (TIR = "0") before switching between the interval timer function and PWM timer
function (CNTR: P/TX).
Interrupt processing cannot return if the interrupt request flag bit (CNTR: TIR) is "1" and the
interrupt request enable bit is enabled (CNTR: TIE = "1"). Always clear the TIR bit.
The TIR bit is not set if the counter is disabled (TPE = "0") at the same time as the counter
and COMR register values match.
152
CHAPTER 7 8-BIT PWM TIMER
00
01
H
One cycle
Cycle for 00
Error
H
Counter activate

Figure 7.8 Error on Starting Counter Operation

02
H
H
03
04
H
H
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents