cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions for Non-Blocking I2C Slave

chuck2399
Associate II
Posted on August 15, 2017 at 02:33

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?

Thanks.

#dma #i2c
0 REPLIES 0