AnsweredAssumed Answered

How to deal with I2C acknowledge failure

Question asked by Mr_M_from_G on Nov 3, 2014
Latest reply on Nov 3, 2014 by Mr_M_from_G
Hi,
I am using STM32L151 and try to communicate over I2C with STM32L151 as master. When I send out an adress to a slave that is not there I don't get an ACK, SDA stays high. With my configuration this results in an interrupt coming out at I2C1_ER_IRQHandler. Also SCL stays low after the ninth pulse.
Now I need to get rid of the AF bit and resolve the bus to be able to try again. I clear AF in SR1 and set STOP in CR1 as mentioned in RM0038 page 664 but it has no effect. I tried an __ISB() after clearing AF, also no luck. I also tried to set START and STOP in CR1 - no change.
Any ideas what I can do. Is there something I completely missed?

Thanks a lot

Martin

Outcomes