Hi TI engineer,
When i use iic0, it return fail log. The below is the log.
src/devices/common/common.c:326] I2C_transfer : ret = -1
[/home/xiejiancheng/tda4_linux/tda4-n50n51/debug/rtos_linux_8.4/psdkra/vision_apps/utils/hdmi/src/hdmi.c:308] i2c Write error : status = -1
I use your iic function to communication. i am sure iic stalve address and iic number is right. i also check iic0 pinmux, it looks fine.
So i donot known what is the problem. Is there anything cause this thing?
i checked all things i thought. Now i have no idea.
// this is the iic function i used
Board_STATUS Board_i2c8BitRegWr()
{
...
ret = I2C_transfer(i2cHandle, &transaction);
if(ret != I2C_STS_SUCCESS)
{
BOARD_DEVICES_ERR_LOG("Failing while writing data by returning - %d\n\r", ret);
printf("\n[%s:%d] I2C_transfer : ret = %d\n", __FILE__, __LINE__, ret);
ret = -1;
return ret;
}
...
}
static int8_t HdmiWrite(uint8_t reg, uint8_t data)
{
int32_t status;
uint8_t writeData = data;
uint8_t regAddr = reg;
status = Board_i2c8BitRegWr(hdmiI2cHandle, HDMI_I2C_ADDR, regAddr, &writeData, 1, BOARD_I2C_TRANSACTION_TIMEOUT);
if (0 != status) {
printf("\n[%s:%d] i2c Write error : status = %d\n", __FILE__, __LINE__, status);
return -1;
}
appLogWaitMsecs(1u);
return 0;
}