Part Number: CC2340R5-Q1
Other Parts Discussed in Thread: CC2340R5
Tool/software:
Hi. TI team.
When operating the CC2340R5-Q1 as an I2C target, issues are occurring. Can you identify any possible causes?
We use SDK version:8.40.
I added the I2C target function to the Basic BLE project's role based on the peripheral software.
Another IC functions as the master and reads out 5 bytes of data.
The CC2340R5-Q1 is able to output an ACK to the target address + R.
However, the ACK for the first byte of data is not being output by the other IC. There might be an issue with the other IC, but looking at the waveform of the SDA (see the red frame in the diagram below), it seems as though the other IC is trying to use the SDA at a low level, yet it remains at a high level.

Could you let me know what could be causing the issue if it originates from the CC2340R5-Q1? I'll also attach the code below.
void i2ctarget_trans(char* dunny)
{
I2CTarget_Params i2ctarget_params;
I2CTarget_init();
I2CTarget_Params_init(&i2ctarget_params);
i2ctarget_params.eventCallbackFxn = Callbackfxn_i2ctareget;
i2ctarget_params.targetAddress = 0x42;
i2ctarget_handle = I2CTarget_open(CONFIG_I2CTARGET_0, &i2ctarget_params);
read_counter = 0;
write_counter = 0;
I2CTarget_start(i2ctarget_handle);
}
int_fast16_t Callbackfxn_i2ctareget(I2CTarget_Handle handle, I2CTarget_Event event, uint8_t *val)
{
if(event == I2CTarget_Event_WRITE_RECEIVED) {
read_buffer[read_counter] = *val;
++read_counter;
return I2CTarget_STATUS_SUCCESS;
}
if(event == I2CTarget_Event_READ_REQUESTED || event == I2CTarget_Event_READ_PROCESSED) {
*val = write_buffer[write_counter];
++write_counter;
return I2CTarget_STATUS_SUCCESS;
}
if (event == I2CTarget_Event_STOP) {
BLEAppUtil_invokeFunctionNoData(i2ctaregt_fin);
}
return I2CTarget_STATUS_SUCCESS;
}
void i2ctaregt_fin(char* dunny)
{
I2CTarget_close(i2ctarget_handle);
}
Best Regards.