Jump to content

Recommended Posts

Posted

Someone sent a week ago a couple of  2.8" TFT Display ili9341 and asked me to wire it to an H5 and make it work.

I had some experience with the ST7789S with Nanopi NEO plus2 and that worked out of the box so i decided to use Nanopi NEO2 as a test bed and used the same wiring scheme.

I have managed to wire it and although the FB is created and no error at all but the display is blank  (black with no backlight enabled). The frame buffer is filled with information but not displayed.

 

here is the wiring (NEO2):

NanoPi  Display
19    SPI_MOSI
21    SPI_MISO
23    SPI_CLK
22    LCD_D/C
24    LCD_CS
7    LCD_RESET
11    LED_EN

GND
VCC (3v3)

Kernel 4.15 output:

[    1.396261] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'reset-gpios' = GPIO203
[    1.403505] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'dc-gpios' = GPIO1
[    1.410317] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'cs-gpios' = GPIO67
[    1.417213] fb_ili9341 spi0.0: fbtft_request_one_gpio: 'led-gpios' = GPIO0
[    1.711586] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 32 KiB buffer memory, fps=50, spi0.0 at 64 MHz

I doubled checked the wiring, seems to be OK.

 

Has anyone succeeded in using ili9341 with H5? Please share your experience, kernel version, Armbian version, whatever... 

Posted

Depends on what you mean by succeeded. My SPI_LCD project runs fine on Armbian supported boards (including H5), but it doesn't create a framebuffer. It's a user-level program which talks directly to the LCD and allows you to draw text and graphics with a simple API:

 

https://github.com/bitbank2/SPI_LCD

 

Even if your project needs fbtft, my code is useful to see if your wiring + display are working correctly.

 

Posted
31 minutes ago, Larry Bank said:

Even if your project needs fbtft, my code is useful to see if your wiring + display are working correctly.

Great, testing your SPI_LCD with Armbian 5.38 latest build and will check if the wiring is correct then. Thanks for the hint. Will report the results.

Posted

@Larry Bank

 

Here come the newbie questions:

* I enabled spi in ArmbianExnv.txt i think and get this:

root@nanopineo2:~/SPI_LCD# cat /boot/armbianEnv.txt
verbosity=1
console=both
overlay_prefix=sun50i-h5
overlays=usbhost1 usbhost2
rootdev=UUID=666159eb-f089-4881-b642-df9bfe4bdfc4
rootfstype=ext4
param_spidev_spi_bus=0

usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
root@nanopineo2:~/SPI_LCD# ./lcd
Error setting SPI mode
Error setting SPI speed
Failed to open the SPI bus
Problem initializing spilcd library
root@nanopineo2:~/SPI_LCD#

What am I missing?

Posted (edited)

Never mind, i missed spidev.

 

Ok, the LCD displayed a blank screen when running ./lcd. Looks like something wrong with the wiring?

 

* Info

The latest build is a bit misleading...

./lcd
Full screen updates max out at 23.92 FPS
2000 random rectangles in 17131 ms
root@nanopineo2:~/SPI_LCD# uname -ra
Linux nanopineo2 4.14.14-sunxi64 #10 SMP Thu Jan 25 20:42:04 CET 2018 aarch64 aarch64 aarch64 GNU/Linux
root@nanopineo2:~/SPI_LCD#
Spoiler

 


