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.

BQ76940: bq76940

Part Number: BQ76940

Hi expert,

My customer has some questions for using bq769x0 to read the SYS_CTRL2 register. 

(1) Write data to SYS_CTRL2:  0x10 (slave address), 0x05 (register address), 0x40(data), 0x24 (CRC calculated result by the first three data). Will BQ769x0 use the first three data to generate a CRC to compare with 0x24?

(2) What is the storage address of 0x24 (CRC)?

(3) After that, reading  2 bytes of data in the SYS_CTRL2 register and get 0x40 (data) and 0x85 (should be CRC). How is 0x85 written into BQ769x0?

(4) What is the storage address of 0x85 (CRC) read above?

(5) Why is the read CRC result(0x85) different from 0x24 which is written in (1)?

Can you help answer the above questions? if there is anything that is unclear, please let me know. Thanks.

Best regards

  • Hi Lenna,
    1. See the bq76940 data sheet section 7.3.1.4 specifically figure 7-4. Also see the application note www.ti.com/.../slva626b.pdf . Yes.
    2. The CRC is calculated dynamically and is not stored.
    3. See figure 7-5 of the data sheet and figure 8 of the data sheet with the description above it. The CRC is not written to the bq76940, CRC is generated by the bq76940 and sent to the host. If interested the host should generate its own CRC on the bytes received and compare to the CRC received.
    4. The CRC is not from an address, it is dynamically generated and transmitted.
    5. The CRC is calculated with the polynominal and will depend on the bytes included in the calculation. For the write it would include 3 bytes, for the read 2 bytes. The read CRC for a zero register value may look repetitive since the device read address and the data byte are included in the CRC.
  • Thanks for your reply. These questions are from me and I think there are almost soloved. But I have a few more questions. (1)If my BQ76940 has CRC option, must I use the functions with "withCRC" to R/W it and not R/W it without CRC? (2)To enable CRC means to choose the BQ76940 with CRC option? (3) When I want to read single byte from a BQ76940 register, should I read two bytes and then will the BQ76940 send one byte data and one byte CRC by default? (4) I can understand "a zero register value may look repetitive". Can your give me an example?
  • Hi Xiong,
    1. You must use the CRC to write to the device. Without the valid CRC the device will reject the byte write. You can read without the CRC by terminating a single byte read before the CRC byte is sent, or ignoring the CRC byte(s).
    2. Yes, CRC must be purchased enabled or disabled, it can not be changed outside the TI factory.
    3. If you want to read the CRC you must keep the clock active for the second byte.
    4. I don't have an example remember the value, but the bq76940 data sheet section 7.1.3.4 includes "In a single-byte read transaction, the CRC is calculated after the second start and uses the slave address and data byte." The slave read address will always be the same, for the basic address of 0x08 it will be 0x11. Each single byte read of 00 the CRC should be calculated from 0x11 0x00 and should be the same.
    For a multi-byte read "The CRC for subsequent data bytes is calculated over the data byte only.", any string of 0x00 should have the same CRC.
  • Thank you for the answers. I completely understand. Have a nice day!