cancel
Showing results for 
Search instead for 
Did you mean: 

Pin state of STM32G431KBT in DFU boot mode

WSpar.1
Associate III

I build a custom board with the STM32G431KBT controller that drives a DC motor via a TI motor driver.

When I put the board in boot mode it drives the motor at full speed.

This only can happen when a combination of 4 pins is in a specific state.

One PWM input is low and the other high.

Disable pin I measure low.

And nSleep is somewhere around 1.7volt

I think the idea is that TI makes the sleep input a NOT Sleep to ignore all types of reset states (all-high and all-low)

But in my case it's unclear.

Why is one PWM high and the other low?

And why is nSleep at 1.7V?

What should be the pinstate of all pins in boot mode?

0693W000006HucTQAS.jpg

4 REPLIES 4
AIM65
Associate III

As far as I know from Reset released time until GPIO initialization by software time the GPIO are in 3-state, thus not predictable. For sensible ports (such motor drive or Chip Select) one usually have external pull-up or down resistor in order to enforce a known state

WSpar.1
Associate III

DFU bootmode is somehow in between Reset and GPIO init and all pins are 3 state?

AIM65
Associate III

Initializing the behaviour of each GPIO pin is a duty of the user software. If not explicitly initialized a pin is 3 state (it may exist some exceptions with specific pins). I don't know the DFU embedded code but its very unlikely it initialize the GPIO ports your application need.

Have a quick test : install a pull up resistor on Disable or a pull down on Sleep.

rgds

AIM65
Associate III

Datasheet of DRV8873H shows that Disable and Sleep pin have respectively onchip pull-up and pull-down resistor : no needs to add external ones.

nSLEEP has internal 100kΩ pull-down and is also connected through 450kΩ to nOL wich is +5V on your schematics. So assuming your DMM or scope is 1MΩ, you should measure 0.83V, not 1.7V. But either 0.83V and 1.7V are below logic high threshold of nSLEEP pin which is Vih.sleep=2.7V. So with 1.7V on nSLEEP chip is in sleep status. If not you may have a chip malfunction. Could you check value of DVDD ?, should be 5V. Do you use MLCC quality caps (such as X5R or X7R) and rated for at least 25V ?

On your schematics, is the +5V connected to something else ?, because this is an output of the DRV8873H and that should not be connected to an external +5V supply.

And , maybe the first question one should asked : does your circuit work in normal mode, I mean not DFU boot mode ?