Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
12
Return to list New
Author: karthik

Orangepi zero + TFT LCD + GUI Desktop

[Copy link]

1

Threads

9

Posts

81

Credits

Registered member

Rank: 2

Credits
81
 Author| Post time 2017-8-23 13:05:57 | Show all posts
Hi,
I am using orangepizero with Armbian_5.30_Orangepizero_Ubuntu_xenial_default_3.4.113 ubuntu server image. I have also installed mate desktop environment to enable my desktop on my waveshare 3.2 LCD. Now the issue is my desktop freezes in my LCD couple of minutes after boot.

I have used heatsink with fan, armbianmonitor show operating temp 40-50 deg cel and cpu load when i run any application 30-40%.

I observed one thing  when my desktop freezes in my LCD, i can access my orangepi with vnc as separate session i can perform any task flawlessly without any freeze.

Any help here?

1

Threads

9

Posts

81

Credits

Registered member

Rank: 2

Credits
81
 Author| Post time 2017-8-25 14:01:16 | Show all posts
Any suggestions please?

0

Threads

1

Posts

24

Credits

Novice

Rank: 1

Credits
24
Post time 2017-12-26 23:13:10 | Show all posts
karthik replied at 2017-7-25 14:53
Hi,

As suggested I have followed the following steps:

Hi, How to configure script.fex?
I have Waveshare 3.5 TFT LCD.
But I don't know which chip used to drive the LCD screen.
Can you give me script.bin which your created.

87

Threads

242

Posts

1405

Credits

Gold member

Rank: 6Rank: 6

Credits
1405
Post time 2018-1-4 06:16:59 | Show all posts
Edited by 8bitbacon at 2018-1-4 06:23

Theres a file that's missing apparently theres like a driver you call that I tried but the file wasn't there,, maybe you can take the driver from another pi with more tft support like the rp
I hope you are using the h2 the h3 one freezes on me when I use the wifi, just don't use wifi for h3 and it wont freeze

5

Threads

33

Posts

145

Credits

Registered member

Rank: 2

Credits
145
Post time 2018-12-23 02:38:14 | Show all posts
Random tips :
- orange pi zero all have 2 SPI bus: one in the main GPIO port, and one for the flash on the back side. If you don't have the plus model, you can unsolder the FLASH and use the port. FLASH is port 1, so, GPIO is port 1. This is very important when you follow tutorials written for other opis
- before you start following a tutorial, you need to understand which kernel you are using. If the turial is written after jan 2017, and mentions adding an overlay in armbianEnv.txt, then it's for kernel 4; if the tuto is before feb 2018, and does not mention altering armbianEnv.txt for SPI compatibility, author is using kernel 3. This is critical.
- I got adressable LEDs working on both kernels, 3 and 4. Easier on 4.
- SPI LCDs work only on kernel 3; I have spend days on kernel 4, just forget them; drivers exist, but they are broken.
- con2fbmap is required only on kernel 3
- to get X working, you need to create /etc/X11/xorg.conf.d/99-fbturbo.conf
- check your FB number with a command like this: dmesg | grep ili | grep graphics | grep -i fb . I have seen people using 0, 1 and 8.

5

Threads

33

Posts

145

Credits

Registered member

Rank: 2

Credits
145
Post time 2019-4-27 18:32:27 | Show all posts
nopnop2002 replied at 2017-7-28 21:47
/dev/spidev0.0 is used in TFT.

OPI is different from RPI, and there is only 1 of SPI.

Nope, half opis have only one SPI, but inparticular, opi0 has TWO SPIs; and some other models have even more (I believe at least one opi has 3).

The SPI in GPIO is SPI1 SPI0 is the one used for the 4MB flash on the back of the board. Most peoploe who don't use this chip can ulsoder it, and gain a secong GPIO. This is very usefull when you want to use a SPI LCD, plus some 1W probes (what is usually impossible to do with most other opis), or 1wire + adressable LEDs.

For now, I am also facing " Error connecting to SPI dev: /dev/spidev0.0". I already solved this in the past, but i forgot how; I may find a solution tonight, when a friend gives me access to the project. Also, note that SPI access is COMPLETELY different between kernels 3 and kernels 4. ADS7846-X11 is said to work with kernels 3.4.112, but I failed to get ADS7846/XPI2046 work on kernel 3.4.113; I am now trying on 4.14.18-sunxi. I will come back when I have more to say.

5

Threads

33

Posts

145

Credits

Registered member

Rank: 2

Credits
145
Post time 2019-4-27 20:17:19 | Show all posts
Edited by DoubleHP at 2019-4-27 20:21

