I am using an M24C64 EEPROM with an STM32F4, but I have a problem with sequential writing. When I try to write 16-bit data sequentially like this, I get HAL_I2C_ERROR_AF error:
write_eeprom(address1,data1);
write_eeprom(address2,data2);
But if I put a 5 ms delay between write operations, I could write successfully.
How can I write faster to the EEPROM?