Stm32L4: I2C: Slave transmitter: How to check for end of transmission ?
Hello,
at I2C slave transmission, the master stops the communication with a NACK and some µseconds later followed by a STOP.
If my slave uC is slowly clocked this works. The calling of the I2C Irq handler takes enough time, to see NACK and STOP at the same time. In that case, I know that it is an expected behaviour and the NACK isn't an error.
My question is, if I run the uC at full speed, I assume there is the risk, that the slave will see only NACK, because the stop event is still not detected. Then slave would handle it wrongly as an error.

Therefore, I assume checking for NACK + STOP isn't 100% correct ?
Are there other options ?
E.g. I'm using DMA, so could I used NACK + (DMA.counter == 0) ?
