fbcp-ili9341
fbcp-ili9341 copied to clipboard
Working on original Pi model B with Adafruit 2.8 inch resistive screen
Just a note that I have got your tool working on my original (2011.12) Pi Model B. Thank you for putting all the effort in to making it work!
Test System
- Original (2011.12) Pi Model B (512MB)
- Adafruit 2.8" 320x240 TFT w/ Touch screen for Raspberry Pi
- Raspbian Buster, kernel 5.10.103
- xfce window manager
Video Modes
Here are the video modes I've tested, along with the applicable lines from /boot/config.txt
.
512x342 (for Mac Plus/Mini vMac), 10 fps
gpu_mem=32 # optional, just to free up memory
hdmi_cvt=512 342 10 1 0 0 0 # [width] [height] [framerate] [aspect] [margins] [interlace] [rb]
hdmi_group=2
hdmi_mode=87
640x480, 10 fps
gpu_mem=32 # optional, just to free up memory
hdmi_cvt=640 480 10 1 0 0 0 # [width] [height] [framerate] [aspect] [margins] [interlace] [rb]
hdmi_group=2
hdmi_mode=87
800x600
hdmi_group=2
hdmi_mode=9
1024x768
hdmi_group=2
hdmi_mode=16
Build options
Here are the options I used:
# DMA
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DADAFRUIT_ILI9341_PITFT=ON \
-DBACKLIGHT_CONTROL=OFF -DSINGLE_CORE_BOARD=ON \
-DARMV6Z=ON -DSTATISTICS=0 \
-DUSE_DMA_TRANSFERS=ON -DDMA_RX_CHANNEL=4
# Non-DMA
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DADAFRUIT_ILI9341_PITFT=ON \
-DBACKLIGHT_CONTROL=OFF -DSINGLE_CORE_BOARD=ON \
-DARMV6Z=ON -DSTATISTICS=0 -DUSE_DMA_TRANSFERS=OFF
On my machine, the the default RX DMA channel was used, and 4 was the next channel that worked.
I haven't tried backlight control yet, that the reason for -DBACKLIGHT_CONTROL=OFF
.
Installation Notes
I used the systemd install instructions, but needed to do a couple of things extra:
- symlink "/etc/systemd/system/fbcp-ili9341.service" in to "/etc/systemd/system/multi-user.target.wants"
-
cd /etc/systemd/system/multi-user.target.wants; sudo ln -s /etc/systemd/system/fbcp-ili9341.service
-
- install the executable in the system path
-
sudo install -m 0755 -t /usr/local/sbin fbcp-ili9341
-
After those two extra steps, fbcp started up properly on boot.
CPU Usage
I watched the CPU usage in 640x480@10fps for one minute with an static screen. Here is the CPU usage I recorded:
- With DMA: 1.3-2.9% cpu usage
- Without DMA: 3.6-5.9% cpu usage
Even without DMA, the CPU usage is 1/3rd of Notro/fbtft with the same resolution and fps! Nice work!