beautypg.com

Motorola M68HC08 User Manual

Page 95

background image

Software Design

State Diagram

DRM028 — Rev 0

Designer Reference Manual

MOTOROLA

Software Design

95

the over-current detection. The CMD_F (current measurement done)
flag indicates that the new value of dc-bus current is ready to be
processed by the current controller.

The time-out (software timer 3) of this state is defined in the software
by the constants: PER_T_ALIGN and PER_BASE_T3_ALIGN.

Current Controller

The current controller subroutine is called every PER_CS_T1_US

µs

(128

µs with default software setting) after a new value of the dc-bus

current has been obtained (CMD_F=1). It sets all six PVALx register
pairs to get the right PWM ratio for the required current.

Timer 1 Interrupt

Once the synchronization of OC function with the PWM cycle has
been achieved, it must be maintained because the current
measurement is initiated here.

Over-Current Detection

The dc-bus current is periodically sensed and the over-current
condition is evaluated. After a defined number successive
over-current events I_CNTR_OVC, the control flow enters into the
fault state.

5.5.5 Back-EMF Acquisition State

The back-EMF acquisition state provides the functionality described in

3.3.1.4 Starting (Back-EMF Acquisition)

and

3.3.1.5 Starting —

Commutation Time Calculation

.

Figure 5-10

shows the state

transitions for the state.

First Commutation

After the align state time out expires, voltage is applied to another
phase pair. The first commutation is made and the PWM duty cycle is
constant. This value has been defined by the current controller during
the Aalign state.

The calculation of the commutation time is explained in

3.3.1.5

Starting — Commutation Time Calculation

.

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

.

..