2017-05-30 04:35 AM
Hello All,
I am working on SPC560B54L5 board using SPC5studio version 5.2.3.
I am trying to implement the checksum calculation on the C-flash memory in my application. In order to implement checksum I am making use of ''pCheckSum( &ssdConfig, c_dest, c_size, &c_sum, (tpfNullCallback)NULL_CALLBACK);'' API of the flash driver component. In the ''SPC560Bxx_RLA Flash Test Application for Discovery'' I have found that after calculating the checksum, sum value is compared to 0x000000000.
My concern is that, in my application the calculated checksum is not equal to zero. Please explain what is the need for comparing the calculated value to Zero in Flash test application. (Is it due to the pre-calculated value of checksum is equal to zero).
Whereas ''Standard software driver for C90LC Flash'' document clearly describes the sum value will lie in 0x00000000 - 0xFFFFFFFF range.
Kindly explain the need for comparison of sum with 0x00000000 in the test application. Also kindly share the source code for the pCheckSum() API so that it will very helpful for us to understand the implementation of checksum API and make use of it as suitable to our application.
Thanks in Advance,
With Regards,
R.Santhamurthy
Solved! Go to Solution.
2017-06-08 02:35 AM
Hello R.Santhamurthy ,
Sorry for the answer , i can miss any post not tagged in SPC5x and SPC5Studio
we can not share this source code
it seems that the sum value should be 0
returnCode = pCheckSum( &ssdConfig, dest, size, &sum, (tpfNullCallback)NULL_CALLBACK);
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
/* The sum value should be 0 */
if ( 0x00000000 != sum )
{
returnCode = (UINT32)DEMO_FAIL;
ErrorTrap(returnCode);
}�?�?�?�?�?�?�?�?�?�?�?�?
Best regards
Erwan
2017-06-08 02:35 AM
Hello R.Santhamurthy ,
Sorry for the answer , i can miss any post not tagged in SPC5x and SPC5Studio
we can not share this source code
it seems that the sum value should be 0
returnCode = pCheckSum( &ssdConfig, dest, size, &sum, (tpfNullCallback)NULL_CALLBACK);
if ( C90FL_OK != returnCode )
{
ErrorTrap(returnCode);
}
/* The sum value should be 0 */
if ( 0x00000000 != sum )
{
returnCode = (UINT32)DEMO_FAIL;
ErrorTrap(returnCode);
}�?�?�?�?�?�?�?�?�?�?�?�?
Best regards
Erwan