Other Parts Discussed in Thread: TMS320C5515, TLV320AIC3204
Hello,
I have a question concerning the TMS320C5515 EVM (or C5515 eZdsp). I am using the CSL 2.10 to configure the on-board TLV320AIC3204 codec with the function I2C_write(). This is working for 8 bits and I can verify this using an oscilloscope.
But how I have to configure the CSL I2C module to read a register (e.g. Register 42 -> Sticky Flag Register 1) from the codec?
I tried several configurations but never see the REPEATED START condition to get the value out of the codec. It only sends the the slave address and the register address I want to read out, no matter if I change the number of bytes to receive.
myread[0] = 0x0005; // Read Register 5
myread[1] = 0x0000;
I2C_read(myread, 1, CSL_I2C_CODEC_ADDR, TRUE, ( (CSL_I2C_START) | (CSL_I2C_RESTART) | (CSL_I2C_STOP) ), CSL_I2C_MAX_TIMEOUT, FALSE);
This are the parameter to set up the I2C using the CSL:
/* Setup I2C module */
i2cSetup.addrMode = CSL_I2C_ADDR_7BIT;
i2cSetup.bitCount = CSL_I2C_BC_8BITS;
i2cSetup.loopBack = CSL_I2C_LOOPBACK_DISABLE;
i2cSetup.freeMode = CSL_I2C_FREEMODE_DISABLE;
i2cSetup.repeatMode = CSL_I2C_REPEATMODE_DISABLE;
i2cSetup.ownAddr = CSL_I2C_OWN_ADDR;
i2cSetup.sysInputClk = CSL_I2C_SYS_CLK;
i2cSetup.i2cBusFreq = CSL_I2C_BUS_FREQ;
startStop = ( (CSL_I2C_START) | (CSL_I2C_STOP) );
Thank you.
Martin