![]() |
Jetson Sensor Processing Engine (SPE) Developer Guider32.2 Release |
I2C application demonstrates how to access/manipulate Always On (AON) I2C from the SPE/AON processor. I2C 2, 8 and 10 are in AON domain for both Jetson TX2 and Jetson AGX.
The ENABLE_I2C_APP
flag in the soc/*/target_specific.mk
file controls compilation of this demo app.
The sample app uses I2C bus 2 and BMI160 sensor module for demo purposes. Make sure I2C bus 2 is disabled in linux kernel as shown below in tegra186-quill-p3310-1000-c03-00-base.dts device tree file.
In addition to above device tree file, make sure bus@1 is being removed from the tegra186-quill-p3310-1000-a00-plugin-manager.dtsi file as well as shown in below code snippet.
BMI160 module is similar to the sample app available at:
The I2C app accesses the 40 pin header J21 and expects I2C external module at the pin map shown below:
The demo app reads BMI160 sensor ID. If the app successfully retrieves the correct ID, it prints the following message:
I2C test successful, sendor ID: 0xd1
The sample app uses I2C bus 8 and on board audio codec chip for demo purposes. Make sure access to codec chip and I2C bus 8 from other software stacks like kernel/bootloader etc... is disabled. For kernel, related dts is tegra194-audio-p2822-0000.dtsi and below is the sample snippet to disable:
The demo app reads device ID. Test is successful if app retrieves correct ID and should print "I2C test successful, sendor ID: 0x1163".