is somebody here, maybe from Khadas- Team with a answer to these question,
How can I use the GPIO’s like GPIO- Pins, UART, SPI and so on…?
Android Studio 3.6.1 supports only NXP or Raspberry derivate!
first is, we decided to use only SPI, because this is the best way to communicate with our pigy-back board.
Is SPI Device in Rom and what have we to do to activate SPI_B Pin 15, 16, 35, 37
to use UART together with one or more GPIO’s is only a way for Plan B, SPI don’t work!
only if we need this combination we wont use UARTC Pin 15/16 and GPIOH_4 Pin 37.
Only for Information your example for UART is from 2009, Android Studio was to this
time under development (not born) today we have 2020 and Android 9!
Thanks for your help.
The Pin 15,16 is also for UARTC, and is configured as a serial port by default on our ROM.
You need to build your rom if you want to use SPI. Also Maybe you need to add driver support for your pigy-back board.
Thanks!
@Terry thanks for the reply.
We have been researched for a few days in the area of Android 9, Android Studio and hardware like SPI etc.
As we understand it, Android Things can only be used for certain hardware supported by Google.
To use other hardware like UART or SPI, it’s mainly required to write its own driver, unless it’s part of the Andriod Linux kernel.
I assume that the SPI interface of the VIM3 on the 40pin GPIO connector SPI_B pin 15, 16, 35, 37, part of the ROM is.
The standard SPI driver can be used.
Is it necessary to integrate the SPI device in the “dts” file…? like
& spi_0 {
spidev @ 1 {
address-cells = <1>; # size-cells = <1>; compatible = “linux, spidev”; spi-max-frequency = <20000000>; reg = <1>; };};Does Khadas have rules or instructions on how to do oneSPI device in an Android environment that integrates an activity.I think we are not alone with this problem becauseeveryone who uses a standard interface like I2C, UART, or SPIwould like to have this problem.Thanks for Anwer!
Hei together, @Terry
Thanks for help in SPI, UART with Android 9 Pie!
UART:
We installed an Android Module for supporting UART_B and UART_C an VIM3 boards,
using C++ and CMake to communicate with the included Linux UART- Driver.
Module works with all three UART’s ttyS1, ttyS2, and ttyS3.
SPI:
This part is (was) not so easy to realise.
To change something in .dts file is very easy but before you can do this,
you have to download round about 250 GB Sourcecode + 150 GB extra
diskspace for recompiling this code. Download needs around 8…10 hours
and one compiling approximately 6…8 hours, to get a new Android image.
Result, it works…!
Now, my last question, maybe you can help again…?
We wont use PIN 37 GPIOH_4 of VIM3’s 40 PIN connector as Output PIN.
Is this possible, is this PIN 37 aktuell defined as GPIO PIN under Android 9.
We searched for an easy example, but we didn’t find some.
can I use VIM3 GPIO PIN37- GPIOH_4 (175) as Output Pin with Android 9…?
The Example Hei again,
my last question was,
can I use VIM3 GPIO PIN37- GPIOH_4 ( 175 ) as Output Pin …?
the example in https://github.com/terry2droid/Wiringpi is mainly for VIm1
but is is it software example similar to VIM3…?
Thanks for help!