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.

LAUNCHXL-CC26X2R1: i2cTransfer error

Part Number: LAUNCHXL-CC26X2R1


Hello,

I tried the i2ctmp example on the resource fiels with a Omrom d6t-8l. The i2c is initializated (it is shown in the display) but when it gets to i2cTransfer it freezees. It don't show any error or anything, just kept stuck. Any idea of what is happening? Thank you.

  • If you use scope to check SCL/SDA signal when you use i2cTransfer, do you see clock and data signal on SCL/SDA pins?

  • Hello Dani,

    Am I understanding that you modified the i2ctmp example for your D6T-8L?  Did you change the i2cTransaction.slaveAddress to 0x0A to match the D6T-8L specification?  What is the full log of your Display driver and does the I2C_transfer function never exit during a debug session?  Please also refer to the TI Drivers Runtime APIs for more examples.

    Regards,
    Ryan

  • Thank you, it would be the most reasonable option but at this moment I do not have an scope here with me. Thank you.

  • Yes, I modified the example for my D6T-8L, I tried  i2cTransaction.slaveAddress = 0x10 and 0x0A (hex). The full log of the display is : "Starting the d6t-8l example" and "I2C initializated!" Then I added "I2C 4!" in the code to see what runs and what does not and it shows that string. After the i2ctransfer it does not show anything, never exit during the debug session.

    In addition, I changed the transfer mode to I2C_MODE_CALLBACK and it works well but does not show any value, just zeros.

    Thank you.

  • d6t-8l.zip I forgot to upload the code. Thank you.

  • Callback mode returns immediately instead of blocking until byte transfer completion.  It is not recommended unless you are using semaphores to wait for callback completion.  Without a timeout or bus fault error condition (NACK), the I2C_transfer could pend forever due to an unknown state of the I2C pins.  What is the value of the pull-up resistance and which LaunchPad pins are being used for the I2C lines?  I recommend reverting your code back to being as close to the example as possible and using 0x0A as the slave address.

    Regards,
    Ryan