W5500-EVB-Pico lockup when using network

i seem to be able to make anywhere from 2 to 12 network request before it locks up, no errors sho up in thonny, just a hard lock on both cores

Source code: https://pastebin.com/GPcRsuaX
Firmware: MicroPython - Python for microcontrollers - v1.19.1-782-g699477d12 (2022-12-20) .uf2

I suspected i was running out of socket connections and did some testing in thonny’s console and figured out i get a error if i run out and that urequests does not seem to close the connection so i have to call r.close() when using the console

i am not sure if this i a driver bug or a defective controller

I got 2 units and 1 is defective, maybe this one is also?

Hello @GM-Script-Writer-628

Write W5500-EVB-Pico F/W as ‘rp2_w5500_20221111_v2.0.0.uf2’ instead of ‘v1.19.1-782-g699477d12 (2022-12-20).uf2’ and try again.

I managed to track down the order of events required to trigger my issue and it also affects the pico W

i was trying to get the board into file system mode earlier today and ran out of time b4 going to work

i have reported that bug here:

there is another issue i found before this

I should be able to work around these bugs (the second is gonna be ugly), but if that is not necessary with wiznet’s firmware that is great

Did some more testing today and i think i figured out what is happening

[THEORY]
When network.WIZNET5K is active on core 0 and you try to lock interrupts to read a DHT22 on core 0 you are gonna have a bad day, to work around this network.WIZNET5K will use core 1 unless it is in use

The issue with getting URLS crashing also affects the pico W, this bug can be worked around easily enough once you know what is happening