./lcd
Full screen updates max out at 23.81 FPS
2000 random rectangles in 17112 ms
root@nanopineo2:~/SPI_LCD# dmesg
[  646.018665] spidev spi0.0: SPI transfer failed: -110
[  646.018689] spi_master spi0: failed to transfer one message from queue
[  646.122654] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.122667] spidev spi0.0: SPI transfer failed: -110
[  646.122691] spi_master spi0: failed to transfer one message from queue
[  646.226657] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.226671] spidev spi0.0: SPI transfer failed: -110
[  646.226695] spi_master spi0: failed to transfer one message from queue
[  646.330663] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.330678] spidev spi0.0: SPI transfer failed: -110
[  646.330702] spi_master spi0: failed to transfer one message from queue
[  646.434661] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.434674] spidev spi0.0: SPI transfer failed: -110
[  646.434697] spi_master spi0: failed to transfer one message from queue
[  646.538661] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.538675] spidev spi0.0: SPI transfer failed: -110
[  646.538698] spi_master spi0: failed to transfer one message from queue
[  646.642667] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.642681] spidev spi0.0: SPI transfer failed: -110
[  646.642705] spi_master spi0: failed to transfer one message from queue
[  646.746667] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.746681] spidev spi0.0: SPI transfer failed: -110
[  646.746705] spi_master spi0: failed to transfer one message from queue
[  646.850686] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.850699] spidev spi0.0: SPI transfer failed: -110
[  646.850723] spi_master spi0: failed to transfer one message from queue
[  646.954676] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  646.954690] spidev spi0.0: SPI transfer failed: -110
[  646.954713] spi_master spi0: failed to transfer one message from queue
[  647.058677] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.058691] spidev spi0.0: SPI transfer failed: -110
[  647.058715] spi_master spi0: failed to transfer one message from queue
[  647.162681] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.162694] spidev spi0.0: SPI transfer failed: -110
[  647.162718] spi_master spi0: failed to transfer one message from queue
[  647.266684] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.266699] spidev spi0.0: SPI transfer failed: -110
[  647.266722] spi_master spi0: failed to transfer one message from queue
[  647.370683] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.370697] spidev spi0.0: SPI transfer failed: -110
[  647.370720] spi_master spi0: failed to transfer one message from queue
[  647.474685] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.474699] spidev spi0.0: SPI transfer failed: -110
[  647.474723] spi_master spi0: failed to transfer one message from queue
[  647.578690] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.578705] spidev spi0.0: SPI transfer failed: -110
[  647.578730] spi_master spi0: failed to transfer one message from queue
[  647.682691] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.682705] spidev spi0.0: SPI transfer failed: -110
[  647.682730] spi_master spi0: failed to transfer one message from queue
[  647.786694] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.786708] spidev spi0.0: SPI transfer failed: -110
[  647.786731] spi_master spi0: failed to transfer one message from queue
[  647.890695] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.890709] spidev spi0.0: SPI transfer failed: -110
[  647.890732] spi_master spi0: failed to transfer one message from queue
[  647.994699] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  647.994713] spidev spi0.0: SPI transfer failed: -110
[  647.994737] spi_master spi0: failed to transfer one message from queue
[  648.098703] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.098717] spidev spi0.0: SPI transfer failed: -110
[  648.098741] spi_master spi0: failed to transfer one message from queue
[  648.202705] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.202718] spidev spi0.0: SPI transfer failed: -110
[  648.202743] spi_master spi0: failed to transfer one message from queue
[  648.306709] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.306723] spidev spi0.0: SPI transfer failed: -110
[  648.306747] spi_master spi0: failed to transfer one message from queue
[  648.410707] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.410720] spidev spi0.0: SPI transfer failed: -110
[  648.410744] spi_master spi0: failed to transfer one message from queue
[  648.514710] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.514725] spidev spi0.0: SPI transfer failed: -110
[  648.514748] spi_master spi0: failed to transfer one message from queue
[  648.618714] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.618728] spidev spi0.0: SPI transfer failed: -110
[  648.618753] spi_master spi0: failed to transfer one message from queue
[  648.810065] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.810083] spidev spi0.0: SPI transfer failed: -110
[  648.810105] spi_master spi0: failed to transfer one message from queue
[  648.910727] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  648.910744] spidev spi0.0: SPI transfer failed: -110
[  648.910770] spi_master spi0: failed to transfer one message from queue
[  649.050725] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.050743] spidev spi0.0: SPI transfer failed: -110
[  649.050765] spi_master spi0: failed to transfer one message from queue
[  649.154736] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.154751] spidev spi0.0: SPI transfer failed: -110
[  649.154776] spi_master spi0: failed to transfer one message from queue
[  649.258731] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.258746] spidev spi0.0: SPI transfer failed: -110
[  649.258771] spi_master spi0: failed to transfer one message from queue
[  649.362733] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.362748] spidev spi0.0: SPI transfer failed: -110
[  649.362773] spi_master spi0: failed to transfer one message from queue
[  649.466733] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.466747] spidev spi0.0: SPI transfer failed: -110
[  649.466770] spi_master spi0: failed to transfer one message from queue
[  649.570712] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.570726] spidev spi0.0: SPI transfer failed: -110
[  649.570749] spi_master spi0: failed to transfer one message from queue
[  649.674738] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.674752] spidev spi0.0: SPI transfer failed: -110
[  649.674775] spi_master spi0: failed to transfer one message from queue
[  649.778742] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.778756] spidev spi0.0: SPI transfer failed: -110
[  649.778781] spi_master spi0: failed to transfer one message from queue
[  649.882786] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.882801] spidev spi0.0: SPI transfer failed: -110
[  649.882824] spi_master spi0: failed to transfer one message from queue
[  649.986747] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  649.986762] spidev spi0.0: SPI transfer failed: -110
[  649.986786] spi_master spi0: failed to transfer one message from queue
[  650.090750] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.090765] spidev spi0.0: SPI transfer failed: -110
[  650.090788] spi_master spi0: failed to transfer one message from queue
[  650.194756] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.194772] spidev spi0.0: SPI transfer failed: -110
[  650.194797] spi_master spi0: failed to transfer one message from queue
[  650.298759] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.298774] spidev spi0.0: SPI transfer failed: -110
[  650.298798] spi_master spi0: failed to transfer one message from queue
[  650.402757] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.402773] spidev spi0.0: SPI transfer failed: -110
[  650.402796] spi_master spi0: failed to transfer one message from queue
[  650.506762] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.506776] spidev spi0.0: SPI transfer failed: -110
[  650.506800] spi_master spi0: failed to transfer one message from queue
[  650.610764] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.610779] spidev spi0.0: SPI transfer failed: -110
[  650.610803] spi_master spi0: failed to transfer one message from queue
[  650.714769] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.714784] spidev spi0.0: SPI transfer failed: -110
[  650.714807] spi_master spi0: failed to transfer one message from queue
[  650.818772] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.818785] spidev spi0.0: SPI transfer failed: -110
[  650.818808] spi_master spi0: failed to transfer one message from queue
[  650.922790] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  650.922804] spidev spi0.0: SPI transfer failed: -110
[  650.922827] spi_master spi0: failed to transfer one message from queue
[  651.026777] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.026791] spidev spi0.0: SPI transfer failed: -110
[  651.026816] spi_master spi0: failed to transfer one message from queue
[  651.130778] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.130792] spidev spi0.0: SPI transfer failed: -110
[  651.130816] spi_master spi0: failed to transfer one message from queue
[  651.234780] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.234795] spidev spi0.0: SPI transfer failed: -110
[  651.234819] spi_master spi0: failed to transfer one message from queue
[  651.338792] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.338807] spidev spi0.0: SPI transfer failed: -110
[  651.338831] spi_master spi0: failed to transfer one message from queue
[  651.442788] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.442803] spidev spi0.0: SPI transfer failed: -110
[  651.442827] spi_master spi0: failed to transfer one message from queue
[  651.546791] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.546804] spidev spi0.0: SPI transfer failed: -110
[  651.546828] spi_master spi0: failed to transfer one message from queue
[  651.650768] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.650782] spidev spi0.0: SPI transfer failed: -110
[  651.650806] spi_master spi0: failed to transfer one message from queue
[  651.754794] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.754807] spidev spi0.0: SPI transfer failed: -110
[  651.754831] spi_master spi0: failed to transfer one message from queue
[  651.858798] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.858812] spidev spi0.0: SPI transfer failed: -110
[  651.858835] spi_master spi0: failed to transfer one message from queue
[  651.962818] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  651.962831] spidev spi0.0: SPI transfer failed: -110
[  651.962855] spi_master spi0: failed to transfer one message from queue
[  652.066802] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.066818] spidev spi0.0: SPI transfer failed: -110
[  652.066840] spi_master spi0: failed to transfer one message from queue
[  652.170804] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.170818] spidev spi0.0: SPI transfer failed: -110
[  652.170842] spi_master spi0: failed to transfer one message from queue
[  652.274816] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.274831] spidev spi0.0: SPI transfer failed: -110
[  652.274855] spi_master spi0: failed to transfer one message from queue
[  652.378811] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.378825] spidev spi0.0: SPI transfer failed: -110
[  652.378849] spi_master spi0: failed to transfer one message from queue
[  652.482815] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.482829] spidev spi0.0: SPI transfer failed: -110
[  652.482852] spi_master spi0: failed to transfer one message from queue
[  652.586817] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.586831] spidev spi0.0: SPI transfer failed: -110
[  652.586855] spi_master spi0: failed to transfer one message from queue
[  652.690820] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.690835] spidev spi0.0: SPI transfer failed: -110
[  652.690860] spi_master spi0: failed to transfer one message from queue
[  652.794824] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.794838] spidev spi0.0: SPI transfer failed: -110
[  652.794861] spi_master spi0: failed to transfer one message from queue
[  652.898856] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  652.898870] spidev spi0.0: SPI transfer failed: -110
[  652.898893] spi_master spi0: failed to transfer one message from queue
[  653.002829] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.002843] spidev spi0.0: SPI transfer failed: -110
[  653.002868] spi_master spi0: failed to transfer one message from queue
[  653.106828] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.106843] spidev spi0.0: SPI transfer failed: -110
[  653.106867] spi_master spi0: failed to transfer one message from queue
[  653.210833] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.210849] spidev spi0.0: SPI transfer failed: -110
[  653.210873] spi_master spi0: failed to transfer one message from queue
[  653.314812] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.314827] spidev spi0.0: SPI transfer failed: -110
[  653.314851] spi_master spi0: failed to transfer one message from queue
[  653.418840] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.418854] spidev spi0.0: SPI transfer failed: -110
[  653.418878] spi_master spi0: failed to transfer one message from queue
[  653.522842] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.522856] spidev spi0.0: SPI transfer failed: -110
[  653.522879] spi_master spi0: failed to transfer one message from queue
[  653.626847] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.626861] spidev spi0.0: SPI transfer failed: -110
[  653.626885] spi_master spi0: failed to transfer one message from queue
[  653.730848] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.730862] spidev spi0.0: SPI transfer failed: -110
[  653.730886] spi_master spi0: failed to transfer one message from queue
[  653.834873] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.834888] spidev spi0.0: SPI transfer failed: -110
[  653.834912] spi_master spi0: failed to transfer one message from queue
[  653.938871] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  653.938885] spidev spi0.0: SPI transfer failed: -110
[  653.938910] spi_master spi0: failed to transfer one message from queue
[  654.042857] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.042871] spidev spi0.0: SPI transfer failed: -110
[  654.042895] spi_master spi0: failed to transfer one message from queue
[  654.146863] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.146877] spidev spi0.0: SPI transfer failed: -110
[  654.146902] spi_master spi0: failed to transfer one message from queue
[  654.250863] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.250878] spidev spi0.0: SPI transfer failed: -110
[  654.250904] spi_master spi0: failed to transfer one message from queue
[  654.354894] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.354908] spidev spi0.0: SPI transfer failed: -110
[  654.354933] spi_master spi0: failed to transfer one message from queue
[  654.458869] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.458883] spidev spi0.0: SPI transfer failed: -110
[  654.458906] spi_master spi0: failed to transfer one message from queue
[  654.562871] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.562885] spidev spi0.0: SPI transfer failed: -110
[  654.562908] spi_master spi0: failed to transfer one message from queue
[  654.666876] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.666890] spidev spi0.0: SPI transfer failed: -110
[  654.666913] spi_master spi0: failed to transfer one message from queue
[  654.770879] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.770893] spidev spi0.0: SPI transfer failed: -110
[  654.770918] spi_master spi0: failed to transfer one message from queue
[  654.874906] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.874920] spidev spi0.0: SPI transfer failed: -110
[  654.874943] spi_master spi0: failed to transfer one message from queue
[  654.978885] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  654.978899] spidev spi0.0: SPI transfer failed: -110
[  654.978922] spi_master spi0: failed to transfer one message from queue
[  655.082885] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.082899] spidev spi0.0: SPI transfer failed: -110
[  655.082923] spi_master spi0: failed to transfer one message from queue
[  655.186870] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.186886] spidev spi0.0: SPI transfer failed: -110
[  655.186914] spi_master spi0: failed to transfer one message from queue
[  655.290847] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.290861] spidev spi0.0: SPI transfer failed: -110
[  655.290879] spi_master spi0: failed to transfer one message from queue
[  655.394914] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.394931] spidev spi0.0: SPI transfer failed: -110
[  655.394958] spi_master spi0: failed to transfer one message from queue
[  655.722908] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.722926] spidev spi0.0: SPI transfer failed: -110
[  655.722948] spi_master spi0: failed to transfer one message from queue
[  655.826922] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.826938] spidev spi0.0: SPI transfer failed: -110
[  655.826962] spi_master spi0: failed to transfer one message from queue
[  655.962267] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  655.962283] spidev spi0.0: SPI transfer failed: -110
[  655.962304] spi_master spi0: failed to transfer one message from queue
[  656.062926] spi_master spi0: spi0.0: timeout transferring 0 bytes@36000000Hz for 104(100)ms
[  656.062942] spidev spi0.0: SPI transfer failed: -110
[  656.062965] spi_master spi0: failed to transfer one message from queue
[0mroot@nanopineo2:~/SPI_LCD# 

 

 

Edited by Tido
lcd displayed a blank screen
Posted

A little info for @Igor, kernel 4.14.14 runs the board at 35 ºC idle, i tested 4.15.18 (EOL) and it runs at 28 ºC.. pity is EOL..

Posted
8 minutes ago, Larry Bank said:

How did you wire LED/DC/RESET? The numbers you feed to SPI_LCD are the header pin numbers, not BCM/WiringPI numbers.

 

 

pin: 7    for LCD_RESET (that i suppose is your lcd)

pin 11    for LED_EN (that i suppose is your led)

pin 22    for LCD_D/C (that i suppose is your dc)

 

Taken from the http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO2

and here base on the Matrix-2'8_SPI_Key_TFT-1706, but the LCD is without Touch.

Posted
1 hour ago, @lex said:

pin: 7    for LCD_RESET (that i suppose is your lcd)

pin 11    for LED_EN (that i suppose is your led)

pin 22    for LCD_D/C (that i suppose is your dc)

 

Taken from the http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO2

and here base on the Matrix-2'8_SPI_Key_TFT-1706, but the LCD is without Touch.

Let's chat about this tomorrow; it's going to take too long to resolve like this. You can reach me on direct message through Twitter (@bitbank).

A couple of things to make wiring easier;

1) You don't need to connect the MISO line

