Part Number: CC2652R7
Hi
we are using the CC2652R7 controller, Here we connected a sensor to MCU and I2C communication is used between MCU and sensor.
I2C drive : #include <ti/drivers/I2C.h>
//I2C Initialization
I2C_Params i2cParams;
I2C_Params_init(&i2cParams);
i2cParams.bitRate = I2C_400kHz;
Handle_i2c = I2C_open(CONFIG_I2C_MS, &i2cParams);
if (gcam_i2c == NULL)
{
return DEVICE_I2C_INIT_FAILED;
}
else
{
return DEVICE_I2C_INIT_SUCCESS;
}
//Data Read
I2C_Transaction i2cTransaction;
i2cTransaction.writeBuf = (void*) ®_address[0];
i2cTransaction.writeCount = 4;
i2cTransaction.readBuf = (void*) &readBuffer[0];
i2cTransaction.readCount = 4;
i2cTransaction.targetAddress = 0x28;
I2C_transferTimeout(Handle_i2c, &i2cTransaction, 0xFFFF)
We are using the above "I2C_transferTimeout" API to read the data from sensor.
Here we are transferring totally Approx. 90 bits per transaction As per 400KHz I2C speed each bit should take 2.25 micro seconds. So totally this transaction is expected to complete in 238.5 micro seconds.
But It is totally taking nearly 485 micro seconds. we are writing 4 byte and reading 4 byte in this transaction. During I2C transaction we captured signal In this captured signal we observed some delay in between each byte transaction also we observed clock signal is low during the delay time. Kindly clarify us, Because of what this clock signal is getting low and this delay is happening in between each transactions.
Is this a expected behavior for multi byte write and read in a single transaction ? If Yes Why ?
Because of what reason this is happening ?
Captured signal :

Purple - Clock (SCL)
Blue - Data Line (SDA)
Red marked line - Delay between transactions and also please observe clock line is in low