Below are the code we have used for reading the data from the flash.here we are finding the problem for giving the checksum value,Every time if we debugg the sum values are different,The sum minus checksum should be Zero ,
All the time sum obtained is diiferent so that we cant assign a proper vale to a checksum,Is ther any alternate method for reading the flash data ,how i can modify my code for that
unsigned int sum = 0;
unsigned int checksum;
const_unStartPgmMem=0x4000;
unsigned int *pFlash = (unsigned int *)const_unStartPgmMem; //Start of program memory
while ((unsigned int)pFlash >= const_unStartPgmMem)
sum += *pFlash++;
sum=sum-checksum;
return (sum == 0);
