cancel
Showing results for 
Search instead for 
Did you mean: 

ENET multicast configuration

niko
Associate II
Posted on June 10, 2009 at 14:03

ENET multicast configuration

4 REPLIES 4
niko
Associate II
Posted on May 17, 2011 at 09:56

I'm trying to make ethernet mac to receive multicast frames using the hash registers as described in the str912 reference. The documentation is somewhat unspecific on the actual procedure. In my understanding the ether mac hardware calculates ethernet CRC32 over 6 bytes of destination address and then uses the most significant bit (bit 31) to determine which (hi/lo) hash register to use. The next 5 bits (bits 30-26) determine which bit in the hash register is checked to see if the frame is to be received.

This is pretty much how ethernet mac operates on some coldfire chips. If I use the same code (found in some linux distribution for coldfire) to calculate hash register values the bit I get is in correct. If I calculate the CRC32 using CRC32C-library I cannot get correct values. I can find the correct bit in hash register by trial and error (by setting bits in hash registers and trying to receive multicast frames until I succeed), but values I get by calculating CRC are not the same. The CRC functions I've used calculate correct CRC for test frames from IEEE ether standard example frames.

My asumption is that the CRC register is reset at the start of the frame, the 6 bytes of destination address are hashed into it and the current CRC value is used to determine if the frame is to be received by the hardware. If so, the CRC register will be updated until end of frame, then it is complemented and compared to FCS of the ether frame to determine if the frame was correctly received. I assume that the CRC value after the destination address is not to be complemented (I'm not getting correct values, with or without complementing the CRC).

Does anyone have code sample showing excatly how the correct hash register bit value is deduced from given ether multicast address?

Thank you in advance.

--

niko

niko
Associate II
Posted on May 17, 2011 at 09:56

Whoa, seems like posting here really helps to find the solutions to problems :o

A few minutes after my post I realized that the CRC register is complemented and the bit order is reflected at the end of crc calculation. So after the destination address calculation the crc value in CRC register is not yet complemented (as I assumed) but also not reflected (bits n and 31-n swapped for n=0...15).

avnera
Associate II
Posted on May 17, 2011 at 09:56

hi niko,

have you managed to receive multicast frames after all?

was it using the STR912 and the uIP stack?

I'm trying to implement one of the discovering protocols. most of them use multicast in order to announce the existence of the device.

any information on that would be appreciated

avner.

bbalasa
Associate II
Posted on May 17, 2011 at 09:56

uIP is unable to receive multicast messages. you need to change to lwIP.