-
Notifications
You must be signed in to change notification settings - Fork 382
Open
Description
I was testing some code with a pico2 and the ws5500, I noticed that in MACRAW mode, if I send a lot of packets the board can get stuck in socket.c. It seems that tmp is always 0. I was able to avoid the problem by calling return when tmp is 0. I also added a print to see how often that would happen and it is not very often. I know that the ws is not bricked because I am able to query other flags from SPI such as getSn_TX_FSR(sn) and the WS also replies to ping.
Are you aware of anything that I could be doing wrong?
while(1)
{
tmp = getSn_IR(sn);
if(tmp & Sn_IR_SENDOK)
{
setSn_IR(sn, Sn_IR_SENDOK);
printf("z9a %d\n", len);
break;
}
//M:20131104
//else if(tmp & Sn_IR_TIMEOUT) return SOCKERR_TIMEOUT;
else if(tmp & Sn_IR_TIMEOUT)
{
setSn_IR(sn, Sn_IR_TIMEOUT);
//M20150409 : Fixed the lost of sign bits by type casting.
//len = (uint16_t)SOCKERR_TIMEOUT;
//break;
printf("z9b %d\n", len);
#if _WIZCHIP_ < 5500 //M20150401 : for WIZCHIP Errata #4, #5 (ARP errata)
if(taddr) setSUBR((uint8_t*)&taddr);
#endif
return SOCKERR_TIMEOUT;
}
print("Error"); // I added this
return (int32_t)len;
}
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels