I am using the concerto experimenter kit writing and reading I2C to the eeprom. When I do a read I am getting a return = 12 on I2CMasterERR . I can do a SysCtlPeripheralReset (i2c) and the read will then work properly but it happens quite frequently and seems like a rather harsh way to clear an error. I get the error after setting up the eeprom address to align it for the read
i2cCurrentAddress = I2C_SLV_ADDR_EEPROM;
I2CMasterSlaveAddrSet(I2C0_MASTER_BASE, I2C_SLV_ADDR_EEPROM, I2C_WRITE);
while (I2CMasterBusy(I2C0_MASTER_BASE)) {}
// Dummy Write to set the future read address
I2CMasterDataPut(I2C0_MASTER_BASE, high_addr); // high address
I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_START);
while (I2CMasterBusy(I2C0_MASTER_BASE)) {}
err =I2CMasterErr(I2C0_MASTER_BASE); //ERROR found here =12
My questions is there a better method to clear this data ack, addr ack, error then to reset the i2c periphearal?
I tried sending I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP (0x04) didn't seem to help
When looking at the I2CMCS register in debug is this the read-only register?
Thanks in advance for your advice