View previous topic :: View next topic |
Author |
Message |
dprocter
Joined: 01 Jul 2009 Posts: 5
|
MAC Level Filters 18F87J60 |
Posted: Mon Jul 06, 2009 2:14 am |
|
|
I'm having a few Ethernet problems, which I have managed to localise down to multicast/broadcast messages filling up the tiny buffer on the PIC. This is making Unicast impossible, which is all I need.
After a look in the datasheet I found the ERXFCON (receive filter) register, but I can't seem to get it to work. I should be able to only allow Unicast messages through, setting it to 0xE0 (1110 0000).
Does anybody have any experience with this register, and/or any advice?
Thanks |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Mon Jul 06, 2009 5:25 am |
|
|
You are looking in the right place. Here is an example that will not accept multicast
Code: |
// The default enables unicast and broadcast
WriteReg(ERXFCON, ERXFCON_UCEN | ERXFCON_CRCEN | ERXFCON_HTEN | ERXFCON_BCEN); |
_________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
dprocter
Joined: 01 Jul 2009 Posts: 5
|
|
Posted: Mon Jul 06, 2009 9:16 am |
|
|
asmallri wrote: |
Code: |
// The default enables unicast and broadcast
WriteReg(ERXFCON, ERXFCON_UCEN | ERXFCON_CRCEN | ERXFCON_HTEN | ERXFCON_BCEN); |
|
Yea, I tried that, but it doesnt seem to let anything through. I cant even ping my device with that set!
Also, im using the Brush Electronics bootloader, which enables the unicast and broadcast by default.
Code: | movlw M_ERXFCON_UCEN | M_ERXFCON_CRCEN | M_ERXFCON_BCEN | M_ERXFCON_MCEN
movwf ERXFCON |
This will always happen before my code initialises, so im wondering if that could be affecting the ability for my code resetting it to 0xE0 (unicast and CRC). |
|
|
|