2014-11-03 05:25 AM
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 Martin2014-11-03 07:36 AM
Sorry for this post, I found an error in my code that caused this behaviour.
Clearing AF and setting STOP works. Martin