Changes

Jump to: navigation, search

SBCX-TN-001: Android Things and SPI bus

361 bytes added, 12:55, 11 April 2018
no edit summary
These interfaces don't include the ones that are typically used in products addressing industrial applications: I2C bus, SPI bus, UARTs, etc. However, as Android popularity is growing outside the mobile world too, Google defined a set of additional APIs to standardize the access to these interfaces as well. These new APIs are part of the [https://developer.android.com/things/index.html Android Things project].
This Technical Note describes the implementation of the [https://developer.android.com/things/sdk/pio/spi.html APIs related to the SPI bus] to access the SPI bus TBD SPI4 of the SBCX platformin the form of a native library. The solution was tested with Android 4.4.3.
==Testbed==
=== Wiring ===
The following table details [[File:SBCX-Android-4.4.3-SPI-hw.png|thumb|center|600px|Simplyfied diagram of the serial flash memory interfacing of ]]As depicted in the previous image, the serial flash memory ot has been connected to the SPI4 bus by using SBCX's expansion connector (J33). The following table details the signals that have been used.
{| class="wikitable"
!Nor
=== Example project===
An [[#Downloads example project]] is provided to illustrate how to use of the native library. It includes the library itself and a simple application which reads the identification code of the flash memory.==== Managing the device connection ====
In order to open a connection to a particular SPI slave, you need to know the unique name of the bus. The get this name,
run the following command from the serial console:
</pre>
==== Configuring clock and data modes ====
Configuration method are identical to the Andriod Things api [https://developer.android.com/things/sdk/pio/spi.html#mode ref].
4,650
edits

Navigation menu