I2C is slave mode is dropping most of the sent data.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Dear Infineon support team,

I used the example I2C003 provided with Dave to receive I2C data.
I modified the function slave_Rx_handler to the following:

uint8_t IIC_Slave_Read[1024];
void slave_Rx_handler(void)
{
// Read data received from master
while(I2C003_ReadData(&I2C003_Handle0, &IIC_Slave_Read[Slave_RxCount]))
{Slave_RxCount++;}
}

XMC relax kit is connected to an I2C device master which sends 512 bytes in a raw of a I2C-WR command.
I see that the interrupt is triggered correctly but unlikely it fails to retrieve all the 512 bytes I have sent.
it retrieves only few bytes.

Could you please suggest a solution to overcome this problem?
0 Likes
3 Replies
Not applicable
How about you try using FIFO?

rgds,
Rou
0 Likes
Not applicable
Actually If you take a look to the project I2C003_Example1 you will see that it uses a FIFO

Regards,
Aymen
0 Likes
Not applicable
Perhaps you can try increasing the FIFO size and the trigger limit?
Not too sure what is really happen but maybe because the data still not ready in the FIFO buffer yet when the interrupt is triggered.

How was the data from your received data?
Is it received a correct data, then missed few data and then again received a correct data?
or only the first few data received was correct then the rest of data are missed?

rgds,
Rou
0 Likes