NE64 MCHASH EMAC CRC calculation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NE64 MCHASH EMAC CRC calculation

5,853 Views
skip
Contributor I
I am working with the EMAC on the MC9S12NE64 16 bit processor and am trying to define a multicast filter via the MCHASH registers.  All the documentation I have found says to use th 32-bit CRC generator and selecting the 6 most significant bits ...
 
The problem is that I can find MANY 32-bit CRC calculations on the web.  Can anyone help me find the correct CRC calcuation?
 
A little background:  I am communicating (successfully) via the network using broadcast messages and multicast messages.  I would like to filter all but a couple multicast groups out.
 
Thanks in advance!
Skip
Labels (1)
0 Kudos
5 Replies

570 Views
steliosb
Contributor I
Hello
 
Did you manage to join multicast groups and multicast data to multicast adressess?
Do you use CMX MIcronet protocol Stack or OpenTCP?
0 Kudos

570 Views
skip
Contributor I
Yes, I did join a multi-cast group.   To answer your last question, I wrote my own network stack, so I did not use either of the mentioned stacks. 
 
A Freescale tech returned the following e-mail on this topic that answered my question:
 

In reply to your Service Request SR 1-327406101 (please see details below and notes on how to contact us with regard to this message):

I am sending you attach a CRC_lib that is free for every body, I use this library in my designs. I think can help you.

Also send you the link where I download from the first time.

http://www.lammertbies.nl/comm/info/crc-calculation.html?crc=1111111111&method=ascii

 
0 Kudos

570 Views
steliosb
Contributor I
Hi skip,
 
I thought it is not so easy to write your own TCP/IP protocol stack, so if you managed to do this you must be a genious.
I want to write a multicast application in which the embedded system must be able to join some multicast groups apart of the 224.0.0.1 in order to filter incoming data, but for this functionality i thought that a TCP/IP stack is needed that supports IGMP protocol and multicasting ( like CMX-Micronet)
The hash table of NE64 confuses me.It has room only for one multicast address?How it exactly works, except it must be CRCed?
 
 
0 Kudos

570 Views
skip
Contributor I
In order to receive multi-cast messages, the address used (in your case 224.0.0.1) has to have the appropriate bit set the in the hash table.  To figure out which bit to set, you have to run the address through the above mentioned CRC.  Each bit in the hash table can represent many different addresses (I believe), so if you set all the bits in the hash table, you will receive messages in all multi-cast groups on your network.  Since you do not want this (I'm assuming), you have to set the correct bit in the hash table.
 
Hope this helps.
0 Kudos

570 Views
steliosb
Contributor I
It looks a little bit tricky.
This bits can also be set at runtime, or they must be preprogrammed?
What about the broadcast address?
Can you give me a small fragment of code with which you do the crc calculation on a MAC address and assign the appropriate bits on the MCHASH table?
0 Kudos