Other Parts Discussed in Thread: BQSTUDIO
Hello,
I am working on bq27542-G1 FUEL GAUGE, interfacing it through I2C with my MCU.
I am refering essentially to bq27542-G1 TRM: link.
In order to calibrate the FUEL GAUGE, I need to read the BlockData (from 0x40 to 0x5F) and also the BlockDataCheckSum (0x60) to set new parameters to the Data Flash but I am facing problems with that:
to read the 32 block Data bytes am following these steps:
*Enter Calibration Mode.
*Send 0x40
*Read 32 bytes
I get my 32 bytes and checksum calculation gives (0xDC), however the checksum read from (0x60) adress is (0x0C) which is the first byte of my 32 block Data bytes previously returned from the FUEL GAUGE.
+Checksum is (FF– x) where x is the 8-bit summation of the BlockData() (0x40 to 0x5F) on a byte-by-byte basis.
I am sure that I have a problem reading the checksum from (0x60) address or the whole BlockData from (0x40) address.
Is there a problem with my methoid reading Data from the BQ27542-G1 ?
Is there any other reference documents about BQ27542-G1 explaining in a better way writing and reading data from Data Flash ?
Kind Regards,
Bayram