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.

TMDSCNCD28388D: I2C example not work

Part Number: TMDSCNCD28388D
Other Parts Discussed in Thread: C2000WARE,

Hi, I am using TMDSCNCD28388D and C2000Ware_3_04_00_00.

I want to do the I2C test.(Test project is 'i2c_ex2_eeprom'.) (C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2838x\examples\c28x\i2c)

I know that TMDSCNCD28388D uses GPIO150 as ESC_I2C_SDA and GPIO151 as ESC_I2C_SCL.

So, I modified GPIO setting code as below.

    // Initialize GPIOs 32 and 33 for use as SDA A and SCL A respectively
    GPIO_setPadConfig(150, GPIO_PIN_TYPE_PULLUP);
    GPIO_setQualificationMode(150, GPIO_QUAL_ASYNC);

    GPIO_setPadConfig(151, GPIO_PIN_TYPE_PULLUP);
    GPIO_setQualificationMode(151, GPIO_QUAL_ASYNC);

And then, If I debug the code, i2cMsgOut.msgStatus does not change at 0x10, and the return value of the writeData(&i2cMsgOut) function becomes 0x5555.

What's the problem?

I would like to save our tuning parameters in EEPROM using I2C.

How can I do this?

And how should I solve this problem?

  • Hi, 

    GPIO150 is used for EtherCAT I2C Data and not for I2C Data.  You can use pins - GPIO104 (I2CA_SDA) and GPIO105(I2CA_SCL) assuming you have interfaced EEPROM to I2CA.  

    Also, there is no change required to be done in the code if you use the device pin macros - DEVICE_GPIO_PIN_SDAA and DEVICE_GPIO_CFG_SCLA. 

    These are already mapped to pins 104 and 105.  

    Best Regards