Introduction
Connect Tech TX2/TX1 carriers offer the use of the onboard I2C channels through their misc I/O header interface. This connections interface allows users to interface directly with external devices such as CSI-MIPI Cameras, Sensor arrays, etc.
Setup
Connect Tech carriers use an external misc I/O header and on this connection interface is where the I2C connectors are located. The I2C interface uses two lines – a data SDA and a clock SCL, where the interface is shared between multiple devices. When using multiple devices, please ensure that the device addresses are not in conflict with either the TX2/TX1 onboard I2C devices or the other additional devices that have been connected to the I2C interface. To see view what devices are in use on the I2C channel use the i2cdetect command as follows:
List all I2C channels:
i2cdetect -l
List all address able devices on the I2C channel:
i2cdetect -y <CHANNEL, EX. “0”>
There will active devices on the I2C channels the addresses that are associated with a UU are in use by a driver or system, any other devices will state their associated address.
You may also directly communicate with the I2C devices using the following commands:
To read from the I2C device:
i2cget -y <BUS CHANNEL> <DEVICE ADDRESS> <DEVICE DATA ADDRESS>
To write to I2C device:
i2cset -y <BUS CHANNEL> <DEVICE ADDRESS> <DEVICE DATA ADDRESS> <DEVICE DATA>
Carrier I2C Table (TX1)