Hi ,
I am using battery gauge BQ 27742-G1. How do I calculate the checksum for key programming and executing an authentication query? Is there any difference between these two checksums?
Regards,
Riya
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi ,
I am using battery gauge BQ 27742-G1. How do I calculate the checksum for key programming and executing an authentication query? Is there any difference between these two checksums?
Regards,
Riya
Hi, Riya,
Please read following section copied from TRM closely, I think it answers your question.
4.2.5 BlockData(): 0x40 Through 0x5F
This command range is used to transfer data for data flash class access. This command range is the 32-byte data block used to access Manufacturer Info Block A or B. Manufacturer Info Block A is read-only for the SEALED access. UNSEALED access is read-write.
4.2.6 BlockDataCheckSum(): 0x60
The host system must write this value to inform the device that new data is ready for programming into the
specified data flash class and block.
UNSEALED Access: This byte contains the checksum on the 32 bytes of block data read from or written to data flash. The least-significant byte of the sum of the data bytes written must be complemented ([255 –x], for x the 8-bit summation of the BlockData() (0x40 to 0x5F) on a byte-by-byte basis) before being written to 0x60.
SEALED Access: This byte contains the checksum for the 32 bytes of block data written to Manufacturer Info Block A. The least-significant byte of the sum of the data bytes written must be complemented ([255 – x], for x the 8-bit summation of the BlockData() (0x40 to 0x5F) on a byte-by-byte basis) before being written to 0x60.
Thanks!
Phil
Hi Phil,
Thanks . I have already gone through these documents. But I need the method for calculating the checksum . What is meant by 8 bit summation on a byte by byte basis. Can you please explain with an example?
Thanks,
Riya