I2C0 halts during Ethernet operation?
MCU & Boards
- Arduino
- W55RP20
No replies yet. Be the first to reply.
Join the discussion.
MCU & Boards
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: I2C0 halts during Ethernet operation?
by Lihan__ WIZnet ·
Hi,
Based on the symptoms — the OLED display Task halting the moment the Ethernet thread starts — I'd recommend checking these two things first.
1. Check whether the I2C0 pins (GPIO4, GPIO5) overlap with the W55RP20's internal SPI
The W55RP20 is a SiP where the RP2040 and W5500 are connected internally through GPIOs, so the Ethernet driver has to drive the W5500 over PIO-based SPI. GPIO20–25 are reserved for that internal connection, which means GPIO4/5 should in principle be free. However, if the PIO program is misconfigured to claim GPIO4 or GPIO5, the conflict won't produce a compile error — it will only show up at runtime. That matches your symptom (the OLED Task halts as soon as Ethernet starts) exactly.
Please verify on the schematic that GPIO4/5 aren't routed to anything Ethernet-related, and in firmware confirm that the PIO SPI pin range doesn't include GPIO4/5.
2. Check whether the Ethernet thread releases its mutex/semaphore often enough
Even with the two Tasks pinned to different cores, shared resources can still stall the OLED Task.
If the Adafruit SSD1306 library and the Ethernet driver share the same underlying resource inside the Arduino-Pico SDK (e.g., a global Wire lock), the Ethernet thread may be holding that mutex for long stretches without calling
xSemaphoreGive()often enough. In that case, the OLED Task will sit waiting indefinitely due to priority inversion, even though it has the higher priority.Recommended checks:
vTaskDelay()ortaskYIELD()inside the Ethernet loop and see if the OLED Task recovers.xSemaphoreGive()is called on every path, including error paths.Please rule out these two first, and let me know what you find — happy to dig deeper from there.