Datasheet
Table Of Contents
W5500 Datasheet Version1.0.9 47 / 66
In these cases, Sn_SR is changed to SOCK_CLOSED.
0x08
DISCON
Valid only in TCP mode.
Regardless of ‘TCP server’ or ‘TCP client’, the DISCON command
processes the disconnect-process (‘Active close’ or ‘Passive close’).
Active close: it transmits disconnect-request(FIN packet) to the
connected peer
Passive close: When FIN packet is received from peer,
a FIN packet is replied back to the peer.
When the disconnect-process is successful (that is, FIN/ACK packet is
received successfully), Sn_SR is changed to SOCK_CLOSED.
Otherwise, TCP
TO
occurs (Sn_IR(3)=‘1)= and then Sn_SR is changed to
SOCK_CLOSED.
cf> If CLOSE is used instead of DISCON, only Sn_SR is changed to
SOCK_CLOSED without disconnect-process.
If a RST packet is received from a peer during communication, Sn_SR
is unconditionally changed to SOCK_CLOSED.
0x10
CLOSE
Close Socket n.
Sn_SR is changed to SOCK_CLOSED.
0x20
SEND
SEND transmits all the data in the Socket n TX buffer. For more
details, please refer to Socket n TX Free Size Register (Sn_TX_FSR),
Socket n, TX Write Pointer Register(Sn_TX_WR), and Socket n TX Read
Pointer Register(Sn_TX_RD).
0x21
SEND_MAC
Valid only in UDP mode.
The basic operation is same as SEND. Normally SEND transmits data
after destination hardware address is acquired by the automatic ARP-
process(Address Resolution Protocol). But SEND_MAC transmits data
without the automatic ARP-process. In this case, the destination
hardware address is acquired from Sn_DHAR configured by host,
instead of APR-process.
0x22
SEND_KEEP
Valid only in TCP mode.
It checks the connection status by sending 1byte keep-alive packet.
If the peer cannot respond to the keep-alive packet during timeout
time, the connection is terminated and the timeout interrupt will
occur.