I’m using Torizon on my Colibri iMX8X module and have the Torizon extension installed in VSCode. I’m writing a .NET program using System.Devices.GPIO to interface to the I2C. I have iMX8X ball names “CSI_EN” and “CSI_RESET” configured for I2C in the device tree.
How can I determine the BusID so I can interface using System.Devices.GPIO?
Could you confirm that you are using the “Colibri iMX8QXP”?
In order to identify which Bus are you currently using, a good approach is to verify the device response through the “i2cdetect” tool, on the available i2c buses configured for the system.
In resume, you can list the I2C buses in the board by the following command:
i2cdetect -l
Additionally you can use “i2cdetect -y -r bus_number” to scan the i2c devices on each I2C bus, as shown in the I2C tools - I2C (Linux) | Toradex Developer Center .
Check which bus corresponds to the I2C bus you are using with the alternate function for pins CSI_EN (X1 pin 37) and CSI_RESET (X1 pin 29).
Now, about the coding for the I2C usage on dotNet.
Please check the dotnet/iot interfaces for this kind of usage.