AnsweredAssumed Answered

STM32F103 I2C EEPROM oddity

Question asked by prinster.jim on Jun 17, 2013
Latest reply on Jun 17, 2013 by denehan.joe
I am trying to use the I2C to read and write to an external 24LC024 EEPROM.  I am using a polling method since my DMAs are being used for USART2.  I remapped I2C1 to PB8/PB9. 

When I read the EEPROM it works fine and I see the correct data.  However, when I write it sometimes fails.  If I single step through my code (IAR EWARM) it will always write correctly with no errors.  However when I let it run freely it will fail waiting for a response from the EEPROM usually when I am sending the data address I want to write to.  I have used the settings as suggested in the examples from IAR.  What else should I look at?

Also, when I read or write I am doing the entire process for each byte.  Does anyone have an example of a polling method that is more efficient?  For example, setting the eeprom to auto-increment through a page of bytes.

Thanks.

Outcomes