common:android_things:spiloopback

'ODROID-N2' on this page refers to the ODROID-N2 series (N2, N2+, N2L).

Android Things with SPI Loopback

  • ODROID-C4
  • ODROID-N2
  • ODROID-M1
target
gpio readall
target
 +-----+-----+---------+------+---+--- M1 ---+---+------+---------+-----+-----+
 | I/O | wPi |   Name  | Mode | V | Physical | V | Mode |  Name   | wPi | I/O |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3V |      |   |  1 || 2  |   |      | 5V      |     |     |
 | 110 |   8 |    SDA0 | ALT5 | 1 |  3 || 4  |   |      | 5V      |     |     |
 | 109 |   9 |    SCL0 | ALT5 | 1 |  5 || 6  |   |      | 0V      |     |     |
 |  14 |   7 |  IO0_B6 |   IN | 1 |  7 || 8  | 0 | ALT5 | UART.TX | 15  | 126 |
 |     |     |      0V |      |   |  9 || 10 | 0 | ALT5 | UART.RX | 16  | 127 |
 |  16 |   0 |  IO0_C0 |   IN | 0 | 11 || 12 | 0 | IN   | IO3_D0  | 1   | 120 |
 |  17 |   2 |  IO0_C1 |   IN | 0 | 13 || 14 |   |      | 0V      |     |     |
 | 106 |   3 |  IO3_B2 |   IN | 0 | 15 || 16 | 0 | IN   | IO3_C6  | 4   | 118 |
 |     |     |    3.3V |      |   | 17 || 18 | 0 | IN   | IO3_C7  | 5   | 119 |
 |  89 |  12 | SPI.TXD | ALT4 | 1 | 19 || 20 |   |      | 0V      |     |     |
 |  88 |  13 | SPI.RXD | ALT4 | 1 | 21 || 22 | 0 | IN   | IO3_D1  | 6   | 121 |
 |  91 |  14 | SPI.CLK | ALT4 | 0 | 23 || 24 | 1 | ALT4 | SPI.CS0 | 10  | 90  |
 |     |     |      0V |      |   | 25 || 26 | 0 | IN   | IO3_D2  | 11  | 122 |
 |  12 |  30 |    SDA1 |   IN | 1 | 27 || 28 | 1 | IN   | SCL1    | 31  | 11  |
 | 145 |  21 |  IO4_C1 |   IN | 0 | 29 || 30 |   |      | 0V      |     |     |
 | 142 |  22 |  IO4_B6 |   IN | 0 | 31 || 32 | 0 | IN   | IO3_D3  | 26  | 123 |
 |  13 |  23 |  IO0_B5 |   IN | 1 | 33 || 34 |   |      | 0V      |     |     |
 | 125 |  24 |  IO3_D5 |  OUT | 1 | 35 || 36 | 0 | IN   | IO3_D4  | 27  | 124 |
 |     |  25 |    AIN1 |      |   | 37 || 38 |   |      | 1V8     | 28  |     |
 |     |     |      0V |      |   | 39 || 40 |   |      | AIN0    | 29  |     |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | I/O | wPi |   Name  | Mode | V | Physical | V | Mode |  Name   | wPi | I/O |
 +-----+-----+---------+------+---+--- M1 ---+---+------+---------+-----+-----+

Create the Project

Android Studio → Check out project from Version Control → Git → URL: https://github.com/xiane/thingsGpioExample → Clone

=== Change a branch to the spiLoopback

VCS → Git → Branches → origin/spiLoopback → Checkout As… → OK

Uploading

After changing the branch to the spiLoopback, Connect to the one of ODROID-M1 otg port.
Click the Run 'app' Button.

  • common/android_things/spiloopback.txt
  • Last modified: 2022/11/08 14:34
  • by luke.go