cancel
Showing results for 
Search instead for 
Did you mean: 

STSPIN32F0 gate driver HS open by default

neoxic
Associate II

I'm trying to adapt a piece of BLDC control firmware that already works for the STM32F0 family for use with an STSPIN32F0 chip using a STEVAL-SPIN3201 board. But for some weird reason, I am unable to figure out what's going on with the gate driver, and the manual doesn't shed any light on this.

According to the manual, the gate driver must first be enabled by asserting F0 or F1 (or both) high. The high side is connected to pins A8,A9,A10 whereas the low side is connected to B13,B14,B15.

But as soon as I run this little snippet:

void main(void) {
    RCC_AHBENR = RCC_AHBENR_GPIOFEN;
    GPIOF_ODR = 0xc0; // F6,F7=11
    GPIOF_MODER = 0x00005000; // F6,F7 (push-pull)
    for (;;) {}
}

... the HSU, HSV and HSW pins go high, i.e. the high side mosfets become open. There's no way to physically check what's going on on the pins between to MCU and the driver since they are both one chip, but logically they must be floating, and there are also internal pull-downs on all of them. Why is the high side open by default? What's driving it high?

Obviously, I also tried properly enabling TIM1 via setting appropriate AF bits, etc. The result is the same - the HS gate is open by default instead of being HighZ. In other words, how do I make a phase floating with this chip on this board? Please advise! Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
neoxic
Associate II

Ok, it looks like it's a self-induced screw-up.:-) I was measuring with respect to ground instead of OUTx.

View solution in original post

1 REPLY 1
neoxic
Associate II

Ok, it looks like it's a self-induced screw-up.:-) I was measuring with respect to ground instead of OUTx.