Hi all,
We are using LPC54608 mcu. In this we tried i2c based eeprom device read and write.
Data write we followed:
void data_write(uint8_t Byte_address, uint8_t value){
I2C_MasterStart(((I2C_Type *)(I2C2_BASE)), 0x50U, kI2C_Write);
I2C_MasterWriteBlocking(((I2C_Type *)(I2C2_BASE)), &Byte_address, 1, kI2C_TransferNoStopFlag);
I2C_MasterWriteBlocking(((I2C_Type *)(I2C2_BASE)), &value, 1, 0);
I2C_MasterStop(((I2C_Type *)(I2C2_BASE)));
//delay();
}
Inside this I2C_MasterWriteBlocking function there is one more function called
status = I2C_PendingStatusWait(base);
first time (Byte_address)I2C_MasterWriteBlocking we received status = 0x805 but second time during value write this status value becomes 0x809 so it skipped without writing data into base->MSTDAT register.
Where i missed?
how to solve this.
Thanks in advance.
Regards,
prathap