cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_I2C_Slave_Receive_IT issue ?

ham10za
Associate II

I had a problem using this API HAL_I2C_Slave_Receive_IT(&hi2c1, buff, 100) in case i send 20 bytes for example wich is a corrupted frame for me (i am waiting for 100 bytes) then i2c driver will stack this 20 bytes and it does not free them wich in a manner that the next 100 bytes transmitted will be mixed with that 20 bytes and i will got a corrupted frame in my callback (20 + (100-20))!!

Is there a way to avoid this use case other then then updating the third param in HAL_I2C_Slave_Receive_IT API to 1 instead of 100 ?

thanks in advance !

1 REPLY 1
ham10za
Associate II

.