UPD784026 Renesas Electronics Corporation., UPD784026 Datasheet - Page 378

no-image

UPD784026

Manufacturer Part Number
UPD784026
Description
16/8-bit Single-chip Microcontrollers
Manufacturer
Renesas Electronics Corporation.
Datasheet
10.10 CAUTIONS
(1) While timer/counter 2 is operating (while the CE2 bit of the timer control register 1 (TMC1) is set), malfunctioning may
(2) If the contents of the compare register (CR2n: n = 0, 1) match with those of TM2 when an instruction that stops timer
338
occur if the contents of the following registers are rewritten. This is because it is undefined which takes precedence, the
change in the hardware functions due to rewriting the register, or the change in the status because of the function before
rewriting.
Therefore, be sure to stop the counter operation for the sake of safety before rewriting the contents of the following
registers.
• Prescaler mode register 1 (PRM1)
• Capture/compare control register 2 (CRC2)
• Timer output control register (TOC)
• CMD2 bit of timer control register 1 (TMC)
register 2 (TM2) operation is executed, the counting operation of TM2 stops, but an interrupt request is generated.
In order not to generate the interrupt when stopping the operation of TM2, mask the interrupt in advance by using the
interrupt mask register before stopping TM2.
Example
Program that may generate interrupt request
CLR1 CE2
OR
MK0H, #03H
Interrupt request
from timer/counter 2
occurs between
these instructions
CHAPTER 10 TIMER/COUNTER 2
Program that does not generate interrupt request
OR
CLR1 CE2
CLR1 CIF20
CLR1 CIF21
MK0H, #03H
Disables interrupt from timer/
counter 2
Clears interrupt request flag for timer/
counter 2

Related parts for UPD784026