513 views|4 replies

8

Posts

1

Resources
The OP
 

[2024 DigiKey Creative Competition] 1. Raspberry Pi 5 drives ILI9488 image display [Copy link]

 This post was last edited by cszzlsw on 2024-9-22 00:33

1. Introduction

I actually received the RaspberryPi5 kit, 8G version, and I was so happy to get it. Since then, I have started to tinker with it. Actually, I have been wondering where to start. Later, I found that I had a screen that was compatible with the Raspberry Pi pins, so I turned on the screen first.

2. Preparation

To light up the screen, you need to prepare: Raspberry Pi (use the official power supply, and if possible, add a heat sink), SD card (32G or above is recommended for later data storage), touch screen (using ILI9488 driver chip, SPI protocol, 320*480 resolution, ft6236 touch chip, I2C protocol), Raspberry Pi 5 dedicated serial cable and appropriate adapter cable. After assembly, it looks like this:

The radiator here is an official one bought from Taobao. It can automatically adjust the speed according to the chip temperature, and its main purpose is to save energy and reduce emissions.

3. Download and burn the system

There is actually nothing much to say about this step. Just refer to some online posts and use the official tool (RapberryPi Imager) to download the official system and burn the firmware to the SD card.

In the official tool, you can configure the WIFI name, password, account name and password that you need to connect to, which is very convenient.

Then after the system starts, it will automatically connect to the corresponding wifi (or use a network cable), and you can use the raspi-config command to direct the system log to the serial port, so you don't have to wait for the system to connect to the network every time. At the same time, you need to buy a serial port cable compatible with the official interface of Raspberry Pi 5 online, and then you can have fun.

4. Touch screen pin definition:

First, check out the pinout of the Raspberry Pi:

My screen model: ILI9488, touch chip is FT6236, wiring is:

BCM Code Function

10 MOSI

9 MISO

11 SCLK

24 DC

25 BL

16 RESET

2 SDA

3 SCL

11 CTP_INT

5. Operation steps

5.1 Enable SPI

Add to the file /boot/firmware/config.txt: (the old system is /boot/config.txt, the new system has been modified)

dtparam=spi=on

5.2 Add corresponding driver and compile firmware

  • Download the Linux system of Raspberry Pi and transplant the fb_ili9488.c file

URL:

链接已隐藏,如需查看请登录或者注册

After downloading, transfer it to the Raspberry Pi's file system, unzip it, and then enter the corresponding directory

  1. make bcm2712_defconfig
  2. make menuconfig
  3. Select fb and set it to true
  4. make -j4 zImage : can compile system firmware, deprecated, directly make to generate all content
  5. make -j4 modules : compile modules
  6. make dtbs : compile device tree
  7. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/opt/install/rpi-4.9 compile kernel image
  • Modification of ili9488 code in fbtft
  1. Copy the fb_ili9486.c file in linux-stable_20240529/drivers/staging/fbtft/ to fb_ili9488.c and add relevant code

You also need to modify the fbtft.h file and fbtft-core.c file

Modify the Makefile file synchronously

Also add compilation to menuconfig

2. After the file is created, start the compilation make, and the newly compiled fb_ili9488.ko and fbtft.ko appear in drivers/staging/fbtft

3. Use xz -zk drivers/staging/fbtft/fbtft.ko file to generate fbtft.ko.xz file, and then use cp command to copy ko and ko.xz files to /lib/modules/6.6.31+rpt-rpi-2712/kernel/drivers/staging/fbtft, the same for fb_ili9488

4. Note that the generation of the mod requires modifying the CONFIG_LOCALVERSION content in .config to: "+rpt-rpi-2712"

5.3 Modify the device tree

  1. Open the /root/linux-stable_20240529/arch/arm64/boot/dts/overlays/fbtft-overlay.dts file and find the location of ili9341:
  2. Change to ili9488 related content, and add the properties of the device tree:

  3. Then use make dtbs to generate the device tree
  4. Copy the generated fbtft.dtbo to /boot/overlays
  5. Then modify /boot/firmware/config.txt and add dt content
  6. After booting, you can see the relevant log in dmesg:
  7. If the connection is correct, the screen should light up The effect is as follows:
  8. Watch the video to experience the startup process
This post is from DigiKey Technology Zone

Latest reply

I feel that those who can modify Linux are all big guys~  Details Published on 2024-9-23 20:56
 
 

8

Posts

1

Resources
2
 
What about videos?
This post is from DigiKey Technology Zone
 
 
 

6609

Posts

0

Resources
3
 

The video gives you a feel of the startup process. I probably forgot to upload the video.

This post is from DigiKey Technology Zone
 
 
 

8

Posts

1

Resources
4
 

The video was uploaded but I don't know why it's not showing

This post is from DigiKey Technology Zone
 
 
 

6792

Posts

2

Resources
5
 
I feel that those who can modify Linux are all big guys~
This post is from DigiKey Technology Zone
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list