2023-11-18 02:19 AM - edited 2023-11-18 02:46 AM
Hello Community,
given is this circuit:
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:
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?
Solved! Go to Solution.
2023-11-18 02:39 AM
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.
2023-11-18 02:28 AM
Are you sure R is 10k?
2023-11-18 02:29 AM
yes, i just edited my posting because I forgot to mention that. I measured it with the multimeter and it is 10k
2023-11-18 02:39 AM
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.
2023-11-18 02:45 AM
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
2023-11-19 07:09 AM
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".
2023-11-19 10:09 AM
thanks for the hint, I appreciate it. This one "sliped through" ...