R01UH0136EJ0210 Rev.2.10
Page 364 of 800
Jul 31, 2012
M16C/64A Group
19. Three-Phase Motor Control Timer Function
19.4
Interrupts
The timer B2 interrupt and timer A1, A2, and A4 interrupts can be used with the three-phase motor control
timer.
19.4.1
Timer B2 Interrupt
When the setting value in the ICTB2 register is n, a timer B2 interrupt request is generated at the
timings below. For details, refer to the specifications and usage examples of each mode.
In triangular wave modulation three-phase mode 0 and sawtooth wave modulation mode, an interrupt
request is generated at the nth count of timer B2 underflow.
In triangular wave modulation three-phase mode 1, an interrupt request is generated at the nth count of
timing selected by setting bits INV01 to INV00 in the INVC0 register.
Refer to 14.7 “Interrupt Control” for details of interrupt control. Table 19.19 lists the Timer B2 Interrupt
Related Register.
19.4.2
Timer A1, A2, and A4 Interrupts
A timer Ai interrupt request is generated at the falling edge of timer Ai one-shot pulse (internal signal)
(i = 1, 2, 4). Refer to 14.7 “Interrupt Control” for details of interrupt control. Table 19.20 lists Timer A1,
A2, and A4 Interrupt Related Registers.
In the timer Ai interrupt, when the TMOD1 bit in the TAiMR register is changed from 0 to 1 (from timer
mode or event counter mode to one-shot timer mode, PWM mode, or programmable output mode), the
IR bit in the TAiIC register is occasionally becomes 1 (interrupt requested). Thus, when changing the
TMOD1 bit, follow the steps below. Also refer to 14.13 “Notes on Interrupts”.
(1) Set bits ILVL2 to ILVL0 in the TAiIC register to 000b (interrupt disabled).
(2) Set the TAiMR register.
(3) Set the IR bit in the TAiIC register to 0 (interrupt not requested).
Table 19.19
Timer B2 Interrupt Related Register
Address
Register
Symbol
Reset Value
Timer B2 Interrupt Control Register
Table 19.20
Timer A1, A2, and A4 Interrupt Related Registers
Address
Register
Symbol
Reset Value
Timer A1 Interrupt Control Register
Timer A2 Interrupt Control Register
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...