w6100 udp 전송 속도 문의
Ethernet Chips
- Sensors
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: w6100 udp 전송 속도 문의
by Grace_Koo WIZnet ·
안녕하세요.
현재 sendto 함수는 UDP 데이터를 TX buffer에 쓰고 바로 return하는 구조가 아니라, Sn_CR_SEND 명령 후 Sn_IR_SENDOK가 발생할 때까지 대기하는 blocking 구조입니다.
따라서 측정하신 약 1.2ms는 16byte payload를 SPI로 쓰는 시간만이 아니라 아래 시간이 모두 포함된 값입니다.
1kHz 주기 전송이 목표라면 아래 방향을 시도해보시면 좋을 것 같습니다.
현재 코드 그대로는 sendto() 함수 시간이 W6100 내부 처리와 네트워크 상태에 영향을 받기 때문에 1ms 이하로 항상 고정하기는 어려울 수 있습니다.
1kHz 주기를 맞추려면 sendto()를 전송 완료까지 기다리는 함수로 쓰기보다는, “TX buffer write + SEND command”까지만 수행하고 완료 확인은 따로 분리하는 방식이 더 적합해보입니다.