Other Parts Discussed in Thread: MSPM0G1107,
Tool/software:
Hello,
I am currently working on a project that involves the MSPM0G1107 microcontroller and the BQ76907 analog front end (AFE). I'm encountering an issue when attempting to read the accumulated charge from the BQ76907. This operation involves a 12-byte I2C read.
The problem occurs after 10 bytes have been successfully read—at this point, the BQ76907 pulls the SDA line low and holds it. As a result, a timeout occurs, and the I2C peripheral is re-initialized. However, the BUSBUSY bit remains set, causing the code to hang in the start condition check function.
I attempted to resolve this by enabling the I2C reset feature of the BQ76907 through the I2C_CONFIG register (set to 0x8402). This workaround does prevent the issue, but it's not a viable long-term solution for our application.
For context, the data transfer is handled using the I2C interrupt. Additionally, I'm running USART communication in the background using interrupts for data transmission and reception every 1 second at 9600 baud (100 bytes maximum).
Notably, this issue occurs only intermittently, making it difficult to reproduce consistently.
Could anyone help me understand why the BQ76907 is holding the SDA line low during this read operation? I’ve attached a screenshot illustrating the behavior for reference.
Thank you in advance for your support.
Expanded screen shot:
Screen shot showing time out and restart of uC, and SDA still low