Motorola M68HC08 User Manual
Page 98
Software Design
Designer Reference Manual
DRM028 — Rev 0
98
Software Design
MOTOROLA
Service of Commutation
As already explained, the motor phase commutation is performed in
the OC interrupt service routine. The phase commutated flag
(PC_F=1) indicates this action to the scheduler, which allows the
performed commutation to be serviced. Detailed explanation of this
state is in
Processes Commutation and Zero Crossing Preset and
Set
.
Service of Received Back-EMF Zero Crossing
The back-EMF zero crossing is detected by PWM middle function
block. Then the appropriate flag (captured received the zero crossing
event - ICR_F) is set by PWM centre interrupt service routine. This
indicates to the scheduler that the zero crossing event must be
served.
The following actions are taken:
1. Commutation parameters are recalculated more precisely based
on the received feedback
2. Commutation time is preset to the output compare register of timer
2
For a better understanding of how the commutation process works,
see
3.3.1 Sensorless Commutation Control
— Commutation Time Calculation
).
BEMF Zero Crossing Sensing Interrupt Service Routine
This ISR is used to evaluate the back-EMF zero crossing. Back-EMF
is evaluated here in order to synchronize zero crossing capture with
the middle of central-aligned PWM. This technique rejects the noise
caused by PWM from the back-EMF signal. When this ISR is initiated,
then three samples of the zero crossing input (BEMF_IN) are taken
and the state is evaluated. Based on the expected edge (V_TASC2,
ELS2A_ELS2B) and the evaluated state of the BEMF_IN pin, the
zero crossing event is verified. If it is accepted, then the captured time
is stored in variable (T_ZCros) and the PWM ISR is finished. The
appropriate flag (captured received the zero crossing event — ICR_F)
is set.
Current Measurement Interrupt Service Routine
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..