How to Calculate FlexRay Header CRC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to Calculate FlexRay Header CRC

3,998件の閲覧回数
yusun
Contributor I

Hi everyone,

 

We are using MC9S12XF512 to build a FlexRay application. However, we cannot figure out how the Header CRC configured for each message buffer is calculated.

 

The official FlexRay does give an algorighm, but it looks like that the actual implementation in MC9S12XF512 is different. Because we tried to use that algorithm to calculate the Header CRC, but the result is different from the value given in the sample applications.

 

Any advice?

 

Thanks a lot.

 

Yu

ラベル(1)
0 件の賞賛
3 返答(返信)

2,151件の閲覧回数
bobgardner
Contributor I

The Flexray_CC.c module in the NVC7383 demo code has the header crc calc function in it.

0 件の賞賛

2,151件の閲覧回数
kwridan
Contributor I

Hi,


The FlexRay protocol specs document (can be obtained from www.flexray.com) contains the algorithm, for the header CRC remember to have the inital values as:

vCrcSize=11;
vCrcInit=[0 0 0 0 0 0 1 1 0 1 0];
vData=[1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0];
vCrcPolynomial=[0 1 1 1 0 0 0 0 1 0 1];


vData as you know is

   1 bit          1 bit        11bits      7bits
[syncFrameBit,startUpFrameBit,frameID,payloadLength]


I found that the CRC result in the end was the other way around (LSB was on the left!)


Good luck!

Kassem

0 件の賞賛

2,151件の閲覧回数
admin
Specialist II
I found that the CRC result in the end was the other way around (LSB was on the left!)

That's because vData have LSB left, i.e. SY bit is LSB.

0 件の賞賛