Socket write pointer S0_TX_WR given random initial value
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: Socket write pointer S0_TX_WR given random initial value
by lawrence WIZnet ·
hello, LukasWikander
Thank you for your question with W5100.
After TCP connection, as you know, the TX_WR has random value. And it is normal operation.
There is no problem with it. because TX_RD has same value with TX_WR as well.
If you send data packet, you will understand there is no data lose.
If you have any questions, please feel free to ask here
Thank you
RE: Socket write pointer S0_TX_WR given random initial value
by Eugeny ·
You will have to use the address value after connection is established (or socket open for UDP mode).
Buffer is cyclical, thus you will have full buffer size free anyway. For example, if socket’s buffer is 2K and pointer after connecting is 839a, absolute location in the TX buffer will be 0x4000 + socket_base_offset + (0x839a & 0x7ff), “virtual” position within socket’s buffer is 0x839a & 0x7ff = 0x39a and you have 0x466 space for contiguous write, then you will have to reset absolute pointer to the beginning of socket’s buffer to write remaining 0x39a bytes to completely fill the TX buffer.
Note that after you write bytes TX_WR should still keep 16-bits, e.g. with 0x839a you write 0x10 bytes you update TX_WR with 0x83aa.