-
Notifications
You must be signed in to change notification settings - Fork 9
OSError: [Errno 22] Invalid argument - on Buster #18
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
Comments
if you have the kernel overlay you cannot connect to it over SPI 'user space' - you can only do one or the other. |
Thanks for the quick response, @ladyada. Trying to interpret and get to a next step... Not sure if I have the kernel overlay, just installed Buster as directed.. Should I try this all as root or...? |
oh you just mean overlay, not kernel overlay. not sure what it is then, we'll leave this open for now! |
ah, yes, the touch overlay is what i mean, which i have used in the past to great success with this microcontroller. the example "make my day" script works like a charm, but now, alas, no dice. not sure what, if anything, changed. also, not really sure how to debug it.... any logs i can provide? any tips from users is much appreciated. |
thanks for assigning this/helping me out, @ladyada and @makermelissa . i did a little more debugging.. this particular error is caused after the first get version/initialization step fails. in other words, it tries to find the stmpe610 version first on this line. That version check fails (the version returned is next, it executes the following code to switch the polarity, related to this issue
it then tries to find the stmpe610 version on this line. that is when i get the below error:
|
Hi everyone, Just another quick update here. We just got the chip working by pulling "up" the MODE pin on the breakout board (aka setting it to 1). We did this physically on the board by connecting the MODE pin to an open 3.3v pin on the raspberry pi and cycling power to the controller. There is also probably a way to do it via python, which we will try next. So, it seems like our board was in I2C mode, which initially cause it to fail the version check and not find the board. Then it switched the polarity to try to initialize with...
After it ran that, for some reason it couldn't read the output it got back about the version, and it errored out with the below. So maybe there is a way for a more descriptive error message or something, or a warning about setting the controller to SPI mode...? Hope that helps, let me know if you need anything more to help debug. Thanks for the great stuff, Adafruit!! Love playing with it.
|
I've been trying various strategies to try and reproduce this error without much luck. I also found it defaulted to I2C mode and tying the mode to 3.3v and then fully shutting down the pi and restarting got it working, though I suspect removing power from the breakout for a minute or so would have also worked due to capacitors. I have tried reproducing the error with both a Raspberry Pi 4 and a Raspberry Pi Zero WH running the latest Raspberry Pi OS. I even tried forcing it to Mode 1 (which didn't work, but didn't produce the OSError). The only states I was able to get are working or I2C mode. I like your suggestion about making the error message a bit better, so I think I will go with that for the fix. |
Thanks for your efforts, @makermelissa. Hoping this will make things better for users down the road. |
Hello!
I have set up the STMPE610 on a pi zero WH running the latest version or Raspbian (buster release 10). I have installed the latest pip dependencies (Adafruit CircuitPython, Bus Device, Register). I have enabled SPI in the boot config.
Running the simpletest with sudo python3 connected to a beautiful, new Adafruit touchscreen overlay gives me the following error:
Things I have tried:
Can't wait to get my touchscreen to make my day and get my project rolling!! Any other ideas for troubleshooting this error? Happy to provide more info. Much appreciated.
The text was updated successfully, but these errors were encountered: