cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431RB PB4 GPIO Open Drain (no pullup/-down) only reaches 1.2 Volt on 10k 3V3

CBerg
Senior

Hello Community,

given is this circuit:

a.png

Typically when I use external pullup circuitry for a signal I set the corresponding GPIO to "Open Drain" and no pullup/-down as the state of the line is defined externally.

Flash_CSn is directly connected to PB4 on an G431RB. It is a single, simple almost straight trace on the PCB, without any branches. There is nothing but EMV that could have an influence on that line, except the MCU and the Resistor (R2) + Supply Voltage. But in the Scope I see no evidence for a potential EMV issue, as the signal levels are pretty clean.

In this case the GPIO-Config is:

b.png

 

The issue is: if I do it this way the line level never reaches 3.3V as it should, but reaches max. 1.2 Volt.

If I change the GPIO Configuration to Push-Pull it works as it it's supposed to work.

 

I noticed this behaviour also on an G473RC. On this board I was able to disconnect the external ADC reference, which is generated at 2.5 Volt by a CJ431. When I disconnected the ADC Reference physically the Signal Levels of the Open Drain GIPOs became normal. When I reconnected the ADC Reference the levels of the Open Drain GPIOs are pulled down to 1.2 Volt again.

I measured the supply voltage of the MCU and the ADC Reference voltage, they are as they should be.

Edit: I also measured R2, it is 10 kOhm.

Edit 2: I change the title and added PB4, so others who stumble uppon this pitfall may find it easier.

Has anyone an idea what's going on here?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Andreas Bolsch
Lead II

If you're absolutely sure that neither the mcu's nor the flash's pin had been damaged (static discharge sometimes cause mysterious effects like high leakage): The errata sheet says that there is a problem with PB4. The description is rather vage, unfortunately. Furthermore, there is a 5k pull-down active at PB4 by default, see RM, 47.4.3.

View solution in original post

6 REPLIES 6
MM..1
Chief

Are you sure R is 10k?

yes, i just edited my posting because I forgot to mention that. I measured it with the multimeter and it is 10k

 

Andreas Bolsch
Lead II

If you're absolutely sure that neither the mcu's nor the flash's pin had been damaged (static discharge sometimes cause mysterious effects like high leakage): The errata sheet says that there is a problem with PB4. The description is rather vage, unfortunately. Furthermore, there is a 5k pull-down active at PB4 by default, see RM, 47.4.3.

Danke Andreas

I guess that is the issue. I complely ignored that Pull Down.

And Yes I am sure the GPIO and the Flash Memory are OK, because it works when I set the Pin to Push Pull

David Littell
Senior III

One thing I noticed: You want FLM_CSn to be negated (i.e., voltage level high) when the GPIO's are initialized, right?  If so, the PB4 "GPIO output level" should be High, not Low as you show.  "GPIO output level" is poorly named in CubeMX and should include the word "Initial".

thanks for the hint, I appreciate it. This one "sliped through" ...