I am trying to program stm32 on my i2c EEprom, but it seems like every time I say:
I2C_GenerateSTART(I2C1, ENABLE);
while( !(I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)) ); the code hangs here
I went through the debugger, and I found that the flag bit SR1 0 (which is a flag with an open start bit) is not set, so the code freezes. I can see on the oscilloscope that the start bit was generated, and this works sometimes. it usually breaks when I tried to make several records in a row. I checked HW, everything looks good. I checked the frequency that I run on the i2c bus, it works well within 24 k1025 ep.
any ideas
thank
source
share