Link Search Menu Expand Document

VOXL 2 Linux User Guide

Table of contents

  1. UARTs
    1. Overview
    2. Apps Proc
      1. /dev/ttyHS0 - Camera Group 2 UART
      2. /dev/ttyHS1 - B2B Connector UART
      3. /dev/ttyHS2 - HSB2B Connector UART
      4. /dev/ttyHS3 - HSB2B Connector UART
    3. SLPI Proc
      1. Overview
      2. QUP2 - ESC UART
      3. QUP6 - GNSS UART
      4. QUP7 - RCIO UART
  2. SPI
    1. Overview
    2. Apps Proc
      1. SPI0 - Camera Group 0 SPI
      2. SPI3 - IMU1
      3. SPI11 - J5 B2B SPI
      4. SPI14 - J10 External SPI
    3. SLPI Proc
      1. QUP5 - IMU0
  3. I2Cs
    1. Overview
    2. Apps Proc
      1. i2c-0 - I2C2 - HS B2B I2C
      2. i2c-1 - I2C9 - B2B I2C - GPIO 125-126
      3. i2c-2 - I2C10 - B2B I2C - GPIO 129-130
      4. i2c-3 - I2C15 - USB Redriver (internal, don’t use)
      5. i2c-4 - I2C1 - Camera Group 1 I2C
      6. i2c-5 - I2C4 - HS B2B I2C
      7. i2cdetect Usage
    3. SLPI Proc
      1. QUP0 - External Sensor (Magnetometer)
      2. QUP2 - External Sensor (Power Monitoring)
      3. QUP3
      4. QUP4 - Internal Sensors (Barometers)
  4. GPIOs
    1. Apps Proc
    2. voxl-gpio-mod Kernel Driver
      1. J3 - B2B
      2. J5 - HS B2B
      3. J6
      4. J7
      5. J8
      6. J10
      7. LEDs
      8. Regulators
      9. HW ID
      10. UART/SPI select (VOXL2 Mini)
      11. Camera Sync Util GPIOs
      12. Camera Use
  5. PCIe
    1. PCIe2
  6. Serial Debug Console
  7. Kernel Modules
    1. voxl-fsync-mod
    2. voxl-gpio-mod
    3. voxl-platform-mod

UARTs

The following is accurate as of System Image 1.6.

Overview

m0054-linux-user-guide-uart

Apps Proc

/dev/ttyHS0 - Camera Group 2 UART

  
Device/dev/ttyHS0
PinsJ8 Pins 38/40 (Tx/Rx)
Voltage1.8V, directly connected to QRB5165, likely need to level shift
Code SampleTODO
Add-OnsNA

/dev/ttyHS1 - B2B Connector UART

  
Device/dev/ttyHS1
PinsJ3 Pins 3/5 (Rx/Tx)
Voltage1.8V, directly connected to QRB5165, likely need to level shift
Code SampleTODO
Add-OnsM0125 J3 Pins 2/3 (Rx/Tx)
M0144 JP1 pins 9/11 (Tx/Rx)
M0130 J5 Pnis 2/3 (Tx/Rx)

/dev/ttyHS2 - HSB2B Connector UART

  
Device/dev/ttyHS2
PinsJ5 HS B2B pins 48/49 (Rx/Tx)
Voltage1.8V, directly connected to QRB5165, likely need to level shift
Code SampleTODO
 M0090 - 5G Add-On Board J9 Pins 2/3 (Tx/Rx)
M0144 J14 pins 17/19

/dev/ttyHS3 - HSB2B Connector UART

  
Device/dev/ttyHS3
PinsJ5 HS B2B pins 97/98 (Rx/Tx)
Voltage1.8V, directly connected to QRB5165, likely need to level shift
Code SampleTODO
 M0130 J8 Pins 10/11 (Tx/Rx) - Level Shifted to 3.3V, M0144 J15 pins 7/9

SLPI Proc

Overview

m0054-ext-fc-dsp.jpg

