02.08.2013 Views

Three-phase Sensorless BLDC Motor Control Kit with the MPC5606B

Three-phase Sensorless BLDC Motor Control Kit with the MPC5606B

Three-phase Sensorless BLDC Motor Control Kit with the MPC5606B

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Software Implementation<br />

20<br />

executed before main<br />

executed in ISR<br />

READY<br />

READY READY<br />

on<br />

on<br />

exit<br />

exit<br />

to<br />

to<br />

CALIB:<br />

CALIB:<br />

- - PWM PWM output output enable enable<br />

e_ready<br />

e_calib<br />

READY<br />

e_app_on<br />

CALIB CALIB<br />

e_reset<br />

reset<br />

e_init_done<br />

e_fault<br />

e_app_off<br />

e_fault<br />

e_reset_done<br />

e_fault<br />

RESET<br />

e_fault<br />

INIT INIT<br />

e_fault_clear<br />

FAULT<br />

FAULT<br />

FAULT FAULT<br />

on<br />

on<br />

entry:<br />

entry:<br />

- - PWM PWM output output disable disable<br />

RESET RESET<br />

on<br />

on<br />

entry:<br />

entry:<br />

ISR ISR disable disable<br />

on on exit: exit:<br />

- - ISR ISR enable enable<br />

INIT<br />

INIT INIT<br />

on<br />

on<br />

entry:<br />

entry:<br />

- - PWM PWM output output disable disable<br />

ALIGN<br />

Figure 14. Application state machine<br />

The application state machine consist of <strong>the</strong> following eight states selected using <strong>the</strong> variable state defined<br />

as AppStates enumeration type:<br />

• RESET state = 0<br />

• INIT state = 1<br />

• FAULT state = 2<br />

• READY state = 3<br />

• CALIB state = 4<br />

• ALIGN state = 5<br />

• START state = 6<br />

• RUN state = 7<br />

To signalize or initiate a change of <strong>the</strong> state, fifteen application events are defined and selected using<br />

<strong>the</strong> variable event defined as AppEvents enumeration type:<br />

• e_reset - event = 0<br />

• e_reset_done - event = 1<br />

• e_fault - event = 2<br />

• e_fault_clear - event = 3<br />

• e_init_done - event = 4<br />

• e_ready - event = 5<br />

e_app_off<br />

e_app_off<br />

3-<strong>phase</strong> <strong>Sensorless</strong> <strong>BLDC</strong> <strong>Motor</strong> <strong>Control</strong> Development <strong>Kit</strong> <strong>with</strong> Qorivva <strong>MPC5606B</strong> MCU, Rev. 0<br />

e_fault<br />

e_app_off<br />

e_fault<br />

e_fault<br />

Before each execution of <strong>the</strong> stateMachine<br />

<strong>the</strong> faultDetection() routine must be called<br />

to perform a fault check !!!<br />

RUN<br />

e_start_done<br />

START<br />

START<br />

e_align_done<br />

e_align<br />

e_run<br />

e_start<br />

faultDetection()<br />

faultDetection<br />

faultDetection()<br />

faultDetection<br />

faultDetection()<br />

faultDetection ()<br />

Freescale Semiconductor

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!