-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
W55RP20 Support Requirements #9747
Comments
There are PIO SPI examples here: https://github.com/raspberrypi/pico-examples/tree/master/spi, but it seems like you are well along in your PIO SPI implementation. I'm guessing that you had to choose the pins you did due to limitations of the placement of the bonding wires between the chips. Is that correct?
I am not sure what you mean by this. The PIO SPI could be separated out, and then the W5500 functionality could be done mostly in a library and in device-independent code. For instance, see https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k |
Yes, that's right. I've currently made some similar to wiznet5k to control the W5500 with PIO SPI instead of busio.SPI, but I'm having trouble getting it to work with different socketpools, dhcp, dns, and other protocols. Also, if I do this, I would like to discuss with you how to utilize the W55RP20 library from adafruit to make it available to users in the future. |
I'm sure I'm oversimplifying several things, but |
I think the q would be the SPI speed for bitbangio. |
Yes, I was mainly suggesting PIO SPI as a possible transparent alternate to SPI (or bitbangio SPI), not sure if that's possible. BTW, I have these boards and could do some speed comparisons, but could use direction on code (and URL or what to serve) to test effectively. |
I don't have time to look at this in detail at the moment, but here's what I was thinking of:
|
Re: (1.), I get as far as |
(1) I think it would be great to have it as a separate library, or you could create a separate class called ioNIC in the existing adafruit_wiznet5k driver. (2) Currently in that repo, the W5500 is controlled by SPI using busio. The W55RP20 can't use hardware SPI due to pin issues, so we use rp2pio to drive the W5500 since it uses SPI PIO. (3) It is not a better driver, but it is also a packaged chip that integrates RP2040 and W5500, and it is a solution that many users have responded to. @anecdata Is the error on the rp2pio internal statemachine side in the link below? |
@min-hs I tried the WIZnet-ioNIC code and example and of course that worked fine. The exception was when I tried to naively use the statemachine as SPI with the existing circuitpython WIZnet library. But conceivably to Dan's point and yours, someone who knows what they are doing could construct a more SPI-compatible class or library using the statemachine. I didn't get far enough or do a thorough audit of the methods needed (read, write, etc), but |
Thank you so much for your help. |
Yes, I am saying you could refactor the library so it's using an SPI interface in the abstract, instead of knowing that it must use the "soft" SPI provided by your PIO program. The driver does not need to know that it has to use PIO SPI. My understanding is that you are using it the same way you would use it if it were an external chip. Only the transport has changed slightly.
See |
Something that I was discussing about this on Discord: Both |
Our engineers have made initial progress in developing a driver for the W55RP20, but we've encountered a few difficulties that we would like to address with your team. Below is a brief overview of the situation:
The W55RP20 is a SiP project that integrates the RP2040 and W5500 in one chip. Internally, the dies are connected via general GPIO pins, not the typical SPI pins. As a result, a PIO program is needed to configure these pins for SPI communication.
Our engineers then decided to start from scratch, writing a PIO program and general code to initialize the W5500 through registers. They were able to create a basic loopback server in standalone mode. While this solution works as an alternative, we thought about the possibility of creating a new CHIP_VARIANT for rp2 CHIP_FAMILY. Given our limited resources, we thought of collaboration with Adafruit to further develop the driver.
The link below is to a WIZNet PIO example we created.
https://github.com/WIZnet-ioNIC/WIZnet-ioNIC-Circuitpython
The text was updated successfully, but these errors were encountered: