CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18F87J60 Ethernet Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dprocter



Joined: 01 Jul 2009
Posts: 5

View user's profile Send private message

18F87J60 Ethernet Problem
PostPosted: Wed Jul 01, 2009 5:05 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Jul 01, 2009 7:13 am     Reply with quote

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:

Code:
arp -d *


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

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 2:52 pm     Reply with quote

Hi,

I maybe had a similar issue: After 5 connection, I was not able to communicate anymore, even if the connection was done.
See thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=37857&highlight=franck26

Good luck,
Franck.
dprocter



Joined: 01 Jul 2009
Posts: 5

View user's profile Send private message

PostPosted: Thu Jul 02, 2009 2:14 am     Reply with quote

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!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group