I2ctransfer error in Jetson AGX with Jetpack 5.02

Hi all,

I try to access my MCU device from I2c bus8 ,in jetpack v 4.6.0
it works well ,but in jetpack v5.0.2 .it is easy to happen “connection time out”
when access mass data almost always fail with “connection time out”
My MCU device I2c clock be set to 100kz.
is any setting need to modify or config in jetpack v5.02 ?

bu5@bu5-desktop:~/app$ i2ctransfer -f -y 8 w4@0x16 0xA1 0x31 0x00 0x00 r2
0x00 0x80
bu5@bu5-desktop:~/app$ i2ctransfer -f -y 8 w4@0x16 0xA1 0x31 0x00 0x00 r2
0x00 0x80
bu5@bu5-desktop:~/app$ i2ctransfer -f -y 8 w4@0x16 0xA1 0x31 0x00 0x00 r2
Error: Sending messages failed: Connection timed out
bu5@bu5-desktop:~/app$ i2ctransfer -f -y 8 w4@0x16 0xA1 0x31 0x00 0x00 r2
Error: Sending messages failed: Connection timed out

solution:
File - $TOP/kernel/kernel-4.9/drivers/i2c/busses/i2c-tegra.c

static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, u8 *buffer,
                u32 tx_len, u32 rx_len)
{
...
        if ((tx_len > I2C_PIO_MODE_MAX_LEN || rx_len > I2C_PIO_MODE_MAX_LEN) &&
                        i2c_dev->tx_dma_chan && i2c_dev->rx_dma_chan) {
                if (i2c_dev->curr_direction & DATA_DMA_DIR_TX) {
                        time_left = wait_for_completion_timeout(
                                        &i2c_dev->tx_dma_complete,
                                        TEGRA_I2C_TIMEOUT);
...
}

Glad to know you resolved the problem, and thanks for your sharing!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.