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.

CCS/CC2640R2F: I2C - Byte write operation fails.

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hi,

the I2C write operation with a EEPROM RM24C256C-L fails. By analysis the signal with a logic analyzer find out the address byte are wrong. Found 0x40 and expect 0xA0. Also, I see on clk signal 16 clocks here I expect more. 

Does anyone have an idea what the problem is?

Additional information the code example, the Logic Analyzer result and the EEPROM I2C write operation description.


BR

Claus

************************************************************************* 

#include <ti/drivers/I2C.h>

#include <ti/drivers/i2c/I2CCC26XX.h>

 

static I2C_Handle i2cHandle;

static I2C_Params i2cParams;

static I2C_Transaction i2cTransaction;

  

I2C_init();

I2C_Params_init(&i2cParams);

i2cParams.transferMode = I2C_MODE_BLOCKING;

i2cParams.bitRate = I2C_400kHz;

 

i2cHandle = I2C_open(Board_I2C0, &i2cParams);

if(!i2cHandle)

{

   return EEPROM_OPEN_UNSUCCESSFUL;

}

 

uint8_t wbuf[3];

 

wbuf[0] = 0x07; //Address High Byte

wbuf[1] = 0x40; //Address Low Byte

wbuf[2] = 0x20; //Data Byte

 

 

i2cTransaction.slaveAddress = 0b10100000;        // write slave address 0xA0

i2cTransaction.writeBuf = wbuf;

i2cTransaction.writeCount = 3;

i2cTransaction.readBuf = NULL;

i2cTransaction.readCount = 0;

 

bool status = I2C_transfer(i2cHandle, &i2cTransaction);

 

***************************************************************************************************