Closed kjsdf7wr3 closed 9 months ago
ST Internal Reference: 149407
Hi @kjsdf7wr3,
The addr flag is not cleared intentionally in the case of listen. Actually, this allows to force a stretch of the line until the application calls the slave sequential interfaces.
The stretch makes possible to block the master, as long as the slave app has not prepared its use case via the sequential interfaces.
Since this is not an issue, please allow me thus to close this thread.
With regards,
Inside
I2C_ITAddrCplt
the address flag is reset forit is not reset for
See https://github.com/STMicroelectronics/STM32CubeG0/blob/03cb8e9ec0cbefad623caebe47359df0bab1d05e/Drivers/STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_i2c.c#L5486
I think this is an error, it should be reset in all cases before calling
HAL_I2C_AddrCallback(hi2c, transferdirection, slaveaddrcode);
. This meansHAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR);
should be added in the two cases mentioned above. If the flag is not reset, the chip will pull the clock line low forever after receiving its slave address.