QUP2 - ESC UART

  
DeviceQUP2
PinsJ18 Pins 2/3 (Tx/Rx)
Voltage3.3V, via directional level shifters
Code SamplePX4 ESC Driver
Add-OnsVOXL ESC

QUP6 - GNSS UART

  
DeviceQUP6
PinsJ19 Pins 2/3 (Tx/Rx)
Voltage3.3V, via directional level shifters
Code SamplePX4 GPS
Add-OnsVOXL 2 GPS Mag Assembly

QUP7 - RCIO UART

  
DeviceQUP7
PinsJ19 Pins 10/11 (Tx/Rx)
Voltage3.3V, via directional level shifters
Code SamplePX4 px4io Driver
 PX4 RC Driver
Add-OnsVOXL 2 IO
 VOXL 2 GPS Mag Assembly

SPI

The following is accurate as of System Image 1.3.

Overview

m0054-linux-user-guide-spi

  • Note: not shown is spidev11 on HS B2B J5
/dev/spidev0.0  --> camera group 0 (J6)
/dev/spidev3.0  --> internal IMU (TDK ICM-42688p)
/dev/spidev11.0 --> HS B2B connector (J5)
/dev/spidev14.0 --> external SPI (J10)

Apps Proc

SPI0 - Camera Group 0 SPI

  
Device/dev/spidev0.0
Code SampleVOXL SDK IMU Server
Voltage1.8V, directly connected to QRB5165, likely need to level shift
PinsJ6 - 34 MISO
 J6 - 36 MOSI
 J6 - 38 SCLK
 J6 - 40 CS_N

SPI3 - IMU1

  
Device/dev/spidev3.0, exposed in MPA as /run/mpa/imu_apps
Code SampleVOXL SDK IMU Server
VoltageInternal
PinsU17 - 1 MISO
 U17 - 14 MOSI
 U17 - 13 SCLK
 U17 - 12 CS_N

SPI11 - J5 B2B SPI

Available in system image 1.5+

  
Device/dev/spidev11.0
Code SampleVOXL SDK IMU Server
Voltage3.3VDC
PinsJ5 - 53 MISO
 J5 - 54 MOSI
 J5 - 55 SCLK
 J5 - 56 CS_N

Available from M0130 addon - J8 pin 2-5

SPI14 - J10 External SPI

  
Device/dev/spidev14.0
Code SampleVOXL SDK IMU Server
Voltage3.3VDC
PinsJ10 - 2 MISO
 J10 - 3 MOSI
 J10 - 4 SCLK
 J10 - 5 CS_N

Available from J10 pins 2-5

SLPI Proc

QUP5 - IMU0

  
Deviceexposed via MAP at /run/mpa/imu_px4
Code SampleVOXL SDK IMU Server
VoltageInternal
PinsU16 - 1 MISO
 U16 - 14 MOSI
 U16 - 13 SCLK
 U16 - 12 CS_N

I2Cs

The following is accurate as of System Image 1.3.

Overview

m0054-linux-user-guide-i2c

Apps Proc

i2c-0 - I2C2 - HS B2B I2C

/dev/i2c-0 is exposed on the HS B2B connector (J5) pins 8/9.

  
Device/dev/i2c-0 (new as of system image 1.5)
Code Sample 
Voltage3.3VDC
PinsJ5 Pin 8/9 (SDA/SCL) (GPIO 115/116)
Add-OnsM0130 J8 Pins 8/9 (SDA/SCL)

i2c-1 - I2C9 - B2B I2C - GPIO 125-126

/dev/i2c-1

  
Device/dev/i2c-1 (as of system image 1.5, was i2c-0 before)
Code Sample 
Voltage3.3VDC
PinsJ3 Pin 13/15 (SCL/SDA) (GPIO 126/125)

i2c-2 - I2C10 - B2B I2C - GPIO 129-130

