AN1910 Freescale Semiconductor / Motorola, AN1910 Datasheet - Page 18

no-image

AN1910

Manufacturer Part Number
AN1910
Description
3-Phase AC Motor Control with V/Hz Speed Closed Loop Using the DSP56F80X
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Software Design
6.2 State Diagram
6.2.1 Initialization
18
Wrong Hardware: In case wrong hardware is identified (different power module or missing
optoisolation board) during initialization, DriveFaultStatus variable is set to Wrong_Hardware.
If any of the above mentioned faults occurs, program run into infinite loop and waits for reset. Fault is
signalled by user LEDs on controller board and on PC Master control screen.
The general state diagram incorporates the main routine entered from reset, and interrupt states. The
main routine includes the initialization of the DSP and the main loop. The main loop incorporates
initialization state, application state machine and check run/stop switch state.
The interrupt states provides calculation of the actual speed of motor, PWM reload interrupt, ADC
service, Limit analog values handling, over current and over voltage PWM fault handler, and so on.
The main routine provides initialization of the DSP:
The board identification routine identifies the connected power stage board by decoding the identified
message send from the power stage. If the wrong power stage is identified, the program goes to the
infinite loop, displaying the fault status on the LED. The state can be left only by the RESET.
Initializes the PLL clock
COP and LVI are disabled
Identifies connected hardware
Initializes analog-to-digital converter
Initializes POSIX timers for speed ramp and LED handler
Initializes PWM module:
— Center aligned complementary PWM mode, positive polarity
— Sets callback for PWM reload to (every 4th. PWM pulse)
— Sets callback for PWM faults
— Sets of PWM modulus - (defines the PWM frequency)
— enables fault interrupts
Sets-up I/O ports (push buttons, switch, brake)
Initializes quadrature decoder for speed measurement
Initializes algorithms (V/Hz look-up table, sinewave generator)
Enables interrupts
3-Phase AC Motor Control with V/Hz Speed Closed Loop
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com

Related parts for AN1910