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.
I use the software version RTD4.0.0 HF01, and the chip is S32K312
Best Regards,
xianlong
Solved! Go to Solution.
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
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
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