Skip to main content
ham10za
Associate II
May 13, 2022
Question

HAL_I2C_Slave_Receive_IT issue ?

  • May 13, 2022
  • 1 reply
  • 691 views

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 !

This topic has been closed for replies.

1 reply

ham10za
ham10zaAuthor
Associate II
May 15, 2022

.