AN1915D Freescale Semiconductor / Motorola, AN1915D Datasheet - Page 21

no-image

AN1915D

Manufacturer Part Number
AN1915D
Description
3-Phase BLDC Motor Control with Quadrature Encoder using DSP56F80x
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MOTOROLA
5.2.1 Initialization
The Main Routine provides initialization of the DSP:
Disables Interrupts
Initializes DSP PLL
Disables COP and LVI
Initializes the POSIX Timer for a time base reference of 1ms
Initializes 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 the on-chip digital filter of the Quadrature Decoder inputs
— Connects Quadrature Decoder signals to Quad TimerA
Initializes Quad TimerA - channels A0
— set Count Mode to Quadrature Count
— set Input Source to Input 1
— set Input Polarity to Normal
— set Secondary Input Source to Input 0
— set CountFrequency to Repeatedly
— set Count Length to Past Compare
— set Count Direction to Down
— disable Capture Mode
— associate Callback On Input Edge to ISRQTimer
3-Phase BLDC Motor Control with Quadrature Encoder
Figure 5-3. State Diagram - General Overview
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
(State Machine)
Initialization
Main loop
Reset
Interrupts
Software Design
21

Related parts for AN1915D