2) You can tie the LED line to 3.3V

3) You can tie the CS line to GND

The rest of your wiring looks fine unless there's a conflict with 22 (UART2 enabled)

 

Did you select the NanoPi NEO GPIO table in spi_lcd.c before you compiled it?

  

Posted
8 hours ago, Larry Bank said:

The rest of your wiring looks fine unless there's a conflict with 22 (UART2 enabled)

 

1

Only enabled spidev, unless uart2 is default on Armbian but it did not  show uart selected on Armbian-config, will check again.

 

8 hours ago, Larry Bank said:

Did you select the NanoPi NEO GPIO table in spi_lcd.c before you compiled it?

Sorry, just compiled straight. Will do it, must be that. It's going to be a busy week, not in a hurry. Thanks. 

Posted
18 hours ago, @lex said:

Please, forgive the quality of the pictures

usually it helps a lot if you turn off  the flash

Posted
11 hours ago, @lex said:

 

20 hours ago, Larry Bank said:

Did you select the NanoPi NEO GPIO table in spi_lcd.c before you compiled it?

Sorry, just compiled straight. Will do it, must be that. It's going to be a busy week, not in a hurry. Thanks. 

 

Just an update, I changed to NanoPi NEO, compiled and ran, the same problem.

 

20 hours ago, Larry Bank said:

