AN1627 Freescale Semiconductor / Motorola, AN1627 Datasheet - Page 13

no-image

AN1627

Manufacturer Part Number
AN1627
Description
Low Cost High Efficiency Sensorless Drive for Brushless dc Motor Using MC68HC (7)05MC4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
5.2
The software is divided into several main routines: INIT, START, BODY and INTERRUPT SERVICE
ROUTINES (ISR). Several common subroutines are called throughout these routines and are described
in more details later in Section 5.2.4. The Figure 5-1. shows the sequence of the routines.
5.2.1
INIT does all necessary initialization before the drive is started.
Ports initialization:
A/D initialization:
PWM initialization:
Timer Output Compare
Function initialization:
Input Capture Function
initialization:
Current
initialization:
Finally, interrupts are enabled.
AN1627
REV 0.2
INIT
Main routines
INIT
Wait until START
button is pressed
Controller
ISR
Timer Output Compare (DC-Bus current measurement, Over-current Detection)
Align
1s
Freescale Semiconductor, Inc.
PA1-6 - PWM output
PB5-7 - output
PC0-7- inputs
PD6-7- inputs
The DC-Bus current zero value and DC-Bus voltage limits (high and low)
are tested in order to prevent the drive from being damaged. The speed
setting is sampled.
After the START switch is turned on (see Figure 5-1.) the initialization con-
tinues.
Sets
(POLA=POLB=0). The time point for synchronization of the current meas-
urement with the PWM is taken. The pointer for commutation look-up
table is initialized.
Software Timer1 is synchronized with PWM in order to handle the internal
A/D converter. Software Timer2 (creates commutation period) is initial-
ized.
The Input Capture Function and input pin (TCAP2) are initialized.
All registers used by PI type of Current Controller are cleared.
For More Information On This Product,
Current Controller
Ramp-up
the
- main routine
- routine
- interval where a subroutine is called
Figure 5-1.
<5s
Go to: www.freescale.com
PWM
frequency
Program Flow
0.1s
Timer Input Capture 2
PLL Acquisition
(3.9kHz)
2-3s
and
PLL Locked
BODY
program flow
the
PWM
MOTOROLA
polarity
13

Related parts for AN1627