I successfully ran W5500 as a server (I can connect to it, of course), but I have a problem with a client mode.
Writing to the registers looks like this:
- PHY configuration (OK - address 192.168.1.30, mask 255.255.255.0, gateway 192.168.1.1, MAC 00-08-DC-01-02-03 as in the datasheet)
- MR->0x01 (TCP mode)
- PORT->46 (source port)
- CR->1 (socket open)
- loop to check, if opened - OK
- DIPR->192.168.1.31 (target IP)
- DPORT->46 (target port, the same as the PORT)
- CR->4 (connect)
- loop to check, if established (if SR->0x17) - this fails and it’s always endless loop
And in this loop SR is 0x13 (opened) for about 2 seconds, and then it becomes 0 (disconnected). In IR register bits TIMEOUT and DISCON are always set (why is it like this?)
I tried with connecting through router and directly between computer and W5500. Windows Firewall is turned off.