UDP packets not sent successfully immediately after initialization
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: UDP packets not sent successfully immediately after initialization
by becky ·
Hello,
The timeout interrupt in udp occurs when a reply to an arp request is not received.
Apart from the errata of the w5100, I think it is because you sent the udp data before the link was assert after the chip was reset.
Make sure you send the data after the link is asserted.
RE: RE: UDP packets not sent successfully immediately after initialization
by brian ruiz ·
Hi Becky,
Thank you for your insight. Ultimately, I have found that asserting a software reset to the W5100 when the errata case is reached is sufficient. I am interested in learning about how one would be able to find when the WIZNET asserts a link to its peer, do you have pseudocode that implements this in UDP mode? Thanks again!
Brian
RE: UDP packets not sent successfully immediately after initialization
by Eugeny ·
This will not be a good solution is the chip is having other sockets running, for example TCP. Is it possible to solve the issue at the socket level only as advised by the errata sheet?
RE: UDP packets not sent successfully immediately after initialization
by brian ruiz ·
Hi Eugeny,
Fortunately, we only have socket zero open and we’re running in UDP mode. Is the software reset a valid solution in this case? When asserting a hardware reset, we noticed a two second delay in sending a response from the W5100 to its peer, which is not satisfactory in our application.
Brian
RE: UDP packets not sent successfully immediately after initialization
by Eugeny ·
In your particular case yes, but may not in other cases. Why you just do not close and reopen the socket 0? It should be even faster than software reset.
RE: UDP packets not sent successfully immediately after initialization
by brian ruiz ·
We close and re-open the socket upon any socket zero related interrupt. For example, if we get a successful send interrupt, we acknowledge the interrupt, close the socket, then re-open it prior to completely exiting the interrupt service routine. In the case in which we implemented the hardware reset, we saw that the microcontroller (uC) would get a timeout interrupt upon sending the missed response after reset and the interrupt service routine would close, then open the socket every time the uC would get a timeout. Unfortunately the closure and reopening of the socket did not reduce or prevent the two second delay we were seeing.
RE: RE: UDP packets not sent successfully immediately after initialization
by Eugeny ·
You do not need to close socket to reuse it for the same purpose. I even think that it is possible to change UDP socket setup on the fly, without reopening it. So you seem have chosen strange way to drive the chip…
RE: UDP packets not sent successfully immediately after initialization
by brian ruiz ·
Do you think that the closing and re-opening of the socket upon any socket zero related interrupt may be placing the W5100 into the errata state described above?
RE: RE: UDP packets not sent successfully immediately after initialization
by Eugeny ·
As I understand it is other way around - when errata state is detected, you must close and open socket. It is actually written in the errata document.
RE: UDP packets not sent successfully immediately after initialization
by brian ruiz ·
The way that I understood the errata is to reset the W5100 in the case that we reach the mismatched TX pointer state. Would simply closing and reopening the socket in the case of the listed errata “reset” the W5100?
RE: UDP packets not sent successfully immediately after initialization
by Eugeny ·
Errata says
IMHO it means write CLOSE command to the command register. But as you write I also start to doubt about it - as there’s no “RESET” to close the socket!