Hi Team,
we are in a position where we need to overwrite the Ra tables on the BQ27426 on ocassion. We understand the flashstream format and know how to write the values. What we're confused about is if we are generating the checksum properly and then, where to write it.
We did review SLUA801 and found the following code:
//check_sum: calculate check sum for block transfer
//pData: pointer to data block
//nLength: length of data block
unsigned char check_sum(unsigned char *pData, unsigned char nLength)
{
unsigned char nSum = 0x00;
unsigned char n;
for (n = 0; n < nLength; n++)
nSum += pData[n];
nSum = 0xFF - nSum;
return nSum;
}
1) Is this the correct procedure for calculating the checksum?
2) Where should this value be written - again if the block transfer is for Ra table?
Thanks,
Sal