View previous topic :: View next topic |
Author |
Message |
dprocter
Joined: 01 Jul 2009 Posts: 5
|
18F87J60 Ethernet Problem |
Posted: Wed Jul 01, 2009 5:05 am |
|
|
Im using the 18F87J60 in a project, and am having a few issues with the PIC.
The device basically converts from Serial to TCP/IP and vice versa.
The code/hardware will all run fine for 2-4 days, then it reaches a point when the device is no longer talking to the computer server and the device does not respond to pings/UPD commands. Watchdog timer does not seem to help.
Ethernet lights are still working and flashing as the switch does. Which I believe means that the PIC has crashed (Ethernet interface is separate). Are there any common memory leaks or other problems that could be causing this to happen?
Thanks |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Wed Jul 01, 2009 7:13 am |
|
|
Are you using DHCP?
If so, what is the DHCP lease time set by your router?
If you are using WDT then it seems likely the PIC has not crashed but is instead in a loop that also resets the WDT. One method I have used in this situation is to add an (can be any spare source) and when the PIC appears to enter an endless loop I invoke the interrupt which them dumps the contents of the PICs stack. This will tell you where the PIC is executing and the call sequence to help determine what path the code took to get into the state.
Have you been able to catch a wireshark trace to see what is happening at the network level?
Are you using TCP or UDP as the transport?
Is the PIC the client or server side of the connection?
Is it possible you have a duplicate IP address or duplicate MAC address?
Next time it happens, clear the ARP cache on the PC end. In windows this is done in a cmd window with:
Once you have done this see if the PIC now responds _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
|
|
dprocter
Joined: 01 Jul 2009 Posts: 5
|
|
Posted: Thu Jul 02, 2009 2:14 am |
|
|
It appears that a multicast stream is constantly filling up the buffer, making other transmission impossible.
I only need unicast with this particular device. The PIC does have a receive filter (ERXFCON). Logical thinking would make you think that you could Deny All then Allow. But it seems all you can do is allow a broadcast method.
Has anybody ever used this register?
Thanks for all your replies! |
|
|
|