This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C driver problem

Other Parts Discussed in Thread: OMAPL138

Hi,

I use CCS 6.0.1, DSP/BIOS 5.42.1.09, processor OMAP-L138 (DSP only), C6748 BIOS PSP 01.30.01.

At execution of the following commands:

wBuffer [0] = 0x07u;
dataBuffer.slaveAddr = 0xECu;
dataBuffer.buffer = *wBuffer [0];
dataBuffer.bufLen = 1u;
dataBuffer.flags = I2c_WRITE | I2c_MASTER | I2c_START | I2c_STOP;
status = GIO_submit (i2c_outHandle, IOM_WRITE, *dataBuffer, *dataBuffer.bufLen, NULL);

Return value variable status = -2. In figure it is shown the oscillogram on lines SCL (the bottom curve) and SDA (the top curve).

That is, on Slave its address is transferred only and value 0x07 is not transferred.

Help to solve a problem.

Thanks

  • Hi,

    Is that your code or example provided by TI ?

    Have you tried to use the following i2c example code ?

    C:\ti\pspdrivers_01_30_00_06\packages\ti\pspiom\i2c\build\C6748\ccs3
  • Hi,

    I use code provided by TI. Everything is the same, but I changed Slave address.

    I use INTERRUPT mode for I2C driver: i2cParams.opMode = I2c_OpMode_INTERRUPT;

    Regards,

    Oleh

  • Hi Oleh,

    Apologies for delayed Response.


    I use code provided by TI. Everything is the same, but I changed Slave address.

    Are you working on EVM or custom board?
    Why you have changed the slave address, are you interfacing an external slave device with different address?
  • Hi Oleh,

    I successfully ran BIOSPSP I2C example code on OMAPL138 LogicPD EVM with both INTERRUPT mode and POLLED Mode.

    wBuffer [0] = 0x07u;
    dataBuffer.slaveAddr = 0xECu;
    dataBuffer.buffer = *wBuffer [0];

    As you are saying you have changed slave address(0xECu), and also it is been transferred. But waveform doesn't look like it has transferred slave address correctly.
    I suspect slave is not configured properly.
  • Hi Oleh,

    What is your I2C slave device ?
    Could you please try "0x76" as slave address and see.

    wBuffer [0] = 0x07u;
    dataBuffer.slaveAddr = 0x76u; //Titus
    dataBuffer.buffer = *wBuffer [0];
    dataBuffer.bufLen = 1u;
    dataBuffer.flags = I2c_WRITE | I2c_MASTER | I2c_START | I2c_STOP;
    status = GIO_submit (i2c_outHandle, IOM_WRITE, *dataBuffer, *dataBuffer.bufLen, NULL);