Hello,
I am using a third-party MCU as a host to communicate with BQ40Z80 to get gauge value. For this, when I implement the repeated start between the write process (CMD) and the read process (gauge value), the first byte that comes in is the PEC value for the previous communication. For example, if I repeat CMD 0x01, I would get {0x8E, 0x2C, 0x01, 0x8E} where the first 0x8E is PEC value from previous communication, 0x2C and 0x01 is gauge value (300) and the last 0x8E is PEC value of the current communication (CRC calculated using 0x8E, 0x2C, and 0x01). I don't have the same issue I send the stop condition before the read process. For the same CMD 0x01, I would get {0x2C, 0x01, 0xE1}.
I read the slua475-SMBusMadeSimple application report, and it states that a repeated start should be used to transition from the write process to the read process. But I am facing the issue only when I use the repeated start. I tried applying various delays between the write and read process but that did not help.
How can I resolve this issue?
Thanks,
Min