I2C broken on RPi Pico-w v1.20.0-50-g786013d46 (and previous 1.20.0) #11429
-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
I confirm that it fails with the build from the download page, and it works with a self-built image with the same build prompt: Edit: @dpgeorge There seems to be a problem at least with the daily build v1.20.0-50 for PICO W. It refuses operation with I2C. scan() works, but nothing besides that. A self-built firmware works, as well as the release build. The firmware for the standard PICO board works. |
Beta Was this translation helpful? Give feedback.
-
Thank you @robert-hh ! For the RPi Pico (not W) running MicroPython v1.20.0 on 2023-04-26, the default pins seem to be Running I2C devices on only those pins will work. For the RPi Pico-W running MicroPython v1.20.0-50-g786013d46 on 2023-05-04, the default pins are the same as the non-W Pico. From the release notes for the RP2 port... So it looks like four pins are the only ones that will be allowed to use I2C. Quite a shame, but it is what it is. |
Beta Was this translation helpful? Give feedback.
-
Thank you again @robert-hh. Gregwa |
Beta Was this translation helpful? Give feedback.
-
@robert-hh @gregwa1953 I have been trying to investigate this but can't quite get to the bottom of it. Here's what should be the case:
I wrote a simple test:
Each one of those configurations (when the wiring was changed to match) worked when I subsequently did a scan and read/write operations. @gregwa1953 One thing I did notice is that the device seems to need a hard reset when switching pins. i.e. If I had it working, then physically changed the wiring, updated the code to use the new pins, it would not work until I did a hard reset. The scan worked, but the first write raised So maybe that's what you're seeing? If so, then that is a bug I think, you should be able to switch pin assignments at runtime. |
Beta Was this translation helpful? Give feedback.
-
I can look into it, but at the first glance it's strange. This is an old part or the code. When you change the pins, you have to call the constructor again. In |
Beta Was this translation helpful? Give feedback.
It's not like that. Just the default pins have been changed. You can always specify different pins in the constructor. For my test, I used sda=Pin(8) and scl=Pin(9). There was just a difference between the v1.20.0-50 firmware loaded from the download page and the v1.20.0-50 firmware which I have built myself using the files from the repository. The self-built firmware works with the I2C setting, the downloaded one not. And the release version of v1.20.0 works as well. So there is a problem with the nightly build image.