Im trying to read/write EEPROM byte by byte but if i dont put an enough delay(~1ms) between read/write tasks, im getting or writing wrong value to the EEPROM. But this delay is taking a significant time when there is a many bytes to read/write and 400kHz losing its meaning. Am i missing something ? or its a nature of byte by byte process is slow. Thanks for your time and help.
MCU = STM32F072C8Tx
EEPROM = 24LC64
I2C Settings:
Speed = 400 kHz
Rise Time = 300 ns
Fall Time = 300 ns
Analog Filter = Disable
Digital Filter Coefficent = 0
Basic R/W Code Sample:
HAL_I2C_Mem_Write(&hi2c1, device_addr, mem_addr, I2C_MEMADD_SIZE_16BIT, data, 1, 500);
Hal_Delay(1);
HAL_I2C_Mem_Read(&hi2c1, device_addr, mem_addr, I2C_MEMADD_SIZE_16BIT, databuffr, 1, 500);