1

I just switched from Raspberry Pi 3 to 4, which I use to control some devices. I just discovered that whenever Raspberry pi 4 boots, it changes the pi state of GPIO pin number 3 very fast from low to high to low, which ruins my application.

Is there a way to fix this? Or is this a bug in Pi 4?

  • GPIO 3 pulls high by default: elinux.org/RPi_BCM2835_GPIOs I'm not sure that this can be overridden (without additional hardware) until the kernel loads (at which point different defaults/a device tree scheme takes over), which is why it may go very quickly from one state to another. The "additional hardware" solution would be an external pull-down. – goldilocks Dec 24 '19 at 13:53
  • @goldilocks But this doesn't happen with GPIO pins 1 or 2. Only 3! That table doesn't seem to distinguish between 1, 2 or 3, or am I mistaken? – The Quantum Physicist Dec 24 '19 at 13:56
  • Not all of them have the same default state, which may provide a solution to your problem. "That table doesn't seem to distinguish" -> I'm not sure what you mean; there are 53 GPIOs listed there, one per row. Note that not all of them are on the breakout. – goldilocks Dec 24 '19 at 14:09
  • @goldilocks I mean 1,2,3,4,5,6,7,8 all pull high by default based on that table. I gather that my only solution is to use another GPIO. Hopefully the ones with "low" in the table will not have this problem. Thanks for the info. – The Quantum Physicist Dec 24 '19 at 14:15
1

Both ports 2 and 3 were having this problem. I moved to another two ports (4, 17) and that fixed the issue. I don't know why 2 and 3 are cursed.

0

Pins 3,5 on ALL model Pi (GPIO2,3 on 40 pin Pi) have 1.8kΩ pullups on the board, so the state of internal pullups is irrelevant!

They can ONLY be pulled LOW by programming the pin as OUTPUT - this will never happen unless you do something explicit to cause it.

If you have enabled I²C it may change state as SCL is setup.

In any event, using these pins for anything other than their intended purpose (I²C) requires consideration of the impact of the 1.8kΩ pullups.

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.