How to fix HAL for STM32F767 I2C master not suporting clock streching from a I2C slave?
I am currently using a TSC2007 to detect touchs on a screen.
When working in blocking mode this is correctly working as the TSC2007 correctly streches the clock and the HAL correctly waits for the data to be ready
When working with interrupts the HAL fails to wait as a NACK and STOP interrupt is triggered which cancels further transmissions of bytes.
I can avoid the TSC2007 doing the streching by manually waiting a specific amount of time. The probem is that depending on the waiting time the read value is incorrect.
The current solution I am using is calling my TSC2007 driver in blocking mode in a low level priority freertos task
Correct clock streching and read when using HAL_I2C_Master_Receive
Read cancelled by HAL when using HAL_I2C_Master_Receive_IT
Read correctly done with HAL_I2C_Master_Receive_IT(but incorrect values reported by device) if I wait for an amount of time that requieres
Any idea how to support clock streching in master mode with Interruptions?
