Main Software Flowchart - Motorola M68HC08 Reference Manual

Sensorless bldc motor control using the mc68hc908mr32
Hide thumbs Also See for M68HC08:
Table of Contents

Advertisement

5.4 Main Software Flowchart

DRM028 — Rev 0
MOTOROLA
Freescale Semiconductor, Inc.
3.2.5 Back-EMF Sensing
provided by the multiplexer setting.
As shown in
Figure
5-2, the commutation and back-EMF zero crossing
selection process is split into two actions:
Preset commutation and zero crossing selection
The preset means setting the buffered registers and RAM
variables for commutation
Set commutation and zero crossing selection
The setting means loading the registers with buffered variables
The implementation is described in
BLDC Commutation and Zero Crossing
The main software flowchart incorporates the main routine entered from
the reset and interrupt states. The main routine includes initializing the
MCU and the main loop. The flowcharts are shown in
Figure
5-5, and
Figure
MCU Initialization is entered only after system reset. It provides
initialization of system registers, ports, and CPU clock. The MCU
Initialization is provided in MCUInit() function.
After MCU Initialization the Application Initialization is executed as
AppInit() function, which performs the following actions. First the zero
current offset of the dc-bus current measurement path is calibrated. This
offset on the ADC input should be 1.65 V at zero current. This is
implemented in the hardware design, in order to be able to measure
negative and positive current values. The status registers are initialized
and PWM generator is started. Also, timer 1 is started at the right
moment to be synchronized with the PWM generator. This way the
current measurement is executed at the defined moment of the PWM
signal.
Software Design
For More Information On This Product,
Go to: www.freescale.com
Circuit.The zero crossing selection is
Implementation Notes
Selection.
5-6.
Software Design
Main Software Flowchart
-
5.6.2
Figure
5-4,
Designer Reference Manual
83

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908mr32

Table of Contents