Skip to main content
fal.sch
Associate II
August 17, 2020
Question

I2C is sending only n-1 bytes

  • August 17, 2020
  • 1 reply
  • 788 views

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.

This topic has been closed for replies.

1 reply

fal.sch
fal.schAuthor
Associate II
August 17, 2020