Skip to content

Conversation

wizhannah
Copy link

Add support for W55RP20-EVB-Pico and WIZNET_PIO_SPI communication (#10440).
Additionally, add support for the W6300-EVB-Pico2 board with Quad SPI functionality.
Tested with example code and libraries below.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

Why do you need a native PIO_SPI object? It seems you are only using this from the Python driver. The PIOASM library has an example of implementing a busio-like UART via PIO all from Python here: https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/blob/main/examples/pioasm_rxuart.py

Want to split out the board definitions from the wiznet module addition? I'm happy to take the new board defs as we sort out the PIO stuff.

@wizhannah
Copy link
Author

Sorry for the late reply, and thank you for the feedback.
The reason I implemented a native PIO_SPI is as follows:

  1. Performance and Overhead
    While it’s possible to drive PIO purely from Python, the WIZnet chips require very frequent register accesses. In practice, the Python interpreter overhead accumulates and can noticeably reduce throughput and responsiveness. The native implementation removes this overhead and ensures more stable operation.

  2. High-Speed Transfer
    Communication with the Ethernet chips often requires SPI clock rates in the several-MHz range. With a Python-only approach it may be difficult to achieve these speeds reliably, whereas a native PIO driver might make it relatively easier to reach them.

  3. Precise Frame Control
    WIZnet chips use slightly different SPI framing depending on the model, and they are sensitive to inter-byte gaps and clock timing. A native implementation provides more predictable timing and precise frame handling.

So while I agree that a Python-only solution is possible in principle, for this use case I found that a native PIO_SPI provides the performance and stability needed.

@anecdata
Copy link
Member

anecdata commented Oct 2, 2025

The W6300 will need library changes for the extra pins to take advantage of the quad SPI?

@tannewt
Copy link
Member

tannewt commented Oct 2, 2025

  1. In practice, the Python interpreter overhead accumulates and can noticeably reduce throughput and responsiveness. The native implementation removes this overhead and ensures more stable operation.

Did you try the Python-only version first? I'm worried this is a lot of specific code for us to maintain. Having it in a library of yours using rp2pio directly means you can maintain it easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants