cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-STSPIN3201 Switch off both high and low side MOSFET simultaneously

ARaj.1
Associate II

Hi,

I am trying to implement simple six step motor control using the STEVAL-STSPIN3201 board. However in order to do this I need to be able to switch off both the high and low side MOSFETS in one of the three phases U,V or W. For example for the first commutation I need HSU to be on, LSV to be on while HSW and LSW need to be off, so that only the coils from U to V conduct. However I am running into a problem where I can't switch off both HSW and LSW simultaneously, the outputs from these pins are always complementary. I have tried configuring them as GPIO pins, with pulldown set to low and I still can't get for example HSW & LSW, HSV & LSV, HSU & LSU low simultaneously. Any help to achieve this is appreciated.

8 REPLIES 8

Switch both pins to GPIO Output in GPIO_MODER, then they will have output given by respective pins in GPIO_ODR.

JW

Hi I have done this already. The corresponding pins PA8 (HSU), PA9 (HSV) and PA10 (HSW) are set to GPIO Output (0x01) and in ODR these bits are set to 0, and this hasn't worked.

You say these pins stayed high or they remained toggling?

Read out and check/post the relevant GPIO registers content.

JW

So if I have both highside (HSU) and lowside (LSU) off in the ODR, but still on the HSU Mosfet gate I get a high voltage. If write high to the LSU port then the HSU goes low. I get the impression this is because of some interlocking feature in the gate driver logic and that the board is built only for FOC and doesn't support six step. I need someone to just confirm this before purchasing STEVAL-STSPIN3202.

Okay so you are talking about the output of the driver, not outputs of the STM32, correct?

What is the driver? What does its datasheet say in this regard?

JW

Laurent Ca...
Lead II

Dear @ARaj.1​ 

Do you have still this problem to solve?

Best regards

Laurent Ca...

ARaj.1
Associate II

We decided to go with FOC, but if we can use 6-step on the board in the future that would be great. So if you have an answer that would be greatly appreciated!

Laurent Ca...
Lead II

Dear @ARaj.1​ 

I have heard that there are plans to have some "6-step" features in the next major version of the STM32 MC SDK but there is currently no release date for this one.

For now, you can take a look at the "6-step" example included in SDK 5.4.4.

Sorry to not be able to help you more.

Best regards

Laurent Ca...