-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
RasPi Pico: Often (but not always) Errno 19 on i2c writes #4235
Comments
There are issues with some I2C devices. The I2C peripherals on the RP2040 do not allow zero-length writes, which are the typical way to do scanning. We are working on a workaround for that. If you remove the |
Hmm. I commented out the scan call, and I now get the same error every time! I don't think the |
Could you try some other I2C device? What is the part number of the serial LCD you are using? |
The LCD is SparkFun ID LCD-14073, running firmware version 1.4. That one is now discontinued, but LCD-16397 and LCD-16396 are the same apart from the addition of a QT/Qwiic connector if you want to test yourself. Give me a bit to scrounge up another device. |
I don't get the error at all using a 8x8 bicolor LED matrix backpack (Adafruit PID 902). I am using the |
Just tested it using the absolute newest build as of b19e7c9, and the error still happens. |
Tested again as of 15615ef, and it still happens. Sorry, but because I do not have an SWD debugger or a logic analyzer, I cannot help with anything requiring that. |
Tested using import board
import busio
from adafruit_bus_device import i2c_device
i2c = busio.I2C(board.GP17, board.GP16)
while not i2c.try_lock():
pass # Interestingly, it doesn't work without locking the bus. bus_device examples don't seem to require this.
print("i2c locked.")
lcd = i2c_device.I2CDevice(i2c, 114, False)
print("Device initted.")
lcd.write("|-") # Clear display
lcd.write("Hello, world!") # Print text
print("Text shown.") |
Try using |
|
Well... not exactly perfectly. I have to pass in |
Moving to a 6.x.x milestone since there's now a workaround. |
This doesn't appear to be fixed in Adafruit CircuitPython 6.2.0 on 2021-04-05; Raspberry Pi Pico with rp2040 I still need to use |
Which device(s) in particular? I tested a bunch. |
Could you open a specific issue for that device? It must depend on how I2C peripheral is implemented there. There are further minor fixes to I2C that are in the works upstream, but I'm not sure they would fix this. Does it work some of the time with the native I2C? |
Give me a bit to get a minimal example working.
Sometimes with |
Just opened #4621. |
I'm sometimes getting "OSError: [Errno 19] Unsupported operation" when attempting to write to an i2c device (a SparkFun Serial LCD) using a RasPi Pico.
code.py:
The error appears to be happening on line 11, according to the output. Am I trying to send an illegal character? Or is it a bug in CircuitPython?
EDIT: Oh. I suppose I should say that I am running
Adafruit CircuitPython 6.2.0-beta.2 on 2021-02-11; Raspberry Pi Pico with rp2040
. I don't know why I didn't say that in my initial comment!The text was updated successfully, but these errors were encountered: