I only have one socket opened. The RMSR is initialized to 0x55.
However, when I wrote 1950 bytes, then 100 bytes.
I expected this to cause a wrap around. However, I see the Rx write pointer is at 0x802 (2002d).
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.
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.