2022-11-15 04:35 AM
Hi,
attached is the code for I2C where we are trying to read from the sensor connected using I2C...I2C_mem_write or I2C_Master Transmit...nothing is sent by the sensor.
any change in the coonfiguration ..kindly let us know.
attached the IOC file also...
Thanks and regards
Ravi chandran
2022-11-15 04:44 AM
2022-11-16 12:36 AM
Hi,
After adding printf we found I2C_WaitOnTXISFlagUntilTimeout flag is not being set...where could be the issue..kindly let us know
while (hi2c->XferCount > 0U)
{
/* Wait until TXIS flag is set */
if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)
{
printf("inside while 1 HAL error = %d ",HAL_ERROR);
return HAL_ERROR;
}
regards
Ravi