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.

BQ76942: I2C is NAK-ing during block writes

Part Number: BQ76942

Tool/software:

TI experts,

Im using a Renasas da14592 microcontroller and Im trying to talk to the BQ76942 chip over I2C. When I Read I get no errors, when I do a single byte write I get no errors, but when I do a multi byte write I get a NAK on the second byte.

I've watched the microcontroller code example video that TI provides and downloaded the sample code to make sure I wasn't missing something. I then tweaked the sample code to work with my da14592 microcontroller.  For example, 7 bit addressing (0x08) rather then 8 bit (0x10 / 0x11).

I attached 2 screenshots of my logic analyzer. One screenshot show an unsuccessful multi byte write where I write the sub command 0x0001 to the register 0x3E and 0x3F. The other screenshot shows a successful multi byte read where I read the entire buffer starting at 0x40. However, the buffer always has garbage data because I haven't been able to successfully write any sub commands.

I cant think of any reasons why the first byte gets an ACK but not the second byte. Any suggestions or help will be greatly appreciated and if you need more information let me know, Thanks you!

 

  • Hello Caden,

    Please give me some time to go through and get back to you on this.

    Regards,

    Rohin Nair

  • Hello Caden,

    Can you confirm if your microcontroller device supports clock stretching and whether this is enabled or not? Also, can you try enabling CRC for data error checking?

    I have retried your command sequence and there seems to be no error on my end. I have pasted this below. Can you share me the full logic analyzer file to view? I would like to view all the commands you are entering prior to this. Also can you try a different subcommand? The one you are doing now does not allow writes as it is related to the device number.

    Regards,

    Rohin Nair

  • After you suggested turning on CRC I found that the problem was that my version of the chip is BQ7694202 which by default already uses CRC. After fixing my i2c protocol to use CRC and send data as seen below, its started ACK-ing back. thanks for the help!

    START → [ADDR|W] → [REG] → DATA0 → CRC0 → DATA1 → CRC1 → STOP

  • Hello Caden,

    I am glad it is working now!

    Regards,

    Rohin Nair