Slave I2C interrupt issues
I am struggling to find working examples to work with FreeRTOS in an interrupt mode.
I use the function HAL_I2C_Slave_Transmit_IT() This enables the interrupt as well as setting up the data.
It works to a point, then the remote Master send a Nak and 8 bytes which then fires the Error interrupt.
However the Write address and the Subaddress is sent there is an issue. The top trace in the waveform below indicated where the interrupt fires. What is most notable that the second firing is a result of a RXNE bit being set. As this bit is never cleared by a read from the data register in the HAL library the interrupt fires again about 200 times until a read address is received.
I feel that is an issue with the stm32f4xx_hal_i2c.c library?
There doesn't seem to be a wealth of slave I2C examples for the STM32F4 series. I think I know what I am doing wrong, but either way this behaviour is not ideal. The byte should at least be read and an error indicated in some way.
