AN1915D Freescale Semiconductor / Motorola, AN1915D Datasheet - Page 20

no-image

AN1915D

Manufacturer Part Number
AN1915D
Description
3-Phase BLDC Motor Control with Quadrature Encoder using DSP56F80x
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
20
Software Design
Note:
5.2 Software Implementation
The general software diagram shows the Main routine entered from Reset and the interrupt states (see
Figure
The Main routine initializes both the DSP and the application, then goes into an infinite background
loop. This loop contains an application State Machine.
The following interrupt service routines are utilized:
PWM Gen 0,2,4
PWM Gen 1,3,5
PWM 0,2,4
PWM 1,3,5
5-3).
In complementary switching mode, it is necessary to use the software control feature for
masking. For independent mode, it is possible to use the masking feature in the PWM Channel
Control Register. This feature works properly in independent mode only.
Compare (TimerA0) - services signals generated by the Quadrature Encoder
Input Capture ISR (TimerA1) - services period measurement for speed calculation
Timer ISR - services the speed controller and LED diode blinking
Push Button Up ISR and Push Button Down ISR - services the Up and Down push buttons
SCI ISR - services communication with the PC master software
Figure 5-2. PWM Swapping and Masking for BLDC Motor
3-Phase BLDC Motor Control with Quadrature Encoder
Freescale Semiconductor, Inc.
For More Information On This Product,
T
PWM
Go to: www.freescale.com
+1/2 U
+1/2 U
-1/2 U
-1/2 U
SWAP 0-1 or 2-3 or 4-5
A
A
B
B
C
C
MASK 0-1 or 2-3 or 4-5
MOTOROLA

Related parts for AN1915D