When using HAL_I2C_Mem_Read_IT(), there is a race condition that happens if the interrupt priority of the I2C is not elevated.
The interrupt gets stuck in a loop handling I2C_MasterTransmit_BTF() because the state is set to RX so I2C_MasterReceive_BTF should be called rather than I2C_MasterTransmit_BTF().
When using HAL_I2C_Mem_Read_IT(), there is a race condition that happens if the interrupt priority of the I2C is not elevated.
The interrupt gets stuck in a loop handling I2C_MasterTransmit_BTF() because the state is set to RX so I2C_MasterReceive_BTF should be called rather than I2C_MasterTransmit_BTF().