U S E R M A N U A L
Jan 26, 2015, AN709-00011-1v0-E
13
5.3
Interrupt Generation
The diagram of the interrupt used for the motor control is briefly introduced in this section.
5.3.1
MFT
The multifunction timer is used to generate the interrupt for the motor control algorithm execution, and
trigger the AD sample at the zero point.
Figure 5-2: Free Run Timer Interrupt
5.3.2
Encoder Capture
The PWC timer is used to capture the encoder A/B signal and calculate pulse-width of the edge of A/B.
Figure 5-3: Encoder Capture with Base-Timer
H
L
One motor mechanical cycle
Encoder A/B signal Voltage High or Low level
Measure completion
Motor
speed
calculate
and
rotor phase angle
core
Base timer Count Over Flow
ISR_MFT_FRT
Free run timer 0, UP/DOWN mode, PWM cycle: 66.7
µs
, 15K Hz
Trigger AD unit0 and FOC interrupt
A/D unit0: sample U, V,
W current
FOC interrupt to drive
motor