W5500 RX Socket 0 크기를 최대 16kb로 설정하려면?
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 RX Socket 0 크기를 최대 16kb로 설정하려면?
by Eugeny ·
You do not need to increase RX buffer size unless you use jumbo UDP packets.
If you wish to anyway, just set S0_RXBUF_SIZE to 16. All other sockets will be unusable.
Explain how it does not work, and what you actually do to the chip’s configuration.
RE: RE: W5500 RX Socket 0 크기를 최대 16kb로 설정하려면?
by pawow2000 ·
아래 주소의 Wiznet에서 Guide 해 준 아래 git hub를 참고로 설정을 했는데, 여전히 RX Socket 0는 겨우 1496Byte 만 수신이 되는 것 같습니다.
1496Byte 만 수신되는 건 Reset후 CHIP의 초기 설정을 그대로 사용하는 것과 다를지 않네요.
SPI 출력을 체크 해 봤을 대, iolibrary를 사용하지 않을 때(guide 받지 전)에도 동일하게 설정이 된 것을 확인 했습니다.
PC에서 2048개 Byte 를 전송하면 1496 Byte만 수신 됩니다. 어떤 설정을 잘못 했을까요?
Default 설정으로도 2048개 만큼 수신이 되질 않는 이유는 뭘까요?
사용한 코드 :
void wizchip_initialize(void)
{
/* Deselect the FLASH : chip select high */
wizchip_deselect();
#ifdef USE_SPI_DMA
reg_wizchip_spiburst_cbfunc(wizchip_read_burst, wizchip_write_burst);
#endif
#if (WIZCHIP == W5100S)
uint8_t memsize[2][4] = {{2, 2, 2, 2}, {2, 2, 2, 2}};
#elif (WIZCHIP == W5500)
uint8_t memsize[2][8] = {{16, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}};
#endif
}
RE: W5500 RX Socket 0 크기를 최대 16kb로 설정하려면?
by Eugeny ·
Can not see it explicitly from your code if you are using TCP or UDP.
TCP data is being split into the packet - chinks of data. Chunk of 1496 byes is valid packet size for TCP. Therefore you are going to receive so many packets into the buffer it may contain. In case of 2K buffer, only one 1496 bytes packet will fit, however in the second portion of data (packet) you then must receive remaining 2048-1496 bytes.
Or are you using UDP?
How do you receive data?
RE: W5500 RX Socket 0 크기를 최대 16kb로 설정하려면?
by pawow2000 ·
C#에서 NetworkStream Write라는 함수를 통해서 아래와 같이 Packet Data 밀러 넣습니다.
→ stream.Write(pkt_data, 0, pkt_data.Length);
STM32 Firmware에서는 iolibrary의 reference code를 조금 수정해서 Packet Data를 수신합니다.
→ recv(SOCK_TCPS, h_socket.pkt_index, data_len);
Ethernet Protocol을 크게 신경 안 쓰려고 Hardware TCP/IP IC를 사용하는 것인데, Packet의 최대 크기도 고려를 해서 Data를 보내야 하는 건가요?
아래는 1024 Byte 보내고, STM32에서 수신된 내용을 UART Print로 보여준 내용