Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GPIO problem using gpio-sunxi module on OrangePi ONE

Featured Replies

Hello,

 

currently I am working on my Orange pi one system (Armbian Linux orangepione 3.4.113-sun8i #10 SMP PREEMPT Thu Feb 23 19:55:00 CET 2017 armv7l armv7l armv7l GNU/Linux)

to get my ILI9341-TFT display to work using the fb_ili9341 kernel module.

 

I have read a lot of documentation and the display works (using the fb_ili9341 module) attached to my cubeitruck (also running armbian).

I think that the problem is the GPIO- kernel module of the Orange PI one.

 

These are the output messages in the syslog file after "modprobe gpio-sunxi":

[  343.417378] gpio_pin_1(7) gpio_request
[  343.417817] gpio_pin_2(8) gpio_request
[  343.418095] gpio_pin_3(9) gpio_request
[  343.418489] gpio name is PA8, ret = 0
[  343.418885] gpio name is PA9, ret = 0
[  343.419213] get config err!
[  343.422568] gpio_sw: probe of gpio_sw.2 failed with error -12
[  343.422808] gpio_init finish with uesd 1

 

My script.fex file contain the following lines:

[gpio_para]
gpio_used = 1
gpio_num = 3
gpio_pin_0 = port:PA07<1><default><default><0>
gpio_pin_1 = port:PA08<1><default><default><0>
gpio_pin_2 = port:PA09<1><default><default><0>

 

[spi0]
spi_used = 1
spi_cs_bitmap = 1
spi_mosi = port:PC00<3><default><default><default>
spi_miso = port:PC01<3><default><default><default>
spi_sclk = port:PC02<3><default><default><default>
spi_cs0 = port:PC03<3><1><default><default>

And yes, the TFT display is connected to SPI0 and the DC, RST and LED lines are also correctly connected...

 

modprobe fbtft dma=1
modprobe fbtft_device custom name=fb_ili9341 buswidth=8 busnum=0 bgr=1 mode=0 speed=64000000 txbuflen=64 fps=25 gpios=reset:0,dc:1,led:2 rotate=0 debug=1

 

~# lsmod
Module                  Size  Used by
fb_ili9341              3432  0
fbtft_device           25082  0
fbtft                  24194  2 fb_ili9341,fbtft_device

And it semes to be that the fb_ili9341 driver has detected the display:

 

[  618.725172] fbtft_device:  SPI devices registered:
[  618.725209] fbtft_device:      spidev spi0.0 33000kHz 8 bits mode=0x00
[  618.725231] fbtft_device:  'fb' Platform devices registered:
[  618.725370] fbtft_device: Deleting spi0.0
[  618.726173] fbtft_device:  GPIOS used by 'fb_ili9341':
[  618.726199] fbtft_device:    'reset' = GPIO0
[  618.726216] fbtft_device:    'dc' = GPIO1
[  618.726233] fbtft_device:    'led' = GPIO2
[  618.726249] fbtft_device:  SPI devices registered:
[  618.726271] fbtft_device:      fb_ili9341 spi0.0 64000kHz 8 bits mode=0x00
[  618.747630] fb_ili9341 spi0.0: fbtft_request_gpios: 'reset' = GPIO0
[  618.747677] fb_ili9341 spi0.0: fbtft_request_gpios: 'dc' = GPIO1
[  618.747714] fb_ili9341 spi0.0: fbtft_request_gpios: 'led' = GPIO2
[  619.115261] graphics fb8: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 0 KiB DMA buffer memory, fps=25, spi0.0 at 64 MHz

 

Does anyone got an idea what the problem could be?

 

Thanks!

 

Regards

Kai

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.