2

I have discovered that BCM21 does not have pull-up resistor or at least not one controllable with the pigpio library. Is that some known fact which I have found hard to find? Or is there something working in the background preventing me to set the pull-ups?

For example how I see that BCM10 has pull-up capabilities:

pi@testpi:~ $ pigs r 20
0
pi@testpi:~ $ pigs pud 20 u
pi@testpi:~ $ pigs r 20
1

And how BCM21 doesn't have:

pi@testpi:~ $ pigs r 21
0
pi@testpi:~ $ pigs pud 21 u
pi@testpi:~ $ pigs r 21
0

Using Raspberry Pi 3 Model B V1.2

2

All the GPIO have internal pull-ups and pull-downs which can be enabled or disabled by software.

In addition GPIO 2/3 have external 1k8 pull-ups fitted.

In your case either GPIO 21 (pin 40) is damaged or it is connected to something which is pulling it low.

Check the mode of the GPIO with pigs mg 21. If it is not set as an INPUT (returned pigs value 0) then the internal GPIO hardware may be setting the GPIO level.

  • My observations were for multiple RPi units. I now took a brand-new RPi out of the box and the same applies. There could be some Raspbian process or kernel configuration preventing the pull-ups working, but this is just a wild guess and I don't know how to track this down. – user199309 Mar 12 '18 at 10:11
  • @user199309 Perhaps the auxiliary SPI is enabled, that uses GPIO 21. What does pigs mg 21 report? – joan Mar 12 '18 at 11:01
  • Yes, it was in mode 4 - SPI CLK. Manually setting mode to 0 made pull-ups work. Thank you for the tip. If you could make this tip part of your reply, then I would upvote and set your reply as the answer. – user199309 Mar 12 '18 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.