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 issue on C6657

Hi all,

I used I2C sample code from mcsdk_2_01_01_04\tools\boot_loader\ibl\src\hw\i2c to verify the function workable or not on 6657EVM.

But I encountered the action of output data to appear abnormal status. When used the sample code, the function "hwI2cMasterRead" was include transmit and receive. The first two bytes data transmitted successfully, but the status register "ICSTR" was always 0x5210. So, it meant that the bus was busy(could not be used), Then could not send out the next two bytes data.(the sample code would check the status, and it would be timeout.)

We tried to do some experiments after the first two bytes transmitted, we reset I2C interface (ICMDR was set to 0x4000). Then went to restart again, and sent out the next two bytes data. In current state, it was workable to send out all data, but it was strange and stupid method. And if we want to use I2C interface with EDMA, I guessed that it would be not workable.

B.R.

OC

  • Hi OC,

    The simplest way to validate that the device can write to I2C EEPROM would be to use the I2C EEPROM writer that is provided as under tools/writer/eeprom to load the default IBL images on the EEPROM.

    The IBL also uses the platform_lib from the PDK so you can look at the file evmc665x_i2c_eeprom.c file provided in the PDK to look at how I2C initialization and master read is implemented.

    Regards,

    Rahul