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.

BQ28Z610: Resetting I2C line when in error state

Part Number: BQ28Z610

I am having a problem with resetting the I2C line from an STM32F411 to a BQ28Z610.

I am able to enter the error state by generating a stop condition while reading. When the error state is entered, the SDA line is pulled low while SCL stays high and I have not been able to recover from

this state without resetting the STM. I am using the STM32Fxx_LL_I2C library. Below is an example of the error state.

After the SCL line goes high there is no more activity on the I2C.

Please advise.

Thanks,

Roni

  • Hi Roni,
    can you hold the clock and data lines low for 2s to see if the device gets to recover?

    thanks
    Onyx
  • I tried to force the lines low but it seems the slave is holding the line high and even if I reconfigure the pins as GPIO_MODE_OUTPUT_OD and try to drive them low, nothing happens.

    I did however find a solution for this problem. As it turns out, my deinitialization function did not deinitialize the pins themselves, so after adding that the lines seem to reset. 

    I still have an issue where sometimes the Write sent immediately after a reset will be NAK'd, however I am unable to get this to consistently happen so it is probably a timing issue.

    In the image below I set this error state twice, and each time it was reset but the first instance the following write was NAK'd. The error is circled in blue and the NAK is circled in red.

    The next image is a zoom in on the NAK:

    Any idea why this is happening?

    Thanks,

    Roni

  • I agree, it looks like a timing issue. If you slow down comms, or space out commands it may not occur.