This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ENC28J60 Filter UDP

Hello All

I am trying to interface ENC28J60 with LPC2148. Everything works well and good except a very few things that I am unable to get it solved.

1) I have an Mobile APP that sends UDP packets to LPC2148, when I address it to the device IP in my mobile APP... it works. But when I use the Broadcast address... it doesn't receive any packets. I cross checked the broadcast using PC and it receives. I believe there is no issues with the transmission and there a problem with the UDP filter. My filter is set a below. Kindly suggest what has to be done to receive the broadcast packets.

// do bank 1 stuff, packet filter:

// For broadcast packets we allow only ARP packtets

// All other packets should be unicast only for our mac (MAADR) //

// The pattern to match on is therefore

// Type ETH.DST // ARP BROADCAST

// 06 08 -- ff ff ff ff ff ff -> ip checksum for theses bytes=f7f9

// in binary these poitions are:11 0000 0011 1111 // This is hex 303F->EPMM0=0x3f,EPMM1=0x30

enc28j60Write(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN);

enc28j60Write(EPMM0, 0x3f);

enc28j60Write(EPMM1, 0x30);

enc28j60Write(EPMCSL, 0xf9);

enc28j60Write(EPMCSH, 0xf7);

2) Sometimes after a long run, the controller LPC2148 stops responding to PING requests. Have to reset it back. Any clues?

Thanks