Open strange-v opened 4 years ago
This dirver sets MAC, sets IP and then resets the chip. To correct this remove all occurences of _wiznet.reset() in WIZinterface.cpp Then add _wiznet.reset() to the first line of the constructor
WIZnetInterface::WIZnetInterface(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset) :
_wiznet(mosi, miso, sclk, cs, reset)
{
_wiznet.reset();
ip_set = false;
_dhcp_enable = true;
thread_read_socket.start(callback(this, &WIZnetInterface::socket_check_read));
}
Also comment all occurencies of error("No more sockets for listening"); Chip supports only 8 sockets. When application layer request more, then error() is callend and system hangs.
@Xeenych it works after I added fixes that you described. I'll create related PR. Thank you for your help!
@Xeenych, sorry that I bother you again, but no one else answers questions here) Looks like I've found one more issue with this library #10, seems you are quite familiar with the W5500 chip, maybe you would have a chance to review my thoughts?
@strange-v, sorry I can't help you with this.
I have two different modules with the W5500 chip and both of them behave identically. They work correctly only when the reset pin is disconnected or reset functionality is commented out (last four lines in the code below):
This behavior is strange because the reset functionality looks correct.
Mbed OS 5.14.2 STM32F411CEU6 (blue pill) Please let me know if some additional information will be helpful.