I had a similar problem with an F072 as master and L011 as slave, where the L011 kept locking up and pulling SCL and SDA low forever. I solved it by using only DMA functions on the L011 instead of blocking or interrupt functions. This approach also s...
Posted on May 10, 2018 at 22:40Hi ImenWe are discussing a situation where the master has not yet started sending anything. Thus, the HAL_I2C_Slave_Receive_IT() will not exit with an interrupt callback. Instead, we have to find another way to cancel ...
Posted on May 10, 2018 at 13:31Hi ImenThe question was the following: If my STM32 is ready to receive data with HAL_I2C_Slave_Receive_IT() but the master is not sending anything, and now I decide that my STM32 should instead send something, how do I...
Posted on May 09, 2018 at 11:53I use HAL_I2C_Init(). It works, but I guess it's overkill and there should be a more elegant way.@ST: There is a function HAL_I2C_Master_Abort_IT(), so why is there no HAL_I2C_Slave_Abort_IT()?
Posted on May 09, 2018 at 11:20Use this:void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c){ // not enough bytes received causes an error, process the data anyway HAL_I2C_SlaveRxCpltCallback( hi2c );}I don't know how to find out how much data ...