Hi,
We have a FPGA which needs to be programmed via I2C. We connected it to i2c-8 and basically worked except for the first time after Xavier rebooted. And it had nothing to do with the FPGA’s state (I tried powering off/on the FPGA, it worked without those errors).
I got these messages (perror outputs)
! Initialize
message: Resource temporarily unavailable
! Check the IDCODE
message: Resource temporarily unavailable
and dmesg outputs
[ 76.237734] tegra-i2c 31e0000.i2c: arb lost in communicate to add 0x40
[ 76.259712] tegra-i2c 31e0000.i2c: arb lost in communicate to add 0x40
When I run the “FPGA flasher” again, it worked well (and also all the later tries). The “FPGA flasher” is based on i2c-dev and these error were reported when executing “status = ioctl(i2c_fd, I2C_RDWR, &i2c_packets);”
i2c_messages[1].addr = i2c_addr;
i2c_messages[1].flags = 0;
i2c_messages[1].buf = a_bByteSend;
i2c_messages[1].len = (length + 7) / 8;
i2c_packets.msgs = i2c_messages;
i2c_packets.nmsgs = 2;
state_stop = 0;
status = ioctl(i2c_fd, I2C_RDWR, &i2c_packets);
if (status < 0) {
perror("message");
}
Any suggestions to solve this problem?
Thanks.