Wiznet / RP2040-HAT-C

Ethernet Example for RP2040
64 stars 35 forks source link

gpio_init not called for reset line before use - device locked in reset #19

Open Stephen-Bath opened 1 year ago

Stephen-Bath commented 1 year ago

Routine wizchip_reset within file port\ioLibrary_Driver\src\w5x00_spi.c attempts to use the reset GPIO line, however the rest line has not been initialised.

The line gpio_init(PIN_RST); needs to be inserted as the first line of the wizchip_reset function.

Without correctly initialising the reset line, it is not driven to a sufficient voltage by the RP2040 to bring the w5x00 device out of reset. Therefore when this library is used with an ethernet module that does not provide an explicit pull-up on the reset line (such as the ETH WIZ Click board) the w5x00 device is held permanently in reset making the device unusable.

sedlons commented 1 year ago

I used W5500-EVB-Pico and had random issues (~ 8 of 10 of power up). I created pull request #18 in February, but still no activity...