Ethernet MAC filter?

23 Feb 2010

Hi all!

 

Is there a way to set up a hardware MAC filter for the ethernet interface in the mbed? I plugged it on the dorm's network and all I got is tons of meaningless bytestream and it seems hard to take only the frames that are for me.

 

Regards, Balint

23 Feb 2010

It seems you need to set AcceptPerfectEn bit in the RxFilterCtrl register to 1, and clear the rest. Also clear PassRxFilter bit in the Command register. See chapter 10, section 17.10 in the User Manual.

24 Feb 2010

Thanks, I will check it! But how can I do register manipulation with mbed API?

25 Feb 2010

Use structures from the LPC17xx.h header (included by mbed.h, no need to add specifically). E.g.:

LPC_EMAC->RxFilterCtrl = 1<<5; // set AcceptPerfectEn=1

You should also inspect the sources of whatever IP stack you use to see if it's already being set up somewhere, maybe you just need to adjust a define or something.