Jump to content

Recommended Posts

Posted

I have a Pine64+ 2GB and use Waveshare 3.5 (A). Armbian Bionic Ubuntu installed.

I tried to initiate Waveshare screen by following steps:

- Enable spidev0.0 from armbianEnv.txt (confirm with /dev/spidev0.0)

- modprobe fbtft by:

sudo modprobe fbtft_device name=piscreen

But I got error with step 2. Here is the output of dmesg

[ 4419.154174] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 4419.163004] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[ 4419.164436] spidev spi0.0: spidev spi0.0 1000kHz 8 bits mode=0x00
[ 4419.164564] spidev spi0.0: Deleting spi0.0
[ 4419.165176] fbtft_device: GPIOS used by 'piscreen':
[ 4419.165183] fbtft_device: 'reset' = GPIO25
[ 4419.165187] fbtft_device: 'dc' = GPIO24
[ 4419.165190] fbtft_device: 'led' = GPIO22
[ 4419.165203] spi spi0.0: fb_ili9486 spi0.0 32000kHz 8 bits mode=0x00
[ 4419.186567] fb_ili9486: module is from the staging directory, the quality is unknown, you have been warned.
[ 4419.188554] fb_ili9486 spi0.0: fbtft_request_gpios: gpio_request_one('reset'=25) failed with -517

It seems that GPIO25 is not responded. I know that many have success with OrangePi, but no one with Pine64.

Any suggestion?

 

Thanks.

Posted
2 hours ago, icce said:

It seems that GPIO25 is not responded

You are probably confused by pin naming and GPIO naming. If you look at the schematic of Pine64+, the header where is GPIO25 is attached to PC15, so in the point of view of SoC A64, PC15 is view as GPIO79.

Probably your setup for GPIO22 and GPIO24 is also wrongly defined ...

Posted

 

Thanks @martinayotte for the suggestion. I made LCD initiated and /dev/fb0 appeared. 

But I got another problem when tried to display something on it.

My intention is to use python display information on LCD, so that I use pygame.

But when I tried to start screen display there is error which I could not find the answer.

Quote

import os, pygame

os.environ['SDL_FBDEV'] = '/dev/fb0'

pygame.init()

pygame.display.init()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

pygame.error: Unable to open a console terminal

 

 

Posted

@Igor I have checked your github but no success. The problem I found that modules fbcon is not loaded. 

When I tried "sudo modprobe fbcon" it return:

modprobe: FATAL: Module fbcon not found in directory /lib/modules/4.19.13-sunxi64

PS: I rechecked and fbcon folder still in /sys/class/graphics and while I add fbtft to /dev/fb0. 

I still don't know why when I set SDL_FBDEV to /dev/fb0 I still get the error.

Posted

@Igor I double checked my script and made a mistake about fbtft. After followed @martinayotte, the screen changed to black (not fully black), and /dev/fb0 appeared. So I thought that initialized ok, but actually not ok.

The working script should be:

sudo modprobe fbtft_device name=piscreen gpios=reset:79,dc:78 speed=16000000

The important parts here are choosing right gpios (reset & dc) and speed (for color correction).

After this step, the others are almost the same with Rpi.  (Pygame should define SDL_FBDEV=/dev/fb0 & SDL_VIDEODRIVER=fbcon ???)

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

Important Information

Terms of Use - Privacy Policy - Guidelines