Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pins we need are in use" error when attempting to draw image to Inky Impressions 7.3" #202

Closed
FoxtrotPerry opened this issue Sep 12, 2024 · 9 comments

Comments

@FoxtrotPerry
Copy link

Issue Description

I bumped my project to inky 2.0.0 and added gpiod and gpiodevice to the pyproject.toml and encountered the following output:

Detected 7-Colour 800x480 (AC073TC1A)
Woah there, some pins we need are in use!
  ⚠️   Chip Select: (line 8, GPIO8) currently claimed by spi0 CS0

Configuration Context

  • This error was encountered running on a Raspberry Pi 3 running Raspberry Pi OS Bookworm (64-bit).
  • This error did not occur when using RPi.GPIO version 0.7.1 and inky version 1.5.0.
@FoxtrotPerry
Copy link
Author

Was able to find that the error is coming from gpiodevice. I'm not familiar enough with raspberry pi architecture to know if is happening because I'm using a pi 3 instead of a 5. Judging by the code though, it seems like gpiodevice at least found a suitable gpiod chip on the pi 3.

@Gadgetoid
Copy link
Member

We probably need some better documentation around this, but since pins are now exclusive but Inky wants to control SPI chip select from software you might need to add the following to config.txt:

dtoverlay=spi0-0cs

@crogers3
Copy link

I'm running into the same issue after upgrading to inky 2.0.0 on a Raspberry Pi Zero W. After setting the config option above, I'm encountering a different but similar error:

Chip Select: (line 8, SPI_CE0_N) currently claimed by spi-bcm2835

@FoxtrotPerry
Copy link
Author

I'm trying the suggested fix right now as well and will report back with whether it worked for me or not!

@FoxtrotPerry
Copy link
Author

Issue was resolved after adding dtoverlay=spi0-0cs to my /boot/firmware/config.txt as @Gadgetoid suggested! For those who might come across this issue in the future - my pi's config.txt was completely stock aside from a couple of unrelated HDMI entries.

@jmkerloch
Copy link

jmkerloch commented Nov 11, 2024

I'm running into the same issue after upgrading to inky 2.0.0 on a Raspberry Pi Zero W. After setting the config option above, I'm encountering a different but similar error:

Chip Select: (line 8, SPI_CE0_N) currently claimed by spi-bcm2835

I still have this issue even after adding dtoverlay=spi0-0cs to /boot/config.txt

I also tried to create a file /boot/firmware/config.txtbut without any luck.

Did anybody manage to fix this ?

Note that I am on Bulleye not Bookworm

@Gadgetoid
Copy link
Member

I also tried to create a file /boot/firmware/config.txtbut without any luck.

Does the file already exist? Does the /boot/firmware directory? 🤔 I can't remember when it was introduced!

spi0-0cs should work for Pi Zero, though it's been a while since I fired one up 😬

@jmkerloch
Copy link

I also tried to create a file /boot/firmware/config.txtbut without any luck.

Does the file already exist? Does the /boot/firmware directory? 🤔 I can't remember when it was introduced!

spi0-0cs should work for Pi Zero, though it's been a while since I fired one up 😬

In Bulleye it's seems that the file and directory doesn't exists.

I will try with a clean install on Bookworm and Bulleye.

@jmkerloch
Copy link

I also tried to create a file /boot/firmware/config.txtbut without any luck.

Does the file already exist? Does the /boot/firmware directory? 🤔 I can't remember when it was introduced!
spi0-0cs should work for Pi Zero, though it's been a while since I fired one up 😬

In Bulleye it's seems that the file and directory doesn't exists.

I will try with a clean install on Bookworm and Bulleye.

I retry with a clean install on Bulleye and it worked. I think there might be a daemon service that could have use the port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants