8 notes on using 8-bit pwm timer, Notes on using 8-bit pwm timer, 8 "no – FUJITSU Semiconductor Controller MB89950/950A User Manual
Page 151

137
CHAPTER 7 8-BIT PWM TIMER
7.8
Notes on Using 8-bit PWM Timer
This section lists points to note when using the 8-bit PWM timer.
■ Notes on using 8-bit PWM timer
●
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 count clock.
Figure 7.8-1 "Error on starting counter operation" shows the error that occurs on starting counter operation.
Figure 7.8-1 Error on starting counter operation
●
Notes on setting by program
•
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/
T).
•
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.
Counter value
Count clock
One cycle
Error
Cycle for 00
H
Counter activate
00
H
01
H
02
H
03
H
04
H