-
Notifications
You must be signed in to change notification settings - Fork 36
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
RuntimeError: Failed to initialize WIZnet module #142
Comments
Can you post the code, and is this the default wiring on the Ethernet FeatherWing ( There is a debug mode that may give you more info: |
Here is the code I am using:
I am using debug=True and it doesn't seem to change any messaging. I thought maybe it was a soldering issue but I did a continuity check on all of my pins from top of Ethernet Featherwing to bottom of RP2040. Everything was correct and I didn’t find any crossing. I saw a few places that soldering the RST pin to an IO pin on the RP2040 was necessary to get it working consistently. I thought that might help so I wired it to D25 which is what you see in the code (rst_eth). Now when adding that to the WIZNET constructor (reset=rst_eth) I get a debug message saying that it is in fact resetting the W5500. Even with the reset, the issue still persists. |
I'm not sure what else to suggest. Your code works on my 8.2.9 Feather RP2040 + Ethernet Featherwing. I made some changes, not sure why they'd make a difference: |
I'm baffled too, there aren't a lot of variables here. Do you have any other SPI-based FeatherWings (or something else that can be manually wired up SPI) to try to rule out the RP2040? Are you using the latest 5.0.6 library version (not sure what date that came out "two weeks ago")? Though it doesn't look like those changes would affect this issue. (edit: looks like 5.0.6 was released on Jan 23; oh, and I see you mentioned updating the libraries) |
I'm not seeing this line: That section of self._write_mr(0x08)
if self._read_mr() != 0x08:
return False |
Yeah I should have the most up to date library version for both Wiznet5k and Bus Device. I don't have any other FeatherWings and the only other microcontroller I have right now is a Waveshare RP2040-Zero. It doesn't seem to me that it has the right pins to connect the Ethernet Featherwing unfortunately. I really appreciate you responding so quickly. I posted something last Tuesday on the Adafruit Support Forum and I still don't have a reply. So thank you for that at the very least. Another thing to add: I don't think it should matter but I bought the Featherwings from Amazon and the Feather RP2040 from Micro Center. Maybe I need to order them directly from Adafruit to confirm no damage? |
They look legit. Micro Center is reputable. Amazon I suppose it depends on the seller. Can you reconcile the differences in the checks on register values that we're seeing? |
Oh yeah for the library code, I tried to add debug statements to the decompiled .py file:
I just changed that 0x08 value to 0x01 to test if it would respond differently with a different value. And I guess when I copied it over to this forum I forgot to change one of the values back to 8. But yeah the outputs would look like this:
Sorry for the confusion there. |
But to clarify, I’ve tested with the .mpy files from the bundle, the most up to date .mpy files from GitHub, then I tested the .py files with those comments first with the original 0x08 register value and then tried changing it to 0x01. All of this with the same result. |
Are the headers on the Feather also soldered? |
Yes. So I soldered the stacking headers to the RP2040: And then I soldered normal male header pins to the Ethernet Featherwing. |
I am having issues connecting an Ethernet Featherwing with a Feather RP2040 microcontroller. I used the "adafruit-circuitpython-adafruit_feather_rp2040-en_US-8.2.9.uf2" (Latest Stable) file to image the RP2040. I added adafruit_wiznet5k, adafruit_bus_device, and adafruit_requests.mpy to the lib folder. I got these from the "adafruit-circuitpython-bundle-8.x-mpy-20240118" bundle.
When running wiznet5k_simpletest_manual_network.py, it gives this error:
eth = WIZNET5K(spi_bus, cs)
I tried messing with the Baurdrates. Nothing worked there. I tried putting every library file in that bundle in the lib folder just in case. I tried getting the most updated version of Adafruit_CircuitPython_Wiznet5k and Adafruit_CircuitPython_BusDevice. Now I have the wiznet5k .py files instead of .mpy files on the board so I can debug further. I found that this is where it's getting caught:
Do you have any suggestions on a fix for this? Any help would be appreciated.
The text was updated successfully, but these errors were encountered: