Description
Port, board and/or hardware
Raspberry Pi Pico 2 W
MicroPython version
v1.25.0-preview.383.gd5aeca2e8 (2025-03-13) .uf2
Reproduction
1.Connect Raspberry Pi Pico 2 W or Pico W.
2.Run the following Python script:
from machine import Pin, I2C
import utime
I2C_ADDR = 0x30 # Problematic address
i2c = I2C(1, scl=Pin(7), sda=Pin(6), freq=100000)
print("=== I2C Scan Start ===")
devices = i2c.scan()
print("Detected devices:", [hex(dev) for dev in devices])
if I2C_ADDR in devices:
print(f"Device detected at {hex(I2C_ADDR)}")
else:
print(f"Error: Device not found at {hex(I2C_ADDR)}")
try:
print(f"\nWriting to {hex(I2C_ADDR)}...")
i2c.writeto(I2C_ADDR, b'\x00')
print("writeto() successful")
except OSError as e:
print(f"writeto() error: {e}")
utime.sleep(1)
Expected behaviour
On both Pico W and Pico 2 W, the I2C scan should detect all connected devices, including addresses 0x30, 0x41, and 0x48.
writeto() should work successfully for all detected devices.
Observed behaviour
On Pico W, the I2C scan correctly detects devices at addresses 0x30, 0x41, and 0x48, and i2c.writeto() works without any issues.
On Pico 2 W, the I2C scan fails to detect these same addresses, returning an empty list []. Attempting to communicate with these addresses using i2c.writeto() results in the error:
OSError: [Errno 110] ETIMEDOUT
However, other I2C devices such as SSD1306 (0x3C) and BME280 (0x76) work normally on both boards, indicating that the issue is specific to certain I2C addresses rather than a general I2C failure.
This suggests a firmware-level bug in Pico 2 W’s I2C implementation, which prevents communication with specific addresses while functioning correctly with others.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree