How to activate the 3.2inch LCD shield with your ODROID-XU4
- To use the SPI, you first need to update the kernel version to “3.10.83” or higher.
- target
sudo apt update && sudo apt dist-upgrade
- “ads7846” module driver must be in the output of “lsmod” command.
- You need a HDMI connection or a Serial console connection to follow below instruction.
- Operation confirmed with testing in our Ubuntu 16.04 LTS (v2.0)
How to enable driver (Only Ubuntu 16.04 or higher is required)
Edit /etc/modprobe.d/blacklist-odroid.conf to comment out following three ines.
blacklist spidev blacklist spi_s3c64xx blacklist ads7846
Reboot.
- target
reboot
Check your SPI node.
- target
ls /dev/spidev*
Configuring framebuffer
0. Update your Kernel
- target
sudo apt update && sudo apt dist-upgrade
1. Insert modules
- target
sudo modprobe fbtft_device name=odroid32 rotate=90 busnum=1 gpios=reset:21,dc:22 speed=32000000 cs=0
You will have a new frame buffer /dev/fbX.
You should check the value of X and replace X to a checked number.
Find a ili9340 framebuffer node
- target
ls /dev/fb* /dev/fbX cat /sys/class/graphics/fbX/name fb_ili9340
Run Xwindow
0. Insert modules
- target
sudo modprobe fbtft_device name=odroid32 rotate=90 busnum=1 gpios=reset:21,dc:22 speed=32000000 cs=0
1. Create a new config file
- target
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old sudo rm -f /etc/X11/xorg.conf.d/exynos.conf sudo vi /etc/X11/xorg.conf
Add following lines in “/etc/X11/xorg.conf” file.
Section "Device" Identifier "fbdev" Driver "fbdev" Option "fbdev" "/dev/fbX" EndSection
2. Run
- target
/etc/init.d/lightdm start
Run Console
0. Insert modules
- target
sudo modprobe fbtft_device name=odroid32 rotate=90 busnum=1 gpios=reset:21,dc:22 speed=32000000 cs=0
1. Run con2fbmap
con2fbmap <console> <framebuffer>
- target
sudo apt-get install fbset sudo con2fbmap 2 0
Press Keyboard Ctrl + Alt + F2 to change the console screen of FB1
There will be a login screen on the LCD screen.
Touch Calibration
- To use the Touch Calibration, you first need to update the kernel version to “3.10.96-86” or higher.
- target
sudo apt update && sudo apt dist-upgrade
0. The xinput-calibrator pakage download
- target
sudo apt-get install xinput-calibrator
1. Remove old calibration data.
- target
sudo rm /etc/X11/xorg.conf.d/99-calibration.conf
2. Login
You need a login to get DISPLAY.
If you want auto login.
Edit /etc/lightdm/lightdm.conf file to enable auto-login: (password: odroid)
- target
odroid@odroid:~$ sudo vi /etc/lightdm/lightdm.conf [sudo] password for odroid: odroid@odroid:~$ cat /etc/lightdm/lightdm.conf [SeatDefaults] autologin-user=odroid autologin-user-timeout=0 odroid@odroid:~$
3. Check your DISPLAY
- target
odroid@odroid:~$ w 09:13:31 up 35 min, 2 users, load average: 0.09, 0.08, 0.12 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT odroid ttySAC2 08:42 2.00s 0.75s 0.02s w odroid :0 :0 05:39 ?xdm? 1:15 0.63s mate-session odroid@odroid:~$
4. Run calibrator
- target
sudo DISPLAY=:0 xinput_calibrator
Follow the directions on your screen.
then, you will get something like
Copy to “/etc/X11/xorg.conf.d/99-calibration.conf”
- target
sudo mkdir /etc/X11/xorg.conf.d/ sudo vi /etc/X11/xorg.conf.d/99-calibration.conf
5. Reboot
- target
sudo reboot