AnsweredAssumed Answered

Checksum calculation on C-Flash

Question asked by Santhamurthy R on May 30, 2017
Latest reply on Jun 8, 2017 by Erwan Y

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,