RP2: Hard I2C not working
Checks
-
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
-
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
rp2
MicroPython version
MicroPython v1.22.2
Reproduction
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
bus = I2C(id = 0, scl = Pin(9), sda = Pin(8), freq = 100_000)
display = SSD1306_I2C(128, 64, bus)
Expected behaviour
ssd1306 working
Observed behaviour
Failure with errors EIO / ETIMEDOUT.
Tested with id 0 and 1, on different pins.
Works like a charm using SoftI2C.
Additional Information
Could be related to this ticket ?
RP2: Hard I2C is intolerant of clock stretching
https://github.com/micropython/micropython/issues/8167
[RP2] machine.soft_reset() hangs when i2s is not deinitialized
Checks
-
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
-
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
RPI_PICO
MicroPython version
MicroPython v1.22.2 on 2024-02-22; Raspberry Pi Pico with RP2040
Reproduction
- Initialize I2S device:
from machine import I2S
from machine import Pin
audio_out = I2S(0,
sck=Pin(0), ws=Pin(1), sd=(2),
mode=I2S.TX,
bits=16,
format=I2S.MONO,
rate=44100,
ibuf=20000)
- Call
machine.soft_reset() - Repeat 1, call
audio_out.deinit()and no. 2 again
Expected behaviour
machine.soft_reset() resets machine
Observed behaviour
device hangs, requiring hardware reset or reconnecting USB
Additional Information
Verified on latest git commit and official release 1.22.2. This issue is pin-independent.