OAK4 SoM Development Guide
| QUPv3 engine | Mode | Pins | Note |
| QUPv3_SE0 | I2C |
| |
| QUPv3_SE1 | SPI |
| |
| QUPv3_SE2 | SPI |
| |
| QUPv3_SE3 | / | / | Not currently exposed |
| QUPv3_SE4 | I2C |
| Enabled by default |
| QUPv3_SE5 | I2C |
| |
| QUPv3_SE6 | / | / | Not currently exposed |
| QUPv3_SE7 | UART |
| |
| QUPv3_SE8 | I2C |
| |
| QUPv3_SE9 | I3C |
| |
| QUPv3_SE10 | SPI |
| |
| QUPv3_SE11 | SPI |
| |
| QUPv3_SE12 | I2C |
| Enabled by default |
| QUPv3_SE13 | / | / | Not currently exposed |
| QUPv3_SE14 | UART |
| High-speed UART, hardware flow control |
| QUPv3_SE15 | / | / | Not currently exposed |
| I2CHUB_SE0 | / | / | Not currently exposed |
| I2CHUB_SE1 | / | / | Not currently exposed |
| I2CHUB_SE2 | I2C |
| Enabled by default |
| I2CHUB_SE3 | I2C |
| |
| I2CHUB_SE4 | I2C |
| |
| I2CHUB_SE5 | / | / | Not currently exposed |
| I2CHUB_SE6 | / | / | Not currently exposed |
| I2CHUB_SE7 | / | / | Not currently exposed |
| I2CHUB_SE8 | / | / | Not currently exposed |
| I2CHUB_SE9 | / | / | Not currently exposed |
Device Tree Overlay Configuration
/persist/custom/dtbo directory on the device. During boot, the system applies all overlays found in this directory to achieve the desired pin configuration. Files in this folder also survive OTA update and do not get deleted.I2C Configuration Example
Connecting a BME280 Sensor via I2C
bme280.dts) in your working directory:Dts
1/dts-v1/;
2/plugin/;
3
4/ {
5 fragment@0 {
6 target = <&qupv3_se5_i2c>;
7 __overlay__ {
8 status = "ok";
9 #address-cells = <1>;
10 #size-cells = <0>;
11
12 bme280@76 {
13 compatible = "bosch,bme280";
14 reg = <0x76>;
15 };
16 };
17 };
18};status = "ok"; which actually enables the selected I2C engine. Without it, the peripheral remains disabled.Note: Fortarget, use&qupv3_seX_i2cfor QUP engines, and&qupv3_hub_i2cXfor HUB engines, whereXis the engine index.
Compiling the Overlay
Command Line
1docker run --rm \
2 -v /etc/passwd:/etc/passwd:ro \
3 -v /etc/shadow:/etc/shadow:ro \
4 -v "$PWD":"$PWD" \
5 -w "$PWD" \
6 --user=$(id -u):$(id -g) --group-add 27 \
7 luxonis/luxonis-os-rvc4:<SDK_version>-public \
8 /bin/bash -c "dtc -@ -I dts -O dtb -o bme280.dtbo bme280.dts"Note:Transfer the compiled<SDK_version>must match the version of OS with which the target device was flashed (eg.1.8.0). You can also uselatestif you are using the latest OS release.
.dtbo file to the target device:Command Line
1scp /app/test-overlay/bme280.dtbo user@<device-ip>:/persist/custom/dtbo//sys/bus/i2c/devices/.SPI Configuration Example
Dts
1/dts-v1/;
2/plugin/;
3
4/ {
5 fragment@0 {
6 target = <&qupv3_se1_spi>;
7 __overlay__ {
8 status = "ok";
9 };
10 };
11};Command Line
1docker run --rm \
2 -v /etc/passwd:/etc/passwd:ro \
3 -v /etc/shadow:/etc/shadow:ro \
4 -v "$PWD":"$PWD" \
5 -w "$PWD" \
6 --user=$(id -u):$(id -g) --group-add 27 \
7 luxonis/luxonis-os-rvc4:latest-public \
8 /bin/bash -c "dtc -@ -I dts -O dtb -o spi-overlay.dtbo spi-overlay.dts"Command Line
1scp spi_se1.dtbo user@<device-ip>:/persist/custom/dtbo/Troubleshooting
- Enter Emergency Download Mode (EDL).
- Re-flash the device with a known-good image.
dmesg:Command Line
1dmesg | lessCommand Line
1journalctl -u apply-overlays.service