cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Stop Motor when in START or ALIGN state

Roberto Giovinetti
Associate III

Hello Everyone

I'm using FOC control for a BLDC motor. It works fine, but there's a situation that I can't solve.

I'm using a trigger as input: when pressed, the motor starts and must remain running until the trigger is released. If the user press the trigger and maintin it pressed there's no problem because motor pass through IDLE->ALIGN->START->RUN states and when the trigger is released I can call MC_StopMotor1(); so motor stops.

If the user press the trigger and after a short time release it, I've to wait motor in the RUN state to call MC_StopMotor1(), because if I do that with motor in the state ALIGN, START or START_RUN, it stops but next time I'll call MC_StartMotor1(), the system will be stucked in IDLE_START state, and precisely in the R3_2_CurrentReadingPolarization() function, in r3_2_f30x_pwm_curr_fdbk.c file.

I've tried to cheat the state machine generating a B2G event via software (break event that is generated by an overcurrent), but the same result has been occurred: when i try to restart motor via MC_StartMotor1() sofwatre will be stucked in the same situation.

Any idea to workaround this problem?

Roberto

2 REPLIES 2
cedric H
ST Employee

Hello @Roberto Giovinetti,

Could you tell us which SDK version do you use ?

Regards

Cedric​

Hello Cedric: It is a project from two years ago, and so I used 5.4.1

Roberto