nanohub: stm32: i2c: always wait for the BTF event in the DmaTxDone ISR
This interrupt is fired when the DMA transfer completes, ie. all bytes
have been transmitted to the I2C peripheral. However, It's possible that
the I2C transfer didn't finish yet, so before touching the peripheral,
wait for the BTF (byte transfer finished) flag to be set.
This fixes the issue where the last byte of a transfer was randomly lost,
especially at higher core clock frequencies (>= 40 MHz).
1 file changed