cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO input external pullup question

TLin.5
Associate III

Testing a board with STM32U5A5.

 

VDD is 3.3V

I have configured one GPIO as input with an external pullup to 3.3V through a 470k ohm resistor.
The input reads high, but when I measure the input with a scope, I read 2.2V on the input, which is below 0.7VDD which is guaranteed as V_IH, but above 0.5VDD+0.2 which is specified by design as V_IH.

Is 470k ohm too high of a pullup resistance?

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead III

It sounds like you are using a x1 oscilloscope probe.

These have 1 Megohm input impedance, so 1 MΩ to ground.

Combined with 470k to +3.3V, I would expect about 2.2V on the pin.

Remove the probe and the voltage will go back up to 3.3V (but you won't see it!)

Many 'scope probes are switchable x1 / x10. If you switch it to x10 you should see perhaps 3.0 V (but might have to tell the 'scope that you're using x10, or scale what you see on the screen).

Imho 470k is a little high for comfort, particularly if the track to the pin is fairly long, as it might pick up electrical interference. Where I have had to use high value pull-up resistors for extremely low-power operation where e.g. a toggle-switch might pull the pin low (perhaps 10 MΩ) I might add a 1nF or 10nF capacitor to ground to kill any electrical interference. It killed the speed of response but was acceptable for that job.

View solution in original post

8 REPLIES 8
mƎALLEm
ST Employee

Hello,

Yes 470k is too high. It is may be seen as almost Hi-Z from the input side.

The range between 4.7k to 47k is acceptable. But consider the power consumption. The lowest pull-up value the more the current consumption you get.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
TDK
Super User

470 kOhm should allow it to be pulled up. You may have something else going on there.

What happens when you use the internal ~40 kOhm pullup on the pin?

If you feel a post has answered your question, please click "Accept as Solution".
Ozone
Principal II

> 470 kOhm should allow it to be pulled up. You may have something else going on there.

I would agree. Without any load, this 470k resistor should safely pull it up to Vdd level.

The 0.7V is what one would expect from a divider between this external 470k and an internal pull-down of about 50k.
Seems you have pull-down enabled on this pin.

 

Danish1
Lead III

It sounds like you are using a x1 oscilloscope probe.

These have 1 Megohm input impedance, so 1 MΩ to ground.

Combined with 470k to +3.3V, I would expect about 2.2V on the pin.

Remove the probe and the voltage will go back up to 3.3V (but you won't see it!)

Many 'scope probes are switchable x1 / x10. If you switch it to x10 you should see perhaps 3.0 V (but might have to tell the 'scope that you're using x10, or scale what you see on the screen).

Imho 470k is a little high for comfort, particularly if the track to the pin is fairly long, as it might pick up electrical interference. Where I have had to use high value pull-up resistors for extremely low-power operation where e.g. a toggle-switch might pull the pin low (perhaps 10 MΩ) I might add a 1nF or 10nF capacitor to ground to kill any electrical interference. It killed the speed of response but was acceptable for that job.

TLin.5
Associate III

Shame on me after looking into further...

The oscilloscope probe itself affected the measurement at 1x as it's only 1Mohm at that point...

At 10x (10Mohm) I get a better measurement.

I suppose the oscilloscope probe itself turned out to be a pulldown in this case...
D'oh.

Maybe change the accepted solution since 470 kOhm is fine for a pullup.

If you feel a post has answered your question, please click "Accept as Solution".
TLin.5
Associate III

Changed solution.