cancel
Showing results for 
Search instead for 
Did you mean: 

How can I turn on low side PWM idle state on STM Workbench?

SkyWork
Associate III

Hi, I would like to ask how to turn on low side pwm during idle state ?

I use workbench (5.3.2) to change "Low side PWM idle state" from "Turn-off" to "Turn-on"

After generating code , i will get compiler error as the following

#error "Error: LOW_SIDE_IDLE_STATE in driver_parameters.h must be false (TURN_OFF)."

Does it means that i need to add the following in driver_parameters.h

#define LOW_SIDE_IDLE_STATE false

and mark #error "Error: LOW_SIDE_IDLE_STATE in driver_parameters.h must be false (TURN_OFF)." in parameters_conversion_f30x.h

1 ACCEPTED SOLUTION

Accepted Solutions
Dario CUCCHI
ST Employee

Hi @SkyWork​ ,

Consider that having the low side MOSFETs always on during the idle state, means that the motor is always braked.

Then, be sure that the driver you are using has an interlocking function, to avoid cross conduction.

It means that even if you set both the HS input and the LS input high, the drivers do not turn on together.

In general it is better to have all the power stage off during the idle state.

So, to avoid any potential issue, the #error directive is inserted in the code whenever you try to change the idle state.

However according to the motor driver used it is possible to use the idle state high for the low side.

Which driver/evaluation board are you using ? Can you share the part number ?

You can check on your board what described above and if you are ok with it, create your project as you have already done, changing the "Low side PWM idle state" from "Turn-off" to "Turn-on".

After code generation you can just comment the line:

#error "Error: LOW_SIDE_IDLE_STATE in driver_parameters.h must be false (TURN_OFF)."

Try to to compile and download the code and let me know if it works.

View solution in original post

4 REPLIES 4
Dario CUCCHI
ST Employee

Hi @SkyWork​ ,

Consider that having the low side MOSFETs always on during the idle state, means that the motor is always braked.

Then, be sure that the driver you are using has an interlocking function, to avoid cross conduction.

It means that even if you set both the HS input and the LS input high, the drivers do not turn on together.

In general it is better to have all the power stage off during the idle state.

So, to avoid any potential issue, the #error directive is inserted in the code whenever you try to change the idle state.

However according to the motor driver used it is possible to use the idle state high for the low side.

Which driver/evaluation board are you using ? Can you share the part number ?

You can check on your board what described above and if you are ok with it, create your project as you have already done, changing the "Low side PWM idle state" from "Turn-off" to "Turn-on".

After code generation you can just comment the line:

#error "Error: LOW_SIDE_IDLE_STATE in driver_parameters.h must be false (TURN_OFF)."

Try to to compile and download the code and let me know if it works.

SkyWork
Associate III

Hi @Dario CUCCHI​ 

Thanks for your reply.

Which driver/evaluation board are you using ?

==> We use our own board (based on ihm08m1 to design), the driver chip is the same (L6398)

I will try and let you know the resutl

thanks

Laurent Ca...
Lead II

Dear @Dario CUCCHI​ 

Any answer to the @SkyWork​'s question or a positive result after the solution he proposed?

Or maybe you no longer have this problem, in this case please indicate it here.

Thank you in advance.

Best regards

Laurent Ca...

SkyWork
Associate III

Hi @Laurent Ca...​  and @Dario CUCCHI​ ​

So currently i can't just fix the angle to achieve six steps?