/dev/i2c-2 is exposed on the Legacy B2B connector’s pins 23 and 25, and available on add-on boards via a JST connector.

  
Device/dev/i2c-2 (as of system image 1.5, was i2c-1 before)
Code Sample 
Voltage3.3VDC
ConnectorM0054 J3 Pins 23/25 (SCL/SDA) (GPIO 130/129)
Add-OnsM0062 J9 Pins 4/5 (SDA/SCL)
 M0090 J9 Pins 4/5 (SDA/SCL)

i2c-3 - I2C15 - USB Redriver (internal, don’t use)

Status: dmesg shows some errors, need to investigate

  
Device/dev/i2c-3 (as of system image 1.5, was i2c-2 before)
HardwarePN NB7VPQ904MMUTWG datasheet
 Address: 0x1C

i2c-4 - I2C1 - Camera Group 1 I2C

/dev/i2c-4 is exposed on the J7 camera group connector

  
Device/dev/i2c-4
Code Sample 
Voltage1.8VDC
ConnectorM0054 J7 Pins 34/36 (SCL/SDA) (GPIO 4/5)

i2c-5 - I2C4 - HS B2B I2C

system image 1.7.2+

/dev/i2c-5 is exposed on the high speed board to board connector J5.

  
Device/dev/i2c-5
Code Sample 
Voltage1.8VDC
ConnectorM0054 J5 Pins 98/99 (SDA/SCL) (GPIO 8/9)

i2cdetect Usage

For example, detecting devices on /dev/i2c-0

i2cdetect -r -y 0

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

SLPI Proc

QUP0 - External Sensor (Magnetometer)

Typically used for magnetometer I2C connection.

  
IDQUP0
Code Sample 
Voltage3.3VDC
PinsJ19 Pins 4/5 (SCL/SDA)
Add-OnsVOXL 2 GPS Mag Assembly

QUP2 - External Sensor (Power Monitoring)

Typically used for battery power monitoring I2C connection.

  
IDQUP2
Code Sample 
Voltage5.0VDC
PinsJ4 Pins 3/4 (SCL/SDA)
Add-OnsVOXL PMv3

QUP3

Future use.

  
IDQUP3
Code Sample 
Voltage3.3VDC
PinsJ19 Pins 7/8 (SCL/SDA)
Add-OnsNA

QUP4 - Internal Sensors (Barometers)

Connected to onboard barometers.

  
IDQUP4
Code Sample 
HardwareTDK-ICP10100 @ 0x63h
 bmp388 @ 0x76h

GPIOs

Apps Proc

Example code: voxl-gpio.c

voxl-gpio-mod Kernel Driver

To help with GPIO initialization and exporting to user space, see meta-voxl2/recipes-kernel/voxl-gpio-mod

Starting SDK 1.2.X/System Image 1.7.3, GPIOs are exported by default in /sys/class/gpio, the GPIO have an offest of 1100 (e.g. GPIO 84 = 1184).

J3 - B2B

See changelog for version info.

GPIODirectionDescription
52InJ3 Pin 7, pulldown - exposed by M0090, M0062 - J8 pin 2 at 3P3V
53OutJ3 Pin 9, default high, 1P8V - exposed by M0090, M0062 - J8 pin 3 at 3P3V (for M0048 pDDL_EN_N)
54OutJ3 Pin 19, default low, 1P8V - exposed by M0090, M0062 - J8 pin 4 at 3P3V
55OutJ3 Pin 17, default low, 1P8V - exposed by M0090, M0062 - J8 pin 5 at 3P3V
131OutJ3 Pin 38 - default low, 1P8V
124OutJ3 Pin 40 - default high,1P8V

J5 - HS B2B

See changelog for version info.

