Issue with ATmega2560/W5500 TCP Server Crashing on Ethernet Cable Reconnection
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: Issue with ATmega2560/W5500 TCP Server Crashing on Ethernet Cable Reconnection
by Eugeny ·
Log what MCU does to see what happens. Something is being handled incorrectly in the software. Socket hung and not being reused.
Very depends on what you mean here. The live connection may have died, you should not hope it will always resume.
RE: RE: Issue with ATmega2560/W5500 TCP Server Crashing on Ethernet Cable Reconnection
by Mohit Singh ·
Hi,
Thanks for response.
I will log the events and report back.
What i mean by not resuming operation is that the microcontroller is going out of normal operation and getting stuck in the bootloader section ( as i am able to ping the bootloader IP address).
Not proceeding with loading the user program is a separate issue I think because there is continuous data on serial port and it is making the bootloader stuck thinking that some data will come. This is my assumption.
I will check the logs and report.
RE: Issue with ATmega2560/W5500 TCP Server Crashing on Ethernet Cable Reconnection
by Eugeny ·
This requires proving.
Do you drive W5500 from boot loader? I suspect you must do it from user space, and the fact that something going on the serial port(s) should not bother bootloader unless it uses those same port(s) for its purposes (e.g. console).
RE: Issue with ATmega2560/W5500 TCP Server Crashing on Ethernet Cable Reconnection
by Mohit Singh ·
Hi,
I’m sorry i do not have my setup currently but as far as I understand the bootloader deals with w5500. It is a bootloader to upload code via ethernet. It waits for 10 seconds for TFTP request on a 192.168.1.128 IP address.
https://github.com/loathingKernel/ariadne-bootloader
Whenever my code stops doing what o expect it to do, it starts to respond to ping on this particular IP address.
The serial port is used by the bootloader. It can load user program from both the serial port and the ethernet port.
Normally it is not a problem as the serial device starts after my board so it doesn’t send any data when the system is powered up.
But after the ethernet cable disconnection and IF the controller gets into the bootloader section as I am assuming then the data keeps on coming on the serial port and keeps it stuck there.
Again, i know it has to be proved. I am just stating my intuition. I will do further tests tomorrow and let you know
RE: Issue with ATmega2560/W5500 TCP Server Crashing on Ethernet Cable Reconnection
by Mohit Singh ·
Hey,
Sorry for late response.
It seems my microcontroller code was crashing when I removed the LAN or closed TCP session because of a memory leak which was happening if the data coming on serial port was not being processed.
After crashing, it would normally had restarted, but the bootloader was somehow getting confused because of continuous data coming on the serial port and thinking that a code upload is happening. ( This is my assumption, I am unable to modify the bootloader to close the serial port upload till now)