Hardware interfaces for the Dragonboard are exposed through the 40-pin header on the board. Functionality includes:
11x - GPIO pins
2x - Serial UARTs
1x - SPI bus
2x - I2C bus
1x - 5V power pin
1x - 1.8V power pin
4x - Ground pins
Note that the Dragonboard uses 1.8V logic levels on all IO pins.
Let’s look at the GPIO available on this device.
GPIO Pin Table
The following GPIO pins are accessible through APIs:
User LED 1
User LED 2
As an example, the following code opens GPIO 35 as an output and writes a digital ‘1’ out on the pin:
Output doesn’t work on GPIO 24. Input works fine.
Pins are configured as InputPullDown at boot, but will change to Input (floating) the first time they are opened
Pins do not revert to their default state when closed
Spurious interrupts may be seen when interrupts are enabled on multiple pins
There are two Serial UARTS available on the Dragonboard UART0 and UART1
UART0 has the standard UART0 TX and UART0 RX lines, along with flow control signals UART0 CTS and UART0 RTS.
Pin 5 - UART0 TX
Pin 7 - UART0 RX
Pin 3 - UART0 CTS
Pin 9 - UART0 RTS
UART1 includes just the UART1 TX and UART1 RX lines.
Pin 11 - UART1 TX
Pin 13 - UART1 RX
The example below initializes UART1 and performs a write followed by a read:
Note that you must add the following capability to the Package.appxmanifest file in your UWP project to run Serial UART code:
Visual Studio 2017 has a known bug in the Manifest Designer (the visual editor for appxmanifest files) that affects the serialcommunication capability. If
your appxmanifest adds the serialcommunication capability, modifying your appxmanifest with the designer will corrupt your appxmanifest (the Device xml child
will be lost). You can workaround this problem by hand editting the appxmanifest by right-clicking your appxmanifest and selecting View Code from the
Let’s look at the I2C busses available on this device.
I2C0 exposed on the pin header with two lines SDA and SCL
Pin 17 - I2C0 SDA
Pin 15 - I2C0 SCL
I2C1 exposed on the pin header with two lines SDA and SCL
Pin 21 - I2C1 SDA
Pin 19 - I2C1 SCL
The example below initializes I2C0 and writes data to an I2C device with address 0x40:
Let’s look at the SPI bus available on this device.
There is one SPI controller SPI0 available on the DB
Pin 10 - SPI0 MISO
Pin 14 - SPI0 MOSI
Pin 8 - SPI0 SCLK
Pin 12 - SPI0 CS0
The SPI clock is fixed at 4.8mhz. The requested SPI clock will be ignored.
An example on how to perform a SPI write on bus SPI0 is shown below: