AN1913D Freescale Semiconductor / Motorola, AN1913D Datasheet - Page 32

no-image

AN1913D

Manufacturer Part Number
AN1913D
Description
3-phase BLDC Motor Control with Sensorless Back-EMF ADC Zero Crossing Detection using DSP 56F80x
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Software Design
7.
7.1 Main Software Flow Chart
32
Information of all above mentioned boards and documents can be found on:
http://mot-sps.com/motor/devtools/index.html
This section describes the design of the software blocks of the drive. The software is described in the
following terms:
For more information of the used control technique refer to
The main software flow chart incorporates the Main routine entered from Reset and interrupt states.
The Main routine includes the initialization of the DSP and the main loop. (It is shown in
and
The main loop incorporates Application State Machine - the highest software level which proceeds
settings for other software levels (BLDC motor Commutation Control, Zero Crossing Offset Control,
Speed Control, Alignment Current Control). The inputs of Application State Machine is Run/Stop
Switch state and Required Speed Omega and Drive Fault Status. Required Mechanical Speed can be
set from the PC Master or manually by Up/Down buttons.
Commutation Control proceeds BLDC motor commutation with the states described in
Section
The Speed Control detailed description is in
Current Control is described in Section
The Run/Stop switch is checked to provide an input for Application State Machine (ApplicationMode
Start or Stop).
The interrupt subroutines provide commutation Timer services, ADC starting in the PWM reload
interrupt, ADC service, ADC Zero Crossing checking, Limit analog values handling, and overcurrent
and overvoltage PWM fault handling.
The Commutation Timer ISR is used for Commutation Timing and Commutation Control and Zero
Crossing Checking.
The Speed/Alignment Timer ISR is used for Speed regulator time base and for Alignment state
duration timing.
The PWM Reload ISR is used to start ADC conversion for ADC Zero Crossing and other channels and
memorize the sampling time T_ZCSample.
The ADC Zero Crossing ISR is used to evaluate Back-EMF Zero Crossing.
The ADC completion ISR is used to read voltages, current and temperature samples from the ADC
convertor. It also sets Current control and Zero Crossing Offset Request flags when the Current
Control or Zero Crossing Offset setting are enabled.
The other interrupts
Mechanical Speed input for Application State Machine (ApplicationMode Start or Stop).
Figure
Software Design
Main Software Flow chart
Data Flow
State Diagram
Section
7-2.)
7.3.4.
(Figure
BLDC control with BEMF Zero Crossing using ADC
Freescale Semiconductor, Inc.
For More Information On This Product,
7-2) are used for System Fault handling and setting of Required
Go to: www.freescale.com
Section 7.2.6
Section 7.2.5
and Section
Section
and Section
Section
5.
7.3.8.
Section
7.3.7. Alignment
Section 5
Figure
7-1,
and

Related parts for AN1913D