I'm using CubeMx with the STM32F415.
Looking at the HAL drivers for I2C slave devices using DMA, it appears as if the HAL_I2C_Slave_Receive_DMA() and HAL_I2C_Slave_Transmit_DMA() functions will effectively be blocking functions until the slave is addressed by a master ( There is a comment /* Wait until ADDR flag is set */ ). My code hangs there.
I want to implement a non-blocking receive function and a non-blocking transmit function. It seems like the best way to do this would be to use the interrupts associated with the ADDRESS being acknowledged. Has anyone done this? Is there a better proposal?