steved wrote:Have you caught up with this thread? There's an example which might help pin down the problem.
I should say that I'm lost with which is the "good" I2CSlave implementation to pick.
I tried to select it by archive (ZIP) date.
With the current implementation (for I2CV2), on STM32L4, there might be an issue with the ISR flags:
It seems the receive completion trigger relies on bit I2C_ISR_TC, which is documented as "TC: TransferComplete (master mode)" in ST data sheet. The `i2cp->slaveRx->processMsg(i2cp)` is therefore never called since I2C_ISR_TC does not seem to updated in slave mode.
Adding this code snippet to the I2C_ISR_STOPF bit management "solves" (should I say "works around" ) the problem I described, but I'm a newbie with the STM32L4, so it might not be the proper way to deal with this issue. Any piece of advice is very welcome!
I also have a couple of question: it seems that i2cp->state is always stuck to I2C_READY when working as I2C slave. If this assumption is correct, I think it might be worth to document it.