Motorola M68HC08 User Manual
Page 54
BLDC Motor Control
Designer Reference Manual
DRM028 — Rev 0
54
BLDC Motor Control
MOTOROLA
unsigned int Switch_Start : 1; /* BIT0 Switch START/STOP
set to START Flag */
unsigned int Running : 1;/* BIT1 Motor is running (Alignment,
Start
or
Running state) */
unsigned int BIT2 : 1; /* BIT2 RESERVED */
unsigned int V120 : 1; /* BIT3 120 V DC-Bus detected
(only for HV DC-Bus) */
unsigned int BIT4 : 1; /* BIT4 RESERVED */
unsigned int BIT5 : 1; /* BIT5 RESERVED */
unsigned int BIT6 : 1; /* BIT6 RESERVED */
unsigned int BIT7 : 1; /* BIT7 RESERVED */
} B;
/* |***|***|***|***|V120|***|Running|Switch_Start| */
char R;
} Motor_Status_Def;
/* PC master software Motor Status Flags register Definition */
typedef union
{
struct
{
unsigned int OverCurrent : 1;
/* BIT0 Over-Current
Failure */
unsigned int OverHeating : 1;
/* BIT1 Over-Heating */
unsigned int VoltageFailure : 1; /* BIT2 Over-Voltage */
unsigned int BIT3
: 1;
/* BIT5 RESERVED */
unsigned int BIT4
: 1;
/* BIT4 RESERVED */
unsigned int BIT5
: 1;
/* BIT6 RESERVED */
unsigned int BoardIdFail : 1;
/* BIT6 pcb Identification
Failure */
unsigned int ErrCmt : 1; /* BIT7 error Commutation */
} B;
/*
|ErrCmt|***|***|***|***|VoltageFailure|OverHeating|OverCurrent|
*/
char R;
} Failure_Def; /* Failure Flags register Definition */
declares if the variable is used as an output or input from the
BLDC control MCU software side. The variable is described and the unit
defined.
When PC master software mode is set, the system start and stop is
controlled by StartCtrl flag in
Motor_Ctrl
variable. When the application
enters the fault state, the variable Failure displays the fault reason.
Setting the ClearFail flag in
Motor_Ctrl
will exit the fault state.
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
.
..