GPIODirectionDescription
0In/OutJ5 Pin 46, default high, 1P8V
1In/OutJ5 Pin 47, default high, 1P8V
36In/OutJ5 Pin 97, default high, 1P8V (system image 1.7.3+)
37In/OutJ5 Pin 98, default high, 1P8V (system image 1.7.3+)
56In/OutJ5 Pin 50, default high, 1P8V
57In/OutJ5 Pin 51, default high, 1P8V
85In/OutJ5 Pin 82, default high, 1P8V
86In/OutJ5 Pin 81, default high, 1P8V
87In/OutJ5 Pin 80, default high, 1P8V
88In/OutJ5 Pin 78, default high, 1P8V
89In/OutJ5 Pin 79, default high, 1P8V - for M0130, controls whether interface on J8 is SPI (default) or UART (DT change needed to convert)
152In/OutJ5 Pin 44, default high, 1P8V
153In/OutJ5 Pin 43, default low, 1P8V
154In/OutJ5 Pin 42, default low, 1P8V
155In/OutJ5 Pin 41, default low, 1P8V

J6

Note: As of system image 1.5:

GPIODirectionDescription
113In/OutJ6 - 16, exposed though interposer M0076 TP2
110In/OutJ6 - 18, exposed though interposer M0076 TP3. Note: camera HW ID 1 reset

J7

Note: As of system image 1.5:

GPIODirectionDescription
6In/OutJ7 - 38, exposed though interposer M0076 TP7
7In/OutJ7 - 40, exposed though interposer M0076 TP8

J8

Note: As of system image 1.5:

GPIODirectionDescription
12In/OutJ8 - 34, exposed though interposer M0076 TP5
13In/OutJ8 - 36, exposed though interposer M0076 TP6

J10

GPIODirectionDescription
46OutJ10 Pin 6 (SPI4 CS1, used for Spektrum bind)

LEDs

GPIODirectionDescription
82OutDS2 LED, Red
83OutDS2 LED, Green
84OutDS2 LED, Blue

Regulators

GPIODirectionDescription
157OutControls U41, the 5V/2A switchable power supply for USB
159OutControls U24, the 3.3VDC supply for RC / VOXL2 IO, J19 pin 9

HW ID

Note: As of system image 1.7.3:

GPIODirectionDescription
48InSOM detect, id_som_1
49InSOM detect, id_som_2
50InSOM detect, id_mai_4
51InSOM detect, id_mai_4
Machine48495051
M0054XX00
M0104XX11
M01541010

UART/SPI select (VOXL2 Mini)

Note: As of system image 1.7.3:

On VOXL 2 Mini, J10 can expose a UART or SPI based on this GPIO (default UART). Not kernel rebuild required to change from UART to SPI.

GPIODirectionDescription
67OutJ10 level shift control, default low (selects UART)

Camera Sync Util GPIOs

Note: As of system image 1.7.7:

See meta-voxl2/recipes-kernel/voxl-fsync-mod

GPIODirectionDescription
109OutDefault low

Camera Use

GPIODirectionDescription
110InWill be used by M0173 config, camera ID 6 reset
111InUsed by stereo sync with ov7251/ov9782, J8 pin 18, D0006 config
112InUsed by future camera config
113InUsed by stereo sync with ov7251/ov9782, J6 pin 18, D0006 config
114Inused by fugure camera config

PCIe

PCIe2

Starting system image 1.7, we’ve disabled the PCIe interface in favor of exposing GPIOs.

Serial Debug Console

This is enabled in DEBUG builds of the system image and not enabled by default.

You can access via:

  • M0017 APQ Console.

m0054-debug-console-m0017

  • M0062 J6.

m0054-debug-console

Running the following after power on, for example:

screen /dev/tty.usbserial-AU03BMG9 115200

Watch the booting progress:

[  OK  ] Stopped Modem Init Service.
[  OK  ] Started Modem Init Service.
[  OK  ] Stopped Modem Init Service.
[FAILED] Failed to start Modem Init Service.
See 'systemctl status init_sys_mss.service' for details.
[  OK  ] Started depends update.

Ubuntu 18.04.5 LTS qrb5165-rb5 ttyMSM0

qrb5165-rb5 login:

Kernel Modules

voxl-fsync-mod

Used to generate image sensor sync pulses.

Source

voxl-gpio-mod

Used to export GPIO to user space.

Source

voxl-platform-mod

Used to export machine specific to user space for operational ease.

Source