Main software flowchart, Owcharts are shown in, Figure 5-4 – Motorola M68HC08 User Manual
Page 84
Software Design
Designer Reference Manual
DRM028 — Rev 0
84
Software Design
MOTOROLA
Figure 5-4. Main Software Flowchart
In the Stand-By state function, the start/stop switch is checked using
StSWReadStart () function. The DecideStaSto () function is called to
decide if the application should start. The start condition differs if manual
or PC master software mode is set. When in manual mode (PCMode =
0), the start condition is the switch in the start position. When PC master
software mode (PCMode = 1), the start condition is a start request from
PC master software (StartCtrl = 1). In both modes, Stop_F is cleared
when the software evaluates the start condition. When Stop_F is
cleared, the software checks the over-voltage condition and the
application starts.
The system Alignment and Starting (Back-EMF Acquisition) states
are provided by Alignment() and Start () functions in the code_start.c
file, both are called from main(). The functionality during the start and
running state is described in
3.3.1 Sensorless Commutation Control
During the starting (back-EMF acquisition) state, the commutation time
RESET
MCU INITIALIZATION:
– SYSTEM REGISTERS INITIALIZATION
– PORTS INITIALIZATION
– PLL — CPU CLOCK INITIALIZATION
– PC MASTER SOFTWARE (PORT)
INITIALIZATION
APPLICATION INITIALIZATION:
– CURRENT OFFSET CALIBRATION
– SYSTEM REGISTERS INITIALIZATION
– PWM INITIALIZATION
– TIMER 1 CURRENT SENSING TO PWM
SYNCHRONIZATION
– ADC MEASUREMENT INITIALIZATION
MAIN S/W LOOP:
– SEE
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..