S32K3 The CRC32 count results are consistent

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

S32K3 The CRC32 count results are consistent

Jump to solution
541 Views
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 Kudos
Reply
1 Solution
512 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
513 Views
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 Kudos
Reply
508 Views
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 Kudos
Reply