cancel
Showing results for 
Search instead for 
Did you mean: 

Can't make I2C START condition on stm32l100

amomum
Associate III
Posted on June 15, 2018 at 13:26

I'm using stm32l100C6-A to communicate with gas gauge by I2C. My code tries to start I2C transfer, like this:

I2C_GenerateSTART( i2c_periph, ENABLE );

and sometimes it works, transfer is completed, all is well. But some othertimes instead of normal start condition on I2C lines, I see this:

0690X0000060BgqQAE.png

If my code tries to START long enough (about 15 sec), it magically works. But some other times - it doesn't. Resetting I2C with I2C_SoftwareResetCmd or I2C_DeInit doesn't help, reinitializing GPIO doesn't help.

But making a full MCU reset helps.

What is going on? What am I doing wrong?

#stm32l-i2c #i2c-isues
0 REPLIES 0