---
title: "W6100 TCP Server RX Overflow"
url: "https://maker.wiznet.io/forum/15091"
markdown_url: "https://maker.wiznet.io/forum/15091/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Dasbuttonmasher"
created: "2023-12-12T22:09:35+09:00"
last_activity: "2023-12-13T22:32:11+09:00"
language: "en"
views: 179
replies: 0
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W6100 TCP Server RX Overflow

## Question

Asked by Dasbuttonmasher on 2023-12-12 in Ethernet Chips.

EDIT: I think I found the problem and it as on my end.

Greetings,

Apologies if this has been answered elsewhere.

I’m using the W6100 with a PIC32. I’ve been able to configure the W6100 as a TCP server using a varying number of sockets. My state machine is working such that I can receive packets and echo them back without problem. The weird part is the PIC crashes after I have transferred the amount of data equivalent to the RX buffer size. It appears to be an overflow problem.

I’ve been testing by using Packet Sender to open a socket, send data, then close the port. This results in Sn_RX_RD resetting to zero after a new connection is established. This appears to be the correct behavior but once the accumulated total of data sent exceed the RX buffer’s size the system crashes.

I have also tested with a persistent connection. In this case Sn_RX_RD is incremented correctly and I can see the deadly overflow approaching. My system again crashes once I send more data than the buffer can hold. I am attempting to catch this and prevent the crash but so far no luck.

I understand that my persistent connection overflow problem is most likely my fault and something I need to fix but I do not understand why sending X amount of data over many new connections causes the same overflow error. Documentation suggests buffer pointers are reinitialized after a new connection is established so it seems like my call to Sn_CR[RECV] is not being processed correctly.

Any help would be greatly appreciated!

---

Source: https://maker.wiznet.io/forum/15091
