How does Sn_RX_RSR behave in case of overrun?
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: How does Sn_RX_RSR behave in case of overrun?
by Eugeny ·
Yes.
It can not receive more data, and it explicitly states it to the remote network device in specific field of TCP packet. You can not consider W5x00 socket programming in disconnection with the “other side” - data flow and protocol of the network.
RSR is indication how many bytes application can get from the buffer. Its range is 0 to buffer size.
W5x00 says remote device not to send anything until W5x00 has space to receive it.
For UDP and RAW modes, new data not fitting into buffer is discarded, thus it is in your application’s interests to flush data as fast as possible.
RE: How does Sn_RX_RSR behave in case of overrun?
by sqjsXvnqH2JbsUeS ·
Again, thank you very much for your time and expertise!
Yes, silly me. I should have known better and should have asked for UDP. Nevertheless, I think your last statement from your post above answers all my questions:
This is reasonable and expected behavior. So Sn_RX_RSR is a saturated register (and not a wrap-around register):
When the RX buffer is full and new data arrives, the new arriving data is discarded, meaning that nothing in the buffer gets overwritten. This in turn means that the number of bytes we can read from the RX buffer remains constant, and this finally means that Sn_RX_RSR remains constant.
Thank you very much again!