2018-06-15 04:26 AM
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:
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