Skip to main content
4316139955_stm1_stmicro
Visitor II
October 25, 2011
Question

I2C Bus clear

  • October 25, 2011
  • 0 replies
  • 754 views
Posted on October 25, 2011 at 11:29

Hi,

I'm working on a project using the I2C interface from the STM32. If the SDA line gets stuck LOW because of a lost clock pulse, the normal procedure to recover would be to send 9 clock pulses (see the NXP I2C-bus specification, section 3.16 Bus clear).

If I try to generate the clock pulses by sending the a byte, this seems not to be working, because of the BUSY bit in SR2 is set. This bit is set if the SCL or SDA lines are low. Is there a chance to get the interface sending out the clock pulses while the BUSY flag is 1, or must the clock pulses be generated by hand (switching the SCL pin to GPIO mode and generating the pulses manualy)?

Regards,

Marc
    This topic has been closed for replies.