OpenSprinkler › Forums › Hardware Questions › OpenSprinkler › Controller lockups / crashes with wired Ethernet module › Reply To: Controller lockups / crashes with wired Ethernet module
Even though I have not posted for a while I am still working on the problem of the wired Ethernet
connection hang. In discussions with the UIPEthernet developers I am convinced that their
driver is OK. So I have changed my debug strategy.
The essential problem seems to be that the main loop is not seeing Ethernet packets when
they arrive. The loop queries if any data has arrived and the Ethernet driver always
reports “no data”. This happens even when packets are arriving. Since the packet
data is not read from the Ethernet chip buffer, the buffer fills and flags an overrun
condition. Originally I thought that this overrun flag was the cause of the problem
but now I see that it is just a result of the problem.
It seems to me now that there must be data corruption in the RAM. The UIPEthernet returns
an incorrect result but the UIPEthernet appears to be error free. Perhaps a buffer
is over-running it’s bounds. Perhaps there is an error in variable type casting.
My new strategy is to dump the entire system RAM for the normal running state and dump
it for the error state. I have a bunch of captures of both conditions.
I have written a program that takes the map file produced by objdump and filled out each
variable with the actual data from the RAM dump. This gives me value of all variables
that exist in the system. I can compare these results from the many captures from the
good running systems. Any differences in the variables will be just the normal running
state changing. I edit these variables out. What is left is a list of the variables that
don’t change in my configuration in my running system when it is working properly.
I next process the bad state RAM dumps and compare them to the good state variables.
This gives me a map of what is different between a good running system and a system
with the Ethernet port hung. After this processing I find about 40 variables that
are different in the bad state. This is out of 586 total variables in the map of
At the moment I am pondering this result but have not come to a conclusion.
It is interesting that the WiFi also seems to have a problem. perhaps they are