W5500 Receive Buffer
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: W5500 Receive Buffer
by Mxyxixptlick ·
I believe that while the internal S0_RX_RD and S0_RX_WR pointers wrap around as the W5500 stores data it receives, you are responsible for sending a valid pointer when you read incoming data.
Try logically ANDing your read pointer in your code with 0x7FF before reading and see if that helps.
RE: RE: W5500 Receive Buffer
by Vyacheslav Tumashenk ·
Thank you very much for responding! I try but for now all the same: (
char WSOCKET0_Read(unsigned int adres){
char result,l,h;
h=hib(adres);
l=lob(adres);
SPI1_Write(h); // адрес в регистре
SPI1_Write(l);
SPI1_Write(0b00001001);
result=SPI1_Read(0);
return result;
}
void WSOCKET0_Write(unsigned int adres, char dat){
char result,l,h;
h=hib(adres);
l=lob(adres);
SPI1_Write(h);
SPI1_Write(l);
SPI1_Write(0b00001101);
SPI1_write(dat);
}
b=WSOCKET0_Read(0x0028);
c=WSOCKET0_Read(0x0029);
sdata=word(b,c); //START DATA
ssdata=sdata & 0x07FF;
b=WSOCKET0_Read(0x002A);
c=WSOCKET0_Read(0x002B);
edata=word(b,c); //END DATA
len=edata-sdata;
WREADBUF(ssdata,len);
sdata+=len;
b=hib(sdata);
c=lob(sdata);
WSOCKET0_Write(0x0028,b);
WSOCKET0_Write(0x0029,c);
WSCOMMAND(0x40); //RECV
RE: W5500 Receive Buffer
by Eugeny ·
Read the W5100 datasheet chapter 5. It gives crystal clear information on how to manage socket and its registers for proper data flow. Register locations and access type may be different for the devices, but the flow is the same.