W5200 initial delay in transmitting
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: W5200 initial delay in transmitting
by hzz ·
Thanks for your prompt reply!
I can discard reason 1. Voltage is stable within ±20mV peak measured with 10us resolution.
I will analyze reasons 2 and 3 and post back.
Regards
Hector
RE: W5200 initial delay in transmitting
by hzz ·
After powering up the board, the nRST pin is held low for 1ms to cause a reset.
After that there is a wait of 150ms before start configuring the chip.
After configuring the chip, the same procedure is done to reset the chip again.
The LINK byte of the PHY STATUS register has the value of 1 permanently
The chip can receive without problem, reponds to a ping, but it does not transmit anything for a while.
RE: W5200 initial delay in transmitting
by hzz ·
Hi
I was making some tests and found the following:
I did not mention, as I thought it was not relevant, that the application is also configuring at power on the Retry_time and Retry_count registers. I’m setting Retry_time=50 (5ms) and Retry_count = 1 (I do this because with the default values, if there is no HOST, the W5200 halts the application for quite some time)
When removing this part of the initial configuration, the problem dissapears
So what I’m doing now is sending anything before configuring Retry_time and Retry_count. In this case there is no problem. I don’t understand why, though.
Regards
Hector
RE: W5200 initial delay in transmitting
by hzz ·
The problem with the previous solution is that it only works if the Retry registers are configured after a succesfull transmission. This means that if there is no Peer available during power on, I cannot configure these registers.
This is a problem in my aplication because it sends a message looking for a Peer every second. This means that every second the application will be halted by the W5200 while it retries until it finds a Peer, which is a lot of time with the default values.
Looking for the LINK bit of the PHY STATUS register before transmitting is useless in many cases because this bit will be 1 as long as the W5200 is connected to a router, even if there is no Peer.
Is there any way to configure the Retry registers without causing the initial delay in ready to transmit?
RE: W5200 initial delay in transmitting
by hzz ·
Yes, you are probably rigth; it must be the ARP-processing.
However there seems to be a difference in behavior of the W5200 at power up and later:
Once ARP-processing is done, if I disconnect the Peer, the W5200 does not halt the application so I understand that it is not attempting a new ARP process. However, If I connect a new Peer with a different MAC, the W5200 have no problem connecting to it. So why so many attempts at power up?
RE: W5200 initial delay in transmitting
by hzz ·
After some tests I think I undertand the W5200 behavior (please correct me if I’m wrong):
At power up, the W5200 doesn’t have a MAC associated to the Peer IP, so it will attempt to start an ARP process each time a packet is sent (tried to be sent actually). The W5200 will make all the Retry attemtps, which by default takes around 1,6 seconds.
This will happen every time a packet is sent to a Peer_ip which is not associated to a MAC; which, at power up, means that it will happen every time a packet is sent to a Peer which is not connected.
Once the Peer is connected, the ARP process will be done and the Peer_IP will be associated with the MAC IP.
After that, the W5200 doesn’t attempt anymore to start an ARP process with this Peer_IP, no matter if the Peer is connected or not.
If we change the Peer_IP, again the W5200 will attempt to start an ARP process each time the packet is sent to the new IP.
If we change the Peer MAC but not the Peer_IP I don’t know what will happen, but this is a very rare case anyway.
The Peer_IP to MAC assosiation is not saved, so it will be lost at power off and the process will start again at power up.
I hope this is useful for others
Regards
Hector
RE: W5200 initial delay in transmitting
by hzz ·
Thanks!
It is clear