W5500 TCP doesn’t send data

Hi! Sorry for my bad English.
I’m new in W5500. I have to send some packets from W5500 to other W5500 chip. When I try UDP everything was ok but I have problems with TCP.
Both chips reach the “SOCK_ESTABLISHED” stage. When I try to set Sn_CR(0x2) (SEND command) nothing happens. Sn_IR stay CON but I wait for SEND_OK.

What I did after SOCK_ESTABLISHED:

  1. Check data size
  2. Read Sn_TX_WR
  3. Save data in TX buff
  4. Set SEND command

I am working with TCP for the first time, so I may not know many of the nuances.
Help future specialist please :smiley:

How do you know that nothing happens? You perform sending from one chip, but you must read data on another chip. And you also must advance WR pointer past data in order for that data to be sent. I do not see this step in the list you provided :slight_smile:

Hello Eliza, first you should see which W5500 is not working, the one which send or the one which receives? You can use a simple tool like Hercules from HW-group, using the ‘TCP Server’ you can test if your trasmission works, and using the ‘TCP Client’ you can test if your reception works.
Also it is easier to use the sockets functions provided by Wiznet instead of using the registers directly, see socket.c and socket.h:

When I say that nothing happens, I mean that Sn_IR does not change its value. I’m sorry I forgot to mention the TX_WR update, I do this.

I don’t know what happens when I do SEND command. At W5500 which is receives data Sn_IR also not RECV and I don’t know what else I should do.