So ... tried https://github.com/Tomasz-Mankowski/ADS7846-X11-daemon . I had various issues with kernels 3.4.113, so now tring on kernel 4.

  1. # cat /etc/armbian-release
  2. # PLEASE DO NOT EDIT THIS FILE
  3. BOARD=orangepizero
  4. BOARD_NAME="Orange Pi Zero"
  5. VERSION=5.35
  6. LINUXFAMILY=sunxi
  7. BRANCH=next
  8. ARCH=arm
  9. IMAGE_TYPE=user-built
  10. BOARD_TYPE=conf
  11. INITRD_ARCH=arm
  12. KERNEL_IMAGE_TYPE=zImage

  13. # uname -a
  14. Linux MyHost 4.13.16-sunxi #20 SMP Fri Nov 24 19:50:07 CET 2017 armv7l armv7l armv7l GNU/Linux

  15. # cat /boot/armbianEnv.txt
  16. verbosity=1
  17. logo=disabled
  18. console=both
  19. disp_mode=1920x1080p60
  20. overlay_prefix=sun8i-h3
  21. overlays=pwm spi-jedec-nor spi-spidev uart1 usbhost2 usbhost3
  22. param_spidev_spi_bus=1
  23. param_spidev_max_freq=100000000
  24. rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374
  25. rootfstype=ext4

  26. usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

  27. # file -s /dev/spidev1.0
  28. /dev/spidev1.0: ERROR: cannot read `/dev/spidev1.0' (Message too long)

  29. # cat /etc/modules
  30. g_serial
Copy the Code


so ... on this machine, spidev node exists.

A machine that does not have LCD.

An other opi0 with LCD:

  1. reboot
  2. #  cat /boot/armbianEnv.txt
  3. verbosity=1
  4. logo=disabled
  5. console=both
  6. disp_mode=1920x1080p60
  7. overlay_prefix=sun8i-h3
  8. overlays=usbhost2 usbhost3 uart1 spi-spidev pwm spi-jedec-nor
  9. # spi-jedec-nor
  10. param_spidev_spi_bus=1
  11. param_spidev_max_freq=100000000
  12. rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374
  13. rootfstype=ext4
  14. user_overlays=myili9431
  15. usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
  16. # file -s /dev/spidev1.0
  17. /dev/spidev1.0: ERROR: cannot read `/dev/spidev1.0' (Message too long)
  18. # modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1
  19. # file -s /dev/spidev1.0
  20. /dev/spidev1.0: cannot open `/dev/spidev1.0' (No such file or directory)
Copy the Code


This is a huge lead: maybe "spi-spidev pwm spi-jedec-nor" are optionnal in the "overlays" line, but ... "user_overlays=myili9431" does not prevent creating the spidev node. After boot, it does exist. It's modprobe that destroys it, when loading fbtft_device.

While I am here, note that param_spidev_spi_bus=1 is required on opi0 because bus0 is the 4MB flash; the LCD is plugged on the main GPIO which is SPI1. So, don't loose hours playing with spi0, feeling happy that you at last have that file, but cant understand why ./ADS7846-X11 is still unhappy with it. This can be worked around by playing with file name.

Just for the fun, I have tried this:
  1. # cat /boot/armbianEnv.txt
  2. verbosity=1
  3. logo=disabled
  4. console=both
  5. disp_mode=1920x1080p60
  6. overlay_prefix=sun8i-h3
  7. overlays=usbhost2 usbhost3 uart1 spi-spidev pwm spi-jedec-nor
  8. # spi-jedec-nor
  9. param_spidev_spi_bus=0
  10. param_spidev_max_freq=100000000
  11. rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374
  12. rootfstype=ext4
  13. user_overlays=myili9431
  14. usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
  15. # file -s /dev/spidev0.0
  16. /dev/spidev0.0: ERROR: cannot read `/dev/spidev0.0' (Message too long)
  17. # modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1
  18. # file -s /dev/spidev0.0
  19. /dev/spidev0.0: ERROR: cannot read `/dev/spidev0.0' (Message too long)
Copy the Code


but, this is pointless. It just prooves that the FB driver knows where the LCD is. SPI0 is the right bus for most other opis. For 0s, we want to use SPI1 !!!

I After some tests, I have reduced my /boot/armbianEnv.txt overlays line to "usbhost2 usbhost3 uart1".

Now, lets try the touch layer itself. To be able to play with the thing, we need to:
- NOT modprobe FB
- rename SPI1 into SPI0
- launch X; since it can not have FB, I will try VNC.

I won't give all details; but in short:
  1. # tightvncserver :0
  2. # vncviewer localhost:0
  3. # cd ADS7846-X11-daemon/
  4. # ./ADS7846-X11 --cal
  5. ./ADS7846-X11: Error connecting to SPI dev: /dev/spidev0.0
  6. All closed...
  7. # cd /dev/
  8. # ls -lha spi*
  9. crw------- 1 root root 153, 0 Apr 27 13:38 spidev1.0
  10. # ln -s spidev1.0 spidev0.0
  11. # cd /root/ADS7846-X11-daemon/
  12. # ./ADS7846-X11 --cal
  13. ./ADS7846-X11: Calibrating...

  14. Calibration time exceeded
  15. All closed...
Copy the Code


I have tried to wait 5s and 1mn before touching the LCD; each time, the app have been waiting quietly, asking me to tap on the cross. As soon as I touch the LCD, at any place, I have a 5s decounter, then it closes. So ... the app can not calibrate, BUT, it detects that I tap once. I have no idea about the orientation, resolution, but the app is clearly doing things almost correctly: it feels my touch. Meaning, many things work fine.

Let's try again:

  1. # tightvncserver -geometry 480x320 :0
  2. # vncviewer localhost:0
  3. # ./ADS7846-X11 --cal
  4. ./ADS7846-X11: Calibrating...

  5. Calibration time exceeded
  6. All closed...
Copy the Code



Not better. I have tried to simultaneously touch LCD and click in VNC, but it's still not happy. Any way, now, we have a lead.

If it had worked, the next step would have been to unsolder the 4MB chip, and wire directly the ADS/XPT chip to bus SPI0. It would probably imply to cut some stripes, because the LCD shares the same MISO/MOSI lines for the ADS/XPT and LCD driver (ILI chip). But, it's the best I can think about, to get a touch screen fully working with a 4.x kernel.

Running out of ideas for today.
12
Return to list New
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-8-25 23:53 GMT+8 , Processed in 0.029534 second(s), 21 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list