cancel
Showing results for 
Search instead for 
Did you mean: 

I2C is sending only n-1 bytes

fal.sch
Associate II

Hello,

I'm using a F301K6T6 based board. When communicating over I2C the first RX/TX works fine but the second TX is starting with the second byte and thus sending only n-1 bytes.

While debugging recognized that `HAL_I2C_Slave_Transmit_IT()` is setting `XferCount` correctly but when entering `I2C_Slave_ISR_IT()` the `XferCount` is already decremented by one.

Does any body can help me debug this further? I've already tried to see if any other slave related function is entered before `I2C_Slave_ISR_IT()` and decrements the counter. But it does not seem so.

1 REPLY 1
fal.sch
Associate II