0

I was using raspbian on my RPI4 till now, but decided that I dont need GUI and would be nice to try Ubuntu Server.

All fine and dandy, but Cannot for the love of god set pins 7 and 8 to low on boot, I have some stuff connected to both pins that starts acting up.

I have read, that by default, pins up to 8 have default state high, but I need 7 and 8 low on boot. Next, DToverlay is a thing I guess, but I cannot find out, how raspbian does this. Nothing in default config.txt shows me how to put pin 7 and 8 low on boot. They were low on my default raspbian installation. With Ubuntu, they are high.

Please help.

UPDATE: Tried with Raspberry PI OS Lite, but same behaviour, pins 7 and 8 are default up when I boot the RPI4, messing my device, thats connected on them.

2
  • 1
    Try switching to RaspiOS Bullseye LITE rather than Ubuntu, it's more like what you're used to and more likely to work the way you want.
    – Dougie
    Commented Feb 1, 2022 at 17:14
  • Added more info into OP, please read.
    – SubjectX
    Commented Feb 3, 2022 at 9:09

2 Answers 2

1

All GPIO are configured as INPUT; GPIO 0-8 have pullup - others pulldown.

This is a characteristic of the SoC - nothing to do with the OS.

It can NOT be changed, although Device Tree can reconfigure pins shortly after boot starts and Raspberry Pi OS has a gpio option to configure pins.

If you don't want GUI use Raspberry Pi OS - Lite.

6
  • So you are saying, that I cannot use Device Tree on ubuntu to trigger pins reconfig at boot time (or shortly after)? I like Ubuntu for some other projects.. If there is no other way, yeah, Raspberry Pi Lite is an option.
    – SubjectX
    Commented Jan 30, 2022 at 19:53
  • @SubjectX I made no comment about Ubuntu. You should be able to use Device Tree on Ubuntu. Your statement "They were low on my default raspbian installation" is incorrect; you have provided no evidence, it is possible to set pins but not at boot, they will assume default for some period.
    – Milliways
    Commented Jan 30, 2022 at 23:32
  • Do you have an insight how on Raspbian this is done? I swear, I was using Raspberry Pi OS without any modifications on my own and pins 7 and 8 were low, when I rebooted.
    – SubjectX
    Commented Jan 31, 2022 at 9:10
  • You have provided no evidence for your assertion. I use my GPIOreadall to display GPIO state, but raspi-gpio get should work on Raspberry Pi OS (although no so user friendly). NOTE post into Your Question, not Comments
    – Milliways
    Commented Jan 31, 2022 at 9:59
  • I have tried RPI OS Lite with same effect. I don't know how my previous installation didn't have this problem :(
    – SubjectX
    Commented Feb 3, 2022 at 9:11
0

Adding dtoverlay

dtoverlay=spi-gpio40-45

to config.txt in Raspberry Pi OS Lite (bullseye) fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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