Hi,
I run I2C drivers to access EEPROM.And it fails in “WAIT_UNTIL_I2C_FIFO_IS_EMPTY()" of "i2c_wait_until_eeprom_ready”.
But this example ran OK in the past few days.The hardware seems to be fine.
I have no idea about I2C's driver.
Could you please give me some proposals?
Tue, 2014-12-30 07:20
#1
I2C example

Hi,
It looks like something is going wrong during initialization of the EEPROM.
我建议你尝试peripheral_examples project. This project allows you to execute a very simple I2C interaction with an EEPROM. You will need to make modifications to fit your hardware ( periph_setup.h and peripherals.c).
The documents UM-B-004 andUM-B-005 should guide you.
Hi,
I just use the peripheral_examples project to test I2C communication.And also I can boot from EEPROM before.
But one day my board can't boot successfully.So I try the peripheral_examples project to test I2C.Then I found the code always failed in “WAIT_UNTIL_I2C_FIFO_IS_EMPTY()".
i2c_eeprom_write_page
-->i2c_wait_until_eeprom_ready
-->WAIT_UNTIL_I2C_FIFO_IS_EMPTY // a endless loop
Does it means the EEPROM respond with a NAK? Maybe the EEPROM goes wrong?
May you should use a hardware logic analyzer to check, whether the eeprom have correct response.