Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add W55RP20-EVB-Pico, W6300-EVB-Pico2 Board#10610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
wizhannah wants to merge8 commits intoadafruit:main
base:main
Choose a base branch
Loading
fromWIZnet-ioNIC:WIZnet-EVB-Pico-circuitpython

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

@tannewttannewt 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 thewiznet module addition? I'm happy to take the new board defs as we sort out the PIO stuff.

@wizhannah
Copy link
Author

wizhannah commentedOct 2, 2025
edited
Loading

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
    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.

for this use case I found that a native PIO_SPI provides the performance and stability needed.

@anecdata
Copy link
Member

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

@tannewt
Copy link
Member

  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.

@wizhannah
Copy link
Author

wizhannah commentedNov 4, 2025
edited
Loading

Thanks again for the thoughtful feedback. I wanted to clarify why I proposed a native PIO SPI implementation and ask whether you’d consider accepting it (or advising on the right shape for it).

The design closely follows the Raspberry Pi SDK’s PIO SPI used by the CYW43 Wi-Fi driver, combining PIO state machines with DMA-backed transfers. This architecture is already validated for continuous, high-speed register access on RP2040 and gives deterministic inter-byte timing that WIZnet parts are sensitive to.
Reference: pico-sdk/src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c.
https://github.com/raspberrypi/pico-sdk/blob/a1438dff1d38bd9c65dbd693f0e5db4b9ae91779/src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c

That reference was key in shaping this design. However, since there was no complete example available for implementing a full PIO SPI interface purely in Python, it was difficult to achieve precise byte-level timing control or continuous DMA-based transfers using Python alone.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tannewttannewttannewt requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@wizhannah@anecdata@tannewt

[8]ページ先頭

©2009-2025 Movatter.jp