A couple of things to make wiring easier;

1) You don't need to connect the MISO line

2) You can tie the LED line to 3.3V

3) You can tie the CS line to GND

The rest of your wiring looks fine unless there's a conflict with 22 (UART2 enabled)

 

Did that, the backlight is on, still the same output and error.

 

2 hours ago, Tido said:

usually it helps a lot if you turn off  the flash

Yes, but late in the night the room was dark with LED lights and the camera (cell phone)  is cheap, the only way to see something was with flash.;)

20 hours ago, Larry Bank said:

it's going to take too long to resolve like this. You can reach me on direct message through Twitter (@bitbank).

Probably so. 

I will revise everything and try to contact you that way.

 

 

Posted

I can confirm the display in question works with Neo, and Neo2, and I dont see anything wrong with your wiring, but I would try to put all the wires closer together so that they can be taped into a block for ease of plugging and unplugging later on. I can also confirm when you do it this way you don't need to worry about conflicts in the fex/dts file as I have already tried them. When I did mine I just copied the wiring from a raspberry pi article, and changed the GPIO numbers in the fbtft call. The cable is the same just the GPIO numbers are different.  There are really just 3 free wires, the rest are constrained. I usually leave the backlight/led wire (the yellow wire below) outside of the block so that it can be attached to a PWM pin or a 3.3v source if you are running out of pins as in Duo.

 

_5020660.thumb.JPG.2c3784f7d905a2cf83deb5ca224670c9.JPG

 

The same cable would work with almost every SBC, here I have it connected up to Neo and Neo2 - note the Ethernet ports of Neo and Neo2 are upside down to each other.

_5020659.thumb.JPG.a2cf5ab6027df6eaa9a43fa5105ab323.JPG

 

Posted

Ok, I figured out what I missed with @Larry Bank SPI_LCD.

 

According to my wiring, I needed to adjust:

rc = spilcdInit(LCD, 0, 0, 36000000, 22, 7, 11); // LCD type, flip 180, SPI Channel, D/C, RST, LED

That was it!

 

@yam1 ,

Nice work. I just noticed all your photo has LCD turned off, what are you running on it, X11 or fb?

 

 

Posted

@Larry Bank

 

If you allow me I would suggest changing source code format to be something self-explanatory, what about:

 

#ifdef USE_NANOPINEO
// NanoPi NEO
// define 40 pins since the 12 pin header has 2 GPIOs available and so does
// the 4-pin TTY header
static int iGenericPins[] = {
    -1,
/* Physical pin <-> GPIO pin */   
/*  1 ,  2 */       -1,  -1,
/*  3 ,  4 */       12,  -1,
/*  5 ,  6 */       11,  -1,
/*  7 ,  8 */      203, 198,
/*  9 , 10 */       -1, 199,
/* 11 , 12 */        0,   6,
/* 13 , 14 */        2,  -1,
/* 15 , 16 */        3, 200,
/* 17 , 18 */       -1, 201,
/* 19 , 20 */       64,  -1,
/* 21 , 22 */       65,   1,
/* 23 , 24 */       66,  67,
    
     -1,  -1,
     -1,  -1,
     -1, 363,
     17,  -1,
     -1,  -1,
     -1,  -1,
     -1,  -1,
      4,   5
      };
#endif // USE_NANOPINEO

but it is up to you. This is for the anxious person like me... :)

 

@yam1

 

Curious about your dual-head solution...

IMG_20180504_210913.jpg

Posted

I like your idea, but think it might be easier to make a separate document; people tend to just run make and not look any further. It might be better to add a parameter to the make to specify the board name and then it will print a quick message about the pin numbering.

 

To connect multiple SPI displays is not a problem. What and how do you want to display information on them? My SPI_LCD library allows you to write code which draws directly on the display. Having multiple virtual framebuffers would probably cause some performance issues for the board.

Posted
1 hour ago, Larry Bank said:

My SPI_LCD library allows you to write code which draws directly on the display.

Just a little observation, i received two samples of the ili9341,  the first sample runs for about  01:15 until it starts to draw white stripes on refreshing the buffer and finally gets a white screen, this happens on fbft .

I started to think fbft still have some bug as in 3.x . Surprisingly your SPI_LCD runs for 2 hrs without any glitches, i have put your example in a loop.

I then started to experiment with different FPS and SPI max speed until i reached a stable performance with the second display sample. i am still in doubt if it is a hardware issue (display) or fbft issue for the ili9341.

Posted
2 hours ago, Larry Bank said:

Now I'm confused. Are you using SPI_LCD + BB-CP or fbtft + fbcp?

Sorry if i confused you. SPI_LCD works really great (thanks for the lib). It's fbtft  (framebuffer) that has the issue i tried to describe for the same FPS and the same frequency. as SPI_LCD. Can't find a reason.

Posted
1 minute ago, Larry Bank said:

SPI_LCD + BB-CP

ahh, OK, i will try and see the results.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines