W5500 unable to connect TCP server

Hello,

I am working with W5500, and want to operate it as TCP client.
I set the following registers as follows, but my client is unable to join any server.
Please review my commands, shall I set something different?

Common register block
0000 04 00 C0A80001 FFFFFF00 9A98DC010203 C0A800CA 0000 FF 40 00 01 0FA0 07 00C8 AA
Socket register block
0000 0C 01 00 1F 00 4B10 FFFFFFFFFFFF 0CA80020
Open socket
0001 0C 01
Check status
0003 08 00 = 0x13
Open as client
0001 0C 04
Check status
0003 08 00 = 0x15
after 30 s it changes 0x00, no connection to the server.

My network settings:
mask: 255.255.255.0
gateway: 192.168.0.1

What should I set different?

Update: w5500 send proper TCP messages in server mode, for client requests, (syn/ack)


while send mac broadcast instead of TCP SYN packet in client mode while try to join a server…

The same setting I use for borh (expect tcp mode for sure)
Strange…
Did somebody had the same before?

OK solved.

SW/HW resets were the problem, I guess.

HW reset for at least ~100ms is necessary,
continue it with SW reset,
and do not modify basic memory settings (timing TOS TTL)
just write the data as follows for common regs and S0…

Default common register settings
0000 04 80 **SW reset
0001 04 C0A80001 FFFFFF00 9A98DC010203 C0A800CA **gateway, subnet, sIP
002e 04 88 **PHY

Default socket_0 register settings for TCP
0000 0C 01 ** TCP mode
0004 0C 1388 **sPORT
000C 0C C0A80020 1388 **dIP, dPORT


Open Socket
0001 0C 01
Check SOCKET 0 is in INIT STATE
0003 08 00 ?= 0x13 (SOCK_INIT)
Send Connect request
0001 0C 04
Check SOCKET 0 if SOCK_SYNSENT
0003 08 00 ?= 0x17 (ESTABLISHED)