I think should be change the wiz_recv_data in w5300.c
because, If they use 16 bit process, recv buffer was big problems.
Please look at the bold font.
If "wizdata[i] = (uint8_t)(rd >> 8)" data was 0x0101, when use 16bit process, assign is value 0x0101.
It was very big mistake.
WiznetIOdriver use default 8bit process, i think this change was not problem.
void wiz_recv_data(uint8_t sn, uint8_t *wizdata, uint32_t len)
{
uint16_t rd = 0;
uint32_t i = 0;
if(len == 0) return;
for(i = 0; i < len; i++)
{
if((i & 0x01)==0)
{
rd = getSn_RX_FIFOR(sn);
wizdata[i] = (uint8_t)(rd >> 8);
}
else wizdata[i] = (uint8_t)rd; // For checking the memory access violation
}
sock_remained_byte[sn] = (uint8_t)rd & 0x00FFu; // back up the remaind fifo byte.
// If you use 16 bit process, perhaps, It should be recv buffer error
// I think it should be inclue the mask LSB.
}
Hi everyone
I think should be change the wiz_recv_data in w5300.c
because, If they use 16 bit process, recv buffer was big problems.
Please look at the bold font.
If "wizdata[i] = (uint8_t)(rd >> 8)" data was 0x0101, when use 16bit process, assign is value 0x0101. It was very big mistake.
WiznetIOdriver use default 8bit process, i think this change was not problem.
void wiz_recv_data(uint8_t sn, uint8_t *wizdata, uint32_t len) { uint16_t rd = 0; uint32_t i = 0; if(len == 0) return; for(i = 0; i < len; i++) { if((i & 0x01)==0) { rd = getSn_RX_FIFOR(sn); wizdata[i] = (uint8_t)(rd >> 8); } else wizdata[i] = (uint8_t)rd; // For checking the memory access violation } sock_remained_byte[sn] = (uint8_t)rd & 0x00FFu; // back up the remaind fifo byte. // If you use 16 bit process, perhaps, It should be recv buffer error // I think it should be inclue the mask LSB. }