W5100s Socket WrapAround
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: W5100s Socket WrapAround
by Eugeny ·
RX_RD is rather 16-bit counter than pointer. You get pointer to the data according to the datasheet by masking with buffer size and adding buffer base address. Thus counter us 0x802, buffer size is 0x800 then relative data location in the buffer is 0x002.
RE: RE: W5100s Socket WrapAround
by grama ·
That doesn’t make sense.
If each Socket Receive pointers do a wrap around, then when I get data > RX Buffer size it should start back at the start of buffer.
What you define is NOT wrap around, if the counter continues to increment PAST the buffer size.
The RX_RD has to be a 16-bit pointer as the buffer/socket would be > 256bytes.
So a Wrap around definition to me is (ignoring the base offset), then the buffer (of 2KB will go from 0000 to x0800. Then when I get the next byte the RX_RD has
to have a value of 0x001 (and not 0x0801).
If not, the SN0 Rx data would be overwriting the data in Sn1 Rx buffer.
Giri
RE: W5100s Socket WrapAround
by Eugeny ·
What exactly does not make sense?
This is true. And you can not get more data than RX buffer size. By definition. Extra data will wait at another end (TCP) or will be discarded (UDP/RAW).
I did not say these words - “wrap around”, and did not define this term. It seems you want to see wraparound here.
It is.
You can see definition of wraparound here:
Did you read the datasheet, sepecially chapter 4? It clearly says how to use RX_RD register, and how to obtain address to the data from it.
It will if you do not follow datasheet guidelines and do not mask the RX_RD value with the RX buffer size.
RE: W5100s Socket WrapAround
by grama ·
You are right. I wanted the Rx_Rd to behave a certain way, and didn’t fully understand the datasheet.
I apologize for my response.
Giri
RE: RE: W5100s Socket WrapAround
by Eugeny ·
No problem. There’re some uncertainties even in datasheets, thus if you have questions come here and ask.