AN1917D Freescale Semiconductor / Motorola, AN1917D Datasheet - Page 16

no-image

AN1917D

Manufacturer Part Number
AN1917D
Description
3-Phase PM Synchronous Motor Control with Quadrature Encoder Using DSP56F80x
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
16
Software Design
5.2.1 Initialization
The Main routine initializes both the DSP and the application, then enters into an infinite background
loop. This loop contains an application State Machine.
The following interrupt service routines are utilized:
The Main Routine provides initialization of the DSP:
PWM Reload ISR- services signals generated by the Quadrature Encoder and generates the
3-phase sinewave output
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 - service the Up and Down push buttons
SCI ISR - services communication with the PC master software
Disables Interrupts
Initializes DSP PLL
Disables COP and LVI
Initializes the POSIX Timer for time base reference 1 ms
Initializes the LED
Initializes the PWM module:
— Center-aligned complementary PWM mode, positive polarity
— PWM modulus - defines PWM frequency
— PWM deadtime - defines PWM deadtime
— Disable faults
Initializes Quadrature Decoder
— Sets on-chip digital filter of the Quadrature Decoder inputs
— Connects Quadrature Decoder signals to QuadTimerA
Initializes QuadTimerA - channel A0
Figure 5-2. State Diagram - General Overview
3-Phase PMSM Control with Quadrature Encoder
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
(State Machine)
Initialization
Main loop
Reset
Interrupts
MOTOROLA

Related parts for AN1917D