AnsweredAssumed Answered

I2C Driver, SDK v2.2 not issuing device address

Question asked by Robert Lewis on Sep 29, 2017
Latest reply on Oct 1, 2017 by Visakhan C

Hi, I have read through the post "

Problem sending I2C message"


and I have a slightly different problem. The device I am talking to requires the device address to be resent (ie readdressed with the Read bit High) after the the initial write of the device address. This is not happening in the device driver.


I have:


masterConfig.baudRate_Bps = I2C_BAUDRATE;

sourceClock = I2C_MASTER_CLK_FREQ;

I2C_MasterInit(I2C0, &masterConfig, sourceClock);

memset(&g_m_handle, 0, sizeof(g_m_handle));
memset(&masterXfer, 0, sizeof(masterXfer));

masterXfer.slaveAddress = 0x68;
masterXfer.direction = kI2C_Write;
masterXfer.subaddress = 0x75;
masterXfer.subaddressSize = 1; = c_buff;
masterXfer.dataSize = 1;
masterXfer.flags = kI2C_TransferNoStopFlag;

I2C_MasterTransferCreateHandle(I2C0, &g_m_handle, i2c_master_callback, NULL);

I2C_MasterTransferNonBlocking(I2C0, &g_m_handle, &masterXfer);

masterXfer.direction = kI2C_Read;
masterXfer.flags = kI2C_TransferRepeatedStartFlag;

I2C_MasterTransferNonBlocking(I2C0, &g_m_handle, &masterXfer);

/* Wait for transfer completed. */
while (!g_MasterCompletionFlag){}
g_MasterCompletionFlag = false;




The call back is occurring however I get no data back because I haven't issued a read with the device address. Can you tell me how to configure the driver to do this. I have attached a screen shot of a logic analyzer with a working correct driver, versus the SDK v2.2, non working driver results.


Thanks in advance