S32K3 The CRC32 count results are consistent

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

S32K3 The CRC32 count results are consistent

ソリューションへジャンプ
163件の閲覧回数
wuxianlong
Contributor III

Hi,All


I have a problem and need help. The CRC32 count results are consistent.

I use the CRC32 algorithm to calculate {0x12, 0x34, 0x56, 0x78} and get the correct result 0x4A090E98.

The second time we use this algorithm to get the wrong result, 0x94b22e7b.

The only difference between the two calls is that the function Crc_Ip_SetChannelCalculate needs to fill in the parameter IsFirstCall, which is FALSE when I do it the second time.
What is the reason for this? Is there anything to pay attention to in this parameter "IsFirstCall"? There is nothing wrong with me using the CRC32_MPEG_2 algorithm.
wuxianlong_2-1717557104486.png

wuxianlong_0-1717557031159.png

I use the software version RTD4.0.0 HF01, and the chip is S32K312

wuxianlong_1-1717557074604.png

Best Regards,
xianlong

0 件の賞賛
返信
1 解決策
134件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @wuxianlong 

All the times that you need to calculate the CRC from scratch it is necessary to define TRUE as the IsFirstCall parameter because when it is set to FALSE, the LocInitialSeedStartValue (Start value (seed Value) when the algorithm starts) will not be the StartValue you set when calling the function, thus causing the difference in the results. 

 

B.R.

VaneB

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
135件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @wuxianlong 

All the times that you need to calculate the CRC from scratch it is necessary to define TRUE as the IsFirstCall parameter because when it is set to FALSE, the LocInitialSeedStartValue (Start value (seed Value) when the algorithm starts) will not be the StartValue you set when calling the function, thus causing the difference in the results. 

 

B.R.

VaneB

0 件の賞賛
返信
130件の閲覧回数
wuxianlong
Contributor III

Hi,@VaneB 

Thank you very much, VaneB.

I have a doubt that every time I choose a channel to call an algorithm, I need to define "IsFirstCall" as TRUE.What is the application scenario for this parameter? When it needs to be defined as FALSE.

Best Regards,
xianlong

0 件の賞賛
返信