Download Print this page

Renesas M16C/50 Series User Manual page 379

Advertisement

M16C/5L Group, M16C/56 Group
17.4
Interrupts
The timer B2 interrupt and timer A1, A2, and A4 interrupts can be used with the three-phase motor control
timer.
17.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 12.7 "Interrupt Control" for details of interrupt control. Table 17.18 lists the Timer B2 Interrupt
Related Register.
Table 17.18
Timer B2 Interrupt Related Register
Address
005Ch
Timer B2 Interrupt Control Register
17.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 12.7 "Interrupt Control" for details of interrupt control. Table 17.19 lists Timer A1,
A2, and A4 Interrupt Related Registers.
Table 17.19
Timer A1, A2, and A4 Interrupt Related Registers
Address
0056h
Timer A1 Interrupt Control Register
0057h
Timer A2 Interrupt Control Register
0059h
Timer A4 Interrupt Control Register
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 12.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).
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
Register
Register
17. Three-Phase Motor Control Timer Function
Symbol
TB2IC
Symbol
TA1IC
TA2IC
TA4IC
Reset Value
XXXX X000b
Reset Value
XXXX X000b
XXXX X000b
XXXX X000b
Page 342 of 803

Advertisement

loading