Other Parts Discussed in Thread: C2000WARE, LM96080
HI,
We followed the example to read and EEPROM from the C2000 directory to do a read with a repeated start.
If we read 1 byte it is correct, if we try to read multiple bytes (using the FIFO, which is enabled) we get the first by to be correct but the remaining bytes to be 0xFF.
Is there a configuration issue?
I2C_disableModule(i2cBase);
I2C_initMaster(i2cBase, DEVICE_SYSCLK_FREQ, KHZ_100, I2C_DUTYCYCLE_50);
I2C_setAddressMode(i2cBase, I2C_ADDR_MODE_7BITS);
I2C_setBitCount(i2cBase, I2C_BITCOUNT_8);
I2C_setSlaveAddress(i2cBase, slaveAddr);
// I2C_EMULATION_FREE_RUN - I2C operation continues regardless of a suspend (i.e. breakpoint)
I2C_setEmulationMode(i2cBase, I2C_EMULATION_FREE_RUN);
// Enable stop condition and register-access-ready interrupts
I2C_enableInterrupt(i2cBase, I2C_INT_STOP_CONDITION | I2C_INT_REG_ACCESS_RDY);
// FIFO configuration
I2C_enableFIFO(i2cBase); // Fifo can be used without Interrupt
I2C_clearInterruptStatus(i2cBase, I2C_INT_RXFF | I2C_INT_TXFF); // Doesn't hurt, When Not using interrupts
// Configuration complete. Enable the module (i.e. take it out of Reset)
I2C_enableModule(i2cBase);
// Per Ref Manual: 11.3.4 ... After taking the I2C peripheral out of reset by setting
// the IRS bit to 1, wait a period larger than the total time taken for the longest data transfer.
DEVICE_DELAY_US(10000); // 